Closed wbazant closed 7 years ago
Is that really a valid ID? Can you point me to the specification?
Sure, that's fair to ask, especially that I didn't check this before submitting the issue! It is:
http://json-schema.org/schema says an id is a uri-reference: http://json-schema.org/latest/json-schema-validation.html#rfc.section.8.3.7
https://tools.ietf.org/html/rfc3986 says an uri-reference can be an URI or a relative-ref (4.1) and (4.2) gives this grammar for relative-ref:
relative-ref = relative-part [ "?" query ] [ "#" fragment ]
relative-part = "//" authority path-abempty
/ path-absolute
/ path-noscheme
/ path-empty
I've opened a pull request now. Please have a look at #80.
Test case: https://github.com/wbazant/json-validator/commit/27de57c1ae2c5022422919b69963cc4b32b845a0