Top Description Inners Methods
org.eclipse.microprofile.openapi.models.parameters

public Interface Parameter

extends Constructible, Extensible<Parameter>, Reference<Parameter>
Imports
java.util.Map, org.eclipse.microprofile.openapi.models.Constructible, .Extensible, .Reference, org.eclipse.microprofile.openapi.models.examples.Example, org.eclipse.microprofile.openapi.models.media.Content, .Schema

Parameter

Describes a single operation parameter.

A unique parameter is defined by a combination of a name and location. There are four possible parameter locations specified by the in field:

The rules for serialization of the parameter are specified in one of two ways. For simpler scenarios, a schema and style can describe the structure and syntax of the parameter.

For more complex scenarios, the content property can define the media type and schema of the parameter. A parameter must contain either a schema property, or a content property, but not both.

See Also
OpenAPI Specification Parameter Object

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
Parameter.In

The values allowed for the in field.

public static enum
Parameter.Style

The values allowed for the style field.

Method Summary

Modifier and TypeMethod and Description
public Parameter

Returns:

the current Parameter instance
addExample
(String
string to represent the example
key
,
Example
example of the parameter. null values will be rejected (implementation will throw an exception) or ignored.
example
)

Adds an example of the parameter using the specified key.

public default Parameter

Returns:

the current Parameter instance
allowEmptyValue
(Boolean
specify the ability to pass empty-valued parameters
allowEmptyValue
)

Sets the allowEmptyValue property of a Parameter instance to the given value.

public default Parameter

Returns:

the current Parameter instance
allowReserved
(Boolean
specifies whether the parameter value should allow reserved characters
allowReserved
)

Sets the allowReserved property of a Parameter instance to the given value.

public default Parameter

Returns:

the current Parameter instance
content
(Content
a map containing the media representations for the parameter
content
)

Sets the content property of a Parameter instance to the given object.

public default Parameter

Returns:

the current Parameter instance
deprecated
(Boolean
specifies that a parameter is deprecated
deprecated
)

Sets the deprecated property of a Parameter instance to the given value.

public default Parameter

Returns:

the current Parameter instance
description
(String
a brief description of the parameter
description
)

Sets the description property of a Parameter instance to the given string.

public default Parameter

Returns:

the current Parameter instance
example
(Object
example of the parameter
example
)

Sets the example property of a Parameter instance to the given object.

public default Parameter

Returns:

the current Parameter instance
examples
(Map<String, Example>
examples of the parameter
examples
)

Sets the examples property of a Parameter instance to the given value.

public default Parameter

Returns:

the current Parameter instance
explode
(Boolean
whether parameter values of type "array" or "object" generate separate parameters for each value
explode
)

Sets the explode property of a Parameter instance to the given value.

public Boolean

Returns:

specifies the ability to pass empty-valued parameters
getAllowEmptyValue
()

Returns the allowEmptyValue property from a Parameter instance.

public Boolean

Returns:

specifies whether the parameter value should allow reserved characters
getAllowReserved
()

Returns the allowReserved property from a Parameter instance.

public Content

Returns:

a map containing the media representations for the parameter
getContent
()

Returns the content property from a Parameter instance.

public Boolean

Returns:

specifies that a parameter is deprecated
getDeprecated
()

Returns the deprecated property from a Parameter instance.

public String

Returns:

a brief description of the parameter
getDescription
()

Returns the description property from a Parameter instance.

public Object

Returns:

example of the parameter
getExample
()

Returns the example property from a Parameter instance.

public Map<String, Example>

Returns:

a copy Map (potentially immutable) of examples of the parameter
getExamples
()

Returns the examples property from a Parameter instance.

public Boolean

Returns:

whether parameter values of type "array" or "object" generate separate parameters for each value
getExplode
()

Returns the explode property from a Parameter instance.

public Parameter.In

Returns:

the location of the parameter
getIn
()

Returns the in property from a Parameter instance.

public String

Returns:

the name of the parameter
getName
()

Returns the name property from a Parameter instance.

public Boolean

Returns:

indicates whether this parameter is mandatory
getRequired
()

Returns the required property from a Parameter instance.

public Schema

Returns:

schema defining the type used for the parameter
getSchema
()

Returns the schema property from a Parameter instance.

public Parameter.Style

Returns:

describes how the parameter value will be serialized
getStyle
()

Returns the style property from a Parameter instance.

public default Parameter

Returns:

the current Parameter instance
in
(Parameter.In
the value of the in property
in
)

Sets the in property of a Parameter instance to the given value.

public default Parameter

Returns:

the current Parameter instance
name
(String
the name of the parameter
name
)

Sets the name property of a Parameter instance to the given string.

public void
removeExample(String
string to represent the example
key
)

Removes an example of the parameter using the specified key.

public default Parameter

Returns:

the current Parameter instance
required
(Boolean
indicates whether this parameter is mandatory
required
)

Sets the required property of a Parameter instance to the given value.

public default Parameter

Returns:

the current Parameter instance
schema
(Schema
schema defining the type used for the parameter
schema
)

Sets the schema property of a Parameter instance to the given value.

public void
setAllowEmptyValue(Boolean
specify the ability to pass empty-valued parameters
allowEmptyValue
)

Sets the allowEmptyValue property of a Parameter instance to the given value.

public void
setAllowReserved(Boolean
specifies whether the parameter value should allow reserved characters
allowReserved
)

Sets the allowReserved property of a Parameter instance to the given value.

public void
setContent(Content
a map containing the media representations for the parameter
content
)

Sets the content property of a Parameter instance to the given object.

public void
setDeprecated(Boolean
specifies that a parameter is deprecated
deprecated
)

Sets the deprecated property of a Parameter instance to the given value.

public void
setDescription(String
a brief description of the parameter
description
)

Sets the description property of a Parameter instance to the given string.

public void
setExample(Object
example of the parameter
example
)

Sets the example property of a Parameter instance to the given object.

public void
setExamples(Map<String, Example>
examples of the parameter
examples
)

Sets the examples property of a Parameter instance to the given value.

public void
setExplode(Boolean
whether parameter values of type "array" or "object" generate separate parameters for each value
explode
)

Sets the explode property of a Parameter instance to the given value.

public void
setIn(Parameter.In
the value of the in property
in
)

Sets the in property of a Parameter instance to the given value.

public void
setName(String
the name of the parameter
name
)

Sets the name property of a Parameter instance to the given string.

public void
setRequired(Boolean
indicates whether this parameter is mandatory
required
)

Sets the required property of a Parameter instance to the given value.

public void
setSchema(Schema
schema defining the type used for the parameter
schema
)

Sets the schema property of a Parameter instance to the given value.

public void
setStyle(Parameter.Style
describes how the parameter value will be serialized
style
)

Sets the style property of a Parameter instance to the given value.

public default Parameter

Returns:

the current Parameter instance
style
(Parameter.Style
describes how the parameter value will be serialized
style
)

Sets the style property of a Parameter instance to the given value.

Inherited from org.eclipse.microprofile.openapi.models.Extensible:
addExtensionextensionsgetExtensionsremoveExtensionsetExtensions
Inherited from org.eclipse.microprofile.openapi.models.Reference:
getRefrefsetRef

Method Detail

addExampleback to summary
public Parameter addExample(String key, Example example)

Adds an example of the parameter using the specified key. The example should contain a value in the correct format as specified in the parameter encoding.

Parameters
key:String

string to represent the example

example:Example

example of the parameter. null values will be rejected (implementation will throw an exception) or ignored.

Returns:Parameter

the current Parameter instance

allowEmptyValueback to summary
public default Parameter allowEmptyValue(Boolean allowEmptyValue)

Sets the allowEmptyValue property of a Parameter instance to the given value.

Parameters
allowEmptyValue:Boolean

specify the ability to pass empty-valued parameters

Returns:Parameter

the current Parameter instance

allowReservedback to summary
public default Parameter allowReserved(Boolean allowReserved)

Sets the allowReserved property of a Parameter instance to the given value.

Parameters
allowReserved:Boolean

specifies whether the parameter value should allow reserved characters

Returns:Parameter

the current Parameter instance

contentback to summary
public default Parameter content(Content content)

Sets the content property of a Parameter instance to the given object.

Parameters
content:Content

a map containing the media representations for the parameter

Returns:Parameter

the current Parameter instance

deprecatedback to summary
public default Parameter deprecated(Boolean deprecated)

Sets the deprecated property of a Parameter instance to the given value.

Parameters
deprecated:Boolean

specifies that a parameter is deprecated

Returns:Parameter

the current Parameter instance

descriptionback to summary
public default Parameter description(String description)

Sets the description property of a Parameter instance to the given string.

Parameters
description:String

a brief description of the parameter

Returns:Parameter

the current Parameter instance

exampleback to summary
public default Parameter example(Object example)

Sets the example property of a Parameter instance to the given object. The example should match the specified schema and encoding properties if present. The examples object is mutually exclusive of the example object.

Parameters
example:Object

example of the parameter

Returns:Parameter

the current Parameter instance

examplesback to summary
public default Parameter examples(Map<String, Example> examples)

Sets the examples property of a Parameter instance to the given value. Each example should contain a value in the correct format as specified in the parameter encoding. The examples object is mutually exclusive of the example object.

Parameters
examples:Map<String, Example>

examples of the parameter

Returns:Parameter

the current Parameter instance

explodeback to summary
public default Parameter explode(Boolean explode)

Sets the explode property of a Parameter instance to the given value.

Parameters
explode:Boolean

whether parameter values of type "array" or "object" generate separate parameters for each value

Returns:Parameter

the current Parameter instance

getAllowEmptyValueback to summary
public Boolean getAllowEmptyValue()

Returns the allowEmptyValue property from a Parameter instance.

Returns:Boolean

specifies the ability to pass empty-valued parameters

getAllowReservedback to summary
public Boolean getAllowReserved()

Returns the allowReserved property from a Parameter instance.

Returns:Boolean

specifies whether the parameter value should allow reserved characters

getContentback to summary
public Content getContent()

Returns the content property from a Parameter instance.

Returns:Content

a map containing the media representations for the parameter

getDeprecatedback to summary
public Boolean getDeprecated()

Returns the deprecated property from a Parameter instance.

Returns:Boolean

specifies that a parameter is deprecated

getDescriptionback to summary
public String getDescription()

Returns the description property from a Parameter instance.

Returns:String

a brief description of the parameter

getExampleback to summary
public Object getExample()

Returns the example property from a Parameter instance.

Returns:Object

example of the parameter

getExamplesback to summary
public Map<String, Example> getExamples()

Returns the examples property from a Parameter instance.

Returns:Map<String, Example>

a copy Map (potentially immutable) of examples of the parameter

getExplodeback to summary
public Boolean getExplode()

Returns the explode property from a Parameter instance.

Returns:Boolean

whether parameter values of type "array" or "object" generate separate parameters for each value

getInback to summary
public Parameter.In getIn()

Returns the in property from a Parameter instance.

Returns:Parameter.In

the location of the parameter

getNameback to summary
public String getName()

Returns the name property from a Parameter instance.

Returns:String

the name of the parameter

getRequiredback to summary
public Boolean getRequired()

Returns the required property from a Parameter instance.

Returns:Boolean

indicates whether this parameter is mandatory

getSchemaback to summary
public Schema getSchema()

Returns the schema property from a Parameter instance.

Returns:Schema

schema defining the type used for the parameter

getStyleback to summary
public Parameter.Style getStyle()

Returns the style property from a Parameter instance.

Returns:Parameter.Style

describes how the parameter value will be serialized

inback to summary
public default Parameter in(Parameter.In in)

Sets the in property of a Parameter instance to the given value.

Parameters
in:Parameter.In

the value of the in property

Returns:Parameter

the current Parameter instance

nameback to summary
public default Parameter name(String name)

Sets the name property of a Parameter instance to the given string.

Parameters
name:String

the name of the parameter

Returns:Parameter

the current Parameter instance

removeExampleback to summary
public void removeExample(String key)

Removes an example of the parameter using the specified key. The example should contain a value in the correct format as specified in the parameter encoding.

Parameters
key:String

string to represent the example

requiredback to summary
public default Parameter required(Boolean required)

Sets the required property of a Parameter instance to the given value.

Parameters
required:Boolean

indicates whether this parameter is mandatory

Returns:Parameter

the current Parameter instance

schemaback to summary
public default Parameter schema(Schema schema)

Sets the schema property of a Parameter instance to the given value.

Parameters
schema:Schema

schema defining the type used for the parameter

Returns:Parameter

the current Parameter instance

setAllowEmptyValueback to summary
public void setAllowEmptyValue(Boolean allowEmptyValue)

Sets the allowEmptyValue property of a Parameter instance to the given value.

Parameters
allowEmptyValue:Boolean

specify the ability to pass empty-valued parameters

setAllowReservedback to summary
public void setAllowReserved(Boolean allowReserved)

Sets the allowReserved property of a Parameter instance to the given value.

Parameters
allowReserved:Boolean

specifies whether the parameter value should allow reserved characters

setContentback to summary
public void setContent(Content content)

Sets the content property of a Parameter instance to the given object.

Parameters
content:Content

a map containing the media representations for the parameter

setDeprecatedback to summary
public void setDeprecated(Boolean deprecated)

Sets the deprecated property of a Parameter instance to the given value.

Parameters
deprecated:Boolean

specifies that a parameter is deprecated

setDescriptionback to summary
public void setDescription(String description)

Sets the description property of a Parameter instance to the given string.

Parameters
description:String

a brief description of the parameter

setExampleback to summary
public void setExample(Object example)

Sets the example property of a Parameter instance to the given object. The example should match the specified schema and encoding properties if present. The examples object is mutually exclusive of the example object.

Parameters
example:Object

example of the parameter

setExamplesback to summary
public void setExamples(Map<String, Example> examples)

Sets the examples property of a Parameter instance to the given value. Each example should contain a value in the correct format as specified in the parameter encoding. The examples object is mutually exclusive of the example object.

Parameters
examples:Map<String, Example>

examples of the parameter

setExplodeback to summary
public void setExplode(Boolean explode)

Sets the explode property of a Parameter instance to the given value.

Parameters
explode:Boolean

whether parameter values of type "array" or "object" generate separate parameters for each value

setInback to summary
public void setIn(Parameter.In in)

Sets the in property of a Parameter instance to the given value.

Parameters
in:Parameter.In

the value of the in property

setNameback to summary
public void setName(String name)

Sets the name property of a Parameter instance to the given string.

Parameters
name:String

the name of the parameter

setRequiredback to summary
public void setRequired(Boolean required)

Sets the required property of a Parameter instance to the given value.

Parameters
required:Boolean

indicates whether this parameter is mandatory

setSchemaback to summary
public void setSchema(Schema schema)

Sets the schema property of a Parameter instance to the given value.

Parameters
schema:Schema

schema defining the type used for the parameter

setStyleback to summary
public void setStyle(Parameter.Style style)

Sets the style property of a Parameter instance to the given value.

Parameters
style:Parameter.Style

describes how the parameter value will be serialized

styleback to summary
public default Parameter style(Parameter.Style style)

Sets the style property of a Parameter instance to the given value.

Parameters
style:Parameter.Style

describes how the parameter value will be serialized

Returns:Parameter

the current Parameter instance

org.eclipse.microprofile.openapi.models.parameters back to summary

public final Enum Parameter.In

extends Enum<Parameter.In>
Class Inheritance

The values allowed for the in field.

Field Summary

Modifier and TypeField and Description
public static final Parameter.In
public static final Parameter.In
public static final Parameter.In
public static final Parameter.In
private final String

Constructor Summary

AccessConstructor and Description
private
In(String value)

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration.

public static Parameter.In
public static Parameter.In[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinalvalueOf

Field Detail

COOKIEback to summary
public static final Parameter.In COOKIE
HEADERback to summary
public static final Parameter.In HEADER
PATHback to summary
public static final Parameter.In PATH
QUERYback to summary
public static final Parameter.In QUERY
valueback to summary
private final String value

Constructor Detail

Inback to summary
private In(String value)

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Enum.toString.

Doc from java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists.

Returns:String

the name of this enum constant

Annotations
@Override
valueOfback to summary
public static Parameter.In valueOf(String name)
valuesback to summary
public static Parameter.In[] values()
org.eclipse.microprofile.openapi.models.parameters back to summary

public final Enum Parameter.Style

extends Enum<Parameter.Style>
Class Inheritance

The values allowed for the style field.

Field Summary

Modifier and TypeField and Description
public static final Parameter.Style
public static final Parameter.Style
public static final Parameter.Style
public static final Parameter.Style
public static final Parameter.Style
public static final Parameter.Style
public static final Parameter.Style
private final String

Constructor Summary

AccessConstructor and Description
private
Style(String value)

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration.

public static Parameter.Style
public static Parameter.Style[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinalvalueOf

Field Detail

DEEPOBJECTback to summary
public static final Parameter.Style DEEPOBJECT
FORMback to summary
public static final Parameter.Style FORM
LABELback to summary
public static final Parameter.Style LABEL
MATRIXback to summary
public static final Parameter.Style MATRIX
PIPEDELIMITEDback to summary
public static final Parameter.Style PIPEDELIMITED
SIMPLEback to summary
public static final Parameter.Style SIMPLE
SPACEDELIMITEDback to summary
public static final Parameter.Style SPACEDELIMITED
valueback to summary
private final String value

Constructor Detail

Styleback to summary
private Style(String value)

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Enum.toString.

Doc from java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists.

Returns:String

the name of this enum constant

Annotations
@Override
valueOfback to summary
public static Parameter.Style valueOf(String name)
valuesback to summary
public static Parameter.Style[] values()