From daa7c4dc73e6d13c3cd1a137fb83e0cf2cecb8fa Mon Sep 17 00:00:00 2001 From: Xyphuz Date: Tue, 10 Jan 2023 21:41:50 +0800 Subject: [PATCH] fix: wrong generated data model of compose spec #41 --- compose_viz/spec/compose_spec.py | 2 +- tests/ymls/networks/docker-compose.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/compose_viz/spec/compose_spec.py b/compose_viz/spec/compose_spec.py index 9c86710..d1e466e 100644 --- a/compose_viz/spec/compose_spec.py +++ b/compose_viz/spec/compose_spec.py @@ -379,7 +379,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 diff --git a/tests/ymls/networks/docker-compose.yml b/tests/ymls/networks/docker-compose.yml index 9210e39..82ca073 100644 --- a/tests/ymls/networks/docker-compose.yml +++ b/tests/ymls/networks/docker-compose.yml @@ -26,3 +26,5 @@ networks: front-tier: back-tier: admin: + traefik-public: + external: true