|
|
|
@ -1,6 +1,7 @@ |
|
|
|
using System; |
|
|
|
using System.ComponentModel.DataAnnotations; |
|
|
|
using System.Reflection; |
|
|
|
using Volo.Abp.Http.ProxyScripting.Configuration; |
|
|
|
|
|
|
|
namespace Volo.Abp.Http.Modeling |
|
|
|
{ |
|
|
|
@ -9,6 +10,8 @@ namespace Volo.Abp.Http.Modeling |
|
|
|
{ |
|
|
|
public string Name { get; set; } |
|
|
|
|
|
|
|
public string JsonName { get; set; } |
|
|
|
|
|
|
|
public string Type { get; set; } |
|
|
|
|
|
|
|
public string TypeSimple { get; set; } |
|
|
|
@ -21,6 +24,7 @@ namespace Volo.Abp.Http.Modeling |
|
|
|
return new PropertyApiDescriptionModel |
|
|
|
{ |
|
|
|
Name = propertyInfo.Name, |
|
|
|
JsonName = AbpApiProxyScriptingOptions.PropertyNameGenerator.Invoke(propertyInfo), |
|
|
|
Type = ApiTypeNameHelper.GetTypeName(propertyInfo.PropertyType), |
|
|
|
TypeSimple = ApiTypeNameHelper.GetSimpleTypeName(propertyInfo.PropertyType), |
|
|
|
IsRequired = propertyInfo.IsDefined(typeof(RequiredAttribute), true) |
|
|
|
|