fix: use name of member not member type
This commit is contained in:
@@ -180,7 +180,7 @@ static class JsonSchemaGenerator
|
|||||||
// 3. Required
|
// 3. Required
|
||||||
// 4. Default values
|
// 4. Default values
|
||||||
// 5. Possible values
|
// 5. Possible values
|
||||||
var memberPropertyName = memberType.Name;
|
var memberPropertyName = member.Name;
|
||||||
var memberDescription = string.Empty;
|
var memberDescription = string.Empty;
|
||||||
var memberRequired = Nullable.GetUnderlyingType(memberType) is null;
|
var memberRequired = Nullable.GetUnderlyingType(memberType) is null;
|
||||||
|
|
||||||
|
|||||||
@@ -462,12 +462,12 @@ public class JsonSchemaGeneratorTestData : IEnumerable<object[]>
|
|||||||
["type"] = "object",
|
["type"] = "object",
|
||||||
["properties"] = new JsonObject()
|
["properties"] = new JsonObject()
|
||||||
{
|
{
|
||||||
["String"] = new JsonObject()
|
["Name"] = new JsonObject()
|
||||||
{
|
{
|
||||||
["type"] = "string",
|
["type"] = "string",
|
||||||
["description"] = string.Empty
|
["description"] = string.Empty
|
||||||
},
|
},
|
||||||
["Int32"] = new JsonObject()
|
["Age"] = new JsonObject()
|
||||||
{
|
{
|
||||||
["type"] = "integer",
|
["type"] = "integer",
|
||||||
["description"] = string.Empty
|
["description"] = string.Empty
|
||||||
@@ -475,8 +475,8 @@ public class JsonSchemaGeneratorTestData : IEnumerable<object[]>
|
|||||||
},
|
},
|
||||||
["required"] = new JsonArray()
|
["required"] = new JsonArray()
|
||||||
{
|
{
|
||||||
"String",
|
"Name",
|
||||||
"Int32"
|
"Age"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user