sdmx-twg / sdmx-json

This repository is used for maintaining the SDMX-JSON message specifications.
54 stars 20 forks source link

Invalid regex pattern for `StandardTimePeriodType` #152

Open hoehrmann opened 7 months ago

hoehrmann commented 7 months ago

https://github.com/sdmx-twg/sdmx-json/blob/71fe5eaa9fcd29e3c15f2f0216a19b9b650b1dbd/data-message/tools/schemas/2.0.0/sdmx-json-data-schema.json defines:

  StandardTimePeriodType:
    anyOf:
      - type: string
        pattern: ^\d{4}\-([ASTQ]\d{1}|[MW]\d{2}|[D]\d{3})(Z|((\+|\-)\d{2}:\d{2}))?$

JSON Schema apparently requires that regular expressions are compiled with the Unicode flag set, and ECMA-262 apparently disallows the redundant identity escape for the hyphen outside of character classes in Unicode mode, rendering the entire schema invalid.

(In doubt, please handle this as a public review comment on SDMX 3.1 once the comment period begins.)