Hi guy, I'm using NestJS for my project
When make a Dto A, B, ... for validation body request and generate an Open Api for document,
I'm using @nestjs/swagger to generate an open Api.
The code look like
import { ApiProperty, PickType } from '@nestjs/swagger';
class User {
@ApiProperty({ example: 'xxxx'})
public id: string;
@ApiProperty({ example: 'wind blade'})
public fullName: string;
....
}
class CreateUserDto extends PickType(User, ['fullName']) {
....
}
So The Open API is working well,
**----
And in service I using
create(createUserDto: CreateUserDto) {
...
return functionCreateUser ({
fullName: createUserDto.fullName
})
}
But createUserDto.fullName showing an error **Unresolved variable ** with fullName
**--
I've change
import {PartialType} from **@nestjs/swagger
```
to
```javascript
import {PartialType} from **@nestjs/mapped-types
The service stop show the error, but property fullName in CreateUserDto had been lost in Open API
**So, Could you tell me any solution to keep fullName in CreateUserDto, also make the service stop show the error?
Thanks 😄