Build against networknt json-schema-validator 3.x#24
Draft
stefanobaghino wants to merge 1 commit into
Draft
Conversation
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
|
Hooray! All contributors have signed the CLA. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Consumers that put networknt json-schema-validator 3.x on the classpath alongside this library hit a
NoSuchMethodErrorthe first time a schema is compiled: 3.x replaced its Jackson 2 node API with Jackson 3 and removed thegetSchema/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.JSONentry points; the customFormatvalidators move to Jackson 3 nodes. The transformer pipeline, the 3.0/3.1 dialect split, and thecom.atlassian.oai.validator.*public API are unchanged.One behaviour change: a value beyond
Double.MAX_VALUEis now rejected as a type error ("number expected") rather than reaching the customdouble-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.double→typechange is acceptable), and before the Atlassian CLA is signed.Closes #21