From b0c7c588dcbdc085d01cedf160cc02aa31589cc0 Mon Sep 17 00:00:00 2001 From: Pierre Gerbelot Date: Thu, 16 Nov 2023 12:43:28 +0100 Subject: [PATCH] feat: add import to variable --- src/openapi.yaml | 2 ++ src/resources/variable/VariablesImport.yaml | 40 +++++++++++++++++++++ src/schemas/enums/APIVariableScope.yaml | 1 + 3 files changed, 43 insertions(+) create mode 100644 src/resources/variable/VariablesImport.yaml diff --git a/src/openapi.yaml b/src/openapi.yaml index 1505a6bf..c1da9037 100644 --- a/src/openapi.yaml +++ b/src/openapi.yaml @@ -818,6 +818,8 @@ paths: $ref: './resources/variable/VariableOverride.yaml' /variable/{variableId}: $ref: './resources/variable/VariableRef.yaml' + /variable/import: + $ref: './resources/variable/VariablesImport.yaml' components: parameters: $ref: './parameters/_index.yaml' diff --git a/src/resources/variable/VariablesImport.yaml b/src/resources/variable/VariablesImport.yaml new file mode 100644 index 00000000..5b39f31d --- /dev/null +++ b/src/resources/variable/VariablesImport.yaml @@ -0,0 +1,40 @@ +post: + summary: 'Import variables' + description: Import environment variables in a defined scope, with a defined visibility. + operationId: importEnvironmentVariable + parameters: + - in: query + name: service_id + required: true + schema: + type: string + format: uuid + description: service id + - in: query + name: scope + required: true + schema: + $ref: '../../schemas/enums/APIVariableScope.yaml' + description: scope + tags: + - Variable Main Calls + requestBody: + content: + application/json: + schema: + $ref: '../../schemas/VariableImportRequest.yaml' + responses: + '201': + description: 'Import environment variables' + content: + application/json: + schema: + $ref: '../../schemas/VariableImportResponse.yaml' + '400': + $ref: '../../responses/BadRequest.yaml' + '401': + $ref: '../../responses/NotAuthorized.yaml' + '403': + $ref: '../../responses/Forbidden.yaml' + '404': + $ref: '../../responses/NotFound.yaml' diff --git a/src/schemas/enums/APIVariableScope.yaml b/src/schemas/enums/APIVariableScope.yaml index 9ca4b77d..d625f2c7 100644 --- a/src/schemas/enums/APIVariableScope.yaml +++ b/src/schemas/enums/APIVariableScope.yaml @@ -6,3 +6,4 @@ enum: - PROJECT - CONTAINER - JOB + - HELM