Annotation Interface OpenApi.RequestBody
- Enclosing class:
OpenApi
Use only on a method with an effective declarative HTTP request body input. The input can be a direct
@Http.Entity parameter, an
@Http.RequestParams record with an @Http.Entity component, or
one or more @Http.FormParam parameters or request-param record components.
For entity inputs, content is inferred from the entity type and the method's consumed media types unless
content() overrides it. For form inputs, generated content is always
application/x-www-form-urlencoded; the schema is inferred from the form field names and types and cannot be
overridden with OpenApi.Content.schema().
Requiredness is inferred from the effective input: Optional entity parameters, entity components, and form
fields are optional, defaulted form fields are optional, and other entity or form inputs are required. Use
required() to make an optional input required. A required input cannot be documented as optional because
the runtime binding still requires it.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionRequest body content entries.Requiredness override.Request body description.
-
Element Details
-
value
-
required
-
content
-