mirror of https://github.com/abpframework/abp.git
14 changed files with 192 additions and 96 deletions
@ -0,0 +1,23 @@ |
|||||
|
using System; |
||||
|
|
||||
|
namespace Volo.Abp.Http.Modeling |
||||
|
{ |
||||
|
[Serializable] |
||||
|
public class ControllerInterfaceApiDescriptionModel |
||||
|
{ |
||||
|
public string TypeAsString { get; set; } |
||||
|
|
||||
|
private ControllerInterfaceApiDescriptionModel() |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public static ControllerInterfaceApiDescriptionModel Create(Type type) |
||||
|
{ |
||||
|
return new ControllerInterfaceApiDescriptionModel |
||||
|
{ |
||||
|
TypeAsString = type.FullName |
||||
|
}; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,33 @@ |
|||||
|
using System; |
||||
|
using System.Reflection; |
||||
|
|
||||
|
namespace Volo.Abp.Http.Modeling |
||||
|
{ |
||||
|
[Serializable] |
||||
|
public class MethodParameterApiDescriptionModel |
||||
|
{ |
||||
|
public string Name { get; set; } |
||||
|
|
||||
|
public string TypeAsString { get; set; } |
||||
|
|
||||
|
public bool IsOptional { get; set; } |
||||
|
|
||||
|
public object DefaultValue { get; set; } |
||||
|
|
||||
|
private MethodParameterApiDescriptionModel() |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public static MethodParameterApiDescriptionModel Create(ParameterInfo parameterInfo) |
||||
|
{ |
||||
|
return new MethodParameterApiDescriptionModel |
||||
|
{ |
||||
|
Name = parameterInfo.Name, |
||||
|
TypeAsString = parameterInfo.ParameterType.FullName, |
||||
|
IsOptional = parameterInfo.IsOptional, |
||||
|
DefaultValue = parameterInfo.HasDefaultValue ? parameterInfo.DefaultValue : null |
||||
|
}; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue