C# Class Nancy.Metadata.Swagger.Fluent.SwaggerEndpointInfoExtensions

Show file Open project: HackandCraft/Nancy.Metadata.Swagger

Public Methods

Method Description
WithDefaultResponse ( this endpointInfo, Type responseType, string description = "Default response" ) : SwaggerEndpointInfo
WithDescription ( this endpointInfo, string description ) : SwaggerEndpointInfo
WithRequestModel ( this endpointInfo, Type requestType, string name = "body", string description = null, bool required = true, string loc = "body" ) : SwaggerEndpointInfo
WithRequestParameter ( this endpointInfo, string name, string type = "string", string format = null, bool required = true, string description = null, string loc = "path" ) : SwaggerEndpointInfo
WithResponse ( this endpointInfo, string statusCode, string description ) : SwaggerEndpointInfo
WithResponseModel ( this endpointInfo, string statusCode, Type modelType, string description = null ) : SwaggerEndpointInfo
WithSummary ( this endpointInfo, string summary ) : SwaggerEndpointInfo

Private Methods

Method Description
GenerateResponseInfo ( string description ) : SwaggerResponseInfo
GenerateResponseInfo ( string description, Type responseType ) : SwaggerResponseInfo
GetOrSaveSchemaReference ( Type type ) : string

Method Details

WithDefaultResponse() public static method

public static WithDefaultResponse ( this endpointInfo, Type responseType, string description = "Default response" ) : SwaggerEndpointInfo
endpointInfo this
responseType System.Type
description string
return Nancy.Metadata.Swagger.Model.SwaggerEndpointInfo

WithDescription() public static method

public static WithDescription ( this endpointInfo, string description ) : SwaggerEndpointInfo
endpointInfo this
description string
return Nancy.Metadata.Swagger.Model.SwaggerEndpointInfo

WithRequestModel() public static method

public static WithRequestModel ( this endpointInfo, Type requestType, string name = "body", string description = null, bool required = true, string loc = "body" ) : SwaggerEndpointInfo
endpointInfo this
requestType System.Type
name string
description string
required bool
loc string
return Nancy.Metadata.Swagger.Model.SwaggerEndpointInfo

WithRequestParameter() public static method

public static WithRequestParameter ( this endpointInfo, string name, string type = "string", string format = null, bool required = true, string description = null, string loc = "path" ) : SwaggerEndpointInfo
endpointInfo this
name string
type string
format string
required bool
description string
loc string
return Nancy.Metadata.Swagger.Model.SwaggerEndpointInfo

WithResponse() public static method

public static WithResponse ( this endpointInfo, string statusCode, string description ) : SwaggerEndpointInfo
endpointInfo this
statusCode string
description string
return Nancy.Metadata.Swagger.Model.SwaggerEndpointInfo

WithResponseModel() public static method

public static WithResponseModel ( this endpointInfo, string statusCode, Type modelType, string description = null ) : SwaggerEndpointInfo
endpointInfo this
statusCode string
modelType System.Type
description string
return Nancy.Metadata.Swagger.Model.SwaggerEndpointInfo

WithSummary() public static method

public static WithSummary ( this endpointInfo, string summary ) : SwaggerEndpointInfo
endpointInfo this
summary string
return Nancy.Metadata.Swagger.Model.SwaggerEndpointInfo