Manish Kumar
Manish Kumar

Reputation: 7179

Swagger documentation for Kafka Listener

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

Upvotes: 15

Views: 8564

Answers (2)

Stav Shamir
Stav Shamir

Reputation: 1008

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)

Upvotes: 2

Timon Back
Timon Back

Reputation: 21

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.

Upvotes: 2

Related Questions