C# 클래스 NSwag.CodeGeneration.SwaggerGenerators.SwaggerGenerator

Provides services to for Swagger generators like the creation of parameters and handling of schemas.
파일 보기 프로젝트 열기: NSwag/NSwag

공개 메소드들

메소드 설명
CreateBodyParameter ( string name, ParameterInfo parameter ) : SwaggerParameter

Creates a primitive parameter for the given parameter information reflection object.

CreatePathParameter ( string parameterName, string parameterType ) : SwaggerParameter

Creates a path parameter for a given type.

CreatePrimitiveParameter ( string name, ParameterInfo parameter ) : SwaggerParameter

Creates a primitive parameter for the given parameter information reflection object.

CreatePrimitiveParameter ( string name, string description, Type parameterType, IList parentAttributes ) : SwaggerParameter

Creates a primitive parameter for the given parameter information reflection object.

GenerateAndAppendSchemaFromType ( Type type, bool mayBeNull, IEnumerable parentAttributes ) : NJsonSchema.JsonSchema4

Generates and appends a schema from a given type.

SwaggerGenerator ( JsonSchemaGenerator schemaGenerator, NJsonSchema.JsonSchemaGeneratorSettings schemaGeneratorSettings, JsonSchemaResolver schemaResolver ) : System

Initializes a new instance of the SwaggerGenerator class.

비공개 메소드들

메소드 설명
IsFileResponse ( Type returnType ) : bool
IsParameterRequired ( ParameterInfo parameter ) : bool

메소드 상세

CreateBodyParameter() 공개 메소드

Creates a primitive parameter for the given parameter information reflection object.
public CreateBodyParameter ( string name, ParameterInfo parameter ) : SwaggerParameter
name string The name.
parameter System.Reflection.ParameterInfo The parameter.
리턴 SwaggerParameter

CreatePathParameter() 공개 메소드

Creates a path parameter for a given type.
public CreatePathParameter ( string parameterName, string parameterType ) : SwaggerParameter
parameterName string Name of the parameter.
parameterType string Type of the parameter.
리턴 SwaggerParameter

CreatePrimitiveParameter() 공개 메소드

Creates a primitive parameter for the given parameter information reflection object.
public CreatePrimitiveParameter ( string name, ParameterInfo parameter ) : SwaggerParameter
name string The name.
parameter System.Reflection.ParameterInfo The parameter information.
리턴 SwaggerParameter

CreatePrimitiveParameter() 공개 메소드

Creates a primitive parameter for the given parameter information reflection object.
public CreatePrimitiveParameter ( string name, string description, Type parameterType, IList parentAttributes ) : SwaggerParameter
name string The name.
description string The description.
parameterType System.Type Type of the parameter.
parentAttributes IList The parent attributes.
리턴 SwaggerParameter

GenerateAndAppendSchemaFromType() 공개 메소드

Generates and appends a schema from a given type.
public GenerateAndAppendSchemaFromType ( Type type, bool mayBeNull, IEnumerable parentAttributes ) : NJsonSchema.JsonSchema4
type System.Type The type.
mayBeNull bool if set to true [may be null].
parentAttributes IEnumerable The parent attributes.
리턴 NJsonSchema.JsonSchema4

SwaggerGenerator() 공개 메소드

Initializes a new instance of the SwaggerGenerator class.
public SwaggerGenerator ( JsonSchemaGenerator schemaGenerator, NJsonSchema.JsonSchemaGeneratorSettings schemaGeneratorSettings, JsonSchemaResolver schemaResolver ) : System
schemaGenerator JsonSchemaGenerator The schema generator.
schemaGeneratorSettings NJsonSchema.JsonSchemaGeneratorSettings The schema generator settings.
schemaResolver JsonSchemaResolver The schema resolver.
리턴 System