@CompileStatic class MediaTypes extends java.lang.Object
The media types an action responds in and binds a body from, as the formats its controller declares map to them.
| Type | Name and description |
|---|---|
static java.lang.String |
DEFAULT_MEDIA_TYPE |
static java.util.List<java.lang.String> |
JSON_MEDIA_TYPESThe media types the JSON renderers answer, and so the ones JSON views renders in. |
| Constructor and description |
|---|
MediaTypes(ApplicationContext context, ControllerCatalog controllers) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
java.util.List<java.lang.String> |
bodyMediaTypes(GrailsControllerClass controller, java.lang.Class<?> controllerType, java.lang.String actionName)The media types an action binds a body from: multipart/form-data where what it binds
has a file, and otherwise those of the data formats it responds in, or JSON. |
|
static io.swagger.v3.oas.models.media.Content |
content(io.swagger.v3.oas.models.media.Schema<?> schema, java.util.Map<java.lang.String, java.lang.Boolean> mediaTypes)The content of a response or body in each media type, with the schema in those that carry the shape. |
|
java.util.Map<java.lang.String, java.lang.Boolean> |
responseMediaTypes(GrailsControllerClass controller, java.lang.String actionName)The media types an action responds in: those of the formats its controller declares in responseFormats, for the action or for every action, or JSON where it declares none.
|
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
The media types the JSON renderers answer, and so the ones JSON views renders in.
The media types an action binds a body from: multipart/form-data where what it binds
has a file, and otherwise those of the data formats it responds in, or JSON.
The content of a response or body in each media type, with the schema in those that carry the shape.
The media types an action responds in: those of the formats its controller declares in
responseFormats, for the action or for every action, or JSON where it declares none.
Each says whether it carries the shape the document describes, which a data format, JSON or
XML, does and a view, a form or a HAL document does not.