OpenApiDocument Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Describes an OpenAPI object (OpenAPI document). See: https://swagger.io/specification
public class OpenApiDocument : Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
type OpenApiDocument = class
interface IOpenApiSerializable
interface IOpenApiElement
interface IOpenApiExtensible
Public Class OpenApiDocument
Implements IOpenApiExtensible, IOpenApiSerializable
- Inheritance
-
OpenApiDocument
- Implements
Constructors
OpenApiDocument() |
Parameter-less constructor |
OpenApiDocument(OpenApiDocument) |
Initializes a copy of an an OpenApiDocument object |
Properties
Components |
An element to hold various schemas for the specification. |
Extensions |
This object MAY be extended with Specification Extensions. |
ExternalDocs |
Additional external documentation. |
HashCode |
The unique hash code of the generated OpenAPI document |
Info |
REQUIRED. Provides metadata about the API. The metadata MAY be used by tooling as required. |
Paths |
REQUIRED. The available paths and operations for the API. |
SecurityRequirements |
A declaration of which security mechanisms can be used across the API. |
Servers |
An array of Server Objects, which provide connectivity information to a target server. |
Tags |
A list of tags used by the specification with additional metadata. |
Workspace |
Related workspace containing OpenApiDocuments that are referenced in this document |
Methods
GenerateHashValue(OpenApiDocument) |
Takes in an OpenApi document instance and generates its hash value |
ResolveReference(OpenApiReference) |
Load the referenced IOpenApiReferenceable object from a OpenApiReference object |
ResolveReferences() |
Walk the OpenApiDocument and resolve unresolved references |
SerializeAsV2(IOpenApiWriter) |
Serialize OpenApiDocument to OpenAPI object V2.0. |
SerializeAsV3(IOpenApiWriter) |
Serialize OpenApiDocument to the latest patch of OpenAPI object V3.0. |
Extension Methods
Validate(IOpenApiElement, ValidationRuleSet) |
Validate element and all child elements |