Interface SpincastOpenApiManager

All Known Implementing Classes:
SpincastOpenApiManagerDefault

public interface SpincastOpenApiManager
The component resposible to store and tweak the informations requierd to generate the Open API specifications.
  • Method Details

    • setOpenApiBase

      void setOpenApiBase(io.swagger.v3.oas.models.OpenAPI baseOpenApiInfo)
      The base OpenAPI informations for the generated specs file.

      This can be a full and standalone OpenAPI object, containing your paths, models, etc. Or it can be the base information to which specs specific to each routes will be added.

    • getOpenApi

      io.swagger.v3.oas.models.OpenAPI getOpenApi()
      The generated specifications as a OpenAPI object.
    • getOpenApiAsJson

      String getOpenApiAsJson()
      The generated specifications as pretty formatted JSON.
    • getOpenApiAsJson

      String getOpenApiAsJson(boolean prettyFormatted)
      The generated specifications as JSON.
    • getOpenApiAsYaml

      String getOpenApiAsYaml()
      The generated specifications as pretty formatted YAML.
    • getOpenApiAsYaml

      String getOpenApiAsYaml(boolean prettyFormatted)
      The generated specifications as YAML.
    • ignoreRoutesByIds

      void ignoreRoutesByIds(String... ids)
      Ignore routes using their ids.
    • ignoreRouteUsingHttpMethodAndPath

      void ignoreRouteUsingHttpMethodAndPath(HttpMethod method, String path)
      Ignore a route using its HTTP method and path.
      Parameters:
      method - If null, all HTTP methods will be used.
    • clearCache

      void clearCache()
      Clears the cache. You need to call this if at runtime you dynamically add some new route/information affecting the generated specifications.
    • resetAll

      void resetAll()
      Reset everything : delete caches, delete ignored routes, etc.