java.lang.Object
io.helidon.reactive.openapi.OpenAPISupport.Builder
- All Implemented Interfaces:
Builder<OpenAPISupport.Builder,,OpenAPISupport> Supplier<OpenAPISupport>
- Enclosing class:
OpenAPISupport
public static class OpenAPISupport.Builder
extends Object
implements Builder<OpenAPISupport.Builder,OpenAPISupport>
Fluent API builder for
OpenAPISupport.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConfig key to select the openapi node from Helidon config. -
Method Summary
Modifier and TypeMethodDescriptionaddOperationServer(String operationID, String operationServer) Adds an operation server for a given operation ID.addPathServer(String path, String pathServer) Adds a path server for a given path.build()Build the instance from this builder.Set various builder attributes from the specifiedConfigobject.crossOriginConfig(CrossOriginConfig crossOriginConfig) Assigns the CORS settings for the OpenAPI endpoint.Set the app-provided OpenAPI model filter class.Returns the supplier of index views.modelReader(String className) Sets the app-provided model reader class.Sets the servers which offer the endpoints in the OpenAPI document.staticFile(String path) Sets the file system path of the static OpenAPI document file.voidvalidate()Makes sure the set-up for OpenAPI is consistent, internally and with the current Helidon runtime environment (SE or MP).webContext(String path) Sets the web context path for the OpenAPI endpoint.
-
Field Details
-
CONFIG_KEY
Config key to select the openapi node from Helidon config.- See Also:
-
-
Method Details
-
build
Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
buildin interfaceBuilder<OpenAPISupport.Builder,OpenAPISupport> - Returns:
- instance of the built type
-
config
Set various builder attributes from the specifiedConfigobject.The
Configobject can specify web-context and static-file in addition to settings supported byOpenAPIConfigImpl.Builder.- Parameters:
config- the openapiConfigobject possibly containing settings- Returns:
- updated builder instance
- Throws:
NullPointerException- if the providedConfigis null
-
validate
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
Sets the web context path for the OpenAPI endpoint.- Parameters:
path- webContext to use, defaults to "/openapi"- Returns:
- updated builder instance
-
staticFile
Sets the file system path of the static OpenAPI document file. Default types are `json`, `yaml`, and `yml`.- Parameters:
path- non-null location of the static OpenAPI document file- Returns:
- updated builder instance
-
crossOriginConfig
Assigns the CORS settings for the OpenAPI endpoint.- Parameters:
crossOriginConfig-CrossOriginConfigcontaining CORS set-up- Returns:
- updated builder instance
-
modelReader
Sets the app-provided model reader class.- Parameters:
className- name of the model reader class- Returns:
- updated builder instance
-
filter
Set the app-provided OpenAPI model filter class.- Parameters:
className- name of the filter class- Returns:
- updated builder instance
-
servers
Sets the servers which offer the endpoints in the OpenAPI document.- Parameters:
serverList- comma-separated list of servers- Returns:
- updated builder instance
-
addOperationServer
Adds an operation server for a given operation ID.- Parameters:
operationID- operation ID to which the server correspondsoperationServer- name of the server to add for this operation- Returns:
- updated builder instance
-
addPathServer
Adds a path server for a given path.- Parameters:
path- path to which the server correspondspathServer- name of the server to add for this path- Returns:
- updated builder instance
-
indexViewsSupplier
Returns the supplier of index views.- Returns:
- index views supplier
-