Interface OpenApiFeatureConfig

All Superinterfaces:
Prototype.Api, Prototype.Factory<OpenApiFeature>
All Known Implementing Classes:
OpenApiFeatureConfig.BuilderBase.OpenApiFeatureConfigImpl

public interface OpenApiFeatureConfig extends Prototype.Api
OpenAPI feature configuration.
See Also:
  • Method Details

    • builder

      static OpenApiFeatureConfig.Builder 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

      static OpenApiFeatureConfig create(Config config)
      Create a new instance from configuration.
      Parameters:
      config - used to configure the new instance
      Returns:
      a new instance configured from configuration
    • create

      static OpenApiFeatureConfig 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:
      true if enabled, false otherwise
    • webContext

      String webContext()
      Web context path for the OpenAPI endpoint.
      Returns:
      webContext to use
    • staticFile

      Optional<String> staticFile()
      Path of the static OpenAPI document file. Default types are `json`, `yaml`, and `yml`.
      Returns:
      location of the static OpenAPI document file
    • generatedMode

      OpenApiGeneratedMode generatedMode()
      Generated document source handling mode.
      Returns:
      generated document source handling mode
    • generatedResolveConfigExpressions

      boolean generatedResolveConfigExpressions()
      Whether generated document sources resolve annotation string values as Helidon config expressions at runtime.

      When disabled, generated document sources use annotation string values literally. This is disabled by default because annotation text can be user-visible OpenAPI content.

      Returns:
      whether to resolve generated OpenAPI annotation string values as config expressions
    • generatedDocumentSources

      List<String> generatedDocumentSources()
      Named generated document metadata sources to use, in the order configured.

      Sources generated from @OpenApi.Document use the annotated type's dotted canonical type name. Custom OpenApiDocumentSource services must be qualified with @Service.Named to be selected by name. Unqualified sources always participate when they support the document context and cannot be filtered with this option.

      Returns:
      generated document metadata source names
    • generatedOperationIds

      Map<String,String> generatedOperationIds()
      Operation ids to use for generated Java methods.

      Each key is a Java method signature consisting of the fully qualified class name, #, the method name, and fully qualified parameter types separated by ,. The value is the operation id to use for that method.

      Returns:
      generated operation ids keyed by fully qualified Java method signature
    • openApiVersion

      Optional<OpenApiVersion> openApiVersion()
      OpenAPI version implementation for rendered generated or merged documents.

      If not configured, service discovery selects the highest-weighted available OpenAPI version provider. This means that adding OpenAPI 3.1 or 3.2 support modules can change generated output to the highest available OpenAPI document version. Configure this option to pin the OpenAPI document version for generated output.

      Static documents served directly by OpenApiGeneratedMode.STATIC_ONLY or by a static hit in OpenApiGeneratedMode.STATIC_FIRST are not re-rendered through this provider.

      Returns:
      version implementation for generated or merged OpenAPI documents
    • 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

      List<String> 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

      Set<String> 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)
    • runtimeServiceRegistry

      Optional<ServiceRegistry> runtimeServiceRegistry()
      Runtime service registry supplied to the builder.
      Returns:
      runtime service registry
    • sourceRoot

      Optional<Object> sourceRoot()
      Runtime source configuration supplied to the builder.
      Returns:
      runtime source configuration