-
Notifications
You must be signed in to change notification settings - Fork 177
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
Duplicate Attributes if the same xsd:element is listed multiple times in the schema #521
Comments
Could you post a (made up) minimal schema that shows the issue? |
I should also note that if it finds. Min and Max Length it also creates duplicate StringLengthAttributes. So here's a property that's outputted:
From this in the xsd:
And then there is another restriction elsewhere:
Every single definition is identical. Somehow the StringLength(150) is there but that isn't listed anywhere that this field is defined. From my understanding, these should be similar to how CSS works in that it goes from least to most specific and takes the most specific version that is found in the chain. Thus this should not use the maxlength in the restriction because it's defined on the field, but should add the pattern It appears that instead it's adding multiples instead of doing the merging. |
Also, it appears that this is also doubling the XML documentation in places (along with xml documentation that generates msbuild warnings because if incorrectly escaped docs) |
I can't share the schema because contracts that prevent me from sharing, but basically if there is the same element many times and it merges them, it's duplicating schema attributes.
I.e. the MaxLengthAttribute will get duplicated in the output because every single example has xsd:length value="6" in it in all references to the same thing.
The text was updated successfully, but these errors were encountered: