java.lang.Object
io.helidon.openapi.OpenAPISupport
- All Implemented Interfaces:
Service
Provides an endpoint and supporting logic for returning an OpenAPI document
that describes the endpoints handled by the server.
The server can use the OpenAPISupport.Builder to set OpenAPI-related attributes. If
the server uses none of these builder methods and does not provide a static
openapi file, then the /openapi endpoint responds with a
nearly-empty OpenAPI document.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classOpenAPISupport.Builder<B extends OpenAPISupport.Builder<B>>Fluent API builder forOpenAPISupport. -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOpenAPISupport(OpenAPISupport.Builder<?> builder) Creates a new instance ofOpenAPISupport. -
Method Summary
Modifier and TypeMethodDescriptionstatic SEOpenAPISupportBuilderbuilder()Creates a newOpenAPISupport.BuilderforOpenAPISupportusing defaults.voidconfigureEndpoint(Routing.Rules rules) Sets up the OpenAPI endpoint by adding routing to the specified rules set.static OpenAPISupportcreate()Creates a newOpenAPISupportinstance using defaults.static OpenAPISupportCreates a newOpenAPISupportinstance using the 'openapi' portion of the providedConfigobject.protected voidTriggers preparation of the model from external code.voidupdate(Routing.Rules rules) UpdatesRouting.Ruleswithhandlersrepresenting this service.
-
Field Details
-
DEFAULT_WEB_CONTEXT
Default path for serving the OpenAPI document.- See Also:
-
DEFAULT_RESPONSE_MEDIA_TYPE
Default media type used in responses in absence of incoming Accept header.
-
-
Constructor Details
-
OpenAPISupport
Creates a new instance ofOpenAPISupport.- Parameters:
builder- the builder to use in constructing the instance
-
-
Method Details
-
update
Description copied from interface:ServiceUpdatesRouting.Ruleswithhandlersrepresenting this service. -
configureEndpoint
Sets up the OpenAPI endpoint by adding routing to the specified rules set.- Parameters:
rules- routing rules to be augmented with OpenAPI endpoint
-
webContext
- Returns:
- the web context setting for this service
-
prepareModel
protected void prepareModel()Triggers preparation of the model from external code. -
builder
Creates a newOpenAPISupport.BuilderforOpenAPISupportusing defaults.- Returns:
- new Builder
-
create
Creates a newOpenAPISupportinstance using defaults.- Returns:
- new OpenAPISUpport
-
create
Creates a newOpenAPISupportinstance using the 'openapi' portion of the providedConfigobject.- Parameters:
config-Configobject containing OpenAPI-related settings- Returns:
- new
OpenAPISupportinstance created using the helidonConfig settings
-