Class SEOpenAPISupportBuilder

  • All Implemented Interfaces:
    Builder<OpenAPISupport>, Supplier<OpenAPISupport>

    public final class SEOpenAPISupportBuilder
    extends OpenAPISupport.Builder
    Builds OpenAPISupport in a Helidon SE environment.

    The builder mostly delegates to an instance of Helidon's OpenAPIConfigImpl.Builder which in turn prepares a smallrye OpenApiConfig which is what the smallrye implementation uses to control its behavior.

    • Constructor Detail

      • SEOpenAPISupportBuilder

        public SEOpenAPISupportBuilder()
    • Method Detail

      • config

        public SEOpenAPISupportBuilder 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.

        Overrides:
        config in class OpenAPISupport.Builder
        Parameters:
        config - the OpenAPI Config object possibly containing settings
        Returns:
        updated builder instance
        Throws:
        NullPointerException - if the provided Config is null
      • openAPIConfig

        public io.smallrye.openapi.api.OpenApiConfig openAPIConfig()
        Description copied from class: OpenAPISupport.Builder
        Returns the smallrye OpenApiConfig instance describing the set-up that will govern the smallrye OpenAPI behavior.
        Specified by:
        openAPIConfig in class OpenAPISupport.Builder
        Returns:
        OpenApiConfig conveying how OpenAPI should behave
      • perAppFilteredIndexViews

        public List<io.smallrye.openapi.runtime.scanner.FilteredIndexView> perAppFilteredIndexViews()
        Description copied from class: OpenAPISupport.Builder
        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.
        Specified by:
        perAppFilteredIndexViews in class OpenAPISupport.Builder
        Returns:
        possibly empty List of FilteredIndexView objects
      • modelReader

        public SEOpenAPISupportBuilder modelReader​(String className)
        Sets the app-provided model reader class.
        Parameters:
        className - name of the model reader class
        Returns:
        updated builder instance
      • filter

        public SEOpenAPISupportBuilder filter​(String className)
        Set the app-provided OpenAPI model filter class.
        Parameters:
        className - name of the filter class
        Returns:
        updated builder instance
      • servers

        public SEOpenAPISupportBuilder servers​(String serverList)
        Sets the servers which offer the endpoints in the OpenAPI document.
        Parameters:
        serverList - comma-separated list of servers
        Returns:
        updated builder instance
      • addOperationServer

        public SEOpenAPISupportBuilder addOperationServer​(String operationID,
                                                          String operationServer)
        Adds an operation server for a given operation ID.
        Parameters:
        operationID - operation ID to which the server corresponds
        operationServer - name of the server to add for this operation
        Returns:
        updated builder instance
      • addPathServer

        public SEOpenAPISupportBuilder addPathServer​(String path,
                                                     String pathServer)
        Adds a path server for a given path.
        Parameters:
        path - path to which the server corresponds
        pathServer - name of the server to add for this path
        Returns:
        updated builder instance