diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/AttemptApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/AttemptApiController.java index c22fb95fd33e..d50e731d5e8d 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/AttemptApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/AttemptApiController.java @@ -9,12 +9,15 @@ import io.airbyte.api.model.generated.SaveStatsRequestBody; import io.airbyte.api.model.generated.SetWorkflowInAttemptRequestBody; import io.airbyte.server.handlers.AttemptHandler; +import io.micronaut.context.annotation.Requires; import io.micronaut.http.MediaType; import io.micronaut.http.annotation.Body; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; @Controller("/api/v1/attempt/") +@Requires(property = "airbyte.deployment-mode", + value = "OSS") public class AttemptApiController implements AttemptApi { private final AttemptHandler attemptHandler; 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 0992b878f470..f0de78d03d31 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 @@ -17,12 +17,15 @@ import io.airbyte.server.handlers.OperationsHandler; import io.airbyte.server.handlers.SchedulerHandler; import io.micronaut.context.annotation.Context; +import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Body; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; @Controller("/api/v1/connections") @Context() +@Requires(property = "airbyte.deployment-mode", + value = "OSS") public class ConnectionApiController implements ConnectionApi { private final ConnectionsHandler connectionsHandler; 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 208e39e1fbfd..6c16cec4a596 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 @@ -16,12 +16,15 @@ import io.airbyte.api.model.generated.WorkspaceIdRequestBody; import io.airbyte.server.handlers.DestinationHandler; import io.airbyte.server.handlers.SchedulerHandler; +import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Body; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; import lombok.AllArgsConstructor; @Controller("/api/v1/destinations") +@Requires(property = "airbyte.deployment-mode", + value = "OSS") @AllArgsConstructor public class DestinationApiController implements DestinationApi { 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 9ae9e4ff53f1..54409d281021 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 @@ -16,10 +16,13 @@ import io.airbyte.api.model.generated.WorkspaceIdRequestBody; import io.airbyte.server.handlers.DestinationDefinitionsHandler; import io.micronaut.context.annotation.Context; +import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; @Controller("/api/v1/destination_definitions") +@Requires(property = "airbyte.deployment-mode", + value = "OSS") @Context public class DestinationDefinitionApiController implements DestinationDefinitionApi { diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationDefinitionSpecificationApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationDefinitionSpecificationApiController.java index 6d1ce0fcb3f3..54492c4a905f 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationDefinitionSpecificationApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationDefinitionSpecificationApiController.java @@ -8,10 +8,13 @@ import io.airbyte.api.model.generated.DestinationDefinitionIdWithWorkspaceId; import io.airbyte.api.model.generated.DestinationDefinitionSpecificationRead; import io.airbyte.server.handlers.SchedulerHandler; +import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; @Controller("/api/v1/destination_definition_specifications") +@Requires(property = "airbyte.deployment-mode", + value = "OSS") public class DestinationDefinitionSpecificationApiController implements DestinationDefinitionSpecificationApi { private final SchedulerHandler schedulerHandler; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationOauthApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationOauthApiController.java index 966d6561f810..33318e14efcb 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationOauthApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationOauthApiController.java @@ -11,11 +11,14 @@ import io.airbyte.api.model.generated.SetInstancewideDestinationOauthParamsRequestBody; import io.airbyte.server.handlers.OAuthHandler; import io.micronaut.context.annotation.Context; +import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; import java.util.Map; @Controller("/api/v1/destination_oauths") +@Requires(property = "airbyte.deployment-mode", + value = "OSS") @Context public class DestinationOauthApiController implements DestinationOauthApi { diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/HealthApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/HealthApiController.java index 6acb5cd39cd2..a5b46d39742b 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/HealthApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/HealthApiController.java @@ -7,11 +7,14 @@ import io.airbyte.api.generated.HealthApi; import io.airbyte.api.model.generated.HealthCheckRead; import io.airbyte.server.handlers.HealthCheckHandler; +import io.micronaut.context.annotation.Requires; import io.micronaut.http.MediaType; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Get; @Controller("/api/v1/health") +@Requires(property = "airbyte.deployment-mode", + value = "OSS") public class HealthApiController implements HealthApi { private final HealthCheckHandler healthCheckHandler; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/JobsApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/JobsApiController.java index 05ff3a2ae8ca..f09d331038a2 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/JobsApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/JobsApiController.java @@ -15,10 +15,13 @@ import io.airbyte.server.handlers.JobHistoryHandler; import io.airbyte.server.handlers.SchedulerHandler; import io.micronaut.context.annotation.Context; +import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; @Controller("/api/v1/jobs") +@Requires(property = "airbyte.deployment-mode", + value = "OSS") @Context public class JobsApiController implements JobsApi { diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/LogsApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/LogsApiController.java index f3c43fdfdf32..126ed8202693 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/LogsApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/LogsApiController.java @@ -8,11 +8,14 @@ import io.airbyte.api.model.generated.LogsRequestBody; import io.airbyte.server.handlers.LogsHandler; import io.micronaut.context.annotation.Context; +import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; import java.io.File; @Controller("/api/v1/logs") +@Requires(property = "airbyte.deployment-mode", + value = "OSS") @Context public class LogsApiController implements LogsApi { diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/NotFoundController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/NotFoundController.java index b898261dac47..a59dea440b05 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/NotFoundController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/NotFoundController.java @@ -4,6 +4,7 @@ package io.airbyte.server.apis; +import io.micronaut.context.annotation.Requires; import io.micronaut.http.HttpRequest; import io.micronaut.http.HttpResponse; import io.micronaut.http.HttpStatus; @@ -15,6 +16,8 @@ * Custom controller that handles global 404 responses for unknown/unmapped paths. */ @Controller("/api/notfound") +@Requires(property = "airbyte.deployment-mode", + value = "OSS") public class NotFoundController { @Error(status = HttpStatus.NOT_FOUND, diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/NotificationsApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/NotificationsApiController.java index 682ab6eb0d08..6af6a1cdf242 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/NotificationsApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/NotificationsApiController.java @@ -8,11 +8,14 @@ import io.airbyte.api.model.generated.Notification; import io.airbyte.api.model.generated.NotificationRead; import io.airbyte.server.handlers.WorkspacesHandler; +import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Body; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; @Controller("/api/v1/notifications/try") +@Requires(property = "airbyte.deployment-mode", + value = "OSS") public class NotificationsApiController implements NotificationsApi { private final WorkspacesHandler workspacesHandler; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/OpenapiApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/OpenapiApiController.java index 8d3ebadb4f62..3aa984d7b2c7 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/OpenapiApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/OpenapiApiController.java @@ -6,11 +6,14 @@ import io.airbyte.api.generated.OpenapiApi; import io.airbyte.server.handlers.OpenApiConfigHandler; +import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Get; import java.io.File; @Controller("/api/v1/openapi") +@Requires(property = "airbyte.deployment-mode", + value = "OSS") public class OpenapiApiController implements OpenapiApi { private final OpenApiConfigHandler openApiConfigHandler; 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 10eabb1571fd..a892ca03d47b 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 @@ -14,11 +14,14 @@ import io.airbyte.api.model.generated.OperationUpdate; import io.airbyte.api.model.generated.OperatorConfiguration; import io.airbyte.server.handlers.OperationsHandler; +import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Body; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; @Controller("/api/v1/operations") +@Requires(property = "airbyte.deployment-mode", + value = "OSS") public class OperationApiController implements OperationApi { private final OperationsHandler operationsHandler; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/SchedulerApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/SchedulerApiController.java index 009bec3d816b..53019774aeca 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/SchedulerApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/SchedulerApiController.java @@ -10,10 +10,13 @@ import io.airbyte.api.model.generated.SourceCoreConfig; import io.airbyte.api.model.generated.SourceDiscoverSchemaRead; import io.airbyte.server.handlers.SchedulerHandler; +import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; @Controller("/api/v1/scheduler") +@Requires(property = "airbyte.deployment-mode", + value = "OSS") public class SchedulerApiController implements SchedulerApi { private final SchedulerHandler schedulerHandler; 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 4befc0806e5d..64cf7c58dfd6 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 @@ -19,10 +19,13 @@ import io.airbyte.api.model.generated.WorkspaceIdRequestBody; import io.airbyte.server.handlers.SchedulerHandler; import io.airbyte.server.handlers.SourceHandler; +import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; @Controller("/api/v1/sources") +@Requires(property = "airbyte.deployment-mode", + value = "OSS") public class SourceApiController implements SourceApi { private final SchedulerHandler schedulerHandler; 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 ccfd35f41696..71222c7873c2 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 @@ -16,10 +16,13 @@ import io.airbyte.api.model.generated.WorkspaceIdRequestBody; import io.airbyte.server.handlers.SourceDefinitionsHandler; import io.micronaut.context.annotation.Context; +import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; @Controller("/api/v1/source_definitions") +@Requires(property = "airbyte.deployment-mode", + value = "OSS") @Context public class SourceDefinitionApiController implements SourceDefinitionApi { diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/SourceDefinitionSpecificationApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/SourceDefinitionSpecificationApiController.java index 2cae2b33f1f1..590f7340b61b 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/SourceDefinitionSpecificationApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/SourceDefinitionSpecificationApiController.java @@ -8,10 +8,13 @@ import io.airbyte.api.model.generated.SourceDefinitionIdWithWorkspaceId; import io.airbyte.api.model.generated.SourceDefinitionSpecificationRead; import io.airbyte.server.handlers.SchedulerHandler; +import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; @Controller("/api/v1/source_definition_specifications") +@Requires(property = "airbyte.deployment-mode", + value = "OSS") public class SourceDefinitionSpecificationApiController implements SourceDefinitionSpecificationApi { private final SchedulerHandler schedulerHandler; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/SourceOauthApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/SourceOauthApiController.java index 9d57cf3c8798..2bba632cf638 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/SourceOauthApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/SourceOauthApiController.java @@ -10,12 +10,15 @@ import io.airbyte.api.model.generated.SetInstancewideSourceOauthParamsRequestBody; import io.airbyte.api.model.generated.SourceOauthConsentRequest; import io.airbyte.server.handlers.OAuthHandler; +import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Body; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; import java.util.Map; @Controller("/api/v1/source_oauths") +@Requires(property = "airbyte.deployment-mode", + value = "OSS") public class SourceOauthApiController implements SourceOauthApi { private final OAuthHandler oAuthHandler; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/StateApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/StateApiController.java index 0692d4f475ba..b1b62373aaa1 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/StateApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/StateApiController.java @@ -9,10 +9,13 @@ import io.airbyte.api.model.generated.ConnectionState; import io.airbyte.api.model.generated.ConnectionStateCreateOrUpdate; import io.airbyte.server.handlers.StateHandler; +import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; @Controller("/api/v1/state") +@Requires(property = "airbyte.deployment-mode", + value = "OSS") public class StateApiController implements StateApi { private final StateHandler stateHandler; diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/WebBackendApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/WebBackendApiController.java index a31a5cfac73b..ac13e02015c1 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/WebBackendApiController.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/WebBackendApiController.java @@ -20,10 +20,13 @@ import io.airbyte.server.handlers.WebBackendCheckUpdatesHandler; import io.airbyte.server.handlers.WebBackendConnectionsHandler; import io.airbyte.server.handlers.WebBackendGeographiesHandler; +import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; @Controller("/api/v1/web_backend") +@Requires(property = "airbyte.deployment-mode", + value = "OSS") public class WebBackendApiController implements WebBackendApi { private final WebBackendConnectionsHandler webBackendConnectionsHandler; 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 fa4242850d84..14d3fdc90ad8 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 @@ -15,11 +15,14 @@ import io.airbyte.api.model.generated.WorkspaceUpdate; import io.airbyte.api.model.generated.WorkspaceUpdateName; import io.airbyte.server.handlers.WorkspacesHandler; +import io.micronaut.context.annotation.Requires; import io.micronaut.http.annotation.Body; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Post; @Controller("/api/v1/workspaces") +@Requires(property = "airbyte.deployment-mode", + value = "OSS") public class WorkspaceApiController implements WorkspaceApi { private final WorkspacesHandler workspacesHandler;