Swagger example models not take DataContract.DataMember.Name override
See original GitHub issueFor example, when i set attribute for action
[HttpPost]
[SwaggerResponse(HttpStatusCode.Created, typeof(Product))]
public async Task<IActionResult> CreateProduct([FromBody] MutableProduct model)
{
}
i get wrong Response Class (Status 200)
description in Swagger UI interface. But when i call this method - response is correct.
I use NSwag 11.17.2.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Net Core display DataMember name in Swagger
I have a request of displaying the name from DataMember attribute in the request body of Swagger, instead of displaying the property name....
Read more >DataContractAttribute Class (System.Runtime.Serialization)
By overriding the default values, you can reuse your existing type and have the serialized data conform to the data contract. Note. In...
Read more >How To Serialize Nonstandard Enum Values
Integrating with third-party systems occasionally require enum values that are invalid .NET enum names. This article illustrates how to get ...
Read more >Swashbuckle rename Data Type in Model
It's working fine on the members of the class but I was wondering if it was possible to override the class name as...
Read more >Declarative Dev Model using Attributes
A great way to get a quick overview of what annotated DTOs looks like in practice ... as DTO Type and change serialization...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Problem was in inheritance, my bad =(
So what was the problem?