-
Notifications
You must be signed in to change notification settings - Fork 16
Pydantic field validations should not be stricter than the Structurizr server #40
Comments
Best would be a systematic comparison with the OpenAPI schema, I suppose. |
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
The text was updated successfully, but these errors were encountered: