Skip to content

Commit

Permalink
feat: Add git token api (#475)
Browse files Browse the repository at this point in the history
* feat: Add git token api

* feat: Be able to use to git token to retrieve repositories & branches
  • Loading branch information
mzottola authored Oct 20, 2023
1 parent c6eca05 commit f8f1fca
Show file tree
Hide file tree
Showing 12 changed files with 85 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 @@ -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:
Expand Down
21 changes: 21 additions & 0 deletions src/resources/GitToken.yaml
Original file line number Diff line number Diff line change
@@ -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'
6 changes: 6 additions & 0 deletions src/resources/OrganizationAccountGitRepositoryBitbucket.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions src/resources/OrganizationAccountGitRepositoryGithub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions src/resources/OrganizationAccountGitRepositoryGitlab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions src/schemas/ApplicationGitRepositoryRequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
13 changes: 13 additions & 0 deletions src/schemas/GitTokenResponse.yaml
Original file line number Diff line number Diff line change
@@ -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'
6 changes: 6 additions & 0 deletions src/schemas/GitTokenResponseList.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: object
properties:
results:
type: array
items:
$ref: './GitTokenResponse.yaml'
2 changes: 2 additions & 0 deletions src/schemas/_index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ GitRepositoryBranchResponseList:
$ref: ./GitRepositoryBranchResponseList.yaml
GitRepositoryResponseList:
$ref: ./GitRepositoryResponseList.yaml
GitTokenResponse:
$ref: ./GitTokenResponse.yaml
Healthcheck:
$ref: ./Healthcheck.yaml
Instance:
Expand Down

0 comments on commit f8f1fca

Please sign in to comment.