OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.86k stars 6.59k forks source link

[REQ] Java client - Extra http parameters #3904

Open sparqueur opened 5 years ago

sparqueur commented 5 years ago

Is your feature request related to a problem? Please describe.

Some "swagger.json" of external api are incomplete (missing query parameter documentation for instance or http headers...). The generated rest client has no extension point (to pass extra parameters).

Describe the solution you'd like

Ability to pass a lamba function to interract with localVarQueryParams, localVarHeaderParams... before they are used

Describe alternatives you've considered

Extend the the Api or write my own one.

Additional context

This is for the java client generator

wing328 commented 5 years ago

Some "swagger.json" of external api are incomplete (missing query parameter documentation for instance or http headers...).

The best way is to fix the OpenAPI/Swagger spec/document.

sparqueur commented 5 years ago

Obviously :-) I was expecting such response and I do agree. It's just I don't manage the third party project. So, I'm going to copy paste the swagger file and alter it manually but in case of api evolution I will have to do it again. I will also create a ticket in the library project. Thank's for your answer