swagger4kafka

Automated JSON API documentation for Kafka Listeners built with Spring

License

License

Categories

Categories

Swagger Program Interface REST Frameworks
GroupId

GroupId

com.stavshamir
ArtifactId

ArtifactId

swagger4kafka
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

swagger4kafka
Automated JSON API documentation for Kafka Listeners built with Spring
Project URL

Project URL

https://github.com/stavshamir/swagger4kafka
Source Code Management

Source Code Management

https://github.com/stavshamir/swagger4kafka

Download swagger4kafka

How to add to project

<!-- https://jarcasting.com/artifacts/com.stavshamir/swagger4kafka/ -->
<dependency>
    <groupId>com.stavshamir</groupId>
    <artifactId>swagger4kafka</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.stavshamir/swagger4kafka/
implementation 'com.stavshamir:swagger4kafka:1.1.0'
// https://jarcasting.com/artifacts/com.stavshamir/swagger4kafka/
implementation ("com.stavshamir:swagger4kafka:1.1.0")
'com.stavshamir:swagger4kafka:jar:1.1.0'
<dependency org="com.stavshamir" name="swagger4kafka" rev="1.1.0">
  <artifact name="swagger4kafka" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.stavshamir', module='swagger4kafka', version='1.1.0')
)
libraryDependencies += "com.stavshamir" % "swagger4kafka" % "1.1.0"
[com.stavshamir/swagger4kafka "1.1.0"]

Dependencies

runtime (7)

Group / Artifact Type Version
io.swagger : swagger-inflector jar 1.0.16
io.springfox : springfox-core jar 2.8.0
org.springframework.boot : spring-boot-starter jar
org.springframework.boot : spring-boot-starter-web jar
org.springframework.kafka : spring-kafka jar
com.google.guava : guava jar 27.0.1-jre
com.fasterxml.jackson.core : jackson-databind jar 2.9.4

test (3)

Group / Artifact Type Version
org.assertj : assertj-core jar 3.11.1
org.springframework.boot : spring-boot-starter-test jar
org.springframework.kafka : spring-kafka-test jar

Project Modules

There are no modules declared in this project.

version springwolf-core License

Springwolf Core

Automated documentation for async APIs built with Spring Boot

Table Of Contents

About

This project is inspired by Springfox, but instead of documenting REST APIs, it documents async APIs.

The resulting document is compliant with the asyncapi specification and is provided as a web UI, much like that of Springfox, and allows easy publishing of autogenerated payload examples.

Demo

You can take a look at a live demo of springwolf.

Supported protocols

  • Kafka
  • SQS (coming soon!)

Why you should use it

In projects using async APIs, you may often find yourself needing to manually send a message to some topic, whether if you are manually testing a new feature, debugging or trying to understand some flow. This requires:

  1. Instantiating a payload object
  2. Serializing your payload object
  3. Publishing it by the CLI or some other interface.

Springwolf exploits the fact you already fully described your consumer endpoint (with listener annotations, such as @KafkaListner) and automatically generates an example payload object for the appropriate payload and allows you to publish it to the correct channel with a single click.

Usage

You should not be using this dependency in your application. Instead, use one of the supported protocols plugins:

Example Project

You can run the provided docker-compose file and check localhost:8080/asyncapi-ui.html. The source can be found here.

Development

Local Snapshots

To work with local snapshots, run the publishToMavenLocal task with -Dsnapshot=true.

Versions

Version
1.1.0
1.0.0