Azure / Azure/azure-functions-openapi-extension
Model casing is changed
- Dominant language
- C#
- Stars
- 388
- Forks
- 202
- PR merge metrics
- No merged PRs in 30d
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:
``
``
` `
` string`
` `
``
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.
Contributor guide
Assessment
This issue has not been assessed yet.