swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

Java JaxRs Resteasy: @DefaulValue missing in queryParams template.

Open andreaformica opened this issue 9 years ago • 2 comments

Description

Trying to generate RESTEASY server side API using swagger codegen: API methods are missing the DefaultValue in the query parameters.

Swagger-codegen version

I am using the master in git.

Swagger declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement

I think it is enough to add {{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}){{#defaultValue}} @DefaultValue("{{{defaultValue}}}"){{/defaultValue}} in the queryParams.mustache file which is in swagger-codegen/src/main/resources/JavaJaxRs/resteasy

But I must admit I do not understand the mustache templates a lot...

andreaformica avatar Oct 17 '17 12:10 andreaformica

@andreaformica your suggested fix looks good. Please file a PR when you've time.

wing328 avatar Oct 17 '17 14:10 wing328

Closed via https://github.com/swagger-api/swagger-codegen/pull/6726

wing328 avatar Dec 16 '17 16:12 wing328