Top Description Methods
org.eclipse.microprofile.openapi.annotations.media

public @Interface Content

extends Annotation
Annotations
@Target
@Retention:RUNTIME
@Inherited
Imports
java.lang.annotation.Inherited, .Retention, .RetentionPolicy, .Target, org.eclipse.microprofile.openapi.annotations.extensions.Extension

This object provides schema and examples for a particular media type.
See Also
OpenAPI Specification Media Type Object

Method Summary

Modifier and TypeMethod and Description
public Encoding[]

Returns:

the array of encodings
encoding
()

An array of encoding corresponding to a map of property name and its encoding information in MediaType model.

public String

Returns:

an example of this content
example
()

A free-form property to include an example of an instance for this content.

public ExampleObject[]

Returns:

the list of examples
examples
()

An array of examples used to show the use of the associated schema.

public Extension[]

Returns:

array of extensions
extensions
()

List of extensions to be added to the MediaType model corresponding to the containing annotation.

public String

Returns:

the media type value
mediaType
()

The media type that this object applies to.

public Schema

Returns:

the schema of this media type
schema
()

The schema defining the type used for the request body.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

encodingback to summary
public Encoding[] encoding()

An array of encoding corresponding to a map of property name and its encoding information in MediaType model. The key, being the property name, MUST exist in the schema as a property.

The encoding object SHALL only apply to requestBody objects when the media type is multipart or application/x-www-form-urlencoded.

Returns:Encoding[]

the array of encodings

exampleback to summary
public String example()

A free-form property to include an example of an instance for this content.

Returns:String

an example of this content

examplesback to summary
public ExampleObject[] examples()

An array of examples used to show the use of the associated schema.

Returns:ExampleObject[]

the list of examples

extensionsback to summary
public Extension[] extensions()

List of extensions to be added to the MediaType model corresponding to the containing annotation.

Returns:Extension[]

array of extensions

Since
3.1
mediaTypeback to summary
public String mediaType()

The media type that this object applies to.

Returns:String

the media type value

schemaback to summary
public Schema schema()

The schema defining the type used for the request body.

Returns:Schema

the schema of this media type