-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Wrong default value is generated for boolean #1368
Comments
Yup, that's indeed a bug. Which version of swagger-core have you tried it with? |
I am using 1.5.0 |
While I seriously doubt it's been resolved, can you give 1.5.3 a try? |
Am trying right now. Namespace have changed.... |
Not from 1.5.0 - unless you meant one of the Milestone versions (M1, M2, M3). 1.5.0 (final) already has a namespace change. In any case, if you're on any of the milestones, I'd highly recommend upgrading. Thanks for giving it a try. |
Is there a mvn package for 1.5.3? |
yup, just change the |
Tried the 1.5.3. Same issue |
Okay, thanks for the confirmation. We'll have to look into it. |
Please look into the other primitive types too. Too bad JAX-RS @DefaultValue only uses strings, so conversions are needed.
generates
the default should be without quotes. |
Fixes #1368: DefaultValue has been fixed
This issue appears to have been fixed for Boolean types in the latest version. However, (unless I am mistaken) the issue still exists for other types, such as integer, as reported by @wsalembi. Can you confirm that this issue still exists? |
@wsalembi, @asicignano - if the issue indeed exists for other types as well, please open a new ticket for it. The PR dealt with the issue as it was reported, and at least for the sake of documentation, I'd rather we resolve other types in a new ticket rather than opening this one. It should work for at least some other types, even if not all. |
Thank you for the response. I can appreciate the desire to keep the PRs I have created a new ticket ( Thank you, On Mon, Oct 5, 2015 at 3:35 PM, Ron notifications@github.com wrote:
|
In the snippet below the yaml and json generated by swagger-core is not correct according to the editor.swagger.io. The default value for the booleans are generated as "false" instead of false. The error that is given is "Not a valid boolean: false"
The text was updated successfully, but these errors were encountered: