Migration guide
If you're currently using @nestjs/swagger@3.*, note the following breaking/API changes in version 4.0.
Breaking changes
The following decorators have been changed/renamed:
- @ApiModelPropertyis now- @ApiProperty
- @ApiModelPropertyOptionalis now- @ApiPropertyOptional
- @ApiResponseModelPropertyis now- @ApiResponseProperty
- @ApiImplicitQueryis now- @ApiQuery
- @ApiImplicitParamis now- @ApiParam
- @ApiImplicitBodyis now- @ApiBody
- @ApiImplicitHeaderis now- @ApiHeader
- @ApiOperation({{ '{' }} title: 'test' {{ '}' }})is now- @ApiOperation({{ '{' }} summary: 'test' {{ '}' }})
- @ApiUseTagsis now- @ApiTags
DocumentBuilder breaking changes (updated method signatures):
- addTag
- addBearerAuth
- addOAuth2
- setContactEmailis now- setContact
- setHosthas been removed
- setSchemeshas been removed (use the- addServerinstead, e.g.,- addServer('http://'))
New methods
The following methods have been added:
- addServer
- addApiKey
- addBasicAuth
- addSecurity
- addSecurityRequirements