diff --git a/src/openapi.yaml b/src/openapi.yaml index 8c340947..ae3b5f7d 100644 --- a/src/openapi.yaml +++ b/src/openapi.yaml @@ -218,6 +218,8 @@ paths: $ref: './resources/OrganizationApiTokenRef.yaml' /organization/{organizationId}/availableRole: $ref: './resources/OrganizationAvailableRole.yaml' + /organization/{organizationId}/gitToken: + $ref: './resources/GitToken.yaml' /organization/{organizationId}/member: $ref: './resources/OrganizationMember.yaml' /organization/{organizationId}/inviteMember: diff --git a/src/resources/GitToken.yaml b/src/resources/GitToken.yaml new file mode 100644 index 00000000..21a971be --- /dev/null +++ b/src/resources/GitToken.yaml @@ -0,0 +1,21 @@ +get: + summary: 'List organization git tokens' + description: 'List organization git tokens' + operationId: listOrganizationGitTokens + parameters: + - $ref: '../parameters/path/organizationId.yaml' + tags: + - Organization Main Calls + responses: + '200': + description: 'List organization git tokens' + content: + application/json: + schema: + $ref: '../schemas/GitTokenResponseList.yaml' + '401': + $ref: '../responses/NotAuthorized.yaml' + '403': + $ref: '../responses/Forbidden.yaml' + '404': + $ref: '../responses/NotFound.yaml' diff --git a/src/resources/OrganizationAccountGitRepositoryBitbucket.yaml b/src/resources/OrganizationAccountGitRepositoryBitbucket.yaml index 2baad41b..081882ee 100644 --- a/src/resources/OrganizationAccountGitRepositoryBitbucket.yaml +++ b/src/resources/OrganizationAccountGitRepositoryBitbucket.yaml @@ -3,6 +3,12 @@ get: operationId: getOrganizationBitbucketRepositories parameters: - $ref: '../parameters/path/organizationId.yaml' + - in: query + name: gitTokenId + schema: + type: string + format: uuid + description: The git token id that must be used for the application tags: - Organization Account Git Repositories responses: diff --git a/src/resources/OrganizationAccountGitRepositoryBitbucketBranch.yaml b/src/resources/OrganizationAccountGitRepositoryBitbucketBranch.yaml index 6bf9a864..dc7414fe 100644 --- a/src/resources/OrganizationAccountGitRepositoryBitbucketBranch.yaml +++ b/src/resources/OrganizationAccountGitRepositoryBitbucketBranch.yaml @@ -5,6 +5,12 @@ get: - Organization Account Git Repositories parameters: - $ref: '../parameters/path/organizationId.yaml' + - in: query + name: gitTokenId + schema: + type: string + format: uuid + description: The git token id that must be used for the application - in: query name: name schema: diff --git a/src/resources/OrganizationAccountGitRepositoryGithub.yaml b/src/resources/OrganizationAccountGitRepositoryGithub.yaml index 78a817f9..d9f05e59 100644 --- a/src/resources/OrganizationAccountGitRepositoryGithub.yaml +++ b/src/resources/OrganizationAccountGitRepositoryGithub.yaml @@ -3,6 +3,12 @@ get: operationId: getOrganizationGithubRepositories parameters: - $ref: '../parameters/path/organizationId.yaml' + - in: query + name: gitTokenId + schema: + type: string + format: uuid + description: The git token id that must be used for the application tags: - Organization Account Git Repositories responses: diff --git a/src/resources/OrganizationAccountGitRepositoryGithubBranch.yaml b/src/resources/OrganizationAccountGitRepositoryGithubBranch.yaml index 5847a6cb..31748956 100644 --- a/src/resources/OrganizationAccountGitRepositoryGithubBranch.yaml +++ b/src/resources/OrganizationAccountGitRepositoryGithubBranch.yaml @@ -5,6 +5,12 @@ get: - Organization Account Git Repositories parameters: - $ref: '../parameters/path/organizationId.yaml' + - in: query + name: gitTokenId + schema: + type: string + format: uuid + description: The git token id that must be used for the application - in: query name: name schema: diff --git a/src/resources/OrganizationAccountGitRepositoryGitlab.yaml b/src/resources/OrganizationAccountGitRepositoryGitlab.yaml index ae55353f..66927b74 100644 --- a/src/resources/OrganizationAccountGitRepositoryGitlab.yaml +++ b/src/resources/OrganizationAccountGitRepositoryGitlab.yaml @@ -3,6 +3,12 @@ get: operationId: getOrganizationGitlabRepositories parameters: - $ref: '../parameters/path/organizationId.yaml' + - in: query + name: gitTokenId + schema: + type: string + format: uuid + description: The git token id that must be used for the application tags: - Organization Account Git Repositories responses: diff --git a/src/resources/OrganizationAccountGitRepositoryGitlabBranch.yaml b/src/resources/OrganizationAccountGitRepositoryGitlabBranch.yaml index 7e163513..8322d8d3 100644 --- a/src/resources/OrganizationAccountGitRepositoryGitlabBranch.yaml +++ b/src/resources/OrganizationAccountGitRepositoryGitlabBranch.yaml @@ -5,6 +5,12 @@ get: - Organization Account Git Repositories parameters: - $ref: '../parameters/path/organizationId.yaml' + - in: query + name: gitTokenId + schema: + type: string + format: uuid + description: The git token id that must be used for the application - in: query name: name schema: diff --git a/src/schemas/ApplicationGitRepositoryRequest.yaml b/src/schemas/ApplicationGitRepositoryRequest.yaml index 7b7c47fa..2b5b2a26 100644 --- a/src/schemas/ApplicationGitRepositoryRequest.yaml +++ b/src/schemas/ApplicationGitRepositoryRequest.yaml @@ -19,3 +19,8 @@ properties: type: string default: / description: indicates the root path of the application. + git_token_id: + type: string + format: uuid + description: The git token id on Qovery side + nullable: true diff --git a/src/schemas/GitTokenResponse.yaml b/src/schemas/GitTokenResponse.yaml new file mode 100644 index 00000000..ca4357b2 --- /dev/null +++ b/src/schemas/GitTokenResponse.yaml @@ -0,0 +1,13 @@ +allOf: + - $ref: './BaseResponse.yaml' + - type: object + required: + - name + - type + properties: + name: + type: string + description: + type: string + type: + $ref: './enums/GitProvider.yaml' diff --git a/src/schemas/GitTokenResponseList.yaml b/src/schemas/GitTokenResponseList.yaml new file mode 100644 index 00000000..3b7622ae --- /dev/null +++ b/src/schemas/GitTokenResponseList.yaml @@ -0,0 +1,6 @@ +type: object +properties: + results: + type: array + items: + $ref: './GitTokenResponse.yaml' diff --git a/src/schemas/_index.yaml b/src/schemas/_index.yaml index 8044d8cf..06eecac6 100644 --- a/src/schemas/_index.yaml +++ b/src/schemas/_index.yaml @@ -358,6 +358,8 @@ GitRepositoryBranchResponseList: $ref: ./GitRepositoryBranchResponseList.yaml GitRepositoryResponseList: $ref: ./GitRepositoryResponseList.yaml +GitTokenResponse: + $ref: ./GitTokenResponse.yaml Healthcheck: $ref: ./Healthcheck.yaml Instance: