Browse Source

Update TypeApiDescriptionModel to include instance and public properties.

pull/22011/head
maliming 2 years ago
parent
commit
a693f28741
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 3
      framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/TypeApiDescriptionModel.cs

3
framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/TypeApiDescriptionModel.cs

@ -1,5 +1,6 @@
using System; using System;
using System.Linq; using System.Linq;
using System.Reflection;
using Volo.Abp.Reflection; using Volo.Abp.Reflection;
namespace Volo.Abp.Http.Modeling; namespace Volo.Abp.Http.Modeling;
@ -46,7 +47,7 @@ public class TypeApiDescriptionModel
else else
{ {
typeModel.Properties = type typeModel.Properties = type
.GetProperties() .GetProperties(BindingFlags.Instance | BindingFlags.Public)
.Where(p => p.DeclaringType == type) .Where(p => p.DeclaringType == type)
.Select(PropertyApiDescriptionModel.Create) .Select(PropertyApiDescriptionModel.Create)
.ToArray(); .ToArray();

Loading…
Cancel
Save