Top Description Methods
org.eclipse.microprofile.openapi.annotations.headers

public @Interface Header

extends Annotation
Annotations
@Target
@Retention:RUNTIME
@Inherited
Imports
java.lang.annotation.Inherited, .Retention, .RetentionPolicy, .Target, org.eclipse.microprofile.openapi.annotations.extensions.Extension, org.eclipse.microprofile.openapi.annotations.media.Schema

Describes a single header object
See Also
OpenAPI Specification Header Object

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

whether or not the header allows empty values
allowEmptyValue
()

When true, allows sending an empty value.

public boolean

Returns:

whether or not the header is deprecated
deprecated
()

Specifies that a header is deprecated and should be transitioned out of usage.

public String

Returns:

the header's description
description
()

Additional description data to provide on the purpose of the header

public Extension[]

Returns:

array of extensions
extensions
()

List of extensions to be added to the Header model corresponding to the containing annotation.

public String

Returns:

this header's name
name
()

The name of the header.

public String

Returns:

reference to a header
ref
()

Reference value to a Header object.

public boolean

Returns:

whether or not the header is required
required
()

Determines whether this header is mandatory.

public Schema

Returns:

the schema of the header
schema
()

The schema defining the type used for the header.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

allowEmptyValueback to summary
public boolean allowEmptyValue()

When true, allows sending an empty value. If false, the header will be considered \"null\" if no value is present. This may create validation errors when the header is required.

Returns:boolean

whether or not the header allows empty values

deprecatedback to summary
public boolean deprecated()

Specifies that a header is deprecated and should be transitioned out of usage.

Returns:boolean

whether or not the header is deprecated

descriptionback to summary
public String description()

Additional description data to provide on the purpose of the header

Returns:String

the header's description

extensionsback to summary
public Extension[] extensions()

List of extensions to be added to the Header model corresponding to the containing annotation.

Returns:Extension[]

array of extensions

Since
3.1
nameback to summary
public String name()

The name of the header. The name is only used as the key to add this header to a map.

It is a REQUIRED property unless this is only a reference to a header instance.

When the header is defined within org.eclipse.microprofile.openapi.annotations.Components, the name will be used as the key to add this header to the 'headers' map for reuse.
Returns:String

this header's name

refback to summary
public String ref()

Reference value to a Header object.

This property provides a reference to an object defined elsewhere. This property may be used with description() but is mutually exclusive with all other properties. If properties other than description are defined in addition to the ref property then the result is undefined.

Returns:String

reference to a header

requiredback to summary
public boolean required()

Determines whether this header is mandatory. The property may be included and its default value is false.

Returns:boolean

whether or not the header is required

schemaback to summary
public Schema schema()

The schema defining the type used for the header. Ignored if the properties content or array are specified.

Returns:Schema

the schema of the header