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

public Interface Header

extends Constructible, Extensible<Header>, Reference<Header>
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

Header

Describes a single header parameter for an operation.

See Also
OpenAPI Specification Header Object

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
Header.Style

Controls the style of serialization.

Method Summary

Modifier and TypeMethod and Description
public Header

Returns:

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

Adds an example of the header using the specified key to this Header instance.

public default Header

Returns:

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

Sets this Header's allowEmptyValue property to the given value.

public default Header

Returns:

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

Sets this Header's content property to the given object.

public default Header

Returns:

the current Header instance
deprecated
(Boolean
whether the header parameter is deprecated
deprecated
)

Sets this Header's deprecated property to the given value.

public default Header

Returns:

the current Header instance
description
(String
a brief description of the header parameter
description
)

Sets this Header's description property to the given string.

public default Header

Returns:

the current Header instance
example
(Object
example of the header
example
)

Sets this Header's example property to the given object.

public default Header

Returns:

the current Header instance
examples
(Map<String, Example>
examples of the header
examples
)

Sets the examples property of this Header instance to the given map.

public default Header

Returns:

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

Sets this Header's explode property to the given value.

public Boolean

Returns:

the ability to pass empty-valued parameters
getAllowEmptyValue
()

Returns the allowEmptyValue property from a Header instance.

public Content

Returns:

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

Returns the content property from a Header instance.

public Boolean

Returns:

whether the header parameter is deprecated
getDeprecated
()

Returns the deprecated property from a Header instance.

public String

Returns:

a brief description of the header parameter.
getDescription
()

Returns the description property from a Header instance.

public Object

Returns:

example of the header
getExample
()

Returns the example property from a Header instance.

public Map<String, Example>

Returns:

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

Returns the examples property from a Header 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 Header instance.

public Boolean

Returns:

whether this parameter is mandatory
getRequired
()

Returns the required property from a Header instance.

public Schema

Returns:

schema defining the type used for the header parameter
getSchema
()

Returns the schema property from a Header instance.

public Header.Style

Returns:

how the parameter value will be serialized
getStyle
()

Returns the style property from a Header instance.

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

Removes an example of the header using the specified key to this Header instance.

public default Header

Returns:

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

Sets this Header's required property to the given value.

public default Header

Returns:

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

Sets this Header's schema property to the given object.

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

Sets this Header's allowEmptyValue property to the given value.

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

Sets this Header's content property to the given object.

public void
setDeprecated(Boolean
whether the header parameter is deprecated
deprecated
)

Sets this Header's deprecated property to the given value.

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

Sets this Header's description property to the given string.

public void
setExample(Object
example of the header
example
)

Sets this Header's example property to the given object.

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

Sets the examples property of this Header instance to the given map.

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

Sets this Header's explode property to the given value.

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

Sets this Header's required property to the given value.

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

Sets this Header's schema property to the given object.

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

Sets this Header's style property to the given style.

public default Header

Returns:

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

Sets this Header's style property to the given style.

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

Method Detail

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

Adds an example of the header using the specified key to this Header instance. 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 header. null values will be rejected (implementation will throw an exception) or ignored.

Returns:Header

the current Header instance

allowEmptyValueback to summary
public default Header allowEmptyValue(Boolean allowEmptyValue)

Sets this Header's allowEmptyValue property to the given value.

Parameters
allowEmptyValue:Boolean

specify the ability to pass empty-valued parameters

Returns:Header

the current Header instance

contentback to summary
public default Header content(Content content)

Sets this Header's content property to the given object.

Parameters
content:Content

a map containing the media representations for the parameter

Returns:Header

the current Header instance

deprecatedback to summary
public default Header deprecated(Boolean deprecated)

Sets this Header's deprecated property to the given value.

Parameters
deprecated:Boolean

whether the header parameter is deprecated

Returns:Header

the current Header instance

descriptionback to summary
public default Header description(String description)

Sets this Header's description property to the given string.

Parameters
description:String

a brief description of the header parameter

Returns:Header

the current Header instance

exampleback to summary
public default Header example(Object example)

Sets this Header's example property 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 header

Returns:Header

the current Header instance

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

Sets the examples property of this Header instance to the given map. 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 header

Returns:Header

the current Header instance

explodeback to summary
public default Header explode(Boolean explode)

Sets this Header's explode property to the given value.

Parameters
explode:Boolean

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

Returns:Header

the current Header instance

getAllowEmptyValueback to summary
public Boolean getAllowEmptyValue()

Returns the allowEmptyValue property from a Header instance.

Returns:Boolean

the ability to pass empty-valued parameters

getContentback to summary
public Content getContent()

Returns the content property from a Header instance.

Returns:Content

a map containing the media representations for the parameter

getDeprecatedback to summary
public Boolean getDeprecated()

Returns the deprecated property from a Header instance.

Returns:Boolean

whether the header parameter is deprecated

getDescriptionback to summary
public String getDescription()

Returns the description property from a Header instance.

Returns:String

a brief description of the header parameter.

getExampleback to summary
public Object getExample()

Returns the example property from a Header instance.

Returns:Object

example of the header

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

Returns the examples property from a Header instance.

Returns:Map<String, Example>

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

getExplodeback to summary
public Boolean getExplode()

Returns the explode property from a Header instance.

Returns:Boolean

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

getRequiredback to summary
public Boolean getRequired()

Returns the required property from a Header instance.

Returns:Boolean

whether this parameter is mandatory

getSchemaback to summary
public Schema getSchema()

Returns the schema property from a Header instance.

Returns:Schema

schema defining the type used for the header parameter

getStyleback to summary
public Header.Style getStyle()

Returns the style property from a Header instance.

Returns:Header.Style

how the parameter value will be serialized

removeExampleback to summary
public void removeExample(String key)

Removes an example of the header using the specified key to this Header instance.

Parameters
key:String

string to represent the example

requiredback to summary
public default Header required(Boolean required)

Sets this Header's required property to the given value.

Parameters
required:Boolean

whether this parameter is mandatory

Returns:Header

the current Header instance

schemaback to summary
public default Header schema(Schema schema)

Sets this Header's schema property to the given object.

Parameters
schema:Schema

schema defining the type used for the header parameter

Returns:Header

the current Header instance

setAllowEmptyValueback to summary
public void setAllowEmptyValue(Boolean allowEmptyValue)

Sets this Header's allowEmptyValue property to the given value.

Parameters
allowEmptyValue:Boolean

specify the ability to pass empty-valued parameters

setContentback to summary
public void setContent(Content content)

Sets this Header's content property 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 this Header's deprecated property to the given value.

Parameters
deprecated:Boolean

whether the header parameter is deprecated

setDescriptionback to summary
public void setDescription(String description)

Sets this Header's description property to the given string.

Parameters
description:String

a brief description of the header parameter

setExampleback to summary
public void setExample(Object example)

Sets this Header's example property 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 header

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

Sets the examples property of this Header instance to the given map. 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 header

setExplodeback to summary
public void setExplode(Boolean explode)

Sets this Header's explode property to the given value.

Parameters
explode:Boolean

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

setRequiredback to summary
public void setRequired(Boolean required)

Sets this Header's required property to the given value.

Parameters
required:Boolean

whether this parameter is mandatory

setSchemaback to summary
public void setSchema(Schema schema)

Sets this Header's schema property to the given object.

Parameters
schema:Schema

schema defining the type used for the header parameter

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

Sets this Header's style property to the given style.

Parameters
style:Header.Style

how the parameter value will be serialized

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

Sets this Header's style property to the given style.

Parameters
style:Header.Style

how the parameter value will be serialized

Returns:Header

the current Header instance

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

public final Enum Header.Style

extends Enum<Header.Style>
Class Inheritance

Controls the style of serialization. Only one style is supported for headers.

Field Summary

Modifier and TypeField and Description
public static final Header.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 Header.Style
public static Header.Style[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinalvalueOf

Field Detail

SIMPLEback to summary
public static final Header.Style SIMPLE
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 Header.Style valueOf(String name)
valuesback to summary
public static Header.Style[] values()