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

public @Interface ExampleObject

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

This object illustrates an example of a particular content
See Also
OpenAPI Specification Example Object

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

a description of this example
description
()

Long description for the example.

public Extension[]

Returns:

array of extensions
extensions
()

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

public String

Returns:

an external URL of the example
externalValue
()

A URL to point to an external document to be used as an example.

public String

Returns:

the name of this example
name
()

A unique name to identify this particular example in a map.

public String

Returns:

reference to an example
ref
()

Reference value to an Example object.

public String

Returns:

a summary of this example
summary
()

A brief summary of the purpose or context of the example

public String

Returns:

the value of the example
value
()

A string representation of the example.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

descriptionback to summary
public String description()

Long description for the example. CommonMark syntax MAY be used for rich text representation.

Returns:String

a description of this example

extensionsback to summary
public Extension[] extensions()

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

Returns:Extension[]

array of extensions

Since
3.1
externalValueback to summary
public String externalValue()

A URL to point to an external document to be used as an example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents.

This is mutually exclusive with the value property.

Returns:String

an external URL of the example

nameback to summary
public String name()

A unique name to identify this particular example in a map.

The name is REQUIRED when the example is defined within org.eclipse.microprofile.openapi.annotations.Components. The name will be used as the key to add this example to the 'examples' map for reuse.

Returns:String

the name of this example

refback to summary
public String ref()

Reference value to an Example object.

This property provides a reference to an object defined elsewhere. This property may be used with description() and summary() but is mutually exclusive with all other properties. If properties other than description and summary are defined in addition to the ref property then the result is undefined.

Returns:String

reference to an example

summaryback to summary
public String summary()

A brief summary of the purpose or context of the example

Returns:String

a summary of this example

valueback to summary
public String value()

A string representation of the example.

This is mutually exclusive with the externalValue property, and ignored if the externalValue property is specified.

If the media type associated with the example allows parsing into an object, it may be converted from a string.
Returns:String

the value of the example