Skip to content

@RequestBody default required = true? #2

Description

@bc-2

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions