Interface Example
-
- All Superinterfaces:
Constructible
,Extensible<Example>
,Reference<Example>
public interface Example extends Constructible, Extensible<Example>, Reference<Example>
ExampleAn object containing sample data for the related object.
In all cases, the example value is expected to be compatible with the type schema of its associated value. Tooling implementations MAY choose to validate compatibility automatically, and reject the example value(s) if incompatible.
- See Also:
- OpenAPI Specification Example Object
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Example
description(String description)
Sets this Example's description property to the given string.default Example
externalValue(String externalValue)
Sets this Example's externalValue property to the given string.String
getDescription()
Returns the description property from an Example instance.String
getExternalValue()
Returns the externalValue property from an Example instance.String
getSummary()
Returns the summary property from an Example instance.Object
getValue()
Returns the value property from an Example instance.void
setDescription(String description)
Sets this Example's description property to the given string.void
setExternalValue(String externalValue)
Sets this Example's externalValue property to the given string.void
setSummary(String summary)
Sets this Example's summary property to the given string.void
setValue(Object value)
Sets this Example's value property to the given value.default Example
summary(String summary)
Sets this Example's summary property to the given string.default Example
value(Object value)
Sets this Example's value property to the given value.-
Methods inherited from interface org.eclipse.microprofile.openapi.models.Extensible
addExtension, extensions, getExtensions, removeExtension, setExtensions
-
-
-
-
Method Detail
-
getSummary
String getSummary()
Returns the summary property from an Example instance.- Returns:
- short description of the example
-
setSummary
void setSummary(String summary)
Sets this Example's summary property to the given string.- Parameters:
summary
- short description of the example
-
summary
default Example summary(String summary)
Sets this Example's summary property to the given string.- Parameters:
summary
- short description of the example- Returns:
- the current Example object
-
getDescription
String getDescription()
Returns the description property from an Example instance.- Returns:
- long description of the example
-
setDescription
void setDescription(String description)
Sets this Example's description property to the given string.- Parameters:
description
- long description of the example
-
description
default Example description(String description)
Sets this Example's description property to the given string.- Parameters:
description
- long description of the example- Returns:
- the current Example object
-
getValue
Object getValue()
Returns the value property from an Example instance.- Returns:
- embedded literal example object
-
setValue
void setValue(Object value)
Sets this Example's value property to the given value. The value field and externalValue field are mutually exclusive.- Parameters:
value
- a literal example object
-
value
default Example value(Object value)
Sets this Example's value property to the given value. The value field and externalValue field are mutually exclusive.- Parameters:
value
- a literal example object- Returns:
- the current Example object
-
getExternalValue
String getExternalValue()
Returns the externalValue property from an Example instance.- Returns:
- URL that points to the literal example
-
setExternalValue
void setExternalValue(String externalValue)
Sets this Example's externalValue property to the given string. The value field and externalValue field are mutually exclusive.- Parameters:
externalValue
- URL that points to the literal example
-
-