Skip to content

Commit d1dd828

Browse files
committed
fix openapi
1 parent d8ccad6 commit d1dd828

File tree

5 files changed

+15
-23
lines changed

5 files changed

+15
-23
lines changed

packages/plugins/openapi/src/schema.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import z from 'zod';
44
* Zod schema for OpenAPI security schemes: https://swagger.io/docs/specification/authentication/
55
*/
66
export const SecuritySchemesSchema = z.record(
7+
z.string(),
78
z.union([
89
z.object({ type: z.literal('http'), scheme: z.literal('basic') }),
910
z.object({ type: z.literal('http'), scheme: z.literal('bearer'), bearerFormat: z.string().optional() }),
@@ -20,22 +21,22 @@ export const SecuritySchemesSchema = z.record(
2021
authorizationUrl: z.string(),
2122
tokenUrl: z.string(),
2223
refreshUrl: z.string(),
23-
scopes: z.record(z.string()),
24+
scopes: z.record(z.string(), z.string()),
2425
}),
2526
implicit: z.object({
2627
authorizationUrl: z.string(),
2728
refreshUrl: z.string(),
28-
scopes: z.record(z.string()),
29+
scopes: z.record(z.string(), z.string()),
2930
}),
3031
password: z.object({
3132
tokenUrl: z.string(),
3233
refreshUrl: z.string(),
33-
scopes: z.record(z.string()),
34+
scopes: z.record(z.string(), z.string()),
3435
}),
3536
clientCredentials: z.object({
3637
tokenUrl: z.string(),
3738
refreshUrl: z.string(),
38-
scopes: z.record(z.string()),
39+
scopes: z.record(z.string(), z.string()),
3940
}),
4041
}),
4142
}),

pnpm-lock.yaml

Lines changed: 7 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ packages:
77
catalog:
88
ts-morph: ^26.0.0
99
typescript: ~5.8.0
10-
zod: ^3.25.0
10+
zod: ^4.0.0
1111
zod-validation-error: ^4.0.0

tests/integration/tests/cli/generate.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ model Post {
4545
// set up project
4646
fs.writeFileSync('package.json', JSON.stringify({ name: 'my app', version: '1.0.0' }));
4747
createNpmrc();
48-
installPackage('prisma @prisma/client zod@^3.25.0');
48+
installPackage('prisma @prisma/client zod@^4.0.0');
4949
installPackage(path.join(__dirname, '../../../../packages/runtime/dist'));
5050

5151
// set up schema

tests/integration/tests/cli/plugins.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ describe('CLI Plugins Tests', () => {
7070
// deps
7171
const ver = require('../../../../packages/schema/package.json').version;
7272
const depPkgs = [
73-
'zod@^3.25.0',
73+
'zod@^4.0.0',
7474
'react',
7575
'swr',
7676
'@tanstack/react-query@5.56.x',

0 commit comments

Comments
 (0)