Skip to content

Commit

Permalink
feat: add import to variable (#505)
Browse files Browse the repository at this point in the history
  • Loading branch information
pggb25 authored Nov 16, 2023
1 parent e2784ca commit 9fea0ce
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
40 changes: 40 additions & 0 deletions src/resources/variable/VariablesImport.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
post:
summary: 'Import variables'
description: Import environment variables in a defined scope, with a defined visibility.
operationId: importEnvironmentVariables
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'
1 change: 1 addition & 0 deletions src/schemas/enums/APIVariableScope.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ enum:
- PROJECT
- CONTAINER
- JOB
- HELM

0 comments on commit 9fea0ce

Please sign in to comment.