Module io.helidon.openapi
Package io.helidon.openapi
Class OpenApiUiBase.Builder<B extends OpenApiUiBase.Builder<B,T>,T extends OpenApiUi>
- java.lang.Object
-
- io.helidon.openapi.OpenApiUiBase.Builder<B,T>
-
- Type Parameters:
T
- type of theOpenApiUiBase
to be builtB
- type of the builder for T
- All Implemented Interfaces:
Builder<T>
,OpenApiUi.Builder<B,T>
,Supplier<T>
- Enclosing class:
- OpenApiUiBase
public abstract static class OpenApiUiBase.Builder<B extends OpenApiUiBase.Builder<B,T>,T extends OpenApiUi> extends Object implements OpenApiUi.Builder<B,T>
Common base builder implementation for creating a newOpenApiUi
.
-
-
Field Summary
-
Fields inherited from interface io.helidon.openapi.OpenApiUi.Builder
ENABLED_CONFIG_KEY, OPENAPI_UI_CONFIG_KEY, OPTIONS_CONFIG_KEY, WEB_CONTEXT_CONFIG_KEY
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Function<MediaType,String>
documentPreparer()
B
documentPreparer(Function<MediaType,String> documentPreparer)
Assigns how the OpenAPI UI can obtain a formatted document for a given media type.B
isEnabled(boolean isEnabled)
Sets whether the UI should be enabled.String
openApiSupportWebContext()
B
openApiSupportWebContext(String openApiWebContext)
Assigns the web context theOpenAPISupport
instance uses.protected Map<String,String>
options()
B
options(Map<String,String> options)
Sets implementation-specific UI options.B
webContext(String webContext)
Sets the entire web context (not just the suffix) where the UI response.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.helidon.openapi.OpenApiUi.Builder
build, config, identity
-
-
-
-
Method Detail
-
options
public B options(Map<String,String> options)
Description copied from interface:OpenApiUi.Builder
Sets implementation-specific UI options.- Specified by:
options
in interfaceOpenApiUi.Builder<B extends OpenApiUiBase.Builder<B,T>,T extends OpenApiUi>
- Parameters:
options
- the options to set for the UI- Returns:
- updated builder
-
isEnabled
public B isEnabled(boolean isEnabled)
Description copied from interface:OpenApiUi.Builder
Sets whether the UI should be enabled.- Specified by:
isEnabled
in interfaceOpenApiUi.Builder<B extends OpenApiUiBase.Builder<B,T>,T extends OpenApiUi>
- Parameters:
isEnabled
- true/false- Returns:
- updated builder
-
webContext
public B webContext(String webContext)
Description copied from interface:OpenApiUi.Builder
Sets the entire web context (not just the suffix) where the UI response.- Specified by:
webContext
in interfaceOpenApiUi.Builder<B extends OpenApiUiBase.Builder<B,T>,T extends OpenApiUi>
- Parameters:
webContext
- entire web context (path) where the UI responds- Returns:
- updated builder
-
documentPreparer
public B documentPreparer(Function<MediaType,String> documentPreparer)
Description copied from interface:OpenApiUi.Builder
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.
- Specified by:
documentPreparer
in interfaceOpenApiUi.Builder<B extends OpenApiUiBase.Builder<B,T>,T extends OpenApiUi>
- Parameters:
documentPreparer
- the function for obtaining the formatted document- Returns:
- updated builder
-
openApiSupportWebContext
public B openApiSupportWebContext(String openApiWebContext)
Description copied from interface:OpenApiUi.Builder
Assigns the web context theOpenAPISupport
instance uses.Developers typically do not invoke this method. Helidon invokes it internally.
- Specified by:
openApiSupportWebContext
in interfaceOpenApiUi.Builder<B extends OpenApiUiBase.Builder<B,T>,T extends OpenApiUi>
- Parameters:
openApiWebContext
- the web context used by theOpenAPISupport
service- Returns:
- updated builder
-
openApiSupportWebContext
public String openApiSupportWebContext()
- Returns:
- OpenAPI web context
-
-