C# Класс NSwag.SwaggerDocument

Describes a JSON web service.
Наследование: IDocumentPathProvider
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
GetOperationNameFromPath string

Открытые методы

Метод Описание
FromFile ( string filePath ) : SwaggerDocument

Creates a Swagger specification from a JSON file.

FromJson ( string data, string documentPath = null ) : SwaggerDocument

Creates a Swagger specification from a JSON string.

FromUrl ( string url ) : SwaggerDocument

Creates a Swagger specification from an URL.

GenerateOperationIds ( ) : void

Generates missing or non-unique operation IDs.

SwaggerDocument ( ) : System.Collections.Generic

Initializes a new instance of the SwaggerDocument class.

ToJson ( ) : string

Converts the description object to JSON.

ToJson ( NJsonSchema.JsonSchemaGeneratorSettings jsonSchemaGenerator ) : string

Converts the description object to JSON.

Приватные методы

Метод Описание
GetOperationNameFromPath ( SwaggerOperationDescription operation ) : string

Описание методов

FromFile() публичный статический Метод

Creates a Swagger specification from a JSON file.
public static FromFile ( string filePath ) : SwaggerDocument
filePath string The file path.
Результат SwaggerDocument

FromJson() публичный статический Метод

Creates a Swagger specification from a JSON string.
public static FromJson ( string data, string documentPath = null ) : SwaggerDocument
data string The JSON data.
documentPath string The document path (URL or file path) for resolving relative document references.
Результат SwaggerDocument

FromUrl() публичный статический Метод

Creates a Swagger specification from an URL.
public static FromUrl ( string url ) : SwaggerDocument
url string The URL.
Результат SwaggerDocument

GenerateOperationIds() публичный Метод

Generates missing or non-unique operation IDs.
public GenerateOperationIds ( ) : void
Результат void

SwaggerDocument() публичный Метод

Initializes a new instance of the SwaggerDocument class.
public SwaggerDocument ( ) : System.Collections.Generic
Результат System.Collections.Generic

ToJson() публичный Метод

Converts the description object to JSON.
public ToJson ( ) : string
Результат string

ToJson() публичный Метод

Converts the description object to JSON.
public ToJson ( NJsonSchema.JsonSchemaGeneratorSettings jsonSchemaGenerator ) : string
jsonSchemaGenerator NJsonSchema.JsonSchemaGeneratorSettings The json schema generator.
Результат string