Class OpenAPIConfigImpl.Builder

java.lang.Object
io.helidon.openapi.internal.OpenAPIConfigImpl.Builder
All Implemented Interfaces:
io.helidon.common.Builder<OpenAPIConfigImpl.Builder,io.smallrye.openapi.api.OpenApiConfig>, Supplier<io.smallrye.openapi.api.OpenApiConfig>
Enclosing class:
OpenAPIConfigImpl

public static final class OpenAPIConfigImpl.Builder extends Object implements io.helidon.common.Builder<OpenAPIConfigImpl.Builder,io.smallrye.openapi.api.OpenApiConfig>
Fluent builder for OpenAPIConfigImpl.

The caller can set values individually by invoking the method corresponding to each value, or by passing a Config object with keys as follows:

Configuration for Setting OpenAPIConfig
Key
"model.reader"
"filter"
"servers"
"servers.path"
"servers.operation"
  • Field Details

    • SCHEMA

      public static final String SCHEMA
      Config key prefix for schema overrides for specified classes.
      See Also:
  • Method Details

    • build

      public io.smallrye.openapi.api.OpenApiConfig build()
      Specified by:
      build in interface io.helidon.common.Builder<OpenAPIConfigImpl.Builder,io.smallrye.openapi.api.OpenApiConfig>
    • config

      public OpenAPIConfigImpl.Builder config(Config config)
      Sets the builder's attributes according to the corresponding entries (if present) in the specified openapi Config object.
      Parameters:
      config - openapi Config object to process
      Returns:
      updated builder
    • modelReader

      public OpenAPIConfigImpl.Builder modelReader(String modelReader)
      Sets the developer-provided OpenAPI model reader class name.
      Parameters:
      modelReader - model reader class name
      Returns:
      updated builder
    • filter

      public OpenAPIConfigImpl.Builder filter(String filter)
      Sets the developer-provided OpenAPI filter class name.
      Parameters:
      filter - filter class name
      Returns:
      updated builder
    • operationServers

      public OpenAPIConfigImpl.Builder operationServers(String operationID, String operationServers)
      Sets alternative servers to service the specified operation. Repeat for multiple operations.
      Parameters:
      operationID - operation ID
      operationServers - comma-separated list of servers for the given operation
      Returns:
      updated builder
    • addOperationServer

      public OpenAPIConfigImpl.Builder addOperationServer(String operationID, String operationServer)
      Adds an alternative server to service the specified operation.
      Parameters:
      operationID - operation ID for the server being added
      operationServer - the server being added
      Returns:
      updated builder
    • pathServers

      public OpenAPIConfigImpl.Builder pathServers(String path, String pathServers)
      Sets alternative servers to service all operations in the specified path. Repeat for multiple paths.
      Parameters:
      path - path for the servers being set
      pathServers - comma-list of servers for the given path
      Returns:
      updated builder
    • addPathServer

      public OpenAPIConfigImpl.Builder addPathServer(String path, String pathServer)
      Adds an alternative server for all operations in the specified path.
      Parameters:
      path - path for the server being added
      pathServer - the server being added
      Returns:
      updated builder
    • servers

      public OpenAPIConfigImpl.Builder servers(String servers)
      Sets servers.
      Parameters:
      servers - comma-list of servers
      Returns:
      updated builder
    • addServer

      public OpenAPIConfigImpl.Builder addServer(String server)
      Adds server.
      Parameters:
      server - server to be added
      Returns:
      updated builder
    • schemas

      public OpenAPIConfigImpl.Builder schemas(Map<String,String> schemas)
      Sets schemas for one or more classes referenced in the OpenAPI model.
      Parameters:
      schemas - map of FQ class name to JSON string depicting the schema
      Returns:
      updated builder
    • addSchema

      public OpenAPIConfigImpl.Builder addSchema(String fullyQualifiedClassName, String schema)
      Adds a schema for a class.
      Parameters:
      fullyQualifiedClassName - name of the class the schema describes
      schema - JSON text definition of the schema
      Returns:
      updated builder
    • scanDisable

      public OpenAPIConfigImpl.Builder scanDisable(boolean value)
      Sets whether annotation scanning should be disabled.
      Parameters:
      value - new setting for annotation scanning disabled flag
      Returns:
      updated builder
    • customSchemaRegistryClass

      public OpenAPIConfigImpl.Builder customSchemaRegistryClass(String className)
      Sets the custom schema registry class.
      Parameters:
      className - class to be assigned
      Returns:
      updated builder
    • applicationPathDisable

      public OpenAPIConfigImpl.Builder applicationPathDisable(Boolean value)
      Sets whether the app path search should be disabled.
      Parameters:
      value - true/false
      Returns:
      updated builder