Interface OpenApiFeatureConfig

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

public interface OpenApiFeatureConfig extends Prototype.Api
OpenApiFeature prototype.
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
    • 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

      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)