@Path(value="/api-docs")
public class SwaggerApiResource
extends com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON
Normally you must set the basePath globally on the SwaggerConfig, but doing it like this allows us to retrieve the path from the UriInfo rather than explicitly configuring it.
If the basePath is already set this class will not alter it.
Constructor and Description |
---|
SwaggerApiResource() |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
apiDeclaration(String route,
javax.ws.rs.core.Application app,
javax.servlet.ServletConfig sc,
javax.ws.rs.core.HttpHeaders headers,
javax.ws.rs.core.UriInfo uriInfo)
Serves the Swagger API.
|
public javax.ws.rs.core.Response apiDeclaration(@PathParam(value="route") String route, @Context javax.ws.rs.core.Application app, @Context javax.servlet.ServletConfig sc, @Context javax.ws.rs.core.HttpHeaders headers, @Context javax.ws.rs.core.UriInfo uriInfo)
apiDeclaration
in class com.wordnik.swagger.jaxrs.listing.ApiListingResource
route
- the routeapp
- the appsc
- the service configheaders
- the headersuriInfo
- the uri infoCopyright © 2020 Cerner Innovation, Inc.. All rights reserved.