This method ...
@POST
@Path("/strings")
@ApiOperation(value = "Send a string in the body",
nickname = "gimmieString",
authorizations = @Authorization(value = "basicAuth"))
public String gimmieString(@ApiParam("theString") String theString, @Auth User user) {
return "you sent: "+ theString;
}
... yields this spec:
...
"/strings" : {
"security": [
{
"basicAuth": []
}
],
"responses": {
"200": {
"schema": {
"type": "string"
},
"description": "successful operation"
}
},
"parameters": [
{
"schema": {
"type": "string"
},
"required": false,
"description": "theString",
"name": "body",
"in": "body"
},
{
"schema": {
"$ref": "#/definitions/User"
},
"required": false,
"name": "body",
"in": "body"
}
],
"produces": [
"application/json"
],
"operationId": "gimmieString",
"description": "",
"summary": "Send a string in the body",
"tags": [
"Bundle Resource"
]
}
}
...
Notice how there are two body parameters.