I am trying to use Swagger to document my REST API. Following this example , I comment on the REST endpoints as follows:
case class CreateItemRequest(title: String, body: String) @ApiOperation(value = "Create a new item", httpMethod = "POST", response = classOf[Item]) @ApiImplicitParams(Array(new ApiImplicitParam(dataType = "CreateItemRequest", paramType = "body", name = "body", required = true, allowMultiple = false, value = "The item object to create"))) def create( @ApiParam(value = "Hash of the user", required = true) @QueryParam("userhash") userhash: String )
And I expected to get "Model" as
but I only get String "CreateItemRequest" as the data type. Not properties of the class class CreateItemRequest.
Hi Daniel
source share