-
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-http-client] handle */* mimetype correctly & split api modules & allowNonUniqueOperationIds #7254
[haskell-http-client] handle */* mimetype correctly & split api modules & allowNonUniqueOperationIds #7254
Conversation
21d2404
to
39c02a6
Compare
When cli option "allowNonUniqueOperationIds" is true, allows *different* API modules to contain the same operationId, and then each API must be imported qualified.
Thanks for doing this, @jonschoning! How hard would it be to break up Model.hs into submodules as well? Can the same technique apply? |
The same technique cannot be naively applied to create a module per model, because unlike APIs, models often depend on other models, and there can even be circular depdencies between models. In theory one could figure out the imports for each model, but Haskell definitely doesn't allow circular imports, and Kubernetes has those too. Notice other languages put all models into the same module/namespace, just with separate files. But let me know if I've missed something. |
I see. No big deal then. |
…es & allowNonUniqueOperationIds (swagger-api#7254) * [haskell-http-client] handle */* mimetype correctly * [haskell-http-client] generate separate api modules, for each child api * [haskell-http-client] add cliOption "allowNonUniqueOperationIds" When cli option "allowNonUniqueOperationIds" is true, allows *different* API modules to contain the same operationId, and then each API must be imported qualified.
This change allows the user to choose any any content type for serialization when the spec consumes
*/*
. (The current behavior forces the user to useMimeAny
which does does not provide a method of serialization)Also, generate separate api modules, for each child api. (similar to how the other generators split out the APIS into separate files)
Instead of putting all the API operations into one file, each API gets its own module/file under API/ (e.g. API/Store.hs)
Add add a cliOption "allowNonUniqueOperationIds" (default False). When cli option "allowNonUniqueOperationIds" is true, allows different API modules to contain the same operationId, and then each API must be imported qualified.