Share via


OpenApiHeader Class

Definition

Header Object. The Header Object follows the structure of the Parameter Object.

public class OpenApiHeader : Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiHeader, Microsoft.OpenApi.IShallowCopyable<Microsoft.OpenApi.IOpenApiHeader>
type OpenApiHeader = class
    interface IOpenApiHeader
    interface IOpenApiDescribedElement
    interface IOpenApiElement
    interface IOpenApiReadOnlyExtensible
    interface IShallowCopyable<IOpenApiHeader>
    interface IOpenApiReferenceable
    interface IOpenApiSerializable
    interface IOpenApiExtensible
Public Class OpenApiHeader
Implements IOpenApiExtensible, IOpenApiHeader, IShallowCopyable(Of IOpenApiHeader)
Inheritance
OpenApiHeader
Implements

Constructors

Name Description
OpenApiHeader()

Parameter-less constructor

Properties

Name Description
AllowEmptyValue

Sets the ability to pass empty-valued headers.

AllowReserved

Determines whether the header value SHOULD allow reserved characters, as defined by RFC3986.

Content

A map containing the representations for the header.

Deprecated

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

Description

Long description for the example. CommonMark syntax MAY be used for rich text representation.

Example

Example of the media type. You must use the IsJsonNullSentinel(JsonNode) method to check whether Default was assigned a null value in the document. Assign JsonNull to use get null as a serialized value.

Examples

Examples of the media type.

Explode

When this is true, header values of type array or object generate separate parameters for each value of the array or key-value pair of the map.

Extensions

Specification extensions.

Required

Determines whether this header is mandatory.

Schema

The schema defining the type used for the request body.

Style

Describes how the header value will be serialized depending on the type of the header value.

Methods

Name Description
CreateShallowCopy()

Create a shallow copy of the current instance.

SerializeAsV2(IOpenApiWriter)

Serialize to OpenAPI V2 document without using reference.

SerializeAsV3(IOpenApiWriter)

Serialize OpenApiHeader to Open Api v3.0

SerializeAsV31(IOpenApiWriter)

Serialize OpenApiHeader to Open Api v3.1

SerializeAsV32(IOpenApiWriter)

Serialize OpenApiHeader to Open Api v3.2

Extension Methods

Name Description
Validate(IOpenApiElement, ValidationRuleSet)

Validate element and all child elements

Applies to