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

Defaults for minOccurs/maxOccurs on ListElement should match the XML spec #11

Open
FelixSchwarz opened this issue Feb 27, 2014 · 0 comments
Milestone

Comments

@FelixSchwarz
Copy link
Member

Currently the default values for minOccurs/maxOccurs on the ListElement are none. I think this means the attributes are omitted when rendering a WSDL/XML schema but at least for maxOccurs this means you can add too many items to the element resulting in an invalid state.

We should make sure that our defaults are the same as the XML spec (bonus: try to keep the generated WSDL/XML schema minimal, omitting the attribute if it equals 1). For minOccurs we probably can't enforce the restriction right away because we need a way to start with an empty list and append values but maxOccurs should be always checked.

Maybe we should also warn/raise if we are about to render XML but the amount of items does not match the occurrence constraints?

@ngnpope ngnpope modified the milestone: Future Jul 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants