Annotation Interface Header
Describes a single header object
- See Also:
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionboolean
When true, allows sending an empty value.boolean
Specifies that a header is deprecated and should be transitioned out of usage.Additional description data to provide on the purpose of the headerThe name of the header.Reference value to a Header object.boolean
Determines whether this header is mandatory.The schema defining the type used for the header.
-
Element Details
-
name
String nameThe 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 withinComponents
, the name will be used as the key to add this header to the 'headers' map for reuse.- Returns:
- this header's name
- Default:
- ""
-
description
String descriptionAdditional description data to provide on the purpose of the header- Returns:
- the header's description
- Default:
- ""
-
schema
Schema schemaThe schema defining the type used for the header. Ignored if the properties content or array are specified.- Returns:
- the schema of the header
- Default:
- @org.eclipse.microprofile.openapi.annotations.media.Schema
-
required
boolean requiredDetermines whether this header is mandatory. The property may be included and its default value is false.- Returns:
- whether or not the header is required
- Default:
- false
-
deprecated
boolean deprecatedSpecifies that a header is deprecated and should be transitioned out of usage.- Returns:
- whether or not the header is deprecated
- Default:
- false
-
allowEmptyValue
boolean allowEmptyValueWhen 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:
- whether or not the header allows empty values
- Default:
- false
-
ref
String refReference value to a Header object.This property provides a reference to an object defined elsewhere. This property and all other properties are mutually exclusive. If other properties are defined in addition to the ref property then the result is undefined.
- Returns:
- reference to a header
- Default:
- ""
-