Skip to content
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

Invalid regex pattern for StandardTimePeriodType #152

Open
hoehrmann opened this issue Apr 17, 2024 · 0 comments
Open

Invalid regex pattern for StandardTimePeriodType #152

hoehrmann opened this issue Apr 17, 2024 · 0 comments

Comments

@hoehrmann
Copy link

hoehrmann commented Apr 17, 2024

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.)

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

No branches or pull requests

1 participant