Page Contents

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

ComponentsSpecBuilder class

A builder for creating ComponentsObject specifications.


export declare class ComponentsSpecBuilder extends BuilderBase<ComponentsObject> 

Extends: BuilderBase<ComponentsObject>


Constructor Modifiers Description
(constructor)()   Constructs a new instance of the ComponentsSpecBuilder class


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.