C# Class Nancy.Swagger.SwaggerTypeMapping

This class allows you to customize how you want a type to be represented in the swagger output. For example, if a service serializes/deserializes DateTime as a string when being sent/received, there should be a SwaggerTypeMapping from DateTime to string in order to make the swagger output match what is actually expected.
ファイルを表示 Open project: khellang/Nancy.Swagger Class Usage Examples

Public Methods

Method Description
AddTypeMapping ( Type source, Type target ) : void
GetMappedType ( Type type, List previousTypes = null ) : Type
IsMappedType ( Type type ) : bool

Private Methods

Method Description
SwaggerTypeMapping ( Type sourceType, Type targetType ) : System

Method Details

AddTypeMapping() public static method

public static AddTypeMapping ( Type source, Type target ) : void
source System.Type
target System.Type
return void

GetMappedType() public static method

public static GetMappedType ( Type type, List previousTypes = null ) : Type
type System.Type
previousTypes List
return System.Type

IsMappedType() public static method

public static IsMappedType ( Type type ) : bool
type System.Type
return bool