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
codegen doesn't take into account the default values #1892
Comments
We can use {{{defaultValue}}} mustache tag to fix it. Here is an example:
Is that something you have cycle to contribute? Here is the contributing guidelines: https://github.com/swagger-api/swagger-codegen/blob/master/CONTRIBUTING.md |
It looks like this is also an issue for Java/Android code generation, I'm generating based on this yml file for my
When I generate the model though, none of the default fields are populated
Is this also a known issue? |
This is over 2 years old - has anyone found a way around this to provide default values properly? We're trying to annotate our POJOs to take this into account. |
Hi,
Here is my swagger description:
And that's what we receive in the generated nodejs app:
Is that ok, that default values are not taken into consideration? string is the same each time, the numer also the same. Is that possible to make it work?
As we don't want to use hardcoded
examples
.Regards,
The text was updated successfully, but these errors were encountered: