Annotation Interface OpenApi.Example
- Enclosing class:
OpenApi
value() is mutually exclusive with dataValue(), serializedValue(), and
externalValue(). serializedValue() and externalValue() are mutually exclusive.
dataValue() can be used by itself, or with either serializedValue() or
externalValue() for OpenAPI 3.2 output.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionOpenAPI 3.2 data value.Example description.External example value URI.Example name.OpenAPI 3.2 serialized value.Example summary.Example value.
-
Element Details
-
name
-
summary
-
description
-
value
String valueExample value.Declarative OpenAPI generation parses valid JSON as a structured OpenAPI value and emits non-JSON text as a string.
Mutually exclusive with
dataValue(),serializedValue(), andexternalValue().- Returns:
- value
- Default:
""
-
dataValue
String dataValueOpenAPI 3.2 data value.Declarative OpenAPI generation parses valid JSON as a structured OpenAPI value and emits non-JSON text as a string.
Rendered only for OpenAPI 3.2 output.
Can be used with either
serializedValue()orexternalValue(). Mutually exclusive withvalue().- Returns:
- data value
- Default:
""
-
serializedValue
String serializedValueOpenAPI 3.2 serialized value.Declarative OpenAPI generation emits this value as a string and does not parse it as JSON.
Rendered only for OpenAPI 3.2 output.
Can be used with
dataValue(). Mutually exclusive withvalue()andexternalValue().- Returns:
- serialized value
- Default:
""
-
externalValue
String externalValueExternal example value URI.Can be used with
dataValue(). Mutually exclusive withvalue()andserializedValue().- Returns:
- external value URI
- Default:
""
-