@icecat-studio/nestjs-swagger
v7.4.2-1
Published
Nest - modern, fast, powerful node.js web framework (@swagger)
Downloads
17
Maintainers
Readme
@nestjs/swagger (Fork)
This is a fork of the original @nestjs/swagger package with an additional @ApiSchema
decorator.
The @ApiSchema
decorator allows renaming DTO classes for schema generation in Swagger. For example, you can rename a class UserCreateDto
to UserCreateRequest
when generating the API documentation.
Example:
import { ApiSchema } from '@nestjs/swagger';
@ApiSchema({ name: 'UserCreateRequest' })
export class UserCreateDto {
// DTO properties
}
Addresses the Following Issues
This feature resolves the following issues from the original repository:
By using this decorator, you can easily customize how your DTOs appear in Swagger’s generated schemas, without needing to modify the actual class names in your codebase.