We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f31c4e6 commit d0844dfCopy full SHA for d0844df
docs/features/openapi/README.md
@@ -54,6 +54,16 @@ export default defineConfig({
54
},
55
schemas: 'src/api/models',
56
57
+ },
58
+ zod: {
59
+ input: {
60
+ target: './swagger.json',
61
+ // 或远程: 'http://localhost:3000/api/swagger.json'
62
63
+ output: {
64
+ target: 'src/api/zod-schemas',
65
+ client: 'zod',
66
67
68
});
69
```
@@ -298,7 +308,7 @@ const UserListWithPagination: FC = function UserListWithPagination() {
298
308
```tsx
299
309
import { type FC } from 'react';
300
310
import { z } from 'zod';
301
-import { UserSchema } from '../api/generated/zod-schemas';
311
+import { UserSchema } from '@/api/zod-schemas';
302
312
303
313
interface UserCardProps {
304
314
userId: string
0 commit comments