Class BasicOpenApiProvider
java.lang.Object
org.apache.juneau.rest.server.openapi.BasicOpenApiProvider
- All Implemented Interfaces:
OpenApiProvider
Basic implementation of an
OpenApiProvider.
Default provider used by RestContext when no override is configured. Creates a fresh
BasicOpenApiProviderSession per call, which walks the @Rest / @RestOp
annotation graph and emits an OpenApi 3.1 document.
See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.juneau.rest.server.openapi.OpenApiProvider
OpenApiProvider.Builder, OpenApiProvider.Void -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetOpenApi(RestContext context, Locale locale) Returns the OpenAPI 3.1 document associated with the specified context of aRest-annotated class.
-
Constructor Details
-
BasicOpenApiProvider
Constructor.- Parameters:
beanStore- The bean store containing injectable beans for this provider.
Must not benull .
-
BasicOpenApiProvider
Constructor.- Parameters:
builder- The builder containing the settings for this OpenAPI provider.
Must not benull .
-
-
Method Details
-
getOpenApi
Returns the OpenAPI 3.1 document associated with the specified context of aRest-annotated class.Subclasses can override this to provide their own method for generating the document.
- Specified by:
getOpenApiin interfaceOpenApiProvider- Parameters:
context- The context of theRest-annotated class.locale- The request locale.- Returns:
- A new
OpenApiobject. - Throws:
Exception- If an error occurred producing the document.
-