@Deprecated public class JaxRsApplicationSwagger2SpecificationRestlet extends Restlet
setApplication(Application)
methods, and the documentation
for each resource.SwaggerSpecificationRestlet
restlet
for Restlet applications.
Usage example (in an Application
class):
new Swagger2SpecificationRestlet(this).attach(baseRouter);or
JaxRsApplicationSwagger2SpecificationRestlet jaxrsSwagger2SpecificationRestlet = new JaxRsApplicationSwagger2SpecificationRestlet(this); // this is the current Application jaxrsSwagger2SpecificationRestlet.setBasePath("http://myapp.com/api/v1"); jaxrsSwagger2SpecificationRestlet.attach(baseRouter);
Constructor and Description |
---|
JaxRsApplicationSwagger2SpecificationRestlet(javax.ws.rs.core.Application application)
Deprecated.
Constructor.
|
JaxRsApplicationSwagger2SpecificationRestlet(Context context,
javax.ws.rs.core.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(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, stop
public JaxRsApplicationSwagger2SpecificationRestlet(javax.ws.rs.core.Application application)
application
- The application to describe.public JaxRsApplicationSwagger2SpecificationRestlet(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 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(javax.ws.rs.core.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.