Class AbstractMiddlewareVersion
java.lang.Object
com.kingsrook.qqq.middleware.javalin.specs.AbstractMiddlewareVersion
- Direct Known Subclasses:
MiddlewareVersionV1
Baseclass that combines multiple specs together into a single "version" of
the full qqq middleware.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateExtensionOpenAPIModel(String basePath, MiddlewareSpecExtension extension) The OpenAPI document of one extension alone (its paths and the component schemas its specs define) - what a qbit commits and contract-tests.generateOpenAPIModel(String basePath) List<AbstractEndpointSpec<?, ?, ?>> The core specs plus the specs registered by extensions, in route order.Paths that serve documentation.abstract List<AbstractEndpointSpec<?, ?, ?>> hey - don't re-construct the endpoint-spec objects inside this method...The extensions whose specs this version serves.Core feature names this version supports, published by the version endpoint, so clients can toggle optional areas without probing.io.javalin.apibuilder.EndpointGroupgetJavalinEndpointGroup(QInstance qInstance) The semantic version (MAJOR.MINOR.PATCH) of this version of the API, as published in the OpenAPI info.version.abstract StringvoidloadExtensions(QInstance qInstance) Load the extension specs registered in a QInstance (replacing any loaded before).voidpreExecute(io.javalin.http.Context context) voidsetQInstance(QInstance qInstance) For initial setup when server boots, set the qInstance - but also, e.g., for development, to do a hot-swap.voidwarnIfPathMethodAlreadyUsed(Method existing, CompleteOperation completeOperation, AbstractEndpointSpec<?, ?, ?> spec)
-
Field Details
-
LOG
-
-
Constructor Details
-
AbstractMiddlewareVersion
public AbstractMiddlewareVersion()
-
-
Method Details
-
getSemanticVersion
The semantic version (MAJOR.MINOR.PATCH) of this version of the API, as published in the OpenAPI info.version. MAJOR matches the URL version. See docs/UI-API-CHANGELOG.md for the rules. The default (for versions that predate semver) is the URL version itself. -
getFeatures
-
getAllEndpointSpecs
The core specs plus the specs registered by extensions, in route order. -
getExtensions
The extensions whose specs this version serves. -
loadExtensions
Load the extension specs registered in a QInstance (replacing any loaded before). Called by setQInstance until routes are defined. -
getVersion
-
getEndpointSpecs
hey - don't re-construct the endpoint-spec objects inside this method... -
getJavalinEndpointGroup
-
getVersionBasePath
-
getDocumentationBasePaths
-
setQInstance
For initial setup when server boots, set the qInstance - but also, e.g., for development, to do a hot-swap. -
generateOpenAPIModel
- Throws:
QException
-
generateExtensionOpenAPIModel
public OpenAPI generateExtensionOpenAPIModel(String basePath, MiddlewareSpecExtension extension) throws QException The OpenAPI document of one extension alone (its paths and the component schemas its specs define) - what a qbit commits and contract-tests.- Throws:
QException
-
warnIfPathMethodAlreadyUsed
public void warnIfPathMethodAlreadyUsed(Method existing, CompleteOperation completeOperation, AbstractEndpointSpec<?, ?, ?> spec) -
preExecute
- Throws:
QException
-