Skip to content

Commit

Permalink
feat(specs): only use shortname in the source input [skip-bc] (genera…
Browse files Browse the repository at this point in the history
…ted)

algolia/api-clients-automation#4287

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Pierre Millot <[email protected]>
  • Loading branch information
algolia-bot and millotp committed Jan 8, 2025
1 parent f652bea commit c74414c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 94 deletions.
34 changes: 0 additions & 34 deletions algoliasearch/ingestion/models/docker_image_type.py

This file was deleted.

34 changes: 0 additions & 34 deletions algoliasearch/ingestion/models/docker_registry.py

This file was deleted.

15 changes: 1 addition & 14 deletions algoliasearch/ingestion/models/source_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,8 @@
from typing_extensions import Self


from algoliasearch.ingestion.models.docker_image_type import DockerImageType
from algoliasearch.ingestion.models.docker_registry import DockerRegistry

_ALIASES = {
"image_type": "imageType",
"registry": "registry",
"image": "image",
"version": "version",
"configuration": "configuration",
}

Expand All @@ -39,12 +33,8 @@ class SourceDocker(BaseModel):
SourceDocker
"""

image_type: DockerImageType
registry: DockerRegistry
image: str
""" Docker image name. """
version: Optional[str] = None
""" Docker image version. """
""" Shortname of the image, as returned by the referential. """
configuration: object
""" Configuration of the spec. """

Expand Down Expand Up @@ -83,7 +73,4 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
if not isinstance(obj, dict):
return cls.model_validate(obj)

obj["imageType"] = obj.get("imageType")
obj["registry"] = obj.get("registry")

return cls.model_validate(obj)
12 changes: 0 additions & 12 deletions algoliasearch/ingestion/models/source_update_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@
from typing_extensions import Self


from algoliasearch.ingestion.models.docker_registry import DockerRegistry

_ALIASES = {
"registry": "registry",
"image": "image",
"version": "version",
"configuration": "configuration",
}

Expand All @@ -37,11 +32,6 @@ class SourceUpdateDocker(BaseModel):
SourceUpdateDocker
"""

registry: Optional[DockerRegistry] = None
image: Optional[str] = None
""" Docker image name. """
version: Optional[str] = None
""" Docker image version. """
configuration: object
""" Configuration of the spec. """

Expand Down Expand Up @@ -80,6 +70,4 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
if not isinstance(obj, dict):
return cls.model_validate(obj)

obj["registry"] = obj.get("registry")

return cls.model_validate(obj)

0 comments on commit c74414c

Please sign in to comment.