Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change the response when creating a variable alias #416

Merged
merged 1 commit into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/resources/variable/VariableAlias.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
post:
summary: 'Create a variable alias'
summary: 'WIP: Create a variable alias'
description: |
- Allows you to add an alias at the level defined in the request body on an existing variable having a higher scope, in order to customize its key.
- You have to specify a key in the request body and the scope and the parent id of the alias
Expand Down
4 changes: 4 additions & 0 deletions src/schemas/_index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -652,3 +652,7 @@ VariableAliasRequest:
$ref: ./variable/VariableAliasRequest.yaml
VariableResponse:
$ref: ./variable/VariableResponse.yaml
VariableAlias:
$ref: ./variable/VariableAlias.yaml
VariableOverride:
$ref: ./variable/VariableOverride.yaml
23 changes: 23 additions & 0 deletions src/schemas/variable/VariableAlias.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
type: object
required:
- id
- key
- mount_path
- scope
- variable_type
properties:
id:
type: string
format: uuid
key:
type: string
example: QOVERY_DATABASE_PSQL_NAME
value:
type: string
nullable: true
mount_path:
type: string
scope:
$ref: '../enums/APIVariableScope.yaml'
variable_type:
$ref: '../enums/APIVariableType.yaml'
22 changes: 22 additions & 0 deletions src/schemas/variable/VariableOverride.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
type: object
required:
- id
- key
- mount_path
- scope
- variable_type
properties:
id:
type: string
format: uuid
key:
type: string
value:
type: string
nullable: true
mount_path:
type: string
scope:
$ref: '../enums/APIVariableScope.yaml'
variable_type:
$ref: '../enums/APIVariableType.yaml'
8 changes: 2 additions & 6 deletions src/schemas/variable/VariableResponse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@ allOf:
- scope
properties:
overridden_variable:
$ref: '../EnvironmentVariableOverride.yaml'
$ref: './VariableOverride.yaml'
aliased_variable:
$ref: '../EnvironmentVariableAlias.yaml'
overridden_secret:
$ref: '../SecretOverride.yaml'
aliased_secret:
$ref: '../SecretAlias.yaml'
$ref: './VariableAlias.yaml'
scope:
$ref: '../enums/APIVariableScope.yaml'
variable_type:
Expand Down