Share via


OpenApiHeader Class

Definition

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

public class OpenApiHeader : Microsoft.OpenApi.Interfaces.IEffective<Microsoft.OpenApi.Models.OpenApiHeader>, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable
type OpenApiHeader = class
    interface IOpenApiSerializable
    interface IOpenApiElement
    interface IOpenApiReferenceable
    interface IOpenApiExtensible
    interface IEffective<OpenApiHeader>
Public Class OpenApiHeader
Implements IEffective(Of OpenApiHeader), IOpenApiExtensible, IOpenApiReferenceable
Inheritance
OpenApiHeader
Implements

Constructors

OpenApiHeader()

Parameter-less constructor

OpenApiHeader(OpenApiHeader)

Initializes a copy of an OpenApiHeader object

Properties

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

A brief description of the header.

Example

Example of the media type.

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

This object MAY be extended with Specification Extensions.

Reference

Reference pointer.

Required

Determines whether this header is mandatory.

Schema

The schema defining the type used for the header.

Style

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

UnresolvedReference

Indicates if object is populated with data or is just a reference to the data

Methods

GetEffective(OpenApiDocument)

Returns an effective OpenApiHeader object based on the presence of a $ref

SerializeAsV2(IOpenApiWriter)

Serialize OpenApiHeader to Open Api v2.0

SerializeAsV2WithoutReference(IOpenApiWriter)

Serialize to OpenAPI V2 document without using reference.

SerializeAsV3(IOpenApiWriter)

Serialize OpenApiHeader to Open Api v3.0

SerializeAsV3WithoutReference(IOpenApiWriter)

Serialize to OpenAPI V3 document without using reference.

Extension Methods

Validate(IOpenApiElement, ValidationRuleSet)

Validate element and all child elements

ResolveReference(IOpenApiReferenceable, JsonPointer)

Resolves a JSON Pointer with respect to an element, returning the referenced element.

Applies to