Page Contents

Home > @loopback/openapi-v3 > param

param namespace

Describe an input parameter of a Controller method. The @param decorator takes an argument of ParameterObject to define how to map the parameter to OpenAPI specification.

@param(paramSpec) must be applied to parameters.

Signature:

export declare namespace param 

Variables

Variable Description
array Define a parameter of array type.
header  
path  
query  

Example

class MyController {
  @get('/')
  list(
    @param(offsetSpec) offset?: number,
    @param(pageSizeSpec) pageSize?: number,
  ) {}
}