Skip to content

Commit

Permalink
fix(examples): fix asyncapi.json for the kafka-example
Browse files Browse the repository at this point in the history
  • Loading branch information
sam0r040 committed Feb 16, 2024
1 parent 56886af commit 9fe3eca
Showing 1 changed file with 42 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -69,11 +64,6 @@
"javax.money.MonetaryAmount": {
"$ref": "#/components/messages/javax.money.MonetaryAmount"
}
},
"bindings": {
"kafka": {
"bindingVersion": "0.4.0"
}
}
},
"protobuf-topic": {
Expand All @@ -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": {
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -1024,13 +997,6 @@
"title": "MonetaryAmount",
"bindings": {
"kafka": {
"key": {
"type": "string",
"description": "Kafka Consumer Message Key",
"examples": [
"example-key"
]
},
"bindingVersion": "0.4.0"
}
}
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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": {
Expand All @@ -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"
}
Expand Down

0 comments on commit 9fe3eca

Please sign in to comment.