@Deprecated public class Swagger2SpecificationRestlet extends Restlet
setApplication(Application)
methods, and the documentation
for each resource.JaxRsApplicationSwagger2SpecificationRestlet
restlet for
Jax-RS applications.
Usage example (in an Application
class):
new Swagger2SpecificationRestlet(this).attach(baseRouter);or
Swagger2SpecificationRestlet swagger2SpecificationRestlet = new Swagger2SpecificationRestlet(this); // this is the current Application swagger2SpecificationRestlet.setBasePath("http://myapp.com/api/v1"); swagger2SpecificationRestlet.attach(baseRouter);
Constructor and Description |
---|
Swagger2SpecificationRestlet(Application application)
Deprecated.
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
attach(Router router)
Deprecated.
Defines one route (by default "/swagger.json") for serving the
application specification.
|
void |
attach(Router router,
java.lang.String path)
Deprecated.
Defines one route (by default "/swagger.json") for serving the
application specification.
|
java.lang.String |
getApiVersion()
Deprecated.
Returns the API's version.
|
java.lang.String |
getBasePath()
Deprecated.
Returns the base path of the API.
|
Representation |
getSwagger()
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 |
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 Swagger2SpecificationRestlet(Application application)
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 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 java.lang.String getApiVersion()
public java.lang.String getBasePath()
public Representation getSwagger()
public java.lang.String getSwaggerVersion()
Swagger2Writer.SWAGGER_VERSION
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.