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

feat: remove the double git sub-object in the helm request for values… #511

Merged
merged 2 commits into from
Nov 22, 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
1 change: 0 additions & 1 deletion src/schemas/HelmGitRepositoryRequest.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
type: object
nullable: true
required:
- provider
- owner
Expand Down
26 changes: 26 additions & 0 deletions src/schemas/HelmValuesGitRepositoryRequest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
type: object
Copy link
Contributor

@mzottola mzottola Nov 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be nullable ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that when used in a 'oneof,' it should not be nullable. Am I wrong?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes indeed

required:
- url
- branch
- paths
properties:
url:
type: string
description: application git repository URL
example: https://github.com/Qovery/simple-node-app
branch:
type: string
description: |
Name of the branch to use. This is optional
If not specified, then the branch used is the `main` or `master` one
example: feat/text_xxx
paths:
type: array
description: List of path inside your git repository to locate values file. Must start by a /
items:
type: string
git_token_id:
type: string
format: uuid
description: The git token id on Qovery side
nullable: true
2 changes: 2 additions & 0 deletions src/schemas/_index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -762,3 +762,5 @@ BaseJobResponse:
$ref: ./job/BaseJobResponse.yaml
HelmGitRepositoryRequest:
$ref: ./HelmGitRepositoryRequest.yaml
HelmValuesGitRepositoryRequest:
$ref: ./HelmValuesGitRepositoryRequest.yaml
51 changes: 22 additions & 29 deletions src/schemas/helm/HelmRequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,27 @@ allOf:
description: |
Specify if the helm will be automatically updated after receiving a new image tag or a new commit according to the source type.
source:
type: object
properties:
git_repository:
$ref: '../HelmGitRepositoryRequest.yaml'
helm_repository:
type: object
nullable: true
oneOf:
- type: object
properties:
repository:
type: string
format: UUID
description: The id of the helm repository
nullable: true
chart_name:
type: string
description: The name of the chart in the repository
chart_version:
type: string
description: The version of the chart to use
git_repository:
$ref: '../HelmGitRepositoryRequest.yaml'
- type: object
properties:
helm_repository:
type: object
properties:
repository:
type: string
format: UUID
description: The id of the helm repository
nullable: true
chart_name:
type: string
description: The name of the chart in the repository
chart_version:
type: string
description: The version of the chart to use
arguments:
type: array
description: The extra arguments to pass to helm
Expand Down Expand Up @@ -103,14 +105,5 @@ allOf:
content:
type: string
description: The content of the value file
git:
type: object
nullable: true
properties:
git_repository:
$ref: '../ApplicationGitRepositoryRequest.yaml'
paths:
type: array
description: List of path inside your git repository to locate values file. Must start by a /
items:
type: string
git_repository:
$ref: '../HelmValuesGitRepositoryRequest.yaml'
Loading