Skip to content

Comments

Update usages of com.networknt:json-schema-validator to the new API. ( 1.5.9 -> 2.0.1 )#797

Open
pedroboado wants to merge 1 commit intoCycloneDX:masterfrom
pedroboado:bump-json-schema-validator-2.x
Open

Update usages of com.networknt:json-schema-validator to the new API. ( 1.5.9 -> 2.0.1 )#797
pedroboado wants to merge 1 commit intoCycloneDX:masterfrom
pedroboado:bump-json-schema-validator-2.x

Conversation

@pedroboado
Copy link

Migrate from the removed 1.x API to the 2.x equivalents:

  • JsonSchemaFactory → SchemaRegistry (builder pattern)
  • JsonSchema → com.networknt.schema.Schema
  • SchemaValidatorsConfig → SchemaRegistryConfig
  • MapSchemaMapper → MapResourceLoader (now maps IRI to schema content)
  • ValidationMessage → Error; Set → List

Update JsonParseTest to reflect that Error.getMessage() no longer prefixes the instance location (e.g. "$: ") to the message text.

@pedroboado pedroboado requested a review from a team as a code owner February 23, 2026 12:08
@pedroboado pedroboado force-pushed the bump-json-schema-validator-2.x branch 2 times, most recently from 10fcbd6 to ae52016 Compare February 23, 2026 14:07
….0.1

Migrate from the removed 1.x API to the 2.x equivalents.
Update JsonParseTest to reflect that Error.getMessage() no longer
prefixes the instance location (e.g. "$: ") to the message text.

Signed-off-by: Pedro Boado <pedro.boado@datadoghq.com>
@pedroboado pedroboado force-pushed the bump-json-schema-validator-2.x branch from ae52016 to b72fdc7 Compare February 23, 2026 14:10
@pedroboado pedroboado changed the title chore(deps): Bump com.networknt:json-schema-validator from 1.5.9 to 2.0.1 Update usages of com.networknt:json-schema-validator to the new API. ( 1.5.9 -> 2.0.1 ) Feb 23, 2026
@codacy-production
Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 7848b121 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (7848b12) Report Missing Report Missing Report Missing
Head commit (b72fdc7) 6670 5055 75.79%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#797) 16 16 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

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.

1 participant