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

BUG: ECMA262 valid pattern throws an exception #413

Open
jeremyfiel opened this issue May 8, 2024 · 0 comments
Open

BUG: ECMA262 valid pattern throws an exception #413

jeremyfiel opened this issue May 8, 2024 · 0 comments

Comments

@jeremyfiel
Copy link

I have a valid ECMA262 pattern defined but the application is throwing an exception.

com.github.fge.jsonschema.core.exceptions.InvalidSchemaException: fatal: invalid JSON Schema, cannot continue     
    Syntax errors:
[{
    "level": "error",
    "message": "string \"((?<OrgOID>[^,. ]+)\\s*\\.\\s*(?<AOID>[^,. ]+))(?:\\s*,\\s*)?\" is not a valid ECMA 262 regular expression",
    "domain": "syntax",
    "schema": {
        "loadingURI": "#",
        "pointer": ""
    },
    "keyword": "pattern",
    "value": "((?<OrgOID>[^,. ]+)\\s*\\.\\s*(?<AOID>[^,. ]+))(?:\\s*,\\s*)?"
}]
level: "fatal"
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "string",
  "pattern": "((?<OrgOID>[^,. ]+)\\s*\\.\\s*(?<AOID>[^,. ]+))(?:\\s*,\\s*)?"
}

valid instance

FFFF.12645,AAAA.6456

I'm guessing it has something to do with the escaping pattern but that is valid per the specification and I can't modify it from my JSON Schema schema otherwise it will break other tooling.

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