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

Validating json-schema with meta-schema draftV4 accepts incorrect inputs #251

Open
walia-gaurav opened this issue Feb 1, 2018 · 0 comments

Comments

@walia-gaurav
Copy link

walia-gaurav commented Feb 1, 2018

        final JsonSchemaFactory factory = JsonSchemaFactory.byDefault();
        final JsonSchema metaSchema = factory.getJsonSchema(SchemaVersion.DRAFTV4.getSchema());

        log.info("Schema Validation Status: " + metaSchema.validate(newJson, true).isSuccess());

Why does this piece of code, accept the below input json as a valid json schema?
{"a":"a"}
or even
{}

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