I have used Swagger to generate a document for rest API, but I am building Kafka listener and wanted to generate a document for it. Do we have any possibility using Swagger or something similar?
Thanks, Manish
I have used Swagger to generate a document for rest API, but I am building Kafka listener and wanted to generate a document for it. Do we have any possibility using Swagger or something similar?
Thanks, Manish
I have faced the same need, and decided to create something myself.
I call it swagger4kafka, and it works very similar to swagger, but it documents @KafkaListener
annotated methods instead of RestController
methods.
Its source is hosted in github: swagger4kafka repository In the readme section you can find how to use it.
I would not say it is production ready yet, but I think it can be quite useful for internal use.
Note:
'swagger4kafka' is now called 'Springwolf' (and also support RabbitMQ)
Stav Shamir has actually created an improved open source solution called Springwolf.
It does auto-detect the KafkaListener annotations and creates AsyncAPI compliant documentation for the asynchronous world (i.e. Kafka) - just like Swagger does for synchronous REST APIs.
© 2022 - 2024 — McMap. All rights reserved.