@Deprecated public class SwaggerSpecificationRestlet extends Restlet
setApplication(Application)
or
setApiInboundRoot(Application)
methods, and the documentation for
each resource.JaxRsApplicationSwaggerSpecificationRestlet
restlet for
Jax-RS applications.
Usage example:
// this is the current Application SwaggerSpecificationRestlet swaggerSpecificationRestlet = new SwaggerSpecificationRestlet(this); swaggerSpecificationRestlet.setBasePath("http://myapp.com/api/v1"); swaggerSpecificationRestlet.attach(baseRouter);
Constructor and Description |
---|
SwaggerSpecificationRestlet()
Deprecated.
Default constructor.
|
SwaggerSpecificationRestlet(Application application)
Deprecated.
Constructor.
|
SwaggerSpecificationRestlet(Context context)
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(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(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, stop
public SwaggerSpecificationRestlet()
public SwaggerSpecificationRestlet(Application application)
application
- The application to describe.public SwaggerSpecificationRestlet(Context context)
context
- The context.public void attach(Router router)
router
- The router on which defining the new route.to attach it with a
custom path
public 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
path
public 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_VERSION
public void setApiInboundRoot(Application application)
application
- The application.public void setApiVersion(java.lang.String apiVersion)
apiVersion
- The API version.public void setApplication(Application application)
application
- The application.public 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.