Skip to content

Commit aa72e55

Browse files
authored
Merge pull request #34 from dev-five-git/impl-zod
Implement zod
2 parents b041ad3 + 2ec9198 commit aa72e55

File tree

24 files changed

+4546
-19
lines changed

24 files changed

+4546
-19
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"changes":{"packages/webpack-plugin/package.json":"Patch","packages/next-plugin/package.json":"Patch","packages/utils/package.json":"Patch","packages/vite-plugin/package.json":"Patch","packages/zod/package.json":"Patch","packages/fetch/package.json":"Patch","packages/core/package.json":"Patch","packages/rsbuild-plugin/package.json":"Patch","packages/generator/package.json":"Patch","packages/react-query/package.json":"Patch"},"note":"implement zod","date":"2026-01-04T11:21:33.541821Z"}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"changes":{"packages/zod/package.json":"Minor"},"note":"Implement zod","date":"2026-01-04T11:21:57.546730400Z"}

bun.lock

Lines changed: 26 additions & 2 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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import { createApi, type DevupObject } from '@devup-api/fetch'
44
import { createQueryClient } from '@devup-api/react-query'
5+
import { schemas } from '@devup-api/zod'
56
import { Box, Text } from '@devup-ui/react'
67
import { useEffect } from 'react'
78

@@ -15,6 +16,13 @@ const api2 = createApi({
1516

1617
const queryClient = createQueryClient(api)
1718

19+
// Example usage of Zod schemas (will be populated after build)
20+
const schema = schemas['openapi.json'].request.CreateUserRequest
21+
const _a = schema.parse({
22+
name: 'John Doe',
23+
email: 'foo@bar.com',
24+
})
25+
1826
export default function Home() {
1927
const { data, isLoading, error } = queryClient.useQuery('GET', 'getUsers', {
2028
// params: { id: 1 },

examples/next/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"@devup-api/next-plugin": "workspace:*",
1616
"@devup-api/fetch": "workspace:*",
1717
"@devup-api/react-query": "workspace:*",
18+
"@devup-api/zod": "workspace:*",
1819
"@devup-ui/react": "^1"
1920
},
2021
"devDependencies": {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
"lint": "biome check",
2020
"lint:fix": "biome check --write",
2121
"prepare": "husky",
22-
"build": "bun run -F @devup-api/core build && bun run -F @devup-api/utils build && bun run -F @devup-api/generator build && bun run -F @devup-api/fetch build && bun run -F @devup-api/webpack-plugin build && bun run -F @devup-api/vite-plugin build && bun run -F @devup-api/next-plugin build && bun run -F @devup-api/rsbuild-plugin build && bun run -F @devup-api/react-query build",
23-
"publish": "bun publish --cwd packages/core && bun publish --cwd packages/utils && bun publish --cwd packages/generator && bun publish --cwd packages/fetch && bun publish --cwd packages/webpack-plugin && bun publish --cwd packages/vite-plugin && bun publish --cwd packages/next-plugin && bun publish --cwd packages/rsbuild-plugin && bun publish --cwd packages/react-query"
22+
"build": "bun run -F @devup-api/core build && bun run -F @devup-api/utils build && bun run -F @devup-api/generator build && bun run -F @devup-api/fetch build && bun run -F @devup-api/zod build && bun run -F @devup-api/webpack-plugin build && bun run -F @devup-api/vite-plugin build && bun run -F @devup-api/next-plugin build && bun run -F @devup-api/rsbuild-plugin build && bun run -F @devup-api/react-query build",
23+
"publish": "bun publish --cwd packages/core && bun publish --cwd packages/utils && bun publish --cwd packages/generator && bun publish --cwd packages/fetch && bun publish --cwd packages/zod && bun publish --cwd packages/webpack-plugin && bun publish --cwd packages/vite-plugin && bun publish --cwd packages/next-plugin && bun publish --cwd packages/rsbuild-plugin && bun publish --cwd packages/react-query"
2424
},
2525
"workspaces": [
2626
"packages/*",

0 commit comments

Comments
 (0)