OpenAPITools / OpenAPITools/openapi-generator
[REQ] Tapir for scala support
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
Scala has a lot of http server and client libraries as a consequence there now is a library called 'tapir' to do endpoint descriptions.
The tapir library than has support for the most common http libraries.
It is from the same authors as 'sttp'.
Describe the solution you'd like
I think it would be best to support scala-tapir and anyone who want to then use any another scala http libary can use the tapir http enpoint descriptions. So we don't have to create more and more scala based generators.
Additional context
As a proof of concept i started from the sttp generator and changed it to generate tapir code, I still have to implement the return types.
Multipart bodies and alternative content types are not supported yet.
https://github.com/borissmidt/openapi-generator/blob/tapir-support/samples/client/petstore/scala-tapir/src/main/scala/org/openapitools/client/api/PetApi.scala
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing sttp-based generator and the sample at samples/client/petstore/scala-tapir/src/main/scala/org/openapitools/client/api/PetApi.scala. Compare the proof of concept with the generator's expected output, then determine how return types, multipart bodies, and alternative content types should be represented. Done means Tapir support generates usable code for these cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100