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 Summary
Modifier and TypeMethodDescriptionvoid
Clears the cache.io.swagger.v3.oas.models.OpenAPI
The generated specifications as a OpenAPI object.The generated specifications as pretty formatted JSON.getOpenApiAsJson
(boolean prettyFormatted) The generated specifications as JSON.The generated specifications as pretty formatted YAML.getOpenApiAsYaml
(boolean prettyFormatted) The generated specifications as YAML.void
ignoreRoutesByIds
(String... ids) Ignore routes using their ids.void
ignoreRouteUsingHttpMethodAndPath
(HttpMethod method, String path) Ignore a route using its HTTP method and path.void
resetAll()
Reset everything : delete caches, delete ignored routes, etc.void
setOpenApiBase
(io.swagger.v3.oas.models.OpenAPI baseOpenApiInfo) The base OpenAPI informations for the generated specs file.
-
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
The generated specifications as JSON. -
getOpenApiAsYaml
String getOpenApiAsYaml()The generated specifications as pretty formatted YAML. -
getOpenApiAsYaml
The generated specifications as YAML. -
ignoreRoutesByIds
Ignore routes using their ids. -
ignoreRouteUsingHttpMethodAndPath
Ignore a route using its HTTP method and path.- Parameters:
method
- Ifnull
, 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.
-