Swagger: Is possible to define multiple ApiImplicitHeader with less boilerplate?

Created on 24 Jan 2018  路  2Comments  路  Source: nestjs/swagger

{
  ...
  @ApiImplicitHeader({ name: 'X-API-Key' })
  @ApiImplicitHeader({ name: 'X-Latitude' })
  @ApiImplicitHeader({ name: 'X-Longitude' })
  @ApiOperation({ title: 'Allows sign up or register a new user.' })
  @Post('register')
  async register(@Body() body: RegisterDto) {
  ... 
}

It would be nice to accept an array of options or be able to define it on the controller for all methods?

feature request

Most helpful comment

In the next release, there'll be a @ApiImplicitHeaders decorator that accepts an array of headers metadata. 馃檪

All 2 comments

In the next release, there'll be a @ApiImplicitHeaders decorator that accepts an array of headers metadata. 馃檪

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leefordjudes picture leefordjudes  路  4Comments

kalaivanan-muthusamy picture kalaivanan-muthusamy  路  4Comments

malbertSC picture malbertSC  路  5Comments

Fiorello picture Fiorello  路  5Comments

otroboe picture otroboe  路  3Comments