Class DocumentationManager

java.lang.Object
one.microstream.storage.restservice.sparkjava.RouteManager
one.microstream.storage.restservice.sparkjava.DocumentationManager

public class DocumentationManager
extends RouteManager
  • Constructor Details

  • Method Details

    • registerRoute

      public void registerRoute​(spark.route.HttpMethod httpMethod, String uri, RouteBase<?> route)
      Register a route / httpMethod and automatically create and register an options route to get help on this route
      Overrides:
      registerRoute in class RouteManager
    • getAllRoutes

      public Object getAllRoutes​(String host)
      get a Json Array containing all registered roots and there httpMethods
      Parameters:
      host - : the host url and context path
      Returns:
      JsonArray
    • getDocumentation

      public Object getDocumentation​(String uri, String httpMethod)
      Get the documentation snippet for a http method for a registered uri
      Parameters:
      uri -
      httpMethod -
      Returns:
      JsonObject
    • getDocumentation

      public Object getDocumentation​(String uri)
      Get the documentation snippet of all http methods for a registered uri
      Parameters:
      uri -
      httpMethod -
      Returns:
      JsonObject