@Deprecated public class JaxRsApplicationSwaggerSpecificationRestlet extends Restlet
setApplication(Application) or
setApiInboundRoot(Application) methods, and the documentation for
each resource.SwaggerSpecificationRestlet restlet
for Restlet applications.
Usage example:
JaxRsApplicationSwaggerSpecificationRestlet jaxrsSwaggerSpecificationRestlet = new JaxRsApplicationSwaggerSpecificationRestlet(this); // this is the current Application
jaxrsSwaggerSpecificationRestlet.setBasePath("http://myapp.com/api/v1");
jaxrsSwaggerSpecificationRestlet.attach(baseRouter);
| Constructor and Description |
|---|
JaxRsApplicationSwaggerSpecificationRestlet(javax.ws.rs.core.Application application)
Deprecated.
Constructor.
|
JaxRsApplicationSwaggerSpecificationRestlet(Context context,
javax.ws.rs.core.Application application)
Deprecated.
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
attach(Router router)
Deprecated.
Defines two routes, one for the high level "Resource listing" (by default
"/api-docs"), and the other one for the "API declaration".
|
void |
attach(Router router,
java.lang.String path)
Deprecated.
Defines two routes, one for the high level "Resource listing", and the
other one for the "API declaration".
|
Representation |
getApiDeclaration(java.lang.String category)
Deprecated.
Returns the Swagger documentation of a given resource, also known as
"API Declaration" in Swagger vocabulary.
|
java.lang.String |
getApiVersion()
Deprecated.
Returns the API's version.
|
java.lang.String |
getBasePath()
Deprecated.
Returns the base path of the API.
|
Representation |
getResourceListing()
Deprecated.
Returns the representation of the whole resource listing of the
Application.
|
java.lang.String |
getSwaggerVersion()
Deprecated.
Returns the version of the Swagger specification.
|
void |
handle(Request request,
Response response)
Deprecated.
|
void |
setApiInboundRoot(javax.ws.rs.core.Application application)
Deprecated.
Sets the root Restlet for the given application.
|
void |
setApiVersion(java.lang.String apiVersion)
Deprecated.
Sets the API's version.
|
void |
setApplication(javax.ws.rs.core.Application application)
Deprecated.
Sets the root Restlet for the given application.
|
void |
setBasePath(java.lang.String basePath)
Deprecated.
Sets the base path of the API.
|
void |
setSwaggerVersion(java.lang.String swaggerVersion)
Deprecated.
Sets the version of the Swagger specification.
|
createFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setContext, setDescription, setFinderClass, setName, setOwner, start, stoppublic JaxRsApplicationSwaggerSpecificationRestlet(javax.ws.rs.core.Application application)
application - The application to describe.public JaxRsApplicationSwaggerSpecificationRestlet(Context context, javax.ws.rs.core.Application application)
context - The context.application - The application to describe.public void attach(Router router)
router - The router on which defining the new route.to attach it with a
custom pathpublic void attach(Router router, java.lang.String path)
router - The router on which defining the new route.path - The root path of the documentation Restlet.to attach it with the default
pathpublic Representation getApiDeclaration(java.lang.String category)
category - The category of the resource to describe.public java.lang.String getApiVersion()
public java.lang.String getBasePath()
public Representation getResourceListing()
public java.lang.String getSwaggerVersion()
SwaggerWriter.SWAGGER_VERSIONpublic void setApiInboundRoot(javax.ws.rs.core.Application application)
application - The application.public void setApiVersion(java.lang.String apiVersion)
apiVersion - The API version.public void setApplication(javax.ws.rs.core.Application application)
application - The applicationpublic void setBasePath(java.lang.String basePath)
basePath - The base path of the APIpublic void setSwaggerVersion(java.lang.String swaggerVersion)
swaggerVersion - The version of the Swagger specification.Copyright © 2005-2024 Restlet.