Skip to content

Commit

Permalink
fix(schemas): add missing required fields
Browse files Browse the repository at this point in the history
  • Loading branch information
ctjhoa committed Oct 10, 2023
1 parent 82864f0 commit d66e105
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 46 deletions.
12 changes: 1 addition & 11 deletions src/schemas/ContainerResponse.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
allOf:
- $ref: './BaseResponse.yaml'
- $ref: './ServiceStorageResponse.yaml'
- $ref: './ContainerSource.yaml'
- type: object
required:
- environment
- registry
- name
- image_name
- tag
- auto_preview
- cpu
- memory
Expand All @@ -19,8 +17,6 @@ allOf:
properties:
environment:
$ref: './ReferenceObject.yaml'
registry:
$ref: './ContainerRegistryProviderDetailsResponse.yaml'
maximum_cpu:
type: integer
description: Maximum cpu that can be allocated to the container based on organization cluster configuration. unit is millicores (m). 1000m = 1 cpu
Expand All @@ -35,12 +31,6 @@ allOf:
description:
type: string
description: give a description to this container
image_name:
type: string
description: name of the image container
tag:
type: string
description: tag of the image container
arguments:
type: array
items:
Expand Down
22 changes: 22 additions & 0 deletions src/schemas/ContainerSource.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
type: object
required:
- image_name
- tag
- registry
properties:
image_name:
type: string
description: |
The image name pattern differs according to chosen container registry provider:
* `ECR`: `repository`
* `SCALEWAY_CR`: `namespace/image`
* `DOCKER_HUB`: `image` or `repository/image`
* `PUBLIC_ECR`: `registry_alias/repository`
tag:
type: string
description: tag of the image container
registry_id:
type: string
description: tag of the image container
registry:
$ref: "./ContainerRegistryProviderDetailsResponse.yaml"
47 changes: 12 additions & 35 deletions src/schemas/job/JobResponse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,41 +63,18 @@ allOf:
source:
type: object
properties:
image:
type: object
nullable: true
required:
- image_name
- tag
- registry_id
- registry
properties:
image_name:
type: string
description: |
The image name pattern differs according to chosen container registry provider:
* `ECR`: `repository`
* `SCALEWAY_CR`: `namespace/image`
* `DOCKER_HUB`: `image` or `repository/image`
* `PUBLIC_ECR`: `registry_alias/repository`
tag:
type: string
description: tag of the image container
registry_id:
type: string
description: tag of the image container
registry:
$ref: '../ContainerRegistryProviderDetailsResponse.yaml'
docker:
type: object
nullable: true
properties:
dockerfile_path:
type: string
description: The path of the associated Dockerfile. Only if you are using build_mode = DOCKER
nullable: true
git_repository:
$ref: '../ApplicationGitRepositoryResponse.yaml'
oneOf:
- image:
$ref: '../ContainerSource.yaml'
- docker:
type: object
properties:
dockerfile_path:
type: string
description: The path of the associated Dockerfile. Only if you are using build_mode = DOCKER
nullable: true
git_repository:
$ref: '../ApplicationGitRepositoryResponse.yaml'
healthchecks:
$ref: '../Healthcheck.yaml'
schedule:
Expand Down

0 comments on commit d66e105

Please sign in to comment.