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 259ea94bf..56d0446cf 100644 --- a/springwolf-examples/springwolf-kafka-example/src/test/resources/asyncapi.json +++ b/springwolf-examples/springwolf-kafka-example/src/test/resources/asyncapi.json @@ -39,11 +39,6 @@ "io.github.stavshamir.springwolf.example.kafka.dto.avro.AnotherPayloadAvroDto": { "$ref": "#/components/messages/io.github.stavshamir.springwolf.example.kafka.dto.avro.AnotherPayloadAvroDto" } - }, - "bindings": { - "kafka": { - "bindingVersion": "0.4.0" - } } }, "example-topic": { @@ -69,11 +64,6 @@ "javax.money.MonetaryAmount": { "$ref": "#/components/messages/javax.money.MonetaryAmount" } - }, - "bindings": { - "kafka": { - "bindingVersion": "0.4.0" - } } }, "protobuf-topic": { @@ -90,14 +80,12 @@ }, "string-topic": { "messages": { + "io.github.stavshamir.springwolf.example.kafka.consumers.StringConsumer$StringEnvelope": { + "$ref": "#/components/messages/io.github.stavshamir.springwolf.example.kafka.consumers.StringConsumer$StringEnvelope" + }, "java.lang.String": { "$ref": "#/components/messages/java.lang.String" } - }, - "bindings": { - "kafka": { - "bindingVersion": "0.4.0" - } } }, "topic-defined-via-asyncPublisher-annotation": { @@ -917,7 +905,7 @@ }, "io.github.stavshamir.springwolf.example.kafka.dtos.AnotherPayloadDto": { "headers": { - "$ref": "#/components/schemas/SpringKafkaDefaultHeaders-AnotherPayloadDto" + "$ref": "#/components/schemas/HeadersNotDocumented" }, "payload": { "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", @@ -935,7 +923,7 @@ }, "io.github.stavshamir.springwolf.example.kafka.dtos.ExamplePayloadDto": { "headers": { - "$ref": "#/components/schemas/SpringKafkaDefaultHeaders-ExamplePayloadDto" + "$ref": "#/components/schemas/HeadersNotDocumented" }, "payload": { "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", @@ -977,21 +965,6 @@ } } }, - "io.github.stavshamir.springwolf.example.kafka.dtos.XmlPayloadDto": { - "headers": { - "$ref": "#/components/schemas/HeadersNotDocumented" - }, - "payload": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "$ref": "#/components/schemas/io.github.stavshamir.springwolf.example.kafka.dtos.XmlPayloadDto" - } - }, - "contentType": "text/xml", - "name": "io.github.stavshamir.springwolf.example.kafka.dtos.XmlPayloadDto", - "title": "XmlPayloadDto", - "bindings": { } - }, "java.lang.String": { "headers": { "$ref": "#/components/schemas/HeadersNotDocumented" @@ -1024,13 +997,6 @@ "title": "MonetaryAmount", "bindings": { "kafka": { - "key": { - "type": "string", - "description": "Kafka Consumer Message Key", - "examples": [ - "example-key" - ] - }, "bindingVersion": "0.4.0" } } @@ -1065,6 +1031,8 @@ "channel": { "$ref": "#/channels/avro-topic" }, + "title": "avro-topic_receive", + "description": "Requires a running kafka-schema-registry. See docker-compose.yml to start it", "bindings": { "kafka": { "bindingVersion": "0.4.0" @@ -1114,6 +1082,36 @@ } ] }, + "multi-payload-topic_receive_receiveMonetaryAmount": { + "action": "receive", + "channel": { + "$ref": "#/channels/multi-payload-topic" + }, + "title": "multi-payload-topic_receive", + "description": "Override description in the AsyncListener annotation with servers at kafka:29092", + "bindings": { + "kafka": { + "groupId": { + "type": "string", + "enum": [ + "foo-groupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "foo-clientId" + ] + }, + "bindingVersion": "0.4.0" + } + }, + "messages": [ + { + "$ref": "#/channels/multi-payload-topic/messages/javax.money.MonetaryAmount" + } + ] + }, "protobuf-topic_receive_receiveExampleProtobufPayload": { "action": "receive", "channel": { @@ -1135,12 +1133,17 @@ "channel": { "$ref": "#/channels/string-topic" }, + "title": "string-topic_receive", + "description": "Final classes (like String) can be documented using an envelope class and the @AsyncApiPayload annotation.", "bindings": { "kafka": { "bindingVersion": "0.4.0" } }, "messages": [ + { + "$ref": "#/channels/string-topic/messages/io.github.stavshamir.springwolf.example.kafka.consumers.StringConsumer$StringEnvelope" + }, { "$ref": "#/channels/string-topic/messages/java.lang.String" }