Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed deserialisation of Required specifications which were appearing as Optional. #6

Merged
merged 2 commits into from
Sep 11, 2023

Conversation

andyward
Copy link
Collaborator

We don't explicitly export minOccurs on xml Export for Required specs as the xsd minOccurs default is 1

But on load we were defaulting MinOccurs to zero (in MinMaxCardinality) and never over-riding if we had an implicit minOccurs. In turn this created the wrong SimpleCardinality when simplifying

Fix1: made MinMaxCardinality work in line with xsd defaults (so we import correctly) i.e. minOccurs default =1
Fix2: explicitly export the minOccurs for Required (so 3rd parties can be clear of the intent, and to avoid similar bugs elsewhere)

Also allow pretty Xml be enabled/disabled in release modes via a switch

We don't explicitly export minOccurs on xml Export for required specs as default is 1
But we were defaulting MinOccurs to zero and never over-riding if implicit minOccurs. In turn this created the wrong SimpleCardinality when simplifying
Fix1: made MinMaxCardinality work in line with xsd defaults (so we import correctly)
Fix2: explicitly export the minOccurs for Required to be nice to others
@andyward andyward merged commit 6ca5ed8 into main Sep 11, 2023
1 check passed
@andyward andyward deleted the fix/required-cardinality branch February 14, 2024 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant