From 78a7654339e4dc6eb7fbc288e77c8cc799e9044e Mon Sep 17 00:00:00 2001 From: Zheng Zhi Yuan Date: Thu, 4 May 2023 02:11:59 +0800 Subject: [PATCH] fix: extension-fields parse error from compose spec #48 --- compose_viz/spec/compose_spec.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compose_viz/spec/compose_spec.py b/compose_viz/spec/compose_spec.py index f4fe528..a02282a 100644 --- a/compose_viz/spec/compose_spec.py +++ b/compose_viz/spec/compose_spec.py @@ -400,7 +400,7 @@ class Network(YamlModel): driver: Optional[str] = None driver_opts: Optional[Dict[constr(regex=r"^.+$"), Union[str, float]]] = None # type: ignore # noqa: F722 ipam: Optional[Ipam] = None - external: Optional[ExternalNetwork] = None + external: Optional[bool | ExternalNetwork] = None internal: Optional[bool] = None enable_ipv6: Optional[bool] = None attachable: Optional[bool] = None @@ -494,7 +494,7 @@ class Service(YamlModel): cap_drop: Optional[List[str]] = Field(None, unique_items=True) cgroup: Optional[Cgroup] = None cgroup_parent: Optional[str] = None - command: Optional[ExternalVolume] = None + command: Optional[Union[str, List[str]]] = None configs: Optional[ServiceConfigOrSecret] = None container_name: Optional[str] = None cpu_count: Optional[conint(ge=0)] = None # type: ignore @@ -516,7 +516,7 @@ class Service(YamlModel): dns_opt: Optional[List[str]] = Field(None, unique_items=True) dns_search: Optional[StringOrList] = None domainname: Optional[str] = None - entrypoint: Optional[ExternalVolume] = None + entrypoint: Optional[Union[str, List[str]]] = None env_file: Optional[StringOrList] = None environment: Optional[ListOrDict] = None expose: Optional[List[Union[str, float]]] = Field(None, unique_items=True)