@voznov/zod-dto-nestjs 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +3 -4
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -24,13 +24,12 @@ import { ZodDto } from '@voznov/zod-dto';
24
24
  import { z } from 'zod';
25
25
 
26
26
  const CreateUserDto = ZodDto(z.object({ name: z.string(), email: z.email() }));
27
- type CreateUser = z.infer<typeof CreateUserDto>;
28
27
 
29
28
  @Controller('users')
30
29
  export class UsersController {
31
30
  @Post()
32
- create(@Body() body: CreateUser) {
33
- // already validated; `body` is a CreateUserDto instance
31
+ create(@Body() body: CreateUserDto) {
32
+ // already validated; `body` is a CreateUserDto instance.
34
33
  }
35
34
  }
36
35
  ```
@@ -69,4 +68,4 @@ app.useGlobalPipes(
69
68
 
70
69
  ## License
71
70
 
72
- Apache-2.0
71
+ [Apache-2.0](./LICENSE)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voznov/zod-dto-nestjs",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "NestJS adapter for @voznov/zod-dto — validation pipe, Swagger generation",
5
5
  "keywords": [
6
6
  "zod",
@@ -48,7 +48,7 @@
48
48
  "@nestjs/common": ">=10.0.0",
49
49
  "@nestjs/swagger": ">=7.0.0",
50
50
  "zod": ">=4.0.0",
51
- "@voznov/zod-dto": "^0.1.1"
51
+ "@voznov/zod-dto": "^0.1.3"
52
52
  },
53
53
  "publishConfig": {
54
54
  "access": "public"