Replies: 1 comment 4 replies
-
I happen to have a gist of the bundled 2020-12 meta-schema you can look at, but it's not going to help you. The URI in that error message is invalid. The correct URI should be,
In practice, implementations will use whatever regex implementation is available to them. You'll have to consult the specific implementation you're using to know why you're regex is getting rejected. About that bogus URI, the path represented there is the evaluation path. It's not a location, it's a list of all the keywords that were encountered while evaluating the schema. A lot of implementations use the evaluation path to communicate errors. I find it to be somewhere between useless and harmful. In any case, it's absolutely incorrect to use an evaluation path as a JSON Pointer in a URI the way you see in the error message. |
Beta Was this translation helpful? Give feedback.
-
👋 Hello, I'm a Go/Java user and so typescript is foreign territory for me.
I'm using a Go library to validate a schema which uses regexes. The Go library claims my pattern is not a supported regex per JSON Schema:
So my next step is to look at the meta schema for JSON Schema to actually see what is a valid/supported regex, and I can't for the life of me resolve the json path on the web:
/allOf/1/$ref/properties/properties/additionalProperties/$dynamicRef/allOf/3/$ref/properties/pattern/format
dynamicRef
.So, what I wanted to do next was to bundle the JSON API draft 2020-12 schema (i.e., resolve all the $refs and pull everything into a single document), then locate the relevant portion of the schema.
Would you be able to help out a Gopher with this particular use case? What would be an example ts script that would bundle the JSON Schema itself?
EDIT: I'm just looking for a bundled version of the 2020-12 draft schema, so if there is a copy of it somewhere on the web, I can just grab it. But my googling and reading of the spec documents didn't provide an answer (or I've missed something obvious), so that's why I've opened this thread.
Many thanks!
Beta Was this translation helpful? Give feedback.
All reactions