diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/ConnectionApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/ConnectionApiController.java index f61b89e41447..aca38ca5ccec 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/ConnectionApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/ConnectionApiController.java @@ -21,9 +21,11 @@ import io.airbyte.server.handlers.SchedulerHandler; import io.micronaut.context.annotation.Context; import io.micronaut.context.annotation.Requires; +import io.micronaut.http.HttpStatus; import io.micronaut.http.annotation.Body; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; +import io.micronaut.http.annotation.Status; import io.micronaut.security.annotation.Secured; import io.micronaut.security.rules.SecurityRule; @@ -89,6 +91,7 @@ public ConnectionRead getConnection(@Body final ConnectionIdRequestBody connecti @Override @Post(uri = "/delete") + @Status(HttpStatus.NO_CONTENT) @Secured({EDITOR}) public void deleteConnection(@Body final ConnectionIdRequestBody connectionIdRequestBody) { ApiHelper.execute(() -> { diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationApiController.java index 7a20184b0e4d..0c1d5f074faa 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationApiController.java @@ -20,9 +20,11 @@ import io.airbyte.server.handlers.DestinationHandler; import io.airbyte.server.handlers.SchedulerHandler; import io.micronaut.context.annotation.Requires; +import io.micronaut.http.HttpStatus; import io.micronaut.http.annotation.Body; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; +import io.micronaut.http.annotation.Status; import io.micronaut.security.annotation.Secured; import io.micronaut.security.rules.SecurityRule; @@ -70,6 +72,7 @@ public DestinationRead createDestination(@Body final DestinationCreate destinati @Post(uri = "/delete") @Secured({EDITOR}) @Override + @Status(HttpStatus.NO_CONTENT) public void deleteDestination(@Body final DestinationIdRequestBody destinationIdRequestBody) { ApiHelper.execute(() -> { destinationHandler.deleteDestination(destinationIdRequestBody); diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationDefinitionApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationDefinitionApiController.java index ab559f6b3b09..e3796c033c32 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationDefinitionApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationDefinitionApiController.java @@ -22,8 +22,10 @@ import io.airbyte.server.handlers.DestinationDefinitionsHandler; import io.micronaut.context.annotation.Context; import io.micronaut.context.annotation.Requires; +import io.micronaut.http.HttpStatus; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; +import io.micronaut.http.annotation.Status; import io.micronaut.security.annotation.Secured; import io.micronaut.security.rules.SecurityRule; @@ -50,6 +52,7 @@ public DestinationDefinitionRead createCustomDestinationDefinition(final CustomD @Post(uri = "/delete") @Secured({ADMIN}) @Override + @Status(HttpStatus.NO_CONTENT) public void deleteDestinationDefinition(final DestinationDefinitionIdRequestBody destinationDefinitionIdRequestBody) { ApiHelper.execute(() -> { destinationDefinitionsHandler.deleteDestinationDefinition(destinationDefinitionIdRequestBody); diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/OperationApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/OperationApiController.java index 172fbb76e40a..64ac3c337f51 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/OperationApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/OperationApiController.java @@ -19,9 +19,11 @@ import io.airbyte.api.model.generated.OperatorConfiguration; import io.airbyte.server.handlers.OperationsHandler; import io.micronaut.context.annotation.Requires; +import io.micronaut.http.HttpStatus; import io.micronaut.http.annotation.Body; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; +import io.micronaut.http.annotation.Status; import io.micronaut.security.annotation.Secured; import io.micronaut.security.rules.SecurityRule; @@ -54,6 +56,7 @@ public OperationRead createOperation(@Body final OperationCreate operationCreate @Post("/delete") @Secured({EDITOR}) @Override + @Status(HttpStatus.NO_CONTENT) public void deleteOperation(@Body final OperationIdRequestBody operationIdRequestBody) { ApiHelper.execute(() -> { operationsHandler.deleteOperation(operationIdRequestBody); diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/SourceApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/SourceApiController.java index 0c680f742989..c1d5970465ca 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/SourceApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/SourceApiController.java @@ -23,8 +23,10 @@ import io.airbyte.server.handlers.SchedulerHandler; import io.airbyte.server.handlers.SourceHandler; import io.micronaut.context.annotation.Requires; +import io.micronaut.http.HttpStatus; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; +import io.micronaut.http.annotation.Status; import io.micronaut.security.annotation.Secured; import io.micronaut.security.rules.SecurityRule; @@ -72,6 +74,7 @@ public SourceRead createSource(final SourceCreate sourceCreate) { @Post("/delete") @Secured({EDITOR}) @Override + @Status(HttpStatus.NO_CONTENT) public void deleteSource(final SourceIdRequestBody sourceIdRequestBody) { ApiHelper.execute(() -> { sourceHandler.deleteSource(sourceIdRequestBody); diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/SourceDefinitionApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/SourceDefinitionApiController.java index 97a030dc7f70..1dac7ca5b708 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/SourceDefinitionApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/SourceDefinitionApiController.java @@ -22,8 +22,10 @@ import io.airbyte.server.handlers.SourceDefinitionsHandler; import io.micronaut.context.annotation.Context; import io.micronaut.context.annotation.Requires; +import io.micronaut.http.HttpStatus; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; +import io.micronaut.http.annotation.Status; import io.micronaut.security.annotation.Secured; import io.micronaut.security.rules.SecurityRule; @@ -50,6 +52,7 @@ public SourceDefinitionRead createCustomSourceDefinition(final CustomSourceDefin @Post("/delete") @Secured({ADMIN}) @Override + @Status(HttpStatus.NO_CONTENT) public void deleteSourceDefinition(final SourceDefinitionIdRequestBody sourceDefinitionIdRequestBody) { ApiHelper.execute(() -> { sourceDefinitionsHandler.deleteSourceDefinition(sourceDefinitionIdRequestBody); @@ -109,6 +112,7 @@ public SourceDefinitionReadList listSourceDefinitionsForWorkspace(final Workspac @Post("/revoke_definition") @Secured({ADMIN}) @Override + @Status(HttpStatus.NO_CONTENT) public void revokeSourceDefinitionFromWorkspace(final SourceDefinitionIdWithWorkspaceId sourceDefinitionIdWithWorkspaceId) { ApiHelper.execute(() -> { sourceDefinitionsHandler.revokeSourceDefinitionFromWorkspace(sourceDefinitionIdWithWorkspaceId); diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/WorkspaceApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/WorkspaceApiController.java index 1942a4d03afb..c270ce286ccf 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/WorkspaceApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/WorkspaceApiController.java @@ -19,9 +19,11 @@ import io.airbyte.api.model.generated.WorkspaceUpdateName; import io.airbyte.server.handlers.WorkspacesHandler; import io.micronaut.context.annotation.Requires; +import io.micronaut.http.HttpStatus; import io.micronaut.http.annotation.Body; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; +import io.micronaut.http.annotation.Status; import io.micronaut.security.annotation.Secured; import io.micronaut.security.rules.SecurityRule; @@ -48,6 +50,7 @@ public WorkspaceRead createWorkspace(@Body final WorkspaceCreate workspaceCreate @Post("/delete") @Secured({OWNER}) @Override + @Status(HttpStatus.NO_CONTENT) public void deleteWorkspace(@Body final WorkspaceIdRequestBody workspaceIdRequestBody) { ApiHelper.execute(() -> { workspacesHandler.deleteWorkspace(workspaceIdRequestBody);