Class OpenAPISupport.Builder

    • Field Detail

      • CONFIG_KEY

        public static final String CONFIG_KEY
        Config key for locating openapi settings within a Helidon config object.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • helidonConfig

        @Deprecated
        public OpenAPISupport.Builder helidonConfig​(Config config)
        Deprecated.
        Set various builder attributes from the specified Config object.

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

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

        public OpenAPISupport.Builder config​(Config config)
        Set various builder attributes from the specified openapi 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
      • indexView

        public abstract org.jboss.jandex.IndexView indexView()
        Returns the Jandex IndexView containing annotated endpoint classes.
        Returns:
        IndexView containing endpoint classes
      • 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 OpenAPISupport.Builder 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 OpenAPISupport.Builder 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