Annotation Interface RequestBody
Describes a single request body.
- See Also:
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionContent[]
The content of the request body.A brief description of the request body.List of extensions to be added to theRequestBody
model corresponding to the containing annotation.The unique name to identify this request body.Reference value to a RequestBody object.boolean
Determines if the request body is required in the request.
-
Element Details
-
description
String descriptionA brief description of the request body.This could contain examples of use. CommonMark syntax MAY be used for rich text representation.
- Returns:
- description of this requestBody instance
- Default:
- ""
-
content
Content[] contentThe content of the request body. It is a REQUIRED property unless this is only a reference to a request body instance.- Returns:
- content of this requestBody instance
- Default:
- {}
-
required
boolean requiredDetermines if the request body is required in the request.- Returns:
- whether or not this requestBody is required
- Default:
- false
-
name
String nameThe unique name to identify this request body. Unless this annotation is used on the actual request body parameter, it is required to match the name of that parameter so the appropriate association can be made. When the request body is defined withinComponents
. The name will be used as the key to add this request body to the 'requestBodies' map for reuse.- Returns:
- this request body's name
- Default:
- ""
-
ref
String refReference value to a RequestBody object.This property provides a reference to an object defined elsewhere. This property and all other properties are mutually exclusive. If other properties are defined in addition to the ref property then the result is undefined.
- Returns:
- reference to a request body
- Default:
- ""
-
extensions
Extension[] extensionsList of extensions to be added to theRequestBody
model corresponding to the containing annotation.- Returns:
- array of extensions
- Since:
- 3.1
- Default:
- {}
-