Open
Description
I defined an XML request like the following :
[OpenApiRequestBody(contentType: "text/xml", bodyType: typeof(Model.MyClass))]
public class MyClass
{
public MySubClass MySubClass { get; set; }
}
public class MySubClass
{
public string MyProperty { get; set; }
}
Then when I look in the generated UI, the casing I have defined has changed:
<?xml version="1.0" encoding="UTF-8"?>
<myClass>
<mySubClass>
<myProperty>string</myProperty>
</mySubClass>
</myClass>
So far, the only solution I have found is to redefine the name of each property using the JsonProperty decorator.
For instance: [JsonProperty("MyProperty")]
Also does it make sense to use that decorator when my request is 'text/xml' ?
It looks like this extension is made for JSON and XML is an afterthought.