We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
이슈 : 외부업체의 협업에서 API를 통해 받은 값을 내부 DB에 저장해야 하는 상황에서 내부 컬럼 생성 규칙과 외부에서 전달받은 DTO의 속성명이 크게 차이가 나는 경우 어떻게 편하게 해결이 가능할까 고민하게 됨
해결 방안 : DTO에서 @expose() 데코레이터를 활용하면 손 쉽게 해결 가능
import { Expose } from 'class-transformer'; export class TestDto { @Expose({ name: '받아온 이름' }) 내부에서 사용할 이름: 타입 }
EX) import { Expose } from 'class-transformer'; export class TestDto { @Expose({ name: 'developerName' }) peopleName: string }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
이슈 : 외부업체의 협업에서 API를 통해 받은 값을 내부 DB에 저장해야 하는 상황에서
내부 컬럼 생성 규칙과 외부에서 전달받은 DTO의 속성명이 크게 차이가 나는 경우
어떻게 편하게 해결이 가능할까 고민하게 됨
해결 방안 : DTO에서 @expose() 데코레이터를 활용하면 손 쉽게 해결 가능
특정 속성만 직렬화/역직렬화 하거나 특정 조건에 따라 속성을 노출시키고 싶을 때에도 사용함.
The text was updated successfully, but these errors were encountered: