Skip to content

Commit a435528

Browse files
chore(deps): Bump com.networknt:json-schema-validator from 1.5.9 to 3.0.0 (#1555)
* chore(deps): Bump com.networknt:json-schema-validator Bumps [com.networknt:json-schema-validator](https://github.com/networknt/json-schema-validator) from 1.5.9 to 3.0.0. - [Release notes](https://github.com/networknt/json-schema-validator/releases) - [Changelog](https://github.com/networknt/json-schema-validator/blob/master/CHANGELOG.md) - [Commits](networknt/json-schema-validator@1.5.9...3.0.0) --- updated-dependencies: - dependency-name: com.networknt:json-schema-validator dependency-version: 3.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * chore(json-schema): use api of version 3 and switch to json draft-07 --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Timon Back <[email protected]>
1 parent cfcaa24 commit a435528

File tree

8 files changed

+122
-116
lines changed

8 files changed

+122
-116
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jakarta-websocket-api = "jakarta.websocket:jakarta.websocket-api:2.2.0"
4747
jakarta-websocket-client-api = "jakarta.websocket:jakarta.websocket-client-api:2.2.0"
4848
jakarta-xml-bind-api = "jakarta.xml.bind:jakarta.xml.bind-api:4.0.4"
4949
jetbrains-annotations = "org.jetbrains:annotations:26.0.2"
50-
json-schema-validator = "com.networknt:json-schema-validator:1.5.9"
50+
json-schema-validator = "com.networknt:json-schema-validator:3.0.0"
5151
json-unit-assertj = "net.javacrumbs.json-unit:json-unit-assertj:5.1.0"
5252
jspecify = "org.jspecify:jspecify:1.0.0"
5353
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "org-junit-jupiter" }

springwolf-add-ons/springwolf-json-schema/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Example:
3838
"MonetaryAmount-Header": {
3939
"...": "",
4040
"x-json-schema": {
41-
"$schema": "https://json-schema.org/draft-04/schema#",
41+
"$schema": "https://json-schema.org/draft-07/schema#",
4242
"name": "MonetaryAmount-Header",
4343
"properties": {
4444
"__TypeId__": {

springwolf-add-ons/springwolf-json-schema/src/main/java/io/github/springwolf/addons/json_schema/JsonSchemaGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class JsonSchemaGenerator {
2525

2626
public Object fromSchema(ComponentSchema schema, Map<String, ComponentSchema> definitions) throws JacksonException {
2727
ObjectNode node = fromSchemaInternal(schema, definitions, new HashSet<>());
28-
node.put("$schema", "https://json-schema.org/draft-04/schema#");
28+
node.put("$schema", "https://json-schema.org/draft-07/schema#");
2929

3030
return jsonMapper.readValue(node.toString(), Object.class);
3131
}

springwolf-add-ons/springwolf-json-schema/src/test/java/io/github/springwolf/addons/json_schema/JsonSchemaGeneratorTest.java

Lines changed: 43 additions & 37 deletions
Large diffs are not rendered by default.

springwolf-examples/springwolf-kafka-example/src/test/resources/asyncapi.json

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227
{ }
228228
],
229229
"x-json-schema": {
230-
"$schema": "https://json-schema.org/draft-04/schema#",
230+
"$schema": "https://json-schema.org/draft-07/schema#",
231231
"description": "There can be headers, but they are not explicitly documented.",
232232
"title": "HeadersNotDocumented",
233233
"type": "object"
@@ -242,7 +242,7 @@
242242
{ }
243243
],
244244
"x-json-schema": {
245-
"$schema": "https://json-schema.org/draft-04/schema#",
245+
"$schema": "https://json-schema.org/draft-07/schema#",
246246
"description": "No headers are present.",
247247
"title": "HeadersNotUsed",
248248
"type": "object"
@@ -257,7 +257,7 @@
257257
{ }
258258
],
259259
"x-json-schema": {
260-
"$schema": "https://json-schema.org/draft-04/schema#",
260+
"$schema": "https://json-schema.org/draft-07/schema#",
261261
"description": "No payload specified",
262262
"title": "PayloadNotUsed",
263263
"type": "object"
@@ -370,7 +370,7 @@
370370
}
371371
],
372372
"x-json-schema": {
373-
"$schema": "https://json-schema.org/draft-04/schema#",
373+
"$schema": "https://json-schema.org/draft-07/schema#",
374374
"description": "Spring __TypeId__ and CloudEvent Headers",
375375
"properties": {
376376
"__TypeId__": {
@@ -464,7 +464,7 @@
464464
}
465465
],
466466
"x-json-schema": {
467-
"$schema": "https://json-schema.org/draft-04/schema#",
467+
"$schema": "https://json-schema.org/draft-07/schema#",
468468
"properties": {
469469
"__TypeId__": {
470470
"description": "Spring Type Id Header",
@@ -501,7 +501,7 @@
501501
}
502502
],
503503
"x-json-schema": {
504-
"$schema": "https://json-schema.org/draft-04/schema#",
504+
"$schema": "https://json-schema.org/draft-07/schema#",
505505
"properties": {
506506
"__TypeId__": {
507507
"description": "Spring Type Id Header",
@@ -539,7 +539,7 @@
539539
}
540540
],
541541
"x-json-schema": {
542-
"$schema": "https://json-schema.org/draft-04/schema#",
542+
"$schema": "https://json-schema.org/draft-07/schema#",
543543
"properties": {
544544
"__TypeId__": {
545545
"description": "Type ID",
@@ -602,7 +602,7 @@
602602
}
603603
],
604604
"x-json-schema": {
605-
"$schema": "https://json-schema.org/draft-04/schema#",
605+
"$schema": "https://json-schema.org/draft-07/schema#",
606606
"properties": {
607607
"__TypeId__": {
608608
"description": "Spring Type Id Header",
@@ -650,7 +650,7 @@
650650
}
651651
],
652652
"x-json-schema": {
653-
"$schema": "https://json-schema.org/draft-04/schema#",
653+
"$schema": "https://json-schema.org/draft-07/schema#",
654654
"properties": {
655655
"__TypeId__": {
656656
"description": "Spring Type Id Header",
@@ -687,7 +687,7 @@
687687
}
688688
],
689689
"x-json-schema": {
690-
"$schema": "https://json-schema.org/draft-04/schema#",
690+
"$schema": "https://json-schema.org/draft-07/schema#",
691691
"properties": {
692692
"__TypeId__": {
693693
"description": "Spring Type Id Header",
@@ -724,7 +724,7 @@
724724
}
725725
],
726726
"x-json-schema": {
727-
"$schema": "https://json-schema.org/draft-04/schema#",
727+
"$schema": "https://json-schema.org/draft-07/schema#",
728728
"properties": {
729729
"__TypeId__": {
730730
"description": "Spring Type Id Header",
@@ -761,7 +761,7 @@
761761
}
762762
],
763763
"x-json-schema": {
764-
"$schema": "https://json-schema.org/draft-04/schema#",
764+
"$schema": "https://json-schema.org/draft-07/schema#",
765765
"properties": {
766766
"__TypeId__": {
767767
"description": "Spring Type Id Header",
@@ -798,7 +798,7 @@
798798
}
799799
],
800800
"x-json-schema": {
801-
"$schema": "https://json-schema.org/draft-04/schema#",
801+
"$schema": "https://json-schema.org/draft-07/schema#",
802802
"properties": {
803803
"__TypeId__": {
804804
"description": "Spring Type Id Header",
@@ -835,7 +835,7 @@
835835
}
836836
],
837837
"x-json-schema": {
838-
"$schema": "https://json-schema.org/draft-04/schema#",
838+
"$schema": "https://json-schema.org/draft-07/schema#",
839839
"properties": {
840840
"__TypeId__": {
841841
"description": "Spring Type Id Header",
@@ -872,7 +872,7 @@
872872
}
873873
],
874874
"x-json-schema": {
875-
"$schema": "https://json-schema.org/draft-04/schema#",
875+
"$schema": "https://json-schema.org/draft-07/schema#",
876876
"properties": {
877877
"__TypeId__": {
878878
"description": "Spring Type Id Header",
@@ -909,7 +909,7 @@
909909
}
910910
],
911911
"x-json-schema": {
912-
"$schema": "https://json-schema.org/draft-04/schema#",
912+
"$schema": "https://json-schema.org/draft-07/schema#",
913913
"properties": {
914914
"__TypeId__": {
915915
"description": "Spring Type Id Header",
@@ -946,7 +946,7 @@
946946
}
947947
],
948948
"x-json-schema": {
949-
"$schema": "https://json-schema.org/draft-04/schema#",
949+
"$schema": "https://json-schema.org/draft-07/schema#",
950950
"properties": {
951951
"__TypeId__": {
952952
"description": "Spring Type Id Header",
@@ -969,7 +969,7 @@
969969
"\"string\""
970970
],
971971
"x-json-schema": {
972-
"$schema": "https://json-schema.org/draft-04/schema#",
972+
"$schema": "https://json-schema.org/draft-07/schema#",
973973
"description": "Payload description using @Schema annotation and @AsyncApiPayload within envelope class",
974974
"maxLength": 100,
975975
"type": "string"
@@ -1001,7 +1001,7 @@
10011001
}
10021002
],
10031003
"x-json-schema": {
1004-
"$schema": "https://json-schema.org/draft-04/schema#",
1004+
"$schema": "https://json-schema.org/draft-07/schema#",
10051005
"properties": {
10061006
"examplePayloadAvroDto": {
10071007
"properties": {
@@ -1048,7 +1048,7 @@
10481048
}
10491049
],
10501050
"x-json-schema": {
1051-
"$schema": "https://json-schema.org/draft-04/schema#",
1051+
"$schema": "https://json-schema.org/draft-07/schema#",
10521052
"properties": {
10531053
"someLong": {
10541054
"format": "int64",
@@ -1091,7 +1091,7 @@
10911091
}
10921092
],
10931093
"x-json-schema": {
1094-
"$schema": "https://json-schema.org/draft-04/schema#",
1094+
"$schema": "https://json-schema.org/draft-07/schema#",
10951095
"properties": {
10961096
"someEnum": {
10971097
"enum": [
@@ -1145,7 +1145,7 @@
11451145
"example"
11461146
],
11471147
"x-json-schema": {
1148-
"$schema": "https://json-schema.org/draft-04/schema#",
1148+
"$schema": "https://json-schema.org/draft-07/schema#",
11491149
"description": "Another payload model",
11501150
"properties": {
11511151
"example": {
@@ -1237,7 +1237,7 @@
12371237
"someString"
12381238
],
12391239
"x-json-schema": {
1240-
"$schema": "https://json-schema.org/draft-04/schema#",
1240+
"$schema": "https://json-schema.org/draft-07/schema#",
12411241
"description": "Example payload model demonstrating markdown text styling:\n**bold**, *cursive* and <u>underlined</u>\n",
12421242
"properties": {
12431243
"someEnum": {
@@ -1306,7 +1306,7 @@
13061306
}
13071307
],
13081308
"x-json-schema": {
1309-
"$schema": "https://json-schema.org/draft-04/schema#",
1309+
"$schema": "https://json-schema.org/draft-07/schema#",
13101310
"description": "Payload model with nested complex types",
13111311
"properties": {
13121312
"examplePayloads": {
@@ -1410,7 +1410,7 @@
14101410
"requiredField"
14111411
],
14121412
"x-json-schema": {
1413-
"$schema": "https://json-schema.org/draft-04/schema#",
1413+
"$schema": "https://json-schema.org/draft-07/schema#",
14141414
"description": "Demonstrate required and nullable. Note, @Schema is only descriptive without nullability check",
14151415
"properties": {
14161416
"enumField": {
@@ -1484,7 +1484,7 @@
14841484
"<io.github.springwolf.examples.kafka.dtos.XmlPayloadDto someAttribute=\"string\"><someEnum>FOO1</someEnum><someLong>0</someLong><someString>string</someString></io.github.springwolf.examples.kafka.dtos.XmlPayloadDto>"
14851485
],
14861486
"x-json-schema": {
1487-
"$schema": "https://json-schema.org/draft-04/schema#",
1487+
"$schema": "https://json-schema.org/draft-07/schema#",
14881488
"properties": {
14891489
"someAttribute": { },
14901490
"someEnum": {
@@ -1531,7 +1531,7 @@
15311531
"someEnum: FOO1\nsomeLong: 0\nsomeString: string\n"
15321532
],
15331533
"x-json-schema": {
1534-
"$schema": "https://json-schema.org/draft-04/schema#",
1534+
"$schema": "https://json-schema.org/draft-07/schema#",
15351535
"properties": {
15361536
"someEnum": {
15371537
"enum": [
@@ -1573,7 +1573,7 @@
15731573
}
15741574
],
15751575
"x-json-schema": {
1576-
"$schema": "https://json-schema.org/draft-04/schema#",
1576+
"$schema": "https://json-schema.org/draft-07/schema#",
15771577
"properties": {
15781578
"hp": {
15791579
"format": "int32",
@@ -1627,7 +1627,7 @@
16271627
}
16281628
],
16291629
"x-json-schema": {
1630-
"$schema": "https://json-schema.org/draft-04/schema#",
1630+
"$schema": "https://json-schema.org/draft-07/schema#",
16311631
"description": "Demonstrates the use of discriminator for polymorphic deserialization (not publishable)",
16321632
"oneOf": [
16331633
{
@@ -1715,7 +1715,7 @@
17151715
}
17161716
],
17171717
"x-json-schema": {
1718-
"$schema": "https://json-schema.org/draft-04/schema#",
1718+
"$schema": "https://json-schema.org/draft-07/schema#",
17191719
"allOf": [
17201720
{
17211721
"description": "Demonstrates the use of discriminator for polymorphic deserialization (not publishable)",
@@ -1798,7 +1798,7 @@
17981798
}
17991799
],
18001800
"x-json-schema": {
1801-
"$schema": "https://json-schema.org/draft-04/schema#",
1801+
"$schema": "https://json-schema.org/draft-07/schema#",
18021802
"allOf": [
18031803
{
18041804
"description": "Demonstrates the use of discriminator for polymorphic deserialization (not publishable)",
@@ -1858,7 +1858,7 @@
18581858
0
18591859
],
18601860
"x-json-schema": {
1861-
"$schema": "https://json-schema.org/draft-04/schema#",
1861+
"$schema": "https://json-schema.org/draft-07/schema#",
18621862
"format": "int32",
18631863
"type": "integer"
18641864
}
@@ -1869,7 +1869,7 @@
18691869
"\"string\""
18701870
],
18711871
"x-json-schema": {
1872-
"$schema": "https://json-schema.org/draft-04/schema#",
1872+
"$schema": "https://json-schema.org/draft-07/schema#",
18731873
"type": "string"
18741874
}
18751875
},
@@ -1897,7 +1897,7 @@
18971897
}
18981898
],
18991899
"x-json-schema": {
1900-
"$schema": "https://json-schema.org/draft-04/schema#",
1900+
"$schema": "https://json-schema.org/draft-07/schema#",
19011901
"properties": {
19021902
"amount": {
19031903
"exclusiveMinimum": 0.01,

0 commit comments

Comments
 (0)