Reputation: 21
My POST request is not showing the BODY field.
My swagger docs
Swagger docs petstore
And my method is so
@ApiOperation(nickname = "insert",
value = "Desc",
httpMethod = "POST")
public Result insert()
I do forgot something?
Thanks!
Upvotes: 0
Views: 4349
Reputation: 2354
I'm assuming you're using the swagger-play integration for play framework 2.5. You shouldn't need to specify the http method, it should be able to figure it out from your routes file.
As for the body field, swagger will do one of these:
By the looks of your insert() method (it doesn't have any explicit parameters), you probably need to use the second annotation. Don't forget to use the appropriate paramType (probably body).
Upvotes: 1