scottie1984 / swagger-ui-express

Adds middleware to your express app to serve the Swagger UI bound to your Swagger document. This acts as living documentation for your API hosted from within your app.
MIT License
1.42k stars 225 forks source link

Request Body not showing up #259

Closed jhl0214 closed 3 years ago

jhl0214 commented 3 years ago

Hi,

I am not using any .json or .yml file to generate the swagger doc. I am using the auto generated swagger doc by using new DocumentBuilder(). The parameters for GET requests show up as expected, but for Post, Put, and Delete, the request body doesn't show up. I am using @Body('data') tag in the controller and I believe this is causing the problem because if I remove 'data' from the @Body and just use @Body(), then it works as expected. Does anyone know why it's behaving like this?