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