Skip to content

Swagger is not generated from main resource to subresource with hidden-true #2116

@radufabian

Description

@radufabian

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions