-
Notifications
You must be signed in to change notification settings - Fork 424
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
[java jaxrs-jersey] default values are never generated in annotations #166
Comments
I've observed the same issue :( adding the following to my generator code shows no sign at all of the defaults in my spec in the output:
Any hints on where I can change the code to fix this? Or is a fix on its way? |
@jbeaven I haven't tried yet, but it could possibly work in the community fork of the generator https://github.com/OpenAPITools/openapi-generator |
I too had this problem. When I looked into it, the
A long term fix would be to add the logic above in this method - https://github.com/swagger-api/swagger-codegen-generators/blob/master/src/main/java/io/swagger/codegen/v3/generators/DefaultCodegenConfig.java#L2256 |
thanks for updating @douglasbgray . i'll try to get this solve next week. |
+1. The default value should be transferred to the |
In all operations I have in my 3.0 spec, swagger-codegen never emits
@DefaultValue
annotation, although it exists on parameter definitions.For parameter in operation like this:
Emitted code for parameter is
While I would expect it to include the default value:
It does not matter what is the type of default, in a big project with many uses of
default
I see no@DefaultValue
annotations in generated code.Version info
Swagger-codegen (build from 3.0.0 release 713d52883cf320d46fb1a555c63e8ad99f78c16e), which is using 1.0.0 release of swagger-codegen-generators.
The text was updated successfully, but these errors were encountered: