Skip to content

Commit 33e3066

Browse files
committed
Add test
1 parent eb053a9 commit 33e3066

File tree

5 files changed

+21
-2
lines changed

5 files changed

+21
-2
lines changed

bun.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/next/app/page.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ const api2 = createApi({
1414
baseUrl: 'https://api.example2.com',
1515
serverName: 'openapi2.json',
1616
})
17+
const api3 = createApi({
18+
baseUrl: 'https://api.example2.com',
19+
serverName: 'openapi3.json',
20+
})
1721

1822
const queryClient = createQueryClient(api)
1923

@@ -80,6 +84,19 @@ export default function Home() {
8084
.then((res) => {
8185
console.log(res)
8286
})
87+
api3.POST('/form', {
88+
body: {
89+
email: 'name',
90+
name: 'John Doe',
91+
},
92+
})
93+
94+
api3.POST('/typed-form', {
95+
body: {
96+
name: 'John Doe',
97+
tags: 'tag1,tag2',
98+
},
99+
})
83100
}, [mutateAsync])
84101
return (
85102
<Box>

examples/next/next.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const config = devupApi(
66
reactStrictMode: true,
77
},
88
{
9-
openapiFiles: ['./openapi.json', './openapi2.json'],
9+
openapiFiles: ['./openapi.json', './openapi2.json', './openapi3.json'],
1010
},
1111
)
1212

File renamed without changes.

examples/next/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"@devup-ui/react": "^1",
2020
"@tanstack/react-query": "^5",
2121
"@devup-api/ui": "workspace:*",
22-
"@devup-api/hookform": "workspace:*"
22+
"@devup-api/hookform": "workspace:*",
23+
"zod": "^4.3"
2324
},
2425
"devDependencies": {
2526
"@devup-ui/next-plugin": "^1",

0 commit comments

Comments
 (0)