OpenAPITools / OpenAPITools/openapi-generator
[REQ] [scala-akka-client] Use sttp client to make scala client more generic
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 different clients like akka-http-client, http4s, async-http-client and many others. Code generator can generate client with only few of them and use different templates for it
Second problem for scala clients is Json parser which is also hardcoded in every template.
Describe the solution you'd like
It is possible to generate client with wrapper library sttp and client can use any compatible implementation which currently support akka-http, async-http-client, http4s, OkHttp and java clients.
Describe alternatives you've considered
As alternative we can reuse templates as much as possible. For example, models in all scala implementations absolutely the same. Template structure can be redefined like /resources/base_language/language. Unfortunately, mustache template engine works not well with such complex paths.
Additional context
In akka-http-client we already have ApiRequest concept which has it's own definition in sttp library.
@clasnake @jimschubert @shijinkui @ramzimaalej
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 scala-akka-client templates and the /resources/base_language/language structure, then compare the current ApiRequest concept with sttp's definition. The work is done when Scala clients can be generated through sttp-compatible implementations and JSON parsing is no longer hardcoded separately in each client template.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100