tapir icon indicating copy to clipboard operation
tapir copied to clipboard

Support for JMS documentation using AsyncAPI

Open rwalpole opened this issue 3 years ago • 3 comments

We are developing a service which is written in Scala and has a JMS 1.1 messaging API, with the intention of using the Amazon SQS implementation in production (we are using Softwaremill's ElasticMQ for development). We have hand-crafted some AsyncAPI documents for our users but would love to be able to auto-generate these from our JSON message case classes (we are using Circe). I was very excited to discover tapir as it seems to be doing most of what we need to achieve this, but it seems it doesn't support the JMS 1.1 protocol for AsyncAPI documentation. Am I missing something? If not, how difficult would it be to implement this? I'm thinking this might be something our organisation could contribute to your project.

rwalpole avatar Apr 13 '22 10:04 rwalpole

tapir is focused on HTTP, so it only supports AsyncAPI when it comes to websockets.

Describing JMS/Kafka/etc. endpoints might be interesting but would require a completely different API (as compared to Endpoint). We could reuse tapir's Schemas and Codecs hopefully, so maybe it would be reasonable to split this out of the main artifact.

So maybe extracting a tapir-schema in combination with https://github.com/softwaremill/tapir/issues/1212 would make a good base for implementing a messaging interpreter?

Not making any promises, but taking a look as to how a tapir-like messaging API could look like would be very interesting. Maybe as part of tapir, maybe as part of a separate project - if you'd like to work on this.

adamw avatar Apr 13 '22 13:04 adamw

Hi @adamw, thanks for your reply! What you say makes perfect sense as it was the Endpoint API that we couldn't see how to implement for JMS. I think we could potentially look at implementing a messaging API. I will discuss it with the rest of the team and post back.

rwalpole avatar Apr 13 '22 15:04 rwalpole

See https://github.com/softwaremill/sttp-apispec - a separate project for creating OpenAPI/AsyncAPI model classes. Might be a good starting for adding the JMS models :)

adamw avatar May 17 '22 10:05 adamw