zod-codegen 1.0.0 → 1.0.1
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.
package/.github/workflows/ci.yml
CHANGED
|
@@ -21,12 +21,12 @@ jobs:
|
|
|
21
21
|
|
|
22
22
|
steps:
|
|
23
23
|
- name: Checkout code
|
|
24
|
-
uses: actions/checkout@
|
|
24
|
+
uses: actions/checkout@v5
|
|
25
25
|
with:
|
|
26
26
|
fetch-depth: 0
|
|
27
27
|
|
|
28
28
|
- name: Setup Node.js ${{ matrix.node-version }}
|
|
29
|
-
uses: actions/setup-node@
|
|
29
|
+
uses: actions/setup-node@v5
|
|
30
30
|
with:
|
|
31
31
|
node-version: ${{ matrix.node-version }}
|
|
32
32
|
cache: 'npm'
|
|
@@ -51,7 +51,7 @@ jobs:
|
|
|
51
51
|
|
|
52
52
|
- name: Upload coverage to Codecov
|
|
53
53
|
if: matrix.node-version == 20 && matrix.os == 'ubuntu-latest'
|
|
54
|
-
uses: codecov/codecov-action@
|
|
54
|
+
uses: codecov/codecov-action@v5
|
|
55
55
|
with:
|
|
56
56
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
57
57
|
file: ./coverage/lcov.info
|
|
@@ -64,10 +64,10 @@ jobs:
|
|
|
64
64
|
|
|
65
65
|
steps:
|
|
66
66
|
- name: Checkout code
|
|
67
|
-
uses: actions/checkout@
|
|
67
|
+
uses: actions/checkout@v5
|
|
68
68
|
|
|
69
69
|
- name: Setup Node.js
|
|
70
|
-
uses: actions/setup-node@
|
|
70
|
+
uses: actions/setup-node@v5
|
|
71
71
|
with:
|
|
72
72
|
node-version: 20
|
|
73
73
|
cache: 'npm'
|
|
@@ -85,10 +85,10 @@ jobs:
|
|
|
85
85
|
|
|
86
86
|
steps:
|
|
87
87
|
- name: Checkout code
|
|
88
|
-
uses: actions/checkout@
|
|
88
|
+
uses: actions/checkout@v5
|
|
89
89
|
|
|
90
90
|
- name: Setup Node.js
|
|
91
|
-
uses: actions/setup-node@
|
|
91
|
+
uses: actions/setup-node@v5
|
|
92
92
|
with:
|
|
93
93
|
node-version: 22
|
|
94
94
|
cache: 'npm'
|
|
@@ -121,12 +121,12 @@ jobs:
|
|
|
121
121
|
|
|
122
122
|
steps:
|
|
123
123
|
- name: Checkout code
|
|
124
|
-
uses: actions/checkout@
|
|
124
|
+
uses: actions/checkout@v5
|
|
125
125
|
with:
|
|
126
126
|
fetch-depth: 0
|
|
127
127
|
|
|
128
128
|
- name: Setup Node.js
|
|
129
|
-
uses: actions/setup-node@
|
|
129
|
+
uses: actions/setup-node@v5
|
|
130
130
|
with:
|
|
131
131
|
node-version: 22
|
|
132
132
|
cache: 'npm'
|
|
@@ -20,13 +20,13 @@ jobs:
|
|
|
20
20
|
|
|
21
21
|
steps:
|
|
22
22
|
- name: Checkout code
|
|
23
|
-
uses: actions/checkout@
|
|
23
|
+
uses: actions/checkout@v5
|
|
24
24
|
with:
|
|
25
25
|
fetch-depth: 0
|
|
26
26
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
27
27
|
|
|
28
28
|
- name: Setup Node.js
|
|
29
|
-
uses: actions/setup-node@
|
|
29
|
+
uses: actions/setup-node@v5
|
|
30
30
|
with:
|
|
31
31
|
node-version: 22
|
|
32
32
|
cache: 'npm'
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## <small>1.0.1 (2025-09-16)</small>
|
|
2
|
+
|
|
3
|
+
- Merge pull request #10 from julienandreu/dependabot/npm_and_yarn/eslint-config-prettier-10.1.8 ([d9b786c](https://github.com/julienandreu/zod-codegen/commit/d9b786c)), closes [#10](https://github.com/julienandreu/zod-codegen/issues/10)
|
|
4
|
+
- Merge pull request #11 from julienandreu/dependabot/npm_and_yarn/types/node-24.5.0 ([aef6e88](https://github.com/julienandreu/zod-codegen/commit/aef6e88)), closes [#11](https://github.com/julienandreu/zod-codegen/issues/11)
|
|
5
|
+
- Merge pull request #3 from julienandreu/dependabot/github_actions/actions/setup-node-5 ([62282bc](https://github.com/julienandreu/zod-codegen/commit/62282bc)), closes [#3](https://github.com/julienandreu/zod-codegen/issues/3)
|
|
6
|
+
- Merge pull request #4 from julienandreu/dependabot/github_actions/actions/checkout-5 ([979b29e](https://github.com/julienandreu/zod-codegen/commit/979b29e)), closes [#4](https://github.com/julienandreu/zod-codegen/issues/4)
|
|
7
|
+
- Merge pull request #5 from julienandreu/dependabot/github_actions/codecov/codecov-action-5 ([dddb7b0](https://github.com/julienandreu/zod-codegen/commit/dddb7b0)), closes [#5](https://github.com/julienandreu/zod-codegen/issues/5)
|
|
8
|
+
- Merge pull request #6 from julienandreu/dependabot/npm_and_yarn/dev-dependencies-77ad94e918 ([596b00f](https://github.com/julienandreu/zod-codegen/commit/596b00f)), closes [#6](https://github.com/julienandreu/zod-codegen/issues/6)
|
|
9
|
+
- Merge pull request #7 from julienandreu/dependabot/npm_and_yarn/zod-4.1.8 ([39eecb4](https://github.com/julienandreu/zod-codegen/commit/39eecb4)), closes [#7](https://github.com/julienandreu/zod-codegen/issues/7)
|
|
10
|
+
- Merge pull request #8 from julienandreu/dependabot/npm_and_yarn/apidevtools/swagger-parser-12.0.0 ([3507359](https://github.com/julienandreu/zod-codegen/commit/3507359)), closes [#8](https://github.com/julienandreu/zod-codegen/issues/8)
|
|
11
|
+
- Merge pull request #9 from julienandreu/dependabot/npm_and_yarn/undici-7.16.0 ([84d7c4a](https://github.com/julienandreu/zod-codegen/commit/84d7c4a)), closes [#9](https://github.com/julienandreu/zod-codegen/issues/9)
|
|
12
|
+
- fix: use z.url() and z.email() instead of substring types ([4ea5902](https://github.com/julienandreu/zod-codegen/commit/4ea5902))
|
|
13
|
+
- chore(deps-dev): bump @types/node from 22.18.3 to 24.5.0 ([33e823c](https://github.com/julienandreu/zod-codegen/commit/33e823c))
|
|
14
|
+
- chore(deps-dev): bump eslint-config-prettier from 9.1.0 to 10.1.8 ([79dc367](https://github.com/julienandreu/zod-codegen/commit/79dc367))
|
|
15
|
+
- chore(deps-dev): bump typescript-eslint in the dev-dependencies group ([907712a](https://github.com/julienandreu/zod-codegen/commit/907712a))
|
|
16
|
+
- chore(deps): bump @apidevtools/swagger-parser from 10.1.0 to 12.0.0 ([9abfbbe](https://github.com/julienandreu/zod-codegen/commit/9abfbbe))
|
|
17
|
+
- chore(deps): bump undici from 6.21.3 to 7.16.0 ([43c579b](https://github.com/julienandreu/zod-codegen/commit/43c579b))
|
|
18
|
+
- chore(deps): bump zod from 3.25.76 to 4.1.8 ([5b7e047](https://github.com/julienandreu/zod-codegen/commit/5b7e047))
|
|
19
|
+
- ci(deps): bump actions/checkout from 4 to 5 ([3f141f7](https://github.com/julienandreu/zod-codegen/commit/3f141f7))
|
|
20
|
+
- ci(deps): bump actions/setup-node from 4 to 5 ([cc4a331](https://github.com/julienandreu/zod-codegen/commit/cc4a331))
|
|
21
|
+
- ci(deps): bump codecov/codecov-action from 4 to 5 ([c0a4ea5](https://github.com/julienandreu/zod-codegen/commit/c0a4ea5))
|
|
22
|
+
|
|
1
23
|
## 1.0.0 (2025-09-16)
|
|
2
24
|
|
|
3
25
|
- chore: fix husky deprecation warnings and improve ci/cd ([fe24d72](https://github.com/julienandreu/zod-codegen/commit/fe24d72))
|
|
@@ -54,7 +54,7 @@ const ServerVariable = z.object({
|
|
|
54
54
|
enum: z.array(z.string()).optional(),
|
|
55
55
|
});
|
|
56
56
|
const Server = z.object({
|
|
57
|
-
url: z.
|
|
57
|
+
url: z.url(),
|
|
58
58
|
description: z.string().optional(),
|
|
59
59
|
variables: z.record(z.string(), ServerVariable).optional(),
|
|
60
60
|
});
|
|
@@ -125,18 +125,18 @@ const Info = z.object({
|
|
|
125
125
|
title: z.string().min(1),
|
|
126
126
|
version: z.string().min(1),
|
|
127
127
|
description: z.string().optional(),
|
|
128
|
-
termsOfService: z.
|
|
128
|
+
termsOfService: z.url().optional(),
|
|
129
129
|
contact: z
|
|
130
130
|
.object({
|
|
131
131
|
name: z.string().optional(),
|
|
132
|
-
email: z.
|
|
133
|
-
url: z.
|
|
132
|
+
email: z.email().optional(),
|
|
133
|
+
url: z.url().optional(),
|
|
134
134
|
})
|
|
135
135
|
.optional(),
|
|
136
136
|
license: z
|
|
137
137
|
.object({
|
|
138
138
|
name: z.string().min(1),
|
|
139
|
-
url: z.
|
|
139
|
+
url: z.url().optional(),
|
|
140
140
|
})
|
|
141
141
|
.optional(),
|
|
142
142
|
});
|
|
@@ -148,7 +148,7 @@ const Tag = z.object({
|
|
|
148
148
|
});
|
|
149
149
|
const ExternalDocumentation = z.object({
|
|
150
150
|
description: z.string().optional(),
|
|
151
|
-
url: z.
|
|
151
|
+
url: z.url(),
|
|
152
152
|
});
|
|
153
153
|
const Components = z.object({
|
|
154
154
|
schemas: z.record(z.string(), SchemaProperties).optional(),
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"url": "https://github.com/julienandreu/zod-codegen/issues"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@apidevtools/swagger-parser": "^
|
|
10
|
+
"@apidevtools/swagger-parser": "^12.0.0",
|
|
11
11
|
"debug": "^4.3.7",
|
|
12
12
|
"js-yaml": "^4.1.0",
|
|
13
13
|
"jsonpath": "^1.1.1",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"typescript": "^5.7.2",
|
|
20
20
|
"url-pattern": "^1.0.3",
|
|
21
21
|
"yargs": "^18.0.0",
|
|
22
|
-
"zod": "^
|
|
22
|
+
"zod": "^4.1.8"
|
|
23
23
|
},
|
|
24
24
|
"description": "A powerful TypeScript code generator that creates Zod schemas and type-safe clients from OpenAPI specifications",
|
|
25
25
|
"keywords": [
|
|
@@ -43,21 +43,21 @@
|
|
|
43
43
|
"@types/jest": "^30.0.0",
|
|
44
44
|
"@types/js-yaml": "^4.0.9",
|
|
45
45
|
"@types/jsonpath": "^0.2.4",
|
|
46
|
-
"@types/node": "^
|
|
46
|
+
"@types/node": "^24.5.0",
|
|
47
47
|
"@types/yargs": "^17.0.33",
|
|
48
48
|
"@vitest/coverage-v8": "^3.2.4",
|
|
49
49
|
"eslint": "^9.17.0",
|
|
50
|
-
"eslint-config-prettier": "^
|
|
50
|
+
"eslint-config-prettier": "^10.1.8",
|
|
51
51
|
"husky": "^9.1.7",
|
|
52
52
|
"lint-staged": "^16.1.6",
|
|
53
53
|
"semantic-release": "^24.2.8",
|
|
54
54
|
"ts-node": "^10.9.2",
|
|
55
|
-
"typescript-eslint": "^8.
|
|
56
|
-
"undici": "^
|
|
55
|
+
"typescript-eslint": "^8.44.0",
|
|
56
|
+
"undici": "^7.16.0",
|
|
57
57
|
"vitest": "^3.2.4"
|
|
58
58
|
},
|
|
59
59
|
"optionalDependencies": {
|
|
60
|
-
"undici": "^
|
|
60
|
+
"undici": "^7.16.0"
|
|
61
61
|
},
|
|
62
62
|
"homepage": "https://github.com/julienandreu/zod-codegen",
|
|
63
63
|
"license": "MIT",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"release": "semantic-release",
|
|
99
99
|
"release:dry": "semantic-release --dry-run"
|
|
100
100
|
},
|
|
101
|
-
"version": "1.0.
|
|
101
|
+
"version": "1.0.1"
|
|
102
102
|
}
|
package/src/types/openapi.ts
CHANGED
|
@@ -61,7 +61,7 @@ const ServerVariable = z.object({
|
|
|
61
61
|
});
|
|
62
62
|
|
|
63
63
|
const Server = z.object({
|
|
64
|
-
url: z.
|
|
64
|
+
url: z.url(),
|
|
65
65
|
description: z.string().optional(),
|
|
66
66
|
variables: z.record(z.string(), ServerVariable).optional(),
|
|
67
67
|
});
|
|
@@ -140,18 +140,18 @@ const Info = z.object({
|
|
|
140
140
|
title: z.string().min(1),
|
|
141
141
|
version: z.string().min(1),
|
|
142
142
|
description: z.string().optional(),
|
|
143
|
-
termsOfService: z.
|
|
143
|
+
termsOfService: z.url().optional(),
|
|
144
144
|
contact: z
|
|
145
145
|
.object({
|
|
146
146
|
name: z.string().optional(),
|
|
147
|
-
email: z.
|
|
148
|
-
url: z.
|
|
147
|
+
email: z.email().optional(),
|
|
148
|
+
url: z.url().optional(),
|
|
149
149
|
})
|
|
150
150
|
.optional(),
|
|
151
151
|
license: z
|
|
152
152
|
.object({
|
|
153
153
|
name: z.string().min(1),
|
|
154
|
-
url: z.
|
|
154
|
+
url: z.url().optional(),
|
|
155
155
|
})
|
|
156
156
|
.optional(),
|
|
157
157
|
});
|
|
@@ -166,7 +166,7 @@ const Tag = z.object({
|
|
|
166
166
|
|
|
167
167
|
const ExternalDocumentation = z.object({
|
|
168
168
|
description: z.string().optional(),
|
|
169
|
-
url: z.
|
|
169
|
+
url: z.url(),
|
|
170
170
|
});
|
|
171
171
|
|
|
172
172
|
const Components = z.object({
|