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 Summary
Modifier and TypeMethodDescriptionbuilder()Returns a new builder.static OpenApi31Versioncreate()Create a new OpenAPI 3.1 version implementation with default configuration.static OpenApi31Versioncreate(OpenApi31VersionConfig config) Create a new OpenAPI 3.1 version implementation from typed configuration.static OpenApi31Versioncreate(Consumer<OpenApi31VersionConfig.Builder> consumer) Create a new OpenAPI 3.1 version implementation with custom configuration.name()Name of this implementation, as provided inConfiguredProvider.create(Config, String).parse(OpenApiDocumentContext context, String content, MediaType mediaType) Parse OpenAPI content into the version-neutral document model.The prototype as it was received when creating this runtime object instance.render(OpenApiDocumentContext context, OpenApiDocument document) Render an OpenAPI document.type()OpenAPI version family supported by this implementation.version()Exact OpenAPI document version produced by this implementation.
-
Method Details
-
builder
-
create
Create a new OpenAPI 3.1 version implementation with default configuration.- Returns:
- new version implementation
-
create
Create a new OpenAPI 3.1 version implementation with custom configuration.- Parameters:
consumer- configuration consumer- Returns:
- new version implementation
-
create
Create a new OpenAPI 3.1 version implementation from typed configuration.- Parameters:
config- typed configuration- Returns:
- new version implementation
-
version
Description copied from interface:OpenApiVersionExact OpenAPI document version produced by this implementation.- Specified by:
versionin interfaceOpenApiVersion- Returns:
- OpenAPI document version
-
parse
Description copied from interface:OpenApiVersionParse OpenAPI content into the version-neutral document model.- Specified by:
parsein interfaceOpenApiVersion- Parameters:
context- document contextcontent- OpenAPI JSON or YAML contentmediaType- media type guessed from the static document path- Returns:
- parsed document model
-
render
Description copied from interface:OpenApiVersionRender an OpenAPI document.All supported OpenAPI versions require an Info Object. OpenAPI 3.0 documents also require a
pathsfield. UseOpenApiDocument.Builder.paths(java.util.Map)withMap.of()to render an intentionally empty Paths Object. OpenAPI 3.1 and 3.2 documents require at least one ofpaths,components, orwebhooks.- Specified by:
renderin interfaceOpenApiVersion- Parameters:
context- document contextdocument- version-neutral document model- Returns:
- rendered OpenAPI document content
-
prototype
Description copied from interface:RuntimeType.ApiThe prototype as it was received when creating this runtime object instance.- Specified by:
prototypein interfaceRuntimeType.Api<OpenApi31VersionConfig>- Returns:
- prototype object used to create this instance
-
name
Description copied from interface:NamedServiceName of this implementation, as provided inConfiguredProvider.create(Config, String).- Specified by:
namein interfaceNamedService- Returns:
- name of this service
-
type
Description copied from interface:OpenApiVersionOpenAPI 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 as3.1.0-rc1.- Specified by:
typein interfaceNamedService- Specified by:
typein interfaceOpenApiVersion- Returns:
- supported OpenAPI version family
-