Class DocumentationManager
java.lang.Object
one.microstream.storage.restservice.sparkjava.types.RouteManager
one.microstream.storage.restservice.sparkjava.types.DocumentationManager
public class DocumentationManager extends RouteManager
-
Field Summary
Fields inherited from class one.microstream.storage.restservice.sparkjava.types.RouteManager
sparkService
-
Constructor Summary
Constructors Constructor Description DocumentationManager(spark.Service sparkService)
-
Method Summary
Modifier and Type Method Description Object
getAllRoutes(String host)
Get a Json Array containing all registered roots and there httpMethods.Object
getDocumentation(String uri)
Get the documentation snippet of all http methods for a registered uri.Object
getDocumentation(String uri, String httpMethod)
Get the documentation snippet for a http method for a registered uri.void
registerRoute(spark.route.HttpMethod httpMethod, String uri, RouteBase<?> route)
Registers a route / httpMethod and automatically creates and registers an options route to get help on this route.Methods inherited from class one.microstream.storage.restservice.sparkjava.types.RouteManager
getRegisteredRoutes
-
Constructor Details
-
DocumentationManager
public DocumentationManager(spark.Service sparkService)
-
-
Method Details
-
registerRoute
Registers a route / httpMethod and automatically creates and registers an options route to get help on this route.- Overrides:
registerRoute
in classRouteManager
- Parameters:
httpMethod
- the http methoduri
- the uriroute
- the route
-
getAllRoutes
Get a Json Array containing all registered roots and there httpMethods.- Parameters:
host
- the host url and context path- Returns:
- JsonArray
-
getDocumentation
Get the documentation snippet for a http method for a registered uri.- Parameters:
uri
- the urihttpMethod
- the http method- Returns:
- JsonObject
-
getDocumentation
Get the documentation snippet of all http methods for a registered uri.- Parameters:
uri
- the uri- Returns:
- JsonObject
-