Midnighter / structurizr-python

A Python 3 port of Simon Brown's Structurizr diagrams-as-code architecture description tool.
https://structurizr.com/
Apache License 2.0
65 stars 16 forks source link

ContainerViewIO should not suppress externalSoftwareSystemBoundariesVisible in JSON when true. #67

Closed yt-ms closed 3 years ago

yt-ms commented 3 years ago

Problem description

When creating a ContainerView, the default for external_software_system_boundaries_visible is True, which makes sense. When uploading a view to Structurizr however, the ContainerViewIO suppresses this field if it is True (because that is specified as the default), and then Structurizr interprets that as false so the boundaries are not actually shown.

Code Sample

>>> from structurizr.view.container_view import ContainerView, ContainerViewIO
>>> cv = ContainerView(key="key", description="description")
>>> io = ContainerViewIO(cv)
>>> io = ContainerViewIO.from_orm(cv)
>>> io.json()
'{"key": "key", "description": "description", "elements": [], "relationships": []}'
>>>

Context

``` System Information ================== OS Windows OS-release 10 Python 3.7.5 Package Versions ================ depinfo 1.5.4 httpx 0.16.1 importlib_metadata 1.7.0 ordered-set 3.1 pip 20.2.4 pydantic 1.7.1 python-dotenv 0.14.0 setuptools 41.2.0 structurizr-python 0.2.1+29.gf1b13ef.dirty ```