Open kentare opened 1 month ago
Frontend throws error when using a XSD uploaded with xsd:gYear type
xsd:gYear
Uploaded XSD:
<xsd:simpleType seres:elementtype="Tallrestriksjon" name="RegnskapAr-17102_Verdirestriksjon"> <xsd:restriction base="xsd:gYear"> <xsd:minInclusive value="1980"/> <xsd:maxInclusive value="9999"/> </xsd:restriction> </xsd:simpleType>
The error:
Error: "formatMaximum": format "year" does not define "compare" function
Schema generated:
"RegnskapAr-17102_Verdirestriksjon": { "@xsdType": "gYear", "type": "string", "format": "year", "@xsdStructure": "XmlSchemaSimpleTypeRestriction", "formatMinimum": "1980", "formatMaximum": "9999", "@xsdUnhandledAttributes": { "seres:elementtype": "Tallrestriksjon" } }
The XSD is a part of imgrate migrating 2 to 3.
Slack discussion with example XSD: https://altinn.slack.com/archives/C02EJ9HKQA3/p1713166049825899
Description of the bug
Frontend throws error when using a XSD uploaded with
xsd:gYear
typeUploaded XSD:
The error:
Schema generated:
Steps To Reproduce
Additional Information
The XSD is a part of imgrate migrating 2 to 3.
Slack discussion with example XSD: https://altinn.slack.com/archives/C02EJ9HKQA3/p1713166049825899