Annotation Type ExampleObject
-
@Target(ANNOTATION_TYPE) @Retention(RUNTIME) @Inherited public @interface ExampleObject
The annotation may be used to add one or more examples to the definition of a parameter, request or response content, by defining it as fieldParameter.examples()
orContent.examples()
- See Also:
- Example (OpenAPI specification)
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
description
A description of the purpose or context of the exampleExtension[]
extensions
The list of optional extensionsString
externalValue
A URL to point to an external document to be used as an example.String
name
A unique name to identify this particular exampleString
ref
A reference to a example defined in components examples.String
summary
A brief summary of the purpose or context of the exampleString
value
A string representation of the example.
-
-
-
Element Detail
-
name
String name
A unique name to identify this particular example- Returns:
- the name of the example
- Default:
- ""
-
-
-
summary
String summary
A brief summary of the purpose or context of the example- Returns:
- a summary of the example
- Default:
- ""
-
-
-
value
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:
- the value of the example
- Default:
- ""
-
-
-
externalValue
String externalValue
A URL to point to an external document to be used as an example. This is mutually exclusive with the value property.- Returns:
- an external URL of the example
- Default:
- ""
-
-
-
extensions
Extension[] extensions
The list of optional extensions- Returns:
- an optional array of extensions
- Default:
- {}
-
-
-
ref
String ref
A reference to a example defined in components examples.- Returns:
- the reference
- Since:
- 2.0.3
- Default:
- ""
-
-
-
description
String description
A description of the purpose or context of the example- Returns:
- a description of the example
- Since:
- 2.1.0
- Default:
- ""
-
-