Skip to content
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

@RequestBody default required = true? #2

Open
bc-2 opened this issue May 22, 2015 · 0 comments
Open

@RequestBody default required = true? #2

bc-2 opened this issue May 22, 2015 · 0 comments

Comments

@bc-2
Copy link

bc-2 commented May 22, 2015

Hi,

Processing the following Spring MVC controller operation results in a "body" parameter with "required: false":

public void addObject(@ApiParam(value = "Object to add") @RequestBody Object theObject)

However, @RequestBody is by default required if the 'required' attribute is not specified. Shouldn't the body parameter in the Swagger JSON be required too, then?

Regards,
Bruno

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant