swagger issue with [FromBody]

643 Views Asked by At

I am trying to integrate swagger into our application. I tried this in a standalone application and everything was smoothly working. I made similar changes to our application but when I use [FromBody] instead of [FromQuery] the swagger page is empty (No API definition provided).

[HttpPost("Submit")]
public async Task<IActionResult> Post(
    [FromQuery] Request[] request);

I have not clue what is going on; it looks like the process that enumerates the actions is crashing. But I can't confirm this since I don't see this logged anywhere. I am using version 4.0.1.

1

There are 1 best solutions below

0
On

My hunch was correct: apiexplorer was throwing an exception. I pasted the exception on google and found this: https://github.com/OData/WebApi/issues/2024.