diff --git a/src/resources/variable/VariableAlias.yaml b/src/resources/variable/VariableAlias.yaml index 3f66f8bf..85883e60 100644 --- a/src/resources/variable/VariableAlias.yaml +++ b/src/resources/variable/VariableAlias.yaml @@ -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 diff --git a/src/schemas/_index.yaml b/src/schemas/_index.yaml index 840afbf5..2fa94de8 100644 --- a/src/schemas/_index.yaml +++ b/src/schemas/_index.yaml @@ -652,3 +652,7 @@ VariableAliasRequest: $ref: ./variable/VariableAliasRequest.yaml VariableResponse: $ref: ./variable/VariableResponse.yaml +VariableAlias: + $ref: ./variable/VariableAlias.yaml +VariableOverride: + $ref: ./variable/VariableOverride.yaml diff --git a/src/schemas/variable/VariableAlias.yaml b/src/schemas/variable/VariableAlias.yaml new file mode 100644 index 00000000..bdf42e7c --- /dev/null +++ b/src/schemas/variable/VariableAlias.yaml @@ -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' diff --git a/src/schemas/variable/VariableOverride.yaml b/src/schemas/variable/VariableOverride.yaml new file mode 100644 index 00000000..1ee2d8b4 --- /dev/null +++ b/src/schemas/variable/VariableOverride.yaml @@ -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' diff --git a/src/schemas/variable/VariableResponse.yaml b/src/schemas/variable/VariableResponse.yaml index db71371a..7a085c30 100644 --- a/src/schemas/variable/VariableResponse.yaml +++ b/src/schemas/variable/VariableResponse.yaml @@ -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: