When xds with specified min and max occurs is uploaded, it converts to JsonSchema with @xsdMinOccurs and @xsdMaxOccurs custom keywords. Those keywords have highest priority for setting up min and max occurs attributes in conversion to c#, and if present, minItems and maxItems keywords are overridden when converting back to xsd. This is problematic when min/max Items are changed after upload.
Here is example problematic json schema:
If @xsdMinOccurs or @xsdMaxOccurs are present on the schema node, when updating minItems and maxItems keywords, update mentioned custom keywords as well.
Calculate min/max occurs attributed based on both min/max items keywords and custom keywords
Note
Keep in mind that value of @xsdMaxOccurs is string since it can have "unbounded" value.
Steps To Reproduce
Upload xsd containing minOccurs or maxOccurs attributes, and than update array limits in datamodeling tool. Produced xsd won't be changed.
Description of the bug
When xds with specified min and max occurs is uploaded, it converts to JsonSchema with @xsdMinOccurs and @xsdMaxOccurs custom keywords. Those keywords have highest priority for setting up min and max occurs attributes in conversion to c#, and if present, minItems and maxItems keywords are overridden when converting back to xsd. This is problematic when min/max Items are changed after upload. Here is example problematic json schema:
converts to following xsd:
Proposed solutions:
Note
Keep in mind that value of @xsdMaxOccurs is string since it can have "unbounded" value.
Steps To Reproduce
Upload xsd containing minOccurs or maxOccurs attributes, and than update array limits in datamodeling tool. Produced xsd won't be changed.
Additional Information
No response