Geonovum / uml2json

Best Practise for OGC - UML to JSON Encoding Rules
https://geonovum.github.io/uml2json/document.html
0 stars 1 forks source link

7.3.1 - pja - req 1 Single or multiple definition schema #14

Closed PalmJanssen closed 1 year ago

PalmJanssen commented 1 year ago

Not sure if I understand this well. Is meant that a UML apllication schema will always lead to one JSON schema and not to several? Is that workable for large application schema including well defined sections (packages).

jechterhoff commented 1 year ago

The answer is yes. We have made the decision to generate a single JSON Schema file per application schema. See NOTE 2 for a good reason for doing so. Overall, that reduces the schema complexity (where cross-references between packages, when encoded in separate JSON Schema files, could easily lead to the whole lot of files to being loaded by applications anyway).

That being said, we do not have any practical experience yet with use cases where a large JSON Schema would actually break the validation process. That also depends on the validator implementation. If, in the future, such cases occur, one could extend the approach with the option to generate multiple schema files (as described in the UGAS 2020 ER). But then the complexity increases in referencing the right schema file for a given JSON dataset.

PalmJanssen commented 1 year ago

For clarification: As an example the INSPIRE schema's of separate theme's consist of several imported schema's. Would that not be possible according to this requirement?

jechterhoff commented 1 year ago

That would still be possible. Cross-references between schemas - encoded in separate JSON files - are expected. It is just that we do not want to distribute the contents of a single schema across multiple files.

PalmJanssen commented 1 year ago

aha, that helps and seems sensible. Verify with @lvdbrink and @wilkoquak

lvdbrink commented 1 year ago

sounds good to me