Skip to content

Commit

Permalink
feat(helm): Add helm repository endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 7, 2023
1 parent 504a980 commit dee80f3
Show file tree
Hide file tree
Showing 6 changed files with 175 additions and 0 deletions.
48 changes: 48 additions & 0 deletions src/resources/OrganizationHelmRepository.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
get:
summary: 'List organization helm repositories'
operationId: listHelmRepository
parameters:
- $ref: '../parameters/path/organizationId.yaml'
tags:
- Helm Repositories
responses:
'200':
description: 'List helm repositories'
content:
application/json:
schema:
$ref: '../schemas/HelmRepositoryResponseList.yaml'
'401':
$ref: '../responses/NotAuthorized.yaml'
'403':
$ref: '../responses/Forbidden.yaml'
'404':
$ref: '../responses/NotFound.yaml'

post:
summary: 'Create a helm repository'
operationId: createHelmRepository
parameters:
- $ref: '../parameters/path/organizationId.yaml'
tags:
- Helm Repositories
requestBody:
content:
application/json:
schema:
$ref: '../schemas/HelmRepositoryRequest.yaml'
responses:
'201':
description: 'Create a helm repository'
content:
application/json:
schema:
$ref: '../schemas/HelmRepositoryResponse.yaml'
'400':
$ref: '../responses/BadRequest.yaml'
'401':
$ref: '../responses/NotAuthorized.yaml'
'403':
$ref: '../responses/Forbidden.yaml'
'404':
$ref: '../responses/NotFound.yaml'
70 changes: 70 additions & 0 deletions src/resources/OrganizationHelmRepositoryRef.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
get:
summary: 'Get a helm repository'
operationId: getHelmRepository
parameters:
- $ref: '../parameters/path/organizationId.yaml'
- $ref: '../parameters/path/helmRepositoryId.yaml'
tags:
- Helm Repositories
responses:
'200':
description: 'The helm repository'
content:
application/json:
schema:
$ref: '../schemas/HelmRepositoryResponse.yaml'
'401':
$ref: '../responses/NotAuthorized.yaml'
'403':
$ref: '../responses/Forbidden.yaml'
'404':
$ref: '../responses/NotFound.yaml'

delete:
summary: 'Delete a helm repository'
operationId: deleteHelmRepository
parameters:
- $ref: '../parameters/path/organizationId.yaml'
- $ref: '../parameters/path/helmRepositoryId.yaml'
tags:
- Helm Repositories
responses:
'204':
$ref: '../responses/Deleted.yaml'
'401':
$ref: '../responses/NotAuthorized.yaml'
'403':
$ref: '../responses/Forbidden.yaml'
'404':
$ref: '../responses/NotFound.yaml'

put:
summary: 'Edit a helm repository'
operationId: editHelmRepository
parameters:
- $ref: '../parameters/path/organizationId.yaml'
- $ref: '../parameters/path/helmRepositoryId.yaml'

tags:
- Helm Repositories
requestBody:
content:
application/json:
schema:
$ref: '../schemas/HelmRepositoryRequest.yaml'

responses:
'200':
description: 'Edited the helm repository'
content:
application/json:
schema:
$ref: '../schemas/HelmRepositoryResponse.yaml'
'400':
$ref: '../responses/BadRequest.yaml'
'401':
$ref: '../responses/NotAuthorized.yaml'
'403':
$ref: '../responses/Forbidden.yaml'
'404':
$ref: '../responses/NotFound.yaml'
32 changes: 32 additions & 0 deletions src/schemas/HelmRepositoryRequest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
type: object
required:
- name
- kind
- config
properties:
name:
type: string
kind:
$ref: ../schemas/enums/HelmRepositoryKind.yaml
description:
type: string
url:
type: string
format: uri
description: |
URL of the helm chart repository:
* For `OCI`: it must start by oci://
* For `HTTPS`: it must be start by https://
config:
type: object
properties:
skip_tls_verification:
type: boolean
default: false
description: Bypass tls certificate verification when connecting to repository
login:
type: string
description: Required if the repository is private
password:
type: string
description: Required if the repository is private
13 changes: 13 additions & 0 deletions src/schemas/HelmRepositoryResponse.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
allOf:
- $ref: './BaseResponse.yaml'
- type: object
properties:
name:
type: string
kind:
$ref: ../schemas/enums/HelmRepositoryKind.yaml
description:
type: string
url:
type: string
description: URL of the helm repository
6 changes: 6 additions & 0 deletions src/schemas/HelmRepositoryResponseList.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: object
properties:
results:
type: array
items:
$ref: './HelmRepositoryResponse.yaml'
6 changes: 6 additions & 0 deletions src/schemas/_index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ ContainerRegistryProviderDetailsResponse:
$ref: ./ContainerRegistryProviderDetailsResponse.yaml
ContainerRegistryResponseList:
$ref: ./ContainerRegistryResponseList.yaml
HelmRepositoryRequest:
$ref: ./HelmRepositoryRequest.yaml
HelmRepositoryResponse:
$ref: ./HelmRepositoryResponse.yaml
HelmRepositoryResponseList:
$ref: ./HelmRepositoryResponseList.yaml
ContainerRequest:
$ref: ./ContainerRequest.yaml
ContainerResponse:
Expand Down

0 comments on commit dee80f3

Please sign in to comment.