Skip to content

Schema version no longer validated since version 1.0.83 #829

@alexruf

Description

@alexruf

I noticed that sice the release of version 1.0.83 the behaviour changed, and wrong schema versions do no longer throw an exception.

With version 1.0.82 the following Kotlin example code would have thrown a JsonSchemaException because the schema version doesn't match:

val schemaNode = jacksonObjectMapper().readTree("{\"\$schema\": \"http://json-schema.org/draft-06/schema\", \"properties\": { \"id\": {\"type\": \"number\"}}}")
val factory = com.networknt.schema.JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V202012)
val schema = factory.getSchema(schemaNode) // since 1.0.83 this will no longer throw 'JsonSchemaException' because of wrong schema version

Now, since version 1.0.83 this is no longer the case and regardless what version flag is specified, all schema versions are accepted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions