Page Contents

Home > @loopback/openapi-spec-builder > ComponentsSpecBuilder

ComponentsSpecBuilder class

A builder for creating ComponentsObject specifications.

Signature:

export declare class ComponentsSpecBuilder extends BuilderBase<ComponentsObject> 

Extends: BuilderBase<ComponentsObject>

Constructors

Constructor Modifiers Description
[(constructor)()](/doc/en/lb4/apidocs.openapi-spec-builder.componentsspecbuilder._constructor_.html) Constructs a new instance of the `ComponentsSpecBuilder` class

Methods

Method Modifiers Description
[withCallback(name, callback)](/doc/en/lb4/apidocs.openapi-spec-builder.componentsspecbuilder.withcallback.html) Define a component callback.
[withExample(name, example)](/doc/en/lb4/apidocs.openapi-spec-builder.componentsspecbuilder.withexample.html) Define a component example.
[withHeader(name, header)](/doc/en/lb4/apidocs.openapi-spec-builder.componentsspecbuilder.withheader.html) Define a component header.
[withLink(name, link)](/doc/en/lb4/apidocs.openapi-spec-builder.componentsspecbuilder.withlink.html) Define a component link.
[withParameter(name, parameter)](/doc/en/lb4/apidocs.openapi-spec-builder.componentsspecbuilder.withparameter.html) Define a component parameter.
[withRequestBody(name, requestBody)](/doc/en/lb4/apidocs.openapi-spec-builder.componentsspecbuilder.withrequestbody.html) Define a component request body.
[withResponse(name, response)](/doc/en/lb4/apidocs.openapi-spec-builder.componentsspecbuilder.withresponse.html) Define a component response.
[withSchema(name, schema)](/doc/en/lb4/apidocs.openapi-spec-builder.componentsspecbuilder.withschema.html) Define a component schema.
[withSecurityScheme(name, securityScheme)](/doc/en/lb4/apidocs.openapi-spec-builder.componentsspecbuilder.withsecurityscheme.html) Define a component security scheme.