Page Contents
Home > @loopback/openapi-spec-builder > ComponentsSpecBuilder > withCallback
ComponentsSpecBuilder.withCallback() method
Define a component callback.
Signature:
withCallback(name: string, callback: CallbackObject | ReferenceObject): this;
Parameters
| Parameter | Type | Description |
|---|---|---|
|
name |
string |
The name of the callback |
|
callback |
CallbackObject | ReferenceObject |
Specification of the callback |
Returns:
this