public class SwaggerApplication extends Application implements org.restlet.ext.platform.internal.introspection.DocumentedApplication
Application
can
describe itself in the format described by the Swagger specification
project. SwaggerSpecificationRestlet
.SwaggerSpecificationRestlet
,
Swagger2SpecificationRestlet
Constructor and Description |
---|
SwaggerApplication() |
Modifier and Type | Method and Description |
---|---|
void |
attachSwaggerDocumentationRestlets(Router router,
java.lang.String resourceListingPath,
Restlet resourceListingRestlet,
java.lang.String apiDeclarationPath,
Restlet apiDeclarationRestlet)
Defines two routes, one for the high level "Resource listing", and the
other one for the "API declaration".
|
void |
attachSwaggerSpecificationRestlet(Router router)
Defines two routes, one for the high level "Resource listing" (by default
"/api-docs"), and the other one for the "API declaration".
|
void |
attachSwaggerSpecificationRestlet(Router router,
java.lang.String path)
Defines two routes, one for the high level "Resource listing", and the
other one for the "API declaration".
|
Restlet |
getInboundRoot()
Overrides the parent's implementation.
|
java.util.Map<java.lang.String,org.restlet.ext.platform.internal.model.Section> |
getSections()
The sections of the Web API.
|
SwaggerSpecificationRestlet |
getSwaggerSpecificationRestlet(Context context)
The dedicated
Restlet able to generate the Swagger specification
formats. |
createInboundRoot, createOutboundRoot, getConnectorService, getConnegService, getConverterService, getCurrent, getDecoderService, getEncoderService, getMetadataService, getOutboundRoot, getRangeService, getRole, getRoles, getServices, getStatusService, getTaskService, getTunnelService, handle, isDebugging, setConnectorService, setConnegService, setContext, setConverterService, setCurrent, setDebugging, setDecoderService, setEncoderService, setInboundRoot, setInboundRoot, setMetadataService, setOutboundRoot, setOutboundRoot, setRangeService, setRoles, setStatusService, setTaskService, setTunnelService, start, stop
createFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setDescription, setFinderClass, setName, setOwner
public void attachSwaggerDocumentationRestlets(Router router, java.lang.String resourceListingPath, Restlet resourceListingRestlet, java.lang.String apiDeclarationPath, Restlet apiDeclarationRestlet)
router
- The router on which defining the new route.resourceListingPath
- The path to which attach the Restlet that serves the resource
listing.resourceListingRestlet
- The Restlet that serves the resource listing.apiDeclarationPath
- The path to which attach the Restlet that serves the
declaration of a specific resource.apiDeclarationRestlet
- The Restlet that serves the declaration of a specific
resource.public void attachSwaggerSpecificationRestlet(Router router)
router
- The router on which defining the new route.to attach it with a custom path
public void attachSwaggerSpecificationRestlet(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 Restlet getInboundRoot()
SwaggerSpecificationRestlet
. By default,
the documentation is attached to the high level router, with the
"/api-docs" path.getInboundRoot
in class Application
public java.util.Map<java.lang.String,org.restlet.ext.platform.internal.model.Section> getSections()
org.restlet.ext.platform.internal.introspection.DocumentedApplication
getSections
in interface org.restlet.ext.platform.internal.introspection.DocumentedApplication
public SwaggerSpecificationRestlet getSwaggerSpecificationRestlet(Context context)
Restlet
able to generate the Swagger specification
formats.Restlet
able to generate the Swagger specification
formats.Copyright © 2005-2020 Restlet.