Hi,
I am trying to get two parameters of "paramType" "body" to work without results.
The method likes like the following
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation(value = "Create new pet", notes = "Create new pet", response = PetResource.class)
@ApiImplicitParams({@ApiImplicitParam(name = "Pet", value = "Pet to be created", required = true, dataType = "PetResource", paramType = "body")})
public Response create(@Context UriInfo info,
@ApiParam(value = "Pet to be created", access = "internal") Pet pet,
@Context ContainerRequestContext context)
{
My need is the following:
The POST method argument is a POJO class (Pet), which is what the json in the payload is actually converted into. This class is actually for internal use, and I don't want to have Swagger annotations in it.
The class to be returned, documented, and actually what the client supposes to send is the PetResource
What I would like to have is
1. Hide @ApiParam(value = "Pet to be created", access = "internal") Pet pet from the documentation, but I cannot filter this parameter out by means of a SwaggerSpecFilter
2. Show @ApiImplicitParams({@ApiImplicitParam(name
= "Pet", value = "Pet to be created", required = true, dataType =
"PetResource", paramType = "body")})but it seems that when there are two parameters my application raises an error
Any help would be greatly appreciated!
System info
jersey version 2.17
swagger-core version 1.5.0
swagger-jersey2-jaxrs version 1.5.0