Class OpenAPISupport.Builder<B extends OpenAPISupport.Builder<B>>

    • Field Detail

      • CONFIG_KEY

        public static final String CONFIG_KEY
        Config key to select the openapi node from Helidon config.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Builder

        protected Builder​(Class<B> builderClass)
    • Method Detail

      • me

        protected B me()
      • config

        public B config​(Config config)
        Set various builder attributes from the specified Config object.

        The Config object can specify web-context and static-file in addition to settings supported by OpenAPIConfigImpl.Builder.

        Parameters:
        config - the openapi Config object possibly containing settings
        Returns:
        updated builder instance
        Throws:
        NullPointerException - if the provided Config is null
      • openAPIConfig

        public abstract io.smallrye.openapi.api.OpenApiConfig openAPIConfig()
        Returns the smallrye OpenApiConfig instance describing the set-up that will govern the smallrye OpenAPI behavior.
        Returns:
        OpenApiConfig conveying how OpenAPI should behave
      • validate

        public void validate()
                      throws IllegalStateException
        Makes sure the set-up for OpenAPI is consistent, internally and with the current Helidon runtime environment (SE or MP).
        Throws:
        IllegalStateException - if validation fails
      • webContext

        public B webContext​(String path)
        Path under which to register OpenAPI endpoint on the web server.
        Parameters:
        path - webContext to use, defaults to "/openapi"
        Returns:
        updated builder instance
      • staticFile

        public B staticFile​(String path)
        Sets the location of the static OpenAPI document file.
        Parameters:
        path - non-null location of the static OpenAPI document file
        Returns:
        updated builder instance
      • crossOriginConfig

        public B crossOriginConfig​(CrossOriginConfig crossOriginConfig)
        Set the CORS config from the specified CrossOriginConfig object.
        Parameters:
        crossOriginConfig - CrossOriginConfig containing CORS set-up
        Returns:
        updated builder instance
      • ui

        public B ui​(OpenApiUi.Builder<?,​?> uiBuilder)
        Assigns the OpenAPI UI builder the OpenAPISupport service should use in preparing the UI.
        Parameters:
        uiBuilder - the OpenApiUi.Builder
        Returns:
        updated builder instance
      • indexViewsSupplier

        protected Supplier<List<? extends org.jboss.jandex.IndexView>> indexViewsSupplier()