Skip to content

Commit d088908

Browse files
Merge pull request #2682 from micalevisk/patch-1
docs(techniques): add mention on streamable files responses when using built-in serialization
2 parents 86b5608 + 0c6cfa6 commit d088908

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

content/techniques/serialization.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Serialization is a process that happens before objects are returned in a network
66

77
Nest provides a built-in capability to help ensure that these operations can be performed in a straightforward way. The `ClassSerializerInterceptor` interceptor uses the powerful [class-transformer](https://github.com/typestack/class-transformer) package to provide a declarative and extensible way of transforming objects. The basic operation it performs is to take the value returned by a method handler and apply the `instanceToPlain()` function from [class-transformer](https://github.com/typestack/class-transformer). In doing so, it can apply rules expressed by `class-transformer` decorators on an entity/DTO class, as described below.
88

9+
> info **Hint** The serialization does not apply to [StreamableFile](https://docs.nestjs.com/techniques/streaming-files#streamable-file-class) responses.
10+
911
#### Exclude properties
1012

1113
Let's assume that we want to automatically exclude a `password` property from a user entity. We annotate the entity as follows:

0 commit comments

Comments
 (0)