swagger-api / swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
http://swagger.io
Apache License 2.0
16.98k stars 6.03k forks source link

java/jersey2 ApiClient.mustache does not allow for http PATCH verb #2848

Open jerrylawson opened 8 years ago

jerrylawson commented 8 years ago

When running swagger-codegen with -l java and library jersey2, the generated ApiClient.java does not allow for "PATCH" in invokeAPI(). PATCH support should be added to the ApiClient.mustache: https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/ApiClient.mustache

wing328 commented 8 years ago

@jerrylawson thanks for reporting the issue. Would you have cycle to contribute the enhancement?

Ref: https://github.com/swagger-api/swagger-codegen/blob/master/CONTRIBUTING.md

For the time being, please generate Java API client with okthtp-gson library instead, which should support PATCH operation.

jerrylawson commented 8 years ago

Yes, I can contribute this change

wing328 commented 8 years ago

@jerrylawson do you need any help with the change? Let us know.

sutdisi commented 7 years ago

I have a fix for this. I am assuming no one else is working on it.

sutdisi commented 7 years ago

4110 should fix this.