Description
For Java API Client using Feign as library, header param names are getting converted to came case breaking the API.
For example: header parameter user-id gets converted to userId.
Swagger-codegen version
2.2.0
Suggest a Fix
Issue is with Line 30 of api.mustache
https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/resources/Java/libraries/feign/api.mustache#L30
Changing the template on left hand side from paramName to baseName fixes the issue.
From:
"{{paramName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{#hasMore}},
To:
"{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{#hasMore}},
Description
For Java API Client using Feign as library, header param names are getting converted to came case breaking the API.
For example: header parameter user-id gets converted to userId.
Swagger-codegen version
2.2.0
Suggest a Fix
Issue is with Line 30 of api.mustache
https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/resources/Java/libraries/feign/api.mustache#L30
Changing the template on left hand side from paramName to baseName fixes the issue.
From:
"{{paramName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{#hasMore}},To:
"{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{#hasMore}},