Module io.helidon.openapi
Package io.helidon.openapi
Interface OpenApiUi.Builder<B extends OpenApiUi.Builder<B,T>,T extends OpenApiUi>
- Type Parameters:
T
- type of theOpenApiUi
to be buildB
- type of the builder for T
- All Known Implementing Classes:
OpenApiUiBase.Builder
- Enclosing interface:
- OpenApiUi
public static interface OpenApiUi.Builder<B extends OpenApiUi.Builder<B,T>,T extends OpenApiUi>
extends Builder<B,T>
Builder for an
OpenApiUi
.-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Config key for theenabled
setting.static final String
Config prefix within the "openapi" section containing UI settings.static final String
Config key for implementation-dependentoptions
settings.static final String
Config key for specifying the entire web context where the UI responds. -
Method Summary
Modifier and TypeMethodDescriptiondefault OpenApiUi
Creates a newOpenApiUi
from the builder.default B
documentPreparer
(Function<MediaType, String> documentPreparer) Assigns how the OpenAPI UI can obtain a formatted document for a given media type.default B
identity()
Instance of this builder as the correct type.isEnabled
(boolean isEnabled) Sets whether the UI should be enabled.openApiSupportWebContext
(String openApiWebContext) Assigns the web context theOpenAPISupport
instance uses.Merges implementation-specific UI options.webContext
(String webContext) Sets the entire web context (not just the suffix) where the UI response.
-
Field Details
-
OPENAPI_UI_CONFIG_KEY
Config prefix within the "openapi" section containing UI settings.- See Also:
-
ENABLED_CONFIG_KEY
Config key for theenabled
setting.- See Also:
-
OPTIONS_CONFIG_KEY
Config key for implementation-dependentoptions
settings.- See Also:
-
WEB_CONTEXT_CONFIG_KEY
Config key for specifying the entire web context where the UI responds.- See Also:
-
-
Method Details
-
options
Merges implementation-specific UI options.- Parameters:
options
- the options to for the UI to merge- Returns:
- updated builder
-
isEnabled
Sets whether the UI should be enabled.- Parameters:
isEnabled
- true/false- Returns:
- updated builder
-
webContext
Sets the entire web context (not just the suffix) where the UI response.- Parameters:
webContext
- entire web context (path) where the UI responds- Returns:
- updated builder
-
config
- Parameters:
uiConfig
- config node containing the UI settings- Returns:
- updated builder
-
identity
Description copied from interface:Builder
Instance of this builder as the correct type. -
documentPreparer
Assigns how the OpenAPI UI can obtain a formatted document for a given media type.Developers typically do not invoke this method. Helidon invokes it internally.
- Parameters:
documentPreparer
- the function for obtaining the formatted document- Returns:
- updated builder
-
openApiSupportWebContext
Assigns the web context theOpenAPISupport
instance uses.Developers typically do not invoke this method. Helidon invokes it internally.
- Parameters:
openApiWebContext
- the web context used by theOpenAPISupport
service- Returns:
- updated builder
-
build
Creates a newOpenApiUi
from the builder.- Parameters:
documentPreparer
- function which converts aMediaType
into the corresponding expression of the OpenAPI documentopenAPIWebContext
- web context for the OpenAPI instance- Returns:
- new
OpenApiUi
-