chore(API): apiResponse annotation for type return (#13088)

This commit is contained in:
YannC
2025-11-20 09:47:32 +01:00
committed by GitHub
parent 0ed2b0a53c
commit 7fa14eb3f5
2 changed files with 4 additions and 3 deletions

View File

@@ -483,6 +483,7 @@ public class ExecutionController {
@ExecuteOn(TaskExecutors.IO)
@Post(uri = "/webhook/{namespace}/{id}/{key}")
@Operation(tags = {"Executions"}, summary = "Trigger a new execution by POST webhook trigger")
@ApiResponse(responseCode = "200", description = "On success", content = {@Content(schema = @Schema(implementation = WebhookResponse.class))})
@SingleResult
public Publisher<HttpResponse<?>> triggerExecutionByPostWebhook(
@Parameter(description = "The flow namespace") @PathVariable String namespace,
@@ -496,6 +497,7 @@ public class ExecutionController {
@ExecuteOn(TaskExecutors.IO)
@Get(uri = "/webhook/{namespace}/{id}/{key}")
@Operation(tags = {"Executions"}, summary = "Trigger a new execution by GET webhook trigger")
@ApiResponse(responseCode = "200", description = "On success", content = {@Content(schema = @Schema(implementation = WebhookResponse.class))})
@SingleResult
public Publisher<HttpResponse<?>> triggerExecutionByGetWebhook(
@Parameter(description = "The flow namespace") @PathVariable String namespace,
@@ -509,6 +511,7 @@ public class ExecutionController {
@ExecuteOn(TaskExecutors.IO)
@Put(uri = "/webhook/{namespace}/{id}/{key}")
@Operation(tags = {"Executions"}, summary = "Trigger a new execution by PUT webhook trigger")
@ApiResponse(responseCode = "200", description = "On success", content = {@Content(schema = @Schema(implementation = WebhookResponse.class))})
@SingleResult
public Publisher<HttpResponse<?>> triggerExecutionByPutWebhook(
@Parameter(description = "The flow namespace") @PathVariable String namespace,

View File

@@ -163,9 +163,7 @@ public class FlowController {
@ExecuteOn(TaskExecutors.IO)
@Get(uri = "{namespace}/{id}")
@Operation(tags = {"Flows"}, summary = "Get a flow")
@Schema(
implementation = FlowWithSource.class
)
@ApiResponse(responseCode = "200", description = "On success", content = {@Content(schema = @Schema(implementation = FlowWithSource.class))})
//FIXME we return Object instead of Flow as Micronaut, since 4, has an issue with subtypes serialization, see https://github.com/micronaut-projects/micronaut-core/issues/10294.
public Object getFlow(
@Parameter(description = "The flow namespace") @PathVariable String namespace,