Share via


OpenApiServerVariable Class

Definition

Server Variable Object.

public class OpenApiServerVariable : Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
type OpenApiServerVariable = class
    interface IOpenApiSerializable
    interface IOpenApiElement
    interface IOpenApiExtensible
Public Class OpenApiServerVariable
Implements IOpenApiExtensible, IOpenApiSerializable
Inheritance
OpenApiServerVariable
Implements

Constructors

OpenApiServerVariable()

Parameterless constructor

OpenApiServerVariable(OpenApiServerVariable)

Initializes a copy of an OpenApiServerVariable object

Properties

Default

REQUIRED. The default value to use for substitution, and to send, if an alternate value is not supplied. Unlike the Schema Object's default, this value MUST be provided by the consumer.

Description

An optional description for the server variable. CommonMark syntax MAY be used for rich text representation.

Enum

An enumeration of string values to be used if the substitution options are from a limited set.

Extensions

This object MAY be extended with Specification Extensions.

Methods

SerializeAsV2(IOpenApiWriter)

Serialize OpenApiServerVariable to Open Api v2.0

SerializeAsV3(IOpenApiWriter)

Serialize OpenApiServerVariable to Open Api v3.0

Extension Methods

Validate(IOpenApiElement, ValidationRuleSet)

Validate element and all child elements

Applies to