Restlet Framework 2.2.1
Java Enterprise Edition

org.restlet.ext.swagger
Class SwaggerUiRestlet

java.lang.Object
  extended by org.restlet.Restlet
      extended by org.restlet.ext.swagger.SwaggerUiRestlet
All Implemented Interfaces:
Uniform

public class SwaggerUiRestlet
extends Restlet

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.

Author:
Grzegorz Godlewski
See Also:
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

SwaggerUiRestlet

public SwaggerUiRestlet()
Default constructor.
Sets the swaggerVersion to SwaggerSpec.version().


SwaggerUiRestlet

public SwaggerUiRestlet(Context context)
Constructor.
Sets the swaggerVersion to SwaggerSpec.version().

Parameters:
context - The context.
Method Detail

handle

public void handle(Request request,
                   Response response)
Specified by:
handle in interface Uniform
Overrides:
handle in class Restlet

setApiInboundRoot

public void setApiInboundRoot(Application application)
Sets the root Restlet for the given application.

Parameters:
application - The application.

setApiInboundRoot

public void setApiInboundRoot(Restlet apiInboundRoot)
Sets the root Restlet for the given application.

Parameters:
apiInboundRoot - The root Restlet.

setApiVersion

public void setApiVersion(String apiVersion)
Sets the API's version.

Parameters:
apiVersion - The API version.

setBasePath

public void setBasePath(String basePath)
Sets the base path of the API.

Parameters:
basePath - The base path of the API

setJsonPath

public void setJsonPath(String jsonPath)
Sets the base path of the API's resource.

Parameters:
basePath - The base path of the API's resource.

setSwaggerVersion

public void setSwaggerVersion(String swaggerVersion)
Sets the version of Swagger used to generate this documentation. Call SwaggerSpec.version()

Parameters:
swaggerVersion -

Restlet Framework 2.2.1
Java Enterprise Edition

Copyright © 2005-2014 Restlet.