-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Haskell] Refactor generator to create separate client, server generator #5100
Comments
👍 Cross-referencing my comment from #5097:
|
@mandrean sounds good to me to use http-client. If a user still prefers servant-client, we can simply keep it in the current generator (for backward compatibility) |
Another option could be https://github.com/bos/wreq which is based on And it has built-in support for Basic Auth and Oauth2. My vote goes to |
Both
Supporting multiple HTTP libraries is possible via a "swappable" ApiClient class. My suggestion is to go with the HTTP library that you feel comfortable. Later there may be enhancement to support HTTP libraries when more and more Haskell developers discover Swagger Codegen. |
Great suggestion. Super busy at work right now, bu I'll try to squeeze out a feature-complete |
my vote would be for Actually, it would not be unreasonable to have multiple haskell client generators as some of the other languages do. that way the servant generator could be kept. |
I'm working on a gradual improvements to haskell-servant right now. Generated code itself first, and codegen refactoring after that. |
@nvmd thanks. If the enhancement is not backward compatible with the existing code, then please file it against 2.3.0 branch. Any questions just let us know. |
Hi all, when you've time, please try the Haskell http-client generator by @jonschoning : #6429 |
Description
Currently, Haskell generator (HaskellServantCodegen.java) generates both client and server code. We want to refactor HaskellServantCodegen.java into the following:
HaskellServantCodegen.java - for server
HaskellClientCodegen.java - for client
AbstractHaskellCodegen.java - abstract class for client/server generator
The goal is to make Haskell generator more consistent with other generators (as no other generator output both client and server code at the same time)
Swagger-codegen version
Latest master
Suggest a Fix
If anyone wants to contribute the enhancement, please reply to let us know.
The text was updated successfully, but these errors were encountered: