Class OpenApi31Version

java.lang.Object
io.helidon.openapi.v31.OpenApi31Version
All Implemented Interfaces:
RuntimeType.Api<OpenApi31VersionConfig>, NamedService, OpenApiVersion

public final class OpenApi31Version extends Object implements OpenApiVersion, RuntimeType.Api<OpenApi31VersionConfig>
OpenAPI 3.1 version implementation.
  • Method Details

    • builder

      public static OpenApi31VersionConfig.Builder builder()
      Returns a new builder.
      Returns:
      new builder
    • create

      public static OpenApi31Version create()
      Create a new OpenAPI 3.1 version implementation with default configuration.
      Returns:
      new version implementation
    • create

      public static OpenApi31Version create(Consumer<OpenApi31VersionConfig.Builder> consumer)
      Create a new OpenAPI 3.1 version implementation with custom configuration.
      Parameters:
      consumer - configuration consumer
      Returns:
      new version implementation
    • create

      public static OpenApi31Version create(OpenApi31VersionConfig config)
      Create a new OpenAPI 3.1 version implementation from typed configuration.
      Parameters:
      config - typed configuration
      Returns:
      new version implementation
    • version

      public String version()
      Description copied from interface: OpenApiVersion
      Exact OpenAPI document version produced by this implementation.
      Specified by:
      version in interface OpenApiVersion
      Returns:
      OpenAPI document version
    • parse

      public OpenApiDocument parse(OpenApiDocumentContext context, String content, MediaType mediaType)
      Description copied from interface: OpenApiVersion
      Parse OpenAPI content into the version-neutral document model.
      Specified by:
      parse in interface OpenApiVersion
      Parameters:
      context - document context
      content - OpenAPI JSON or YAML content
      mediaType - media type guessed from the static document path
      Returns:
      parsed document model
    • render

      public String render(OpenApiDocumentContext context, OpenApiDocument document)
      Description copied from interface: OpenApiVersion
      Render an OpenAPI document.

      All supported OpenAPI versions require an Info Object. OpenAPI 3.0 documents also require a paths field. Use OpenApiDocument.Builder.paths(java.util.Map) with Map.of() to render an intentionally empty Paths Object. OpenAPI 3.1 and 3.2 documents require at least one of paths, components, or webhooks.

      Specified by:
      render in interface OpenApiVersion
      Parameters:
      context - document context
      document - version-neutral document model
      Returns:
      rendered OpenAPI document content
    • prototype

      public OpenApi31VersionConfig prototype()
      Description copied from interface: RuntimeType.Api
      The prototype as it was received when creating this runtime object instance.
      Specified by:
      prototype in interface RuntimeType.Api<OpenApi31VersionConfig>
      Returns:
      prototype object used to create this instance
    • name

      public String name()
      Description copied from interface: NamedService
      Name of this implementation, as provided in ConfiguredProvider.create(Config, String).
      Specified by:
      name in interface NamedService
      Returns:
      name of this service
    • type

      public String type()
      Description copied from interface: OpenApiVersion
      OpenAPI version family supported by this implementation.

      The value is the major and minor version prefix, such as 3.1. It is used to select an implementation for static documents that declare a more specific version beginning with the family followed by a period, such as 3.1.0-rc1.

      Specified by:
      type in interface NamedService
      Specified by:
      type in interface OpenApiVersion
      Returns:
      supported OpenAPI version family