@ExecuteOn(TaskExecutors.IO)
    @Post(consumes = MediaType.APPLICATION_YAML)
    @Operation(tags = {"Flows"}, summary = "Create a flow from yaml source")
    public HttpResponse<FlowWithSource> create(
        @Parameter(description = "The flow") @Body String flow
    ) throws ConstraintViolationException {
        Flow flowParsed = yamlFlowParser.parse(flow, Flow.class);

        return HttpResponse.ok(doCreate(flowParsed, flow));
    }
@Test
    void updateFlowFromString() throws IOException {
        String flow = generateFlowAsString("updatedFlow","io.kestra.unittest","a");
        Flow assertFlow = parseFlow(flow);

        FlowWithSource result = client.toBlocking().retrieve(POST("/api/v1/flows", flow).contentType(MediaType.APPLICATION_YAML), FlowWithSource.class);

        assertThat(result.getId(), is(assertFlow.getId()));
        assertThat(result.getInputs().getFirst().getId(), is("a"));

        flow = generateFlowAsString("updatedFlow","io.kestra.unittest","b");

        FlowWithSource get = client.toBlocking().retrieve(
            PUT("/api/v1/flows/io.kestra.unittest/updatedFlow", flow).contentType(MediaType.APPLICATION_YAML),
            FlowWithSource.class
        );

        assertThat(get.getId(), is(assertFlow.getId()));
        assertThat(get.getInputs().getFirst().getId(), is("b"));

        String finalFlow = flow;
        HttpClientResponseException e = assertThrows(HttpClientResponseException.class, () -> {
            HttpResponse<Void> response = client.toBlocking().exchange(
                PUT("/api/v1/flows/io.kestra.unittest/" + IdUtils.create(), finalFlow).contentType(MediaType.APPLICATION_YAML)
            );
        });
        assertThat(e.getStatus(), is(NOT_FOUND));
    }