|
Restlet Framework 2.2.2 Java Standard Edition |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.Restlet
org.restlet.ext.swagger.SwaggerUiRestlet
public class SwaggerUiRestlet
Restlet that generates Swagger documentation in the format supported by the
swagger-ui project.
It helps to generate the high level documentation for the whole API (set by
calling setApiInboundRoot(Application)
or
setApiInboundRoot(Restlet)
methods, and the documentation for each
resource.
Supports only Jaxrs application and collection of JaxRsRestlet at this time.
https://github.com/wordnik/swagger-ui
,
https://helloreverb.com/developers/swagger
Constructor Summary | |
---|---|
SwaggerUiRestlet()
Default constructor. Sets the swaggerVersion to SwaggerSpec.version() . |
|
SwaggerUiRestlet(Context context)
Constructor. Sets the swaggerVersion to SwaggerSpec.version() . |
Method Summary | |
---|---|
void |
handle(Request request,
Response response)
|
void |
setApiInboundRoot(Application application)
Sets the root Restlet for the given application. |
void |
setApiInboundRoot(Restlet apiInboundRoot)
Sets the root Restlet for the given application. |
void |
setApiVersion(String apiVersion)
Sets the API's version. |
void |
setBasePath(String basePath)
Sets the base path of the API. |
void |
setJsonPath(String jsonPath)
Sets the base path of the API's resource. |
void |
setSwaggerVersion(String swaggerVersion)
Sets the version of Swagger used to generate this documentation. |
Methods inherited from class org.restlet.Restlet |
---|
createFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setContext, setDescription, setFinderClass, setName, setOwner, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SwaggerUiRestlet()
swaggerVersion
to SwaggerSpec.version()
.
public SwaggerUiRestlet(Context context)
swaggerVersion
to SwaggerSpec.version()
.
context
- The context.Method Detail |
---|
public void handle(Request request, Response response)
handle
in interface Uniform
handle
in class Restlet
public void setApiInboundRoot(Application application)
application
- The application.public void setApiInboundRoot(Restlet apiInboundRoot)
apiInboundRoot
- The root Restlet.public void setApiVersion(String apiVersion)
apiVersion
- The API version.public void setBasePath(String basePath)
basePath
- The base path of the APIpublic void setJsonPath(String jsonPath)
basePath
- The base path of the API's resource.public void setSwaggerVersion(String swaggerVersion)
swaggerVersion
-
|
Restlet Framework 2.2.2 Java Standard Edition |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |