Interface OpenApiUi.Builder<B extends OpenApiUi.Builder<B,T>,T extends OpenApiUi>

Type Parameters:
T - type of the OpenApiUi to be build
B - type of the builder for T
All Superinterfaces:
Builder<B,T>, Supplier<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 Details

    • OPENAPI_UI_CONFIG_KEY

      static final String OPENAPI_UI_CONFIG_KEY
      Config prefix within the "openapi" section containing UI settings.
      See Also:
    • ENABLED_CONFIG_KEY

      static final String ENABLED_CONFIG_KEY
      Config key for the enabled setting.
      See Also:
    • OPTIONS_CONFIG_KEY

      static final String OPTIONS_CONFIG_KEY
      Config key for implementation-dependent options settings.
      See Also:
    • WEB_CONTEXT_CONFIG_KEY

      static final String WEB_CONTEXT_CONFIG_KEY
      Config key for specifying the entire web context where the UI responds.
      See Also:
  • Method Details

    • options

      B options(Map<String,String> options)
      Merges implementation-specific UI options.
      Parameters:
      options - the options to for the UI to merge
      Returns:
      updated builder
    • isEnabled

      B isEnabled(boolean isEnabled)
      Sets whether the UI should be enabled.
      Parameters:
      isEnabled - true/false
      Returns:
      updated builder
    • webContext

      B webContext(String 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

      default B config(Config uiConfig)
      Updates the builder using the specified config node at "ui" within the "openapi" config section.
      Parameters:
      uiConfig - config node containing the UI settings
      Returns:
      updated builder
    • identity

      default B identity()
      Description copied from interface: Builder
      Instance of this builder as the correct type.
      Specified by:
      identity in interface Builder<B extends OpenApiUi.Builder<B,T>,T extends OpenApiUi>
      Returns:
      correctly-typed self
    • documentPreparer

      B documentPreparer(Function<MediaType,String> 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

      B openApiSupportWebContext(String openApiWebContext)
      Assigns the web context the OpenAPISupport instance uses.

      Developers typically do not invoke this method. Helidon invokes it internally.

      Parameters:
      openApiWebContext - the web context used by the OpenAPISupport service
      Returns:
      updated builder
    • build

      default OpenApiUi build(Function<MediaType,String> documentPreparer, String openAPIWebContext)
      Creates a new OpenApiUi from the builder.
      Parameters:
      documentPreparer - function which converts a MediaType into the corresponding expression of the OpenAPI document
      openAPIWebContext - web context for the OpenAPI instance
      Returns:
      new OpenApiUi