diff --git a/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaChannelBinding.java b/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaChannelBinding.java index d24dbd34f..05b8098e0 100644 --- a/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaChannelBinding.java +++ b/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaChannelBinding.java @@ -53,5 +53,5 @@ public class KafkaChannelBinding extends ChannelBinding { */ @Builder.Default @JsonProperty("bindingVersion") - private String bindingVersion = "0.4.0"; + private String bindingVersion = "0.5.0"; } diff --git a/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaChannelTopicConfiguration.java b/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaChannelTopicConfiguration.java index 4d6f68730..84959c924 100644 --- a/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaChannelTopicConfiguration.java +++ b/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaChannelTopicConfiguration.java @@ -59,4 +59,28 @@ public class KafkaChannelTopicConfiguration { @PositiveOrZero @JsonProperty("max.message.bytes") private Integer maxMessageBytes; + + /** + * It shows whether the schema validation for the message key is enabled. Vendor specific config. + */ + @JsonProperty("confluent.key.schema.validation") + private Boolean confluentKeySchemaValidation; + + /** + * The name of the schema lookup strategy for the message key. Vendor specific config. + */ + @JsonProperty("confluent.key.subject.name.strategy") + private String confluentKeySubjectNameStrategy; + + /** + * It shows whether the schema validation for the message value is enabled. Vendor specific config. + */ + @JsonProperty("confluent.value.schema.validation") + private Boolean confluentValueSchemaValidation; + + /** + * The name of the schema lookup strategy for the message value. Vendor specific config. + */ + @JsonProperty("confluent.value.subject.name.strategy") + private String confluentValueSubjectNameStrategy; } diff --git a/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaMessageBinding.java b/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaMessageBinding.java index e3daab8de..697bc197e 100644 --- a/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaMessageBinding.java +++ b/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaMessageBinding.java @@ -48,5 +48,5 @@ public class KafkaMessageBinding extends MessageBinding { */ @Builder.Default @JsonProperty("bindingVersion") - private String bindingVersion = "0.4.0"; + private String bindingVersion = "0.5.0"; } diff --git a/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaOperationBinding.java b/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaOperationBinding.java index 3dd6a0130..9089bf90e 100644 --- a/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaOperationBinding.java +++ b/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaOperationBinding.java @@ -39,5 +39,5 @@ public class KafkaOperationBinding extends OperationBinding { */ @Builder.Default @JsonProperty("bindingVersion") - private String bindingVersion = "0.4.0"; + private String bindingVersion = "0.5.0"; } diff --git a/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaServerBinding.java b/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaServerBinding.java index d3e008159..45e58330c 100644 --- a/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaServerBinding.java +++ b/springwolf-asyncapi/src/main/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaServerBinding.java @@ -37,5 +37,5 @@ public class KafkaServerBinding extends ServerBinding { */ @Builder.Default @JsonProperty("bindingVersion") - private String bindingVersion = "0.4.0"; + private String bindingVersion = "0.5.0"; } diff --git a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaBindingTest.java b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaBindingTest.java index 17d92beba..e85f0aa32 100644 --- a/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaBindingTest.java +++ b/springwolf-asyncapi/src/test/java/io/github/springwolf/asyncapi/v3/bindings/kafka/KafkaBindingTest.java @@ -114,6 +114,10 @@ void shouldSerializeKafkaTopic() throws IOException { .retentionBytes(1000000000) .deleteRetentionMs(86400000) .maxMessageBytes(1048588) + .confluentKeySchemaValidation(true) + .confluentKeySubjectNameStrategy("TopicNameStrategy") + .confluentValueSchemaValidation(true) + .confluentValueSubjectNameStrategy("TopicNameStrategy") .build()); // Uses https://github.com/asyncapi/bindings/blob/master/amqp/README.md#example diff --git a/springwolf-asyncapi/src/test/resources/v3/asyncapi/asyncapi.json b/springwolf-asyncapi/src/test/resources/v3/asyncapi/asyncapi.json index d6d820738..eda070154 100644 --- a/springwolf-asyncapi/src/test/resources/v3/asyncapi/asyncapi.json +++ b/springwolf-asyncapi/src/test/resources/v3/asyncapi/asyncapi.json @@ -66,7 +66,7 @@ "key": { "type": "string" }, - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } } } @@ -86,7 +86,7 @@ "myGroupId" ] }, - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } }, "messages": [ diff --git a/springwolf-asyncapi/src/test/resources/v3/asyncapi/asyncapi.yaml b/springwolf-asyncapi/src/test/resources/v3/asyncapi/asyncapi.yaml index 98c6b6cb8..3a6b2c58f 100644 --- a/springwolf-asyncapi/src/test/resources/v3/asyncapi/asyncapi.yaml +++ b/springwolf-asyncapi/src/test/resources/v3/asyncapi/asyncapi.yaml @@ -46,7 +46,7 @@ components: kafka: key: type: string - bindingVersion: 0.4.0 + bindingVersion: 0.5.0 operations: new-user_listenerMethod_subscribe: action: send @@ -58,6 +58,6 @@ operations: type: string enum: - myGroupId - bindingVersion: 0.4.0 + bindingVersion: 0.5.0 messages: - "$ref": "#/channels/new-user/messages/io.github.springwolf.core.ExamplePayload" diff --git a/springwolf-asyncapi/src/test/resources/v3/bindings/kafka/kafka-channel.yaml b/springwolf-asyncapi/src/test/resources/v3/bindings/kafka/kafka-channel.yaml index 8779867be..95a3efc4d 100644 --- a/springwolf-asyncapi/src/test/resources/v3/bindings/kafka/kafka-channel.yaml +++ b/springwolf-asyncapi/src/test/resources/v3/bindings/kafka/kafka-channel.yaml @@ -11,4 +11,4 @@ channels: retention.bytes: 1000000000 delete.retention.ms: 86400000 max.message.bytes: 1048588 - bindingVersion: '0.4.0' \ No newline at end of file + bindingVersion: '0.5.0' \ No newline at end of file diff --git a/springwolf-asyncapi/src/test/resources/v3/bindings/kafka/kafka-message.yaml b/springwolf-asyncapi/src/test/resources/v3/bindings/kafka/kafka-message.yaml index 16eb2b001..88bcb08f8 100644 --- a/springwolf-asyncapi/src/test/resources/v3/bindings/kafka/kafka-message.yaml +++ b/springwolf-asyncapi/src/test/resources/v3/bindings/kafka/kafka-message.yaml @@ -11,4 +11,4 @@ channels: schemaIdLocation: 'payload' schemaIdPayloadEncoding: 'apicurio-new' schemaLookupStrategy: 'TopicIdStrategy' - bindingVersion: '0.4.0' \ No newline at end of file + bindingVersion: '0.5.0' \ No newline at end of file diff --git a/springwolf-asyncapi/src/test/resources/v3/bindings/kafka/kafka-operation.yaml b/springwolf-asyncapi/src/test/resources/v3/bindings/kafka/kafka-operation.yaml index f3d22e691..f57666008 100644 --- a/springwolf-asyncapi/src/test/resources/v3/bindings/kafka/kafka-operation.yaml +++ b/springwolf-asyncapi/src/test/resources/v3/bindings/kafka/kafka-operation.yaml @@ -9,4 +9,4 @@ operations: clientId: type: string enum: ['myClientId'] - bindingVersion: '0.4.0' \ No newline at end of file + bindingVersion: '0.5.0' \ No newline at end of file diff --git a/springwolf-asyncapi/src/test/resources/v3/bindings/kafka/kafka-server.yaml b/springwolf-asyncapi/src/test/resources/v3/bindings/kafka/kafka-server.yaml index 24242d4b5..c4c094e03 100644 --- a/springwolf-asyncapi/src/test/resources/v3/bindings/kafka/kafka-server.yaml +++ b/springwolf-asyncapi/src/test/resources/v3/bindings/kafka/kafka-server.yaml @@ -4,4 +4,4 @@ servers: kafka: schemaRegistryUrl: 'https://my-schema-registry.com' schemaRegistryVendor: 'confluent' - bindingVersion: '0.4.0' \ No newline at end of file + bindingVersion: '0.5.0' \ No newline at end of file diff --git a/springwolf-asyncapi/src/test/resources/v3/bindings/kafka/kafka-topic.yaml b/springwolf-asyncapi/src/test/resources/v3/bindings/kafka/kafka-topic.yaml index 1618436f9..54d43a227 100644 --- a/springwolf-asyncapi/src/test/resources/v3/bindings/kafka/kafka-topic.yaml +++ b/springwolf-asyncapi/src/test/resources/v3/bindings/kafka/kafka-topic.yaml @@ -3,4 +3,8 @@ topicConfiguration: retention.ms: 604800000 retention.bytes: 1000000000 delete.retention.ms: 86400000 - max.message.bytes: 1048588 \ No newline at end of file + max.message.bytes: 1048588 + confluent.key.schema.validation: true + confluent.key.subject.name.strategy: "TopicNameStrategy" + confluent.value.schema.validation: true + confluent.value.subject.name.strategy: "TopicNameStrategy" \ No newline at end of file diff --git a/springwolf-examples/springwolf-kafka-example/src/test/java/io/github/springwolf/examples/kafka/ApiIntegrationTest.java b/springwolf-examples/springwolf-kafka-example/src/test/java/io/github/springwolf/examples/kafka/ApiIntegrationTest.java index fc303cde2..34b4efd96 100644 --- a/springwolf-examples/springwolf-kafka-example/src/test/java/io/github/springwolf/examples/kafka/ApiIntegrationTest.java +++ b/springwolf-examples/springwolf-kafka-example/src/test/java/io/github/springwolf/examples/kafka/ApiIntegrationTest.java @@ -22,7 +22,7 @@ webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @EmbeddedKafka(partitions = 1) @DirtiesContext -public class ApiIntegrationTest { +class ApiIntegrationTest { @Autowired private TestRestTemplate restTemplate; diff --git a/springwolf-examples/springwolf-kafka-example/src/test/resources/asyncapi.json b/springwolf-examples/springwolf-kafka-example/src/test/resources/asyncapi.json index fb10b23a4..787d71ca5 100644 --- a/springwolf-examples/springwolf-kafka-example/src/test/resources/asyncapi.json +++ b/springwolf-examples/springwolf-kafka-example/src/test/resources/asyncapi.json @@ -30,7 +30,7 @@ }, "bindings": { "kafka": { - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } } }, @@ -49,7 +49,7 @@ }, "bindings": { "kafka": { - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } } }, @@ -74,7 +74,7 @@ }, "bindings": { "kafka": { - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } } }, @@ -1092,7 +1092,7 @@ "title": "StringEnvelope", "bindings": { "kafka": { - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } } }, @@ -1110,7 +1110,7 @@ "title": "AnotherPayloadAvroDto", "bindings": { "kafka": { - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } } }, @@ -1128,7 +1128,7 @@ "title": "Message", "bindings": { "kafka": { - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } } }, @@ -1146,7 +1146,7 @@ "title": "AnotherPayloadDto", "bindings": { "kafka": { - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } } }, @@ -1164,7 +1164,7 @@ "title": "ExamplePayloadDto", "bindings": { "kafka": { - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } } }, @@ -1190,7 +1190,7 @@ "example-key" ] }, - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } } }, @@ -1209,7 +1209,7 @@ "title": "XmlPayloadDto", "bindings": { "kafka": { - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } } }, @@ -1228,7 +1228,7 @@ "title": "YamlPayloadDto", "bindings": { "kafka": { - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } } }, @@ -1246,7 +1246,7 @@ "title": "String", "bindings": { "kafka": { - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } } }, @@ -1271,7 +1271,7 @@ "example-key" ] }, - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } } } @@ -1291,7 +1291,7 @@ "example-group-id" ] }, - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } }, "messages": [ @@ -1309,7 +1309,7 @@ "description": "Requires a running kafka-schema-registry. See docker-compose.yml to start it", "bindings": { "kafka": { - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } }, "messages": [ @@ -1325,7 +1325,7 @@ }, "bindings": { "kafka": { - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } }, "messages": [ @@ -1341,7 +1341,7 @@ }, "bindings": { "kafka": { - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } }, "messages": [ @@ -1377,7 +1377,7 @@ "foo-clientId" ] }, - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } }, "messages": [ @@ -1393,7 +1393,7 @@ }, "bindings": { "kafka": { - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } }, "messages": [ @@ -1411,7 +1411,7 @@ "description": "Final classes (like String) can be documented using an envelope class and the @AsyncApiPayload annotation.", "bindings": { "kafka": { - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } }, "messages": [ @@ -1438,7 +1438,7 @@ "foo-clientId" ] }, - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } }, "messages": [ @@ -1456,7 +1456,7 @@ "description": "Showcases a xml based message", "bindings": { "kafka": { - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } }, "messages": [ @@ -1474,7 +1474,7 @@ "description": "Showcases a yaml based message", "bindings": { "kafka": { - "bindingVersion": "0.4.0" + "bindingVersion": "0.5.0" } }, "messages": [ diff --git a/springwolf-ui/package-lock.json b/springwolf-ui/package-lock.json index 37b807ac5..456ea0719 100644 --- a/springwolf-ui/package-lock.json +++ b/springwolf-ui/package-lock.json @@ -27,7 +27,7 @@ "@angular-devkit/build-angular": "^17.2.0", "@angular/cli": "^17.2.0", "@angular/compiler-cli": "^17.2.1", - "@asyncapi/parser": "^3.0.10", + "@asyncapi/parser": "^3.0.11", "@testing-library/angular": "^15.2.0", "@types/jest": "^29.5.12", "@types/node": "^18.18.0", @@ -1035,12 +1035,12 @@ } }, "node_modules/@asyncapi/parser": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.10.tgz", - "integrity": "sha512-x9qo7SHGzPWbC1XCRyilcI+Z6UZsWZ9uRl05h9j4G/v+3IjNG3krwngiAbt59nbLlYZD/nBS7Hc03GayoocnQw==", + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.11.tgz", + "integrity": "sha512-YrmPY6Me7Eh6yH7xISKrDuiybaNVDUxVjbChUAoJZ4dnVGAmMVTxQTlwoqEwQ9bfTHzAb3RixdJ3TC6I4RoHNw==", "dev": true, "dependencies": { - "@asyncapi/specs": "^6.5.3", + "@asyncapi/specs": "^6.5.4", "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", "@stoplight/json": "^3.20.2", "@stoplight/json-ref-readers": "^1.2.2", @@ -1080,9 +1080,9 @@ } }, "node_modules/@asyncapi/specs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-6.5.3.tgz", - "integrity": "sha512-mZROlCOLkZEWy5tN4pPop3JEJflSKmLLMGO1TebF5wjnroqZ3yp/GuGUxVIl3jVNxFk1i5nZ2AtWzAD/HaUj3Q==", + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-6.5.4.tgz", + "integrity": "sha512-olC+iuboGIGjFRKuqfwaXxm5I6Wae3JohmySwMfExl21nYUd88IbfwywunOPLWyLV05aXeoTJ5tDXiM9e4gWcQ==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.11" diff --git a/springwolf-ui/package.json b/springwolf-ui/package.json index c53ccc9c1..7db02374a 100644 --- a/springwolf-ui/package.json +++ b/springwolf-ui/package.json @@ -29,7 +29,7 @@ "@angular-devkit/build-angular": "^17.2.0", "@angular/cli": "^17.2.0", "@angular/compiler-cli": "^17.2.1", - "@asyncapi/parser": "^3.0.10", + "@asyncapi/parser": "^3.0.11", "@testing-library/angular": "^15.2.0", "@types/jest": "^29.5.12", "@types/node": "^18.18.0", @@ -38,4 +38,4 @@ "jest-preset-angular": "^14.0.3", "typescript": "^5.3.3" } -} \ No newline at end of file +}