Skip to content

fix(IDSSpecifications): handle single xs:enumeration and multiple xs:pattern - #872

Open
3adoshka wants to merge 1 commit into
ThatOpen:mainfrom
3adoshka:fix/ids-restriction-single-values
Open

3adoshka wants to merge 1 commit into
ThatOpen:mainfrom
3adoshka:fix/ids-restriction-single-values

Conversation

@3adoshka

Copy link
Copy Markdown

Fixes #867.

fast-xml-parser returns a single child element as an object and multiple child elements as an array:

  • Normalize restriction.enumeration to an array in getParameterValue so a single <xs:enumeration> does not throw restriction.enumeration.map is not a function.
  • Normalize restriction.pattern so an array of <xs:pattern> elements reads a string value instead of returning undefined on .value.

This branch has not been deployed

No deployments
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.

IDS: loading fails when a restriction has a single xs:enumeration or xs:pattern

1 participant