Skip to content

Build against networknt json-schema-validator 3.x#24

Draft
stefanobaghino wants to merge 1 commit into
atlassian:masterfrom
stefanobaghino:migrate-networknt-3x
Draft

Build against networknt json-schema-validator 3.x#24
stefanobaghino wants to merge 1 commit into
atlassian:masterfrom
stefanobaghino:migrate-networknt-3x

Conversation

@stefanobaghino

Copy link
Copy Markdown

Consumers that put networknt json-schema-validator 3.x on the classpath alongside this library hit a NoSuchMethodError the first time a schema is compiled: 3.x replaced its Jackson 2 node API with Jackson 3 and removed the getSchema/validate(JsonNode) overloads this library calls. This builds the library against networknt 3.x so the two stay compatible.

swagger-parser still produces Jackson 2 nodes while networknt 3.x consumes Jackson 3, so the schema and the instance are handed to networknt as JSON text through its InputFormat.JSON entry points; the custom Format validators move to Jackson 3 nodes. The transformer pipeline, the 3.0/3.1 dialect split, and the com.atlassian.oai.validator.* public API are unchanged.

One behaviour change: a value beyond Double.MAX_VALUE is now rejected as a type error ("number expected") rather than reaching the custom double-format validator. The value is still rejected; only the error key differs.

Opening as a draft pending the two questions in #21 (text boundary vs. node conversion; whether the format.doubletype change is acceptable), and before the Atlassian CLA is signed.

Closes #21

networknt 3.x replaced its Jackson 2 node API with Jackson 3 and removed the
getSchema/validate(JsonNode) overloads this library called, so consumers that
put networknt 3.x on the classpath hit NoSuchMethodError when the first schema
is compiled. Feed networknt JSON text via its InputFormat.JSON entry points,
move the custom Format validators to Jackson 3 nodes, and pin the Jackson 3 BOM
to the version networknt depends on. The public API is unchanged.

One behaviour change: a value beyond Double.MAX_VALUE is now rejected as a type
error ("number expected") rather than reaching the custom double-format
validator. The value is still rejected.

Refs atlassian#21
@atlassian-cla-bot

atlassian-cla-bot Bot commented Jun 18, 2026

Copy link
Copy Markdown

Hooray! All contributors have signed the CLA.

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

Successfully merging this pull request may close these issues.

Migrate to networknt json-schema-validator 3.x (Jackson 3 API)

1 participant