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:
| Key |
|---|
| "model.reader" |
| "filter" |
| "servers" |
| "servers.path" |
| "servers.operation" |
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionaddOperationServer(String operationID, String operationServer) Adds an alternative server to service the specified operation.addPathServer(String path, String pathServer) Adds an alternative server for all operations in the specified path.Adds a schema for a class.Adds server.applicationPathDisable(Boolean value) Sets whether the app path search should be disabled.io.smallrye.openapi.api.OpenApiConfigbuild()Sets the builder's attributes according to the corresponding entries (if present) in the specified openapiConfigobject.customSchemaRegistryClass(String className) Sets the custom schema registry class.Sets the developer-provided OpenAPI filter class name.modelReader(String modelReader) Sets the developer-provided OpenAPI model reader class name.operationServers(String operationID, String operationServers) Sets alternative servers to service the specified operation.pathServers(String path, String pathServers) Sets alternative servers to service all operations in the specified path.scanDisable(boolean value) Sets whether annotation scanning should be disabled.Sets schemas for one or more classes referenced in the OpenAPI model.Sets servers.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.helidon.common.Builder
get, identity, update
-
Field Details
-
SCHEMA
Config key prefix for schema overrides for specified classes.- See Also:
-
-
Method Details
-
build
public io.smallrye.openapi.api.OpenApiConfig build()- Specified by:
buildin interfaceio.helidon.common.Builder<OpenAPIConfigImpl.Builder,io.smallrye.openapi.api.OpenApiConfig>
-
config
Sets the builder's attributes according to the corresponding entries (if present) in the specified openapiConfigobject.- Parameters:
config- openapi Config object to process- Returns:
- updated builder
-
modelReader
Sets the developer-provided OpenAPI model reader class name.- Parameters:
modelReader- model reader class name- Returns:
- updated builder
-
filter
Sets the developer-provided OpenAPI filter class name.- Parameters:
filter- filter class name- Returns:
- updated builder
-
operationServers
Sets alternative servers to service the specified operation. Repeat for multiple operations.- Parameters:
operationID- operation IDoperationServers- comma-separated list of servers for the given operation- Returns:
- updated builder
-
addOperationServer
Adds an alternative server to service the specified operation.- Parameters:
operationID- operation ID for the server being addedoperationServer- the server being added- Returns:
- updated builder
-
pathServers
Sets alternative servers to service all operations in the specified path. Repeat for multiple paths.- Parameters:
path- path for the servers being setpathServers- comma-list of servers for the given path- Returns:
- updated builder
-
addPathServer
Adds an alternative server for all operations in the specified path.- Parameters:
path- path for the server being addedpathServer- the server being added- Returns:
- updated builder
-
servers
Sets servers.- Parameters:
servers- comma-list of servers- Returns:
- updated builder
-
addServer
Adds server.- Parameters:
server- server to be added- Returns:
- updated builder
-
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
Adds a schema for a class.- Parameters:
fullyQualifiedClassName- name of the class the schema describesschema- JSON text definition of the schema- Returns:
- updated builder
-
scanDisable
Sets whether annotation scanning should be disabled.- Parameters:
value- new setting for annotation scanning disabled flag- Returns:
- updated builder
-
customSchemaRegistryClass
Sets the custom schema registry class.- Parameters:
className- class to be assigned- Returns:
- updated builder
-
applicationPathDisable
Sets whether the app path search should be disabled.- Parameters:
value- true/false- Returns:
- updated builder
-