- All Superinterfaces:
Prototype.Api,Prototype.Factory<OpenApiFeature>
- All Known Implementing Classes:
OpenApiFeatureConfig.BuilderBase.OpenApiFeatureConfigImpl
OpenApiFeature prototype.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent API builder forOpenApiFeature.static classOpenApiFeatureConfig.BuilderBase<BUILDER extends OpenApiFeatureConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends OpenApiFeatureConfig> Fluent API builder base forOpenApiFeature. -
Method Summary
Modifier and TypeMethodDescriptionstatic OpenApiFeatureConfig.Builderbuilder()Create a new fluent API builder to customize configuration.static OpenApiFeatureConfig.Builderbuilder(OpenApiFeatureConfig instance) Create a new fluent API builder from an existing instance.cors()CORS config.static OpenApiFeatureConfigcreate()Create a new instance with default values.static OpenApiFeatureConfigDeprecated.static OpenApiFeatureConfigCreate a new instance from configuration.booleanSets whether the feature should be enabled.manager()OpenAPI manager.name()Name of this instance.booleanWhether to allow anybody to access the endpoint.roles()Hints for role names the user is expected to be in.services()OpenAPI services.sockets()List of sockets to register this feature on.Path of the static OpenAPI document file.Web context path for the OpenAPI endpoint.doubleweight()Weight of the OpenAPI feature.Methods inherited from interface io.helidon.builder.api.Prototype.Factory
build
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Deprecated.Create a new instance from configuration.- Parameters:
config- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Create a new instance with default values.- Returns:
- a new instance
-
weight
double weight()Weight of the OpenAPI feature. This is quite low, to be registered after routing. 90.0.- Returns:
- weight of the feature
-
isEnabled
boolean isEnabled()Sets whether the feature should be enabled.- Returns:
trueif enabled,falseotherwise
-
webContext
String webContext()Web context path for the OpenAPI endpoint.- Returns:
- webContext to use
-
staticFile
Path of the static OpenAPI document file. Default types are `json`, `yaml`, and `yml`.- Returns:
- location of the static OpenAPI document file
-
cors
Optional<CrossOriginConfig> cors()CORS config.- Returns:
- CORS config
-
services
List<OpenApiService> services()OpenAPI services.- Returns:
- the OpenAPI services
-
manager
Optional<OpenApiManager<?>> manager()OpenAPI manager.- Returns:
- the OpenAPI manager
-
permitAll
boolean permitAll()Whether to allow anybody to access the endpoint.- Returns:
- whether to permit access to metrics endpoint to anybody, defaults to
true - See Also:
-
roles
Hints for role names the user is expected to be in.- Returns:
- list of hints
-
name
String name()Name of this instance.- Returns:
- instance name, used when discovered from configuration
-
sockets
List of sockets to register this feature on. If empty, it would get registered on all sockets.- Returns:
- socket names to register on, defaults to empty (all available sockets)
-
create(io.helidon.config.Config)