Open yt-ms opened 3 years ago
Best would be a systematic comparison with the OpenAPI schema, I suppose. https://editor.swagger.io/?url=https://raw.githubusercontent.com/structurizr/json/master/structurizr.yaml
Best would be a systematic comparison with the OpenAPI schema, I suppose. https://editor.swagger.io/?url=https://raw.githubusercontent.com/structurizr/json/master/structurizr.yaml
Unless I'm missing something, none of the properties are marked as required in the YAML!
Hah, fair enough. That's probably because the Java classes can be empty instances. However, for some measure of sanity checking, I chose to add a few required arguments on the classes which means those keys should also be required by pydantic. However, if everything is empty, class instantiation should probably just be ignored.
Problem description
With a new workspace in the Structurizr UI, many fields are optional (may be left blank). The model we have using Pydantic is more strict than this, which means that trying to get the workspace fails on deserialisation.
Code Sample
The stacktrace below is from creating a new workspace with a system context view that has no description. There may well be a host of other fields with the same problem.
Context