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

Be strict about adherence to cardinality via collection: true #185

Open
ronaldtse opened this issue Nov 21, 2024 · 0 comments
Open

Be strict about adherence to cardinality via collection: true #185

ronaldtse opened this issue Nov 21, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ronaldtse
Copy link
Contributor

From:

Currently, if an attribute does not define collection: true, lutaml-model accepts all 3 cases:

  • 0 occurrences
  • 1 occurrence
  • N occurrences

However, collection: true means 0..*, and collection: false (default) means 0..1. Right now, the default of 0..1 does not raise any error if there are more than 1 occurrence.

When the XML/JSON does not fit this model definition, it should raise an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants