Annotation Type Header
-
@Target({}) @Retention(RUNTIME) @Inherited public @interface Header
The annotation may be used to add one or more headers to the definition of a response or as attribute of content encoding by defining it as fieldApiResponse.headers()
orContent.encoding()
.Please note that request headers are defined as Header
Parameter
.- See Also:
- Header (OpenAPI specification),
ApiResponse
,Parameter
,Encoding
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description boolean
deprecated
Specifies that a header is deprecated and should be transitioned out of usage.String
description
Additional description data to provide on the purpose of the headerString
ref
A reference to a header defined in components headers.boolean
required
Determines whether this header is mandatory.Schema
schema
The schema defining the type used for the header.
-
-
-
Element Detail
-
name
String name
Required: The name of the header. The name is only used as the key to store this header in a map.- Returns:
- the header's name
-
-
-
description
String description
Additional description data to provide on the purpose of the header- Returns:
- the header's description
- Default:
- ""
-
-
-
schema
Schema schema
The schema defining the type used for the header. Ignored if the properties content or array are specified.- Returns:
- the schema of the header
- Default:
- @io.swagger.v3.oas.annotations.media.Schema
-
-
-
ref
String ref
A reference to a header defined in components headers.- Returns:
- the reference
- Since:
- 2.0.3
- Default:
- ""
-
-