Skip to content

Releases: harrel56/json-schema

1.8.1

23 Feb 20:45
38a56a0
Compare
Choose a tag to compare

This patch reverts most of the breaking changes introduced in 1.8.0. Enforcing every JsonNode implementation to comply with Java's equals & hashCode was not necessary - in this release it works in more "hybrid" way, so the built-in JsonNode implementations take advantage of equals & hashCode, while 3rd party JsonNode implementations do not use it and fall back to old default equality check.

Summing up: custom JsonNode implementation don't need to worry about equality checks between the nodes as it will be handled automatically (assuming of course that implementation is compliant with the test suite).

What's Changed

Fixes 🛠️

  • Fix/don't use equals & hashCode of foreign JsonNode implementations by @harrel56 in #278

Dependencies 🗃️

  • chore(test-suite): incremental test suite update from upstream by @harrel56 in #279

Full Changelog: 1.8.0...1.8.1

1.8.0

18 Feb 16:14
9a8a168
Compare
Choose a tag to compare

What's Changed

Breaking changes for users implementing custom JsonNode 🚨

  • Performance/json node refactor, redesign node equality by @harrel56 in #264 - previous method isEqualTo has been removed and now JsonNode implementations are required to follow standard Java's equals & hashCode contract. Please note that equality checks are used in some keywords like const, enum or uniqueKeys, so proper equals & hashCode implementation is crucial. Version 1.8.1 gets rid of the necessity of handling equality logic yourself. Now the only backward incompatible change is that method isEqualTo is gone (it's logic has been moved to internal classes).

New features 🎉

Performance related 📈

Dependencies 🗃️

  • chore(deps): bump the all group with 4 updates by @dependabot in #258
  • chore(deps): bump the all group with 2 updates by @dependabot in #259
  • chore(deps): bump org.assertj:assertj-core from 3.27.2 to 3.27.3 in the all group by @dependabot in #260
  • chore(deps): bump com.google.code.gson:gson from 2.11.0 to 2.12.1 in the all group by @dependabot in #261
  • chore(test-suite): incremental test suite update from upstream by @harrel56 in #266
  • chore(test-suite): incremental test suite update from upstream by @harrel56 in #272
  • chore(test-suite): incremental test suite update from upstream by @harrel56 in #274
  • chore(deps): bump the all group with 2 updates by @dependabot in #276

Full Changelog: 1.7.3...1.8.0

1.7.3

02 Jan 20:38
a25fe8b
Compare
Choose a tag to compare

What's Changed

New features 🎉

  • Feature/provider versioning by @harrel56 in #257 - explicit support for JSON/YAML libraries version ranges. Small refactor of jackson provider just to support older versions

Full Changelog: 1.7.2...1.7.3

1.7.2

30 Dec 13:06
1b23744
Compare
Choose a tag to compare

What's Changed

Performance related 📈

  • Performance/rewrite sibling annotation getting, don't use Optionals by @harrel56 in #222
  • resolve refs just once by @harrel56 in #224

Fixes 🛠️

  • Replace synchronized with ReentrantLock - prevent virtual threads getting pinned by @harrel56 in #242
  • Chore/Gson compatibility by @harrel56 in #251

Dependencies 🗃️

  • Chore/update gradle actions by @harrel56 in #221
  • chore(deps): bump org.junit.jupiter:junit-jupiter-api from 5.10.3 to 5.11.0 by @dependabot in #225
  • chore(deps): bump org.junit.jupiter:junit-jupiter-engine from 5.10.3 to 5.11.0 by @dependabot in #226
  • chore(deps): bump org.junit.jupiter:junit-jupiter from 5.10.3 to 5.11.0 by @dependabot in #227
  • chore(deps): bump org.mockito:mockito-core from 5.12.0 to 5.13.0 by @dependabot in #228
  • chore(deps): bump org.jetbrains.kotlinx:kotlinx-serialization-json from 1.7.1 to 1.7.2 by @dependabot in #229
  • chore(deps): bump org.yaml:snakeyaml from 2.2 to 2.3 by @dependabot in #230
  • chore(deps): bump org.jetbrains.kotlinx:kotlinx-serialization-json from 1.7.2 to 1.7.3 by @dependabot in #231
  • chore(test-suite): incremental test suite update from upstream by @harrel56 in #232
  • chore(deps): bump org.junit.jupiter:junit-jupiter-engine from 5.11.0 to 5.11.1 by @dependabot in #233
  • chore(deps): bump org.junit.jupiter:junit-jupiter-api from 5.11.0 to 5.11.1 by @dependabot in #235
  • chore(deps): bump org.junit.jupiter:junit-jupiter from 5.11.0 to 5.11.1 by @dependabot in #236
  • chore(deps): bump org.mockito:mockito-core from 5.13.0 to 5.14.1 by @dependabot in #237
  • chore(deps): bump com.fasterxml.jackson.core:jackson-databind from 2.17.2 to 2.18.0 by @dependabot in #234
  • chore(deps): bump the all group with 3 updates by @dependabot in #241
  • chore(test-suite): incremental test suite update from upstream by @harrel56 in #243
  • chore(deps): bump the all group with 4 updates by @dependabot in #244
  • chore(deps): bump com.fasterxml.jackson.core:jackson-databind from 2.18.0 to 2.18.1 in the all group by @dependabot in #245
  • chore(deps): bump org.sonarqube from 5.1.0.4882 to 6.0.0.5145 in the all group by @dependabot in #246
  • chore(deps): bump the all group with 2 updates by @dependabot in #247
  • chore(deps): bump the all group with 3 updates by @dependabot in #248
  • chore(deps): bump org.assertj:assertj-core from 3.26.3 to 3.27.0 in the all group by @dependabot in #250

Other

Full Changelog: 1.7.1...1.7.2

1.7.1

07 Aug 19:52
21b3554
Compare
Choose a tag to compare

What's Changed

Fixes 🛠️

  • Fix/draft7 id with empty fragment + fix StringIndexOutOfBoundsException by @harrel56 in #219
  • Disallow resource path traversal for DefaultSchemaResolver by @harrel56 in #220

Dependencies 🗃️

  • chore(deps): bump org.eclipse.parsson:parsson from 1.1.6 to 1.1.7 by @dependabot in #217
  • chore(deps): bump org.jetbrains.kotlinx:kotlinx-serialization-json from 1.7.0 to 1.7.1 by @dependabot in #218

Full Changelog: 1.7.0...1.7.1

1.7.0

30 Jul 19:09
bb7c11d
Compare
Choose a tag to compare

Important notice

Despite the fact that this is just a minor release, there are a few incompatible changes. I believe that they realistically shouldn't affect any users, but if you use this library in an uncommon or advanced way, I'd recommend to familiarize yourself with the "breaking changes" section below.

What's Changed

Breaking changes 🚨

Feature/cross spec by @harrel56 in #204

General revamp on handling dialects. It supports now cross-dialect references and dynamically infers which dialect should be used based on $schema value.

There are no direct API changes, only these methods change behavior slightly:

  • ValidatorFactory.withDisabledSchemaValidation() - now, setting it to true does not disable vocabularies semantics as well (which I think was more of an unexpected side effect). It will use vocabularies from Dialect instances (official or custom if provided). It still guarantees that meta-schemas will not be resolved, so e.g. schemas with "$schema": "http://json-schema.org/draft-03/schema#" will not fail despite lack of draft3 support.
  • ValidatorFactory.withDialect() - previously, it served as a hard dialect override, meaning just this one dialect would be used regardless of $schema keyword. Now, this method registers your custom dialect and can be called multiple times for multiple registrations.

There is one new method:

  • ValidatorFactory.withDefaultDialect() - it serves similar purpose as ValidatorFactory.withDialect() previously did. By default, it's set on draf2020-12. It's just a fallback when schema does not contain $schema keyword.

Refactor/handle vocabs in evaluator factory by @harrel56 in #211

If you've overridden Evaluator.getVocabularies(), it will now have no effect as this method is no longer called by the library. If evaluator is dependent on active vocabularies state, it should now be handled in EvaluatorFactory code.

New features 🎉

  • Feature/draft7 support by @harrel56 in #212 - now draft2020-12, draft2019-09 and draft-07 are supported
  • Feature/kotlinx json provider by @harrel56 in #197 - this might be useful for users who use Kotlin

Dependencies 🗃️

  • chore(deps): bump org.jetbrains.kotlinx:kotlinx-serialization-json from 1.6.3 to 1.7.0 by @dependabot in #199
  • chore(deps): bump org.junit.jupiter:junit-jupiter from 5.10.2 to 5.10.3 by @dependabot in #205
  • chore(deps): bump org.junit.jupiter:junit-jupiter-engine from 5.10.2 to 5.10.3 by @dependabot in #206
  • chore(test-suite): incremental test suite update from upstream by @harrel56 in #214
  • chore(deps): bump com.fasterxml.jackson.core:jackson-databind from 2.17.1 to 2.17.2 by @dependabot in #208
  • chore(deps): bump org.sonarqube from 5.0.0.4638 to 5.1.0.4882 by @dependabot in #209
  • chore(deps): bump org.assertj:assertj-core from 3.26.0 to 3.26.3 by @dependabot in #210

Full Changelog: 1.6.1...1.7.0

1.6.1

20 Jun 19:43
5a5414e
Compare
Choose a tag to compare

What's Changed

Fixes 🛠️

  • Allow to validate against subschemas (URI with fragments, either JSON pointer or anchor) by @harrel56 in #202

Dependencies 🗃️

  • chore(deps): bump com.fasterxml.jackson.core:jackson-databind from 2.17.0 to 2.17.1 by @dependabot in #189
  • chore(test-suite): incremental test suite update from upstream by @harrel56 in #191
  • chore(deps): bump org.mockito:mockito-core from 5.11.0 to 5.12.0 by @dependabot in #192
  • chore(deps): bump com.google.code.gson:gson from 2.10.1 to 2.11.0 by @dependabot in #193
  • chore(test-suite): incremental test suite update from upstream by @harrel56 in #194
  • chore(deps): bump com.sanctionco.jmail:jmail from 1.6.2 to 1.6.3 by @dependabot in #195
  • chore(deps): bump org.assertj:assertj-core from 3.25.3 to 3.26.0 by @dependabot in #196
  • upgrade gradle to 8.8 by @harrel56 in #198

Full Changelog: 1.6.0...1.6.1

1.6.0

02 May 14:50
b167891
Compare
Choose a tag to compare

What's Changed

New features 🎉

Performance related 📈

  • Chore/integer vs number recognition by @harrel56 in #167
  • Performance: enum static failure message, additionalProperties small refactor by @harrel56 in #178

Fixes 🛠️

  • Fix/unevaluated for evaluted errors by @harrel56 in #175
  • Fix: return unmodifiable List/Map from JsonNode by @harrel56 in #179
  • Fix: JsonNodeFatory.wrap - make it always consistently return "root" node (for JSON pointer calculations) by @harrel56 in #181
  • Fix/use yaml constructors by @harrel56 in #186
  • Fix: concurrent processing improvements by @harrel56 in #187

Dependencies 🗃️

  • chore(deps): bump org.json:json from 20240205 to 20240303 by @dependabot in #166
  • chore(deps): bump org.mockito:mockito-core from 5.10.0 to 5.11.0 by @dependabot in #165
  • chore(deps): bump com.fasterxml.jackson.core:jackson-databind from 2.16.1 to 2.16.2 by @dependabot in #168
  • chore(deps): bump com.fasterxml.jackson.core:jackson-databind from 2.16.2 to 2.17.0 by @dependabot in #169
  • chore(deps): bump net.minidev:json-smart from 2.5.0 to 2.5.1 by @dependabot in #170
  • chore(test-suite): incremental test suite update from upstream by @harrel56 in #173
  • chore(deps): bump org.sonarqube from 4.4.1.3373 to 5.0.0.4638 by @dependabot in #172
  • chore(deps): bump org.eclipse.parsson:parsson from 1.1.5 to 1.1.6 by @dependabot in #174
  • chore(test-suite): incremental test suite update from upstream by @harrel56 in #176
  • chore(test-suite): incremental test suite update from upstream by @harrel56 in #177
  • chore(test-suite): incremental test suite update from upstream by @harrel56 in #183
  • chore(test-suite): incremental test suite update from upstream by @harrel56 in #184
  • chore(test-suite): incremental test suite update from upstream by @harrel56 in #188

Other

Full Changelog: 1.5.2...1.6.0

1.5.2

29 Feb 19:42
Compare
Choose a tag to compare

What's Changed

Performance related 📈

  • Annotation collection: let's use simple for-each loop instead of streams by @harrel56 in #159
  • Performance/cache objects and arrays by @harrel56 in #160
  • Performance/more streams as loops by @harrel56 in #162

Full Changelog: 1.5.1...1.5.2

1.5.1

21 Feb 18:52
Compare
Choose a tag to compare

What's Changed

Features

Performance related

Dependencies

  • bump gradle to 8.5 by @harrel56 in #113
  • chore(deps): bump org.mockito:mockito-core from 5.7.0 to 5.8.0 by @dependabot in #114
  • chore(deps): bump com.fasterxml.jackson.core:jackson-databind from 2.16.0 to 2.16.1 by @dependabot in #118
  • chore(deps): bump org.assertj:assertj-core from 3.24.2 to 3.25.0 by @dependabot in #119
  • chore(deps): bump org.assertj:assertj-core from 3.25.0 to 3.25.1 by @dependabot in #121
  • chore(deps): bump org.mockito:mockito-core from 5.8.0 to 5.9.0 by @dependabot in #122
  • chore(deps): bump org.mockito:mockito-core from 5.9.0 to 5.10.0 by @dependabot in #127
  • chore(deps): bump org.assertj:assertj-core from 3.25.1 to 3.25.2 by @dependabot in #128
  • bump gh-actions versions by @harrel56 in #131
  • chore(test-suite): incremental test suite update from upstream by @harrel56 in #138
  • chore(test-suite): incremental test suite update from upstream by @harrel56 in #139
  • chore(test-suite): incremental test suite update from upstream by @harrel56 in #140
  • chore(deps): bump org.junit.jupiter:junit-jupiter from 5.10.1 to 5.10.2 by @dependabot in #141
  • chore(deps): bump org.assertj:assertj-core from 3.25.2 to 3.25.3 by @dependabot in #144
  • chore(test-suite): incremental test suite update from upstream by @harrel56 in #145
  • chore(test-suite): incremental test suite update from upstream by @harrel56 in #146
  • chore(test-suite): incremental test suite update from upstream by @harrel56 in #151
  • chore(deps): bump org.json:json from 20231013 to 20240205 by @dependabot in #152

Other

Full Changelog: 1.5.0...1.5.1