-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(COR-683): add api to create an override on the variable endpoint (…
- Loading branch information
Showing
6 changed files
with
56 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
post: | ||
summary: 'Create a variable override' | ||
description: | | ||
- Allows you to override a variable that has a higher scope. | ||
- You have to specify a value in the request body and the scope and the parent id of the variable to alias | ||
- The system will create a new environment variable at project level with the same key as the one corresponding to the variable id in the path | ||
- The response body will contain the newly created variable | ||
- Information regarding the overridden_variable will be exposed in the "overridden_variable" or in the "overridden_secret" field of the newly created variable | ||
operationId: createVariableOverride | ||
parameters: | ||
- $ref: '../../parameters/path/variableId.yaml' | ||
|
||
tags: | ||
- Variable Main Calls | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../schemas/variable/VariableOverrideRequest.yaml' | ||
responses: | ||
'201': | ||
description: 'Create variable override' | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../schemas/variable/VariableResponse.yaml' | ||
'400': | ||
description: Can't create an override on a higher scope. Overrides can only be created from one scope to a lower scope. Scope hierarchy is ORGANIZATION > PROJECT > ENVIRONMENT > APPLICATION | ||
'401': | ||
$ref: '../../responses/NotAuthorized.yaml' | ||
'403': | ||
$ref: '../../responses/Forbidden.yaml' | ||
'404': | ||
$ref: '../../responses/NotFound.yaml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
type: object | ||
required: | ||
- key | ||
- aliasScope | ||
- aliasParentId | ||
- alias_scope | ||
- alias_parent_id | ||
properties: | ||
key: | ||
type: string | ||
aliasScope: | ||
alias_scope: | ||
$ref: '../enums/APIVariableScope.yaml' | ||
aliasParentId: | ||
alias_parent_id: | ||
type: string | ||
format: uuid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
type: object | ||
required: | ||
- value | ||
- alias_scope | ||
- alias_parent_id | ||
properties: | ||
value: | ||
type: string | ||
alias_scope: | ||
$ref: '../enums/APIVariableScope.yaml' | ||
alias_parent_id: | ||
type: string | ||
format: uuid |