OpenApiServer Class

Definition

Server Object: an object representing a Server.

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

Constructors

OpenApiServer()

Parameterless constructor

OpenApiServer(OpenApiServer)

Initializes a copy of an OpenApiServer object

Properties

Description

An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation.

Extensions

This object MAY be extended with Specification Extensions.

Url

REQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in {brackets}.

Variables

A map between a variable name and its value. The value is used for substitution in the server's URL template.

Methods

SerializeAsV2(IOpenApiWriter)

Serialize OpenApiServer to Open Api v2.0

SerializeAsV3(IOpenApiWriter)

Serialize OpenApiServer to Open Api v3.0

Extension Methods

Validate(IOpenApiElement, ValidationRuleSet)

Validate element and all child elements

Applies to