Class OpenApiDocument.LicenseBuilder
java.lang.Object
io.helidon.openapi.OpenApiDocument.LicenseBuilder
- All Implemented Interfaces:
Builder<OpenApiDocument.LicenseBuilder, OpenApiDocument.License>, Supplier<OpenApiDocument.License>
- Enclosing class:
OpenApiDocument
public static final class OpenApiDocument.LicenseBuilder
extends Object
implements Builder<OpenApiDocument.LicenseBuilder, OpenApiDocument.License>
OpenAPI license builder.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the instance from this builder.Add an extension.identifier(String identifier) Set license identifier.Set license name.Set license URL.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault OpenApiDocument.Licenseget()default OpenApiDocument.LicenseBuilderidentity()Instance of this builder as the correct type.default OpenApiDocument.LicenseBuilderupdate(Consumer<OpenApiDocument.LicenseBuilder> consumer) Update the builder in a fluent API way.
-
Method Details
-
name
Set license name.- Parameters:
name- license name- Returns:
- updated builder
-
identifier
Set license identifier.Rendered only for OpenAPI 3.1 and later output. When set together with
url(String), this value takes precedence for those versions; the URL remains available for OpenAPI 3.0 output.- Parameters:
identifier- SPDX license identifier- Returns:
- updated builder
-
url
Set license URL.For OpenAPI 3.1 and later output, this value is ignored when
identifier(String)is set.- Parameters:
url- license URL- Returns:
- updated builder
-
extension
Add an extension.Extension names must start with
x-.- Parameters:
name- extension namevalue- extension value- Returns:
- updated builder
-
build
Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
buildin interfaceBuilder<OpenApiDocument.LicenseBuilder, OpenApiDocument.License>- Returns:
- instance of the built type
-