Class OpenAPISupport.Builder

    • 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

        public Builder()
    • Method Detail

      • config

        public OpenAPISupport.Builder 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 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
      • crossOriginConfig

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

        public abstract List<io.smallrye.openapi.runtime.scanner.FilteredIndexView> perAppFilteredIndexViews()
        Returns zero or more FilteredIndexView instances, each of which to be used in constructing an OpenAPI model that is merged with the others. This is particularly useful for supporting multiple Application instances in a single server.
        Returns:
        possibly empty List of FilteredIndexView objects