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