mff-uk / dataspecer

https://dataspecer.com
MIT License
22 stars 7 forks source link

OR vs XOR #681

Open jakubklimek opened 6 days ago

jakubklimek commented 6 days ago

Related to #680 , OR could have an option (or it would be a different construct) to say that it is exclusive, meaning only one of the options can be present in a valid instance. That would correspond to choice in XML Schema and oneOf in JSON Schema.

jakubklimek commented 3 days ago

Just a note: We have made the current OR a XOR in XSD. This may need to be reflected in JSON as well, and probably refactored later according to the discussion that currently, it is OR among classes, while in XSD, choice, sequence and all are groups, that group parts of the content of the class, not the class (complexType) itself.