Class OpenApiDocument.ComponentsBuilder
java.lang.Object
io.helidon.openapi.OpenApiDocument.ComponentsBuilder
- All Implemented Interfaces:
Builder<OpenApiDocument.ComponentsBuilder, OpenApiDocument.Components>, Supplier<OpenApiDocument.Components>
- Enclosing class:
OpenApiDocument
public static final class OpenApiDocument.ComponentsBuilder
extends Object
implements Builder<OpenApiDocument.ComponentsBuilder, OpenApiDocument.Components>
OpenAPI components builder.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the instance from this builder.callback(String name, OpenApiDocument.Callback callback) Set callback.callback(String name, Consumer<OpenApiDocument.CallbackBuilder> callback) Set callback.example(String name, OpenApiDocument.Example example) Set example.example(String name, Consumer<OpenApiDocument.ExampleBuilder> example) Set example.Add an extension.header(String name, OpenApiDocument.Header header) Set header.header(String name, Consumer<OpenApiDocument.HeaderBuilder> header) Set header.link(String name, OpenApiDocument.Link link) Set link.link(String name, Consumer<OpenApiDocument.LinkBuilder> link) Set link.mediaType(String name, OpenApiDocument.MediaTypeObject mediaType) Set OpenAPI 3.2 media type.mediaType(String name, Consumer<OpenApiDocument.MediaTypeObjectBuilder> mediaType) Set OpenAPI 3.2 media type.parameter(String name, OpenApiDocument.Parameter parameter) Set parameter.parameter(String name, Consumer<OpenApiDocument.ParameterBuilder> parameter) Set parameter.pathItem(String name, OpenApiDocument.PathItem pathItem) Set path item.pathItem(String name, Consumer<OpenApiDocument.PathItemBuilder> pathItem) Set path item.requestBody(String name, OpenApiDocument.RequestBody requestBody) Set request body.requestBody(String name, Consumer<OpenApiDocument.RequestBodyBuilder> requestBody) Set request body.response(String name, OpenApiDocument.Response response) Set response.response(String name, Consumer<OpenApiDocument.ResponseBuilder> response) Set response.Set schema.securityScheme(String name, OpenApiDocument.SecurityScheme securityScheme) Set security scheme.securityScheme(String name, Consumer<OpenApiDocument.SecuritySchemeBuilder> securityScheme) Set security scheme.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.Componentsget()identity()Instance of this builder as the correct type.update(Consumer<OpenApiDocument.ComponentsBuilder> consumer) Update the builder in a fluent API way.
-
Method Details
-
schema
Set schema.- Parameters:
name- schema nameschema- schema- Returns:
- updated builder
-
response
Set response.- Parameters:
name- response nameresponse- response- Returns:
- updated builder
-
response
public OpenApiDocument.ComponentsBuilder response(String name, Consumer<OpenApiDocument.ResponseBuilder> response) Set response.- Parameters:
name- response nameresponse- consumer to update response builder- Returns:
- updated builder
-
parameter
public OpenApiDocument.ComponentsBuilder parameter(String name, OpenApiDocument.Parameter parameter) Set parameter.- Parameters:
name- parameter nameparameter- parameter- Returns:
- updated builder
-
parameter
public OpenApiDocument.ComponentsBuilder parameter(String name, Consumer<OpenApiDocument.ParameterBuilder> parameter) Set parameter.- Parameters:
name- parameter nameparameter- consumer to update parameter builder- Returns:
- updated builder
-
example
Set example.- Parameters:
name- example nameexample- example- Returns:
- updated builder
-
example
public OpenApiDocument.ComponentsBuilder example(String name, Consumer<OpenApiDocument.ExampleBuilder> example) Set example.- Parameters:
name- example nameexample- consumer to update example builder- Returns:
- updated builder
-
requestBody
public OpenApiDocument.ComponentsBuilder requestBody(String name, OpenApiDocument.RequestBody requestBody) Set request body.- Parameters:
name- request body namerequestBody- request body- Returns:
- updated builder
-
requestBody
public OpenApiDocument.ComponentsBuilder requestBody(String name, Consumer<OpenApiDocument.RequestBodyBuilder> requestBody) Set request body.- Parameters:
name- request body namerequestBody- consumer to update request body builder- Returns:
- updated builder
-
header
Set header.- Parameters:
name- header nameheader- header- Returns:
- updated builder
-
header
public OpenApiDocument.ComponentsBuilder header(String name, Consumer<OpenApiDocument.HeaderBuilder> header) Set header.- Parameters:
name- header nameheader- consumer to update header builder- Returns:
- updated builder
-
securityScheme
public OpenApiDocument.ComponentsBuilder securityScheme(String name, OpenApiDocument.SecurityScheme securityScheme) Set security scheme.- Parameters:
name- security scheme namesecurityScheme- security scheme- Returns:
- updated builder
-
securityScheme
public OpenApiDocument.ComponentsBuilder securityScheme(String name, Consumer<OpenApiDocument.SecuritySchemeBuilder> securityScheme) Set security scheme.- Parameters:
name- security scheme namesecurityScheme- consumer to update security scheme builder- Returns:
- updated builder
-
link
Set link.- Parameters:
name- link namelink- link- Returns:
- updated builder
-
link
public OpenApiDocument.ComponentsBuilder link(String name, Consumer<OpenApiDocument.LinkBuilder> link) Set link.- Parameters:
name- link namelink- consumer to update link builder- Returns:
- updated builder
-
callback
Set callback.- Parameters:
name- callback namecallback- callback- Returns:
- updated builder
-
callback
public OpenApiDocument.ComponentsBuilder callback(String name, Consumer<OpenApiDocument.CallbackBuilder> callback) Set callback.- Parameters:
name- callback namecallback- consumer to update callback builder- Returns:
- updated builder
-
pathItem
Set path item.- Parameters:
name- path item namepathItem- path item- Returns:
- updated builder
-
pathItem
public OpenApiDocument.ComponentsBuilder pathItem(String name, Consumer<OpenApiDocument.PathItemBuilder> pathItem) Set path item.- Parameters:
name- path item namepathItem- consumer to update path item builder- Returns:
- updated builder
-
mediaType
public OpenApiDocument.ComponentsBuilder mediaType(String name, OpenApiDocument.MediaTypeObject mediaType) Set OpenAPI 3.2 media type.- Parameters:
name- media type namemediaType- media type object- Returns:
- updated builder
-
mediaType
public OpenApiDocument.ComponentsBuilder mediaType(String name, Consumer<OpenApiDocument.MediaTypeObjectBuilder> mediaType) Set OpenAPI 3.2 media type.- Parameters:
name- media type namemediaType- consumer to update media type object builder- 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.ComponentsBuilder, OpenApiDocument.Components>- Returns:
- instance of the built type
-