for-GET / jesse

jesse (JSon Schema Erlang) is an implementation of a JSON Schema validator for Erlang.
https://github.com/for-get/jesse
Apache License 2.0
124 stars 64 forks source link

fix strict schema matching #124

Open andreineculau opened 2 years ago

andreineculau commented 2 years ago

A schema with "$schema": "http://json-schema.org/draft-06/schema" i.e. no trailing # will make jesse believe this is not a draft6 schema, and complain about unsupported schema.

http://json-schema.org/draft-06/schema# is equivalent to http://json-schema.org/draft-06/schema and should be treated as such.

tsloughter commented 1 year ago

Just came here to say the same thing.

I plan to send a PR to parse the schema url and match the parts, but curious if this really needs to continue to support OTP-19 and 20? Would like to just use uri_string from the stdlib.

andreineculau commented 3 months ago

I think the added value trumps supporting old OTP 19-20. PR appreciated

gsantana2023 commented 1 month ago

I don't think there should be a need to support http://json-schema.org/draft-06/schema without the trailing#. I think that the JSON schema specification strictly uses it.