C# 클래스 NSwag.SwaggerDocument

Describes a JSON web service.
상속: IDocumentPathProvider
파일 보기 프로젝트 열기: NSwag/NSwag 1 사용 예제들

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