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)()   Constructs a new instance of the ComponentsSpecBuilder class

Methods

Method Modifiers Description
withCallback(name, callback)   Define a component callback.
withExample(name, example)   Define a component example.
withHeader(name, header)   Define a component header.
withLink(name, link)   Define a component link.
withParameter(name, parameter)   Define a component parameter.
withRequestBody(name, requestBody)   Define a component request body.
withResponse(name, response)   Define a component response.
withSchema(name, schema)   Define a component schema.
withSecurityScheme(name, securityScheme)   Define a component security scheme.