Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jakarta-websocket-api = "jakarta.websocket:jakarta.websocket-api:2.2.0"
jakarta-websocket-client-api = "jakarta.websocket:jakarta.websocket-client-api:2.2.0"
jakarta-xml-bind-api = "jakarta.xml.bind:jakarta.xml.bind-api:4.0.4"
jetbrains-annotations = "org.jetbrains:annotations:26.0.2"
json-schema-validator = "com.networknt:json-schema-validator:1.5.9"
json-schema-validator = "com.networknt:json-schema-validator:3.0.0"
json-unit-assertj = "net.javacrumbs.json-unit:json-unit-assertj:5.1.0"
jspecify = "org.jspecify:jspecify:1.0.0"
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "org-junit-jupiter" }
Expand Down
2 changes: 1 addition & 1 deletion springwolf-add-ons/springwolf-json-schema/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Example:
"MonetaryAmount-Header": {
"...": "",
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"name": "MonetaryAmount-Header",
"properties": {
"__TypeId__": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class JsonSchemaGenerator {

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

return jsonMapper.readValue(node.toString(), Object.class);
}
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
{ }
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"description": "There can be headers, but they are not explicitly documented.",
"title": "HeadersNotDocumented",
"type": "object"
Expand All @@ -242,7 +242,7 @@
{ }
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"description": "No headers are present.",
"title": "HeadersNotUsed",
"type": "object"
Expand All @@ -257,7 +257,7 @@
{ }
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"description": "No payload specified",
"title": "PayloadNotUsed",
"type": "object"
Expand Down Expand Up @@ -370,7 +370,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"description": "Spring __TypeId__ and CloudEvent Headers",
"properties": {
"__TypeId__": {
Expand Down Expand Up @@ -464,7 +464,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"__TypeId__": {
"description": "Spring Type Id Header",
Expand Down Expand Up @@ -501,7 +501,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"__TypeId__": {
"description": "Spring Type Id Header",
Expand Down Expand Up @@ -539,7 +539,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"__TypeId__": {
"description": "Type ID",
Expand Down Expand Up @@ -602,7 +602,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"__TypeId__": {
"description": "Spring Type Id Header",
Expand Down Expand Up @@ -650,7 +650,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"__TypeId__": {
"description": "Spring Type Id Header",
Expand Down Expand Up @@ -687,7 +687,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"__TypeId__": {
"description": "Spring Type Id Header",
Expand Down Expand Up @@ -724,7 +724,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"__TypeId__": {
"description": "Spring Type Id Header",
Expand Down Expand Up @@ -761,7 +761,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"__TypeId__": {
"description": "Spring Type Id Header",
Expand Down Expand Up @@ -798,7 +798,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"__TypeId__": {
"description": "Spring Type Id Header",
Expand Down Expand Up @@ -835,7 +835,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"__TypeId__": {
"description": "Spring Type Id Header",
Expand Down Expand Up @@ -872,7 +872,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"__TypeId__": {
"description": "Spring Type Id Header",
Expand Down Expand Up @@ -909,7 +909,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"__TypeId__": {
"description": "Spring Type Id Header",
Expand Down Expand Up @@ -946,7 +946,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"__TypeId__": {
"description": "Spring Type Id Header",
Expand All @@ -969,7 +969,7 @@
"\"string\""
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"description": "Payload description using @Schema annotation and @AsyncApiPayload within envelope class",
"maxLength": 100,
"type": "string"
Expand Down Expand Up @@ -1001,7 +1001,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"examplePayloadAvroDto": {
"properties": {
Expand Down Expand Up @@ -1048,7 +1048,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"someLong": {
"format": "int64",
Expand Down Expand Up @@ -1091,7 +1091,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"someEnum": {
"enum": [
Expand Down Expand Up @@ -1145,7 +1145,7 @@
"example"
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"description": "Another payload model",
"properties": {
"example": {
Expand Down Expand Up @@ -1237,7 +1237,7 @@
"someString"
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"description": "Example payload model demonstrating markdown text styling:\n**bold**, *cursive* and <u>underlined</u>\n",
"properties": {
"someEnum": {
Expand Down Expand Up @@ -1306,7 +1306,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"description": "Payload model with nested complex types",
"properties": {
"examplePayloads": {
Expand Down Expand Up @@ -1410,7 +1410,7 @@
"requiredField"
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"description": "Demonstrate required and nullable. Note, @Schema is only descriptive without nullability check",
"properties": {
"enumField": {
Expand Down Expand Up @@ -1484,7 +1484,7 @@
"<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>"
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"someAttribute": { },
"someEnum": {
Expand Down Expand Up @@ -1531,7 +1531,7 @@
"someEnum: FOO1\nsomeLong: 0\nsomeString: string\n"
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"someEnum": {
"enum": [
Expand Down Expand Up @@ -1573,7 +1573,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"hp": {
"format": "int32",
Expand Down Expand Up @@ -1627,7 +1627,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"description": "Demonstrates the use of discriminator for polymorphic deserialization (not publishable)",
"oneOf": [
{
Expand Down Expand Up @@ -1715,7 +1715,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"allOf": [
{
"description": "Demonstrates the use of discriminator for polymorphic deserialization (not publishable)",
Expand Down Expand Up @@ -1798,7 +1798,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"allOf": [
{
"description": "Demonstrates the use of discriminator for polymorphic deserialization (not publishable)",
Expand Down Expand Up @@ -1858,7 +1858,7 @@
0
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"format": "int32",
"type": "integer"
}
Expand All @@ -1869,7 +1869,7 @@
"\"string\""
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"type": "string"
}
},
Expand Down Expand Up @@ -1897,7 +1897,7 @@
}
],
"x-json-schema": {
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"amount": {
"exclusiveMinimum": 0.01,
Expand Down
Loading
Loading