-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Hello,
I have main resource ConfigurationResource and the subresource EnvironmentsResource.
I am using swagger api version 1.5.9.
The swagger is generationg tags configuration but without any method inside. If I remove hidden=true from subresource then is OK. It should work with hidden=true as EnvironmentsResource is a subresource and I do not want it to be listed separately. Any idea?
@path("/config")
@produces(MediaType.APPLICATION_JSON)
@Api(value = "Configuration Resource", description = "Configuration: environments", tags = {"configuration"})
public class ConfigurationResource {
@Timed
@Path("/environments")
@ApiOperation(value = "environment operation", tags = {"configuration"}, response = EnvironmentsResource.class)
public EnvironmentsResource getEnvironmentsResource() {
return environmentsResourceProvider.get();
}
}
@Api (hidden = true, value="environments", tags = {"configuration"})
@produces(MediaType.APPLICATION_JSON)
public class EnvironmentsResource {
@Timed
@GET
@Path("/{id}")
@ApiOperation(
value = "Get environment by id", httpMethod = "GET", response = JsonWrapper.class,
notes = "The environments provides a method to get the environment by id")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "The content is a descriptor for each of the matching results.")})
public JsonWrapper getEnvironmentById(@ApiParam(value = "The environment id", required = true, defaultValue = "1")
@PathParam("id") BigInteger id) {
return null;
}
}
Thank you, very much,
Radu