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

Incorrect handling of format-assertions #36

Open
big-andy-coates opened this issue Nov 18, 2023 · 0 comments
Open

Incorrect handling of format-assertions #36

big-andy-coates opened this issue Nov 18, 2023 · 0 comments

Comments

@big-andy-coates
Copy link
Collaborator

Hi @jimblackler,

Thought I'd let you know that I think this library is currently mishandling schemas that have format-assertion listed in its $vocabulary.

Turns out that having "https://json-schema.org/draft/2020-12/vocab/format-assertion": false e.g.:

"$vocabulary": {
        "https://json-schema.org/draft/2020-12/vocab/core": true,
        "https://json-schema.org/draft/2020-12/vocab/format-assertion": false
    },

...doesn't turn off format assertions, as I'd first assumed. Instead the false just means parsers/validators that don't understand format-assertsions can still parse the schema, (a value of true means such implementations should error out).

SchemaFriend fails 2 of the optional/format-assertions.json tests. I'm assuming this is because it turns off format assertions when it sees the "https://json-schema.org/draft/2020-12/vocab/format-assertion": false.

Here's the slack conversation about what the false means...

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