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