-
Notifications
You must be signed in to change notification settings - Fork 63
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
TM Schema regex error #1906
Comments
Basically, the backreference (
|
At the same time, Rust does not seem to accept escaping / , i.e. |
The json schema validators I know are;
Which one are you using? |
I am using https://regex101.com/ so not a JSON Schema validator. It seems that JSON Schema libraries offload regex to standard libraries of the language |
rust does not have regex as part of the standard library. |
Both |
From a quick look also a nice jsonschema impl in golang seems to be aware of their shortcoming: qri-io/jsonschema#119. So either we make aware our downstreams that we expect that their jsonschema validators support regex-with-backreferences or we have to make sure we do not use those features. |
Call of 25.10:
Decision: Make it more correct. Two regexes that can be combined: Also relevant for #1749 |
In our TM Schema, we have a regex at https://github.com/w3c/wot-thing-description/blob/main/validation/tm-json-schema-validation.json#L1852 . This is sadly failing in golang and rust and subsequently the TM Schema cannot be used by many golang based JSON Schema validators (not sure about Rust yet). An alternative is available at https://regex101.com/r/qSBNcw/1 but that fails for Rust. Ideally we should fix this asap.
Note:
/
is not reserved character for regex but we are escaping it but I do not remember whyThe text was updated successfully, but these errors were encountered: