Swagger body annotations XML comments

29 views
Skip to first unread message

chava...@eternix.co.il

unread,
Nov 13, 2018, 9:40:16 AM11/13/18
to Swagger
I am using swagger in a C# webapi controller. I am using XML comments and would like to have annotations for a body request that I am reading within the method and serializing with my own custom serializer. I am having a hard time figuring out how to set the "params" to show in swagger, without having the actually parameter in the method.
Ex:
Search([FromBody] MyObject myObject),
instead I would like to do:
Search() {
string body = await Request.Content.ReadAsStringAsync();
// custom serialization
}
Reply all
Reply to author
Forward
0 new messages