Page Contents

Home > @loopback/openapi-spec-builder > OpenApiSpecBuilder > withComponents

OpenApiSpecBuilder.withComponents() method

Define a new ComponentsObject.

Signature:

withComponents(spec: ComponentsObject | ComponentsSpecBuilder): this;

Parameters

Parameter Type Description
spec ComponentsObject | ComponentsSpecBuilder Specification of the components.

Returns:

this