mirror of
https://github.com/langgenius/dify.git
synced 2026-04-25 13:16:16 +08:00
refactor: generate orpc contract from openapi
This commit is contained in:
26
web/kubb.config.ts
Normal file
26
web/kubb.config.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import { defineConfig } from '@kubb/core'
|
||||
import { pluginOas } from '@kubb/plugin-oas'
|
||||
import { pluginOrpc } from '@kubb/plugin-orpc'
|
||||
import { pluginZod } from '@kubb/plugin-zod'
|
||||
|
||||
export default defineConfig({
|
||||
root: '.',
|
||||
input: {
|
||||
path: './open-api/api.json',
|
||||
},
|
||||
output: {
|
||||
path: './gen',
|
||||
extension: {
|
||||
'.ts': '',
|
||||
},
|
||||
format: false,
|
||||
lint: 'eslint',
|
||||
clean: true,
|
||||
barrelType: false,
|
||||
},
|
||||
plugins: [
|
||||
pluginOas({ validate: false }),
|
||||
pluginZod(),
|
||||
pluginOrpc(),
|
||||
],
|
||||
})
|
||||
4725
web/open-api/api.json
Normal file
4725
web/open-api/api.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -51,7 +51,8 @@
|
||||
"build-storybook": "storybook build",
|
||||
"preinstall": "npx only-allow pnpm",
|
||||
"analyze": "ANALYZE=true pnpm build",
|
||||
"knip": "knip"
|
||||
"knip": "knip",
|
||||
"generate:contract": "kubb generate"
|
||||
},
|
||||
"dependencies": {
|
||||
"@amplitude/analytics-browser": "2.33.1",
|
||||
@ -163,12 +164,20 @@
|
||||
"@antfu/eslint-config": "7.0.1",
|
||||
"@chromatic-com/storybook": "4.1.1",
|
||||
"@eslint-react/eslint-plugin": "2.7.0",
|
||||
"@kubb/cli": "4.18.4",
|
||||
"@kubb/core": "4.18.4",
|
||||
"@kubb/plugin-oas": "4.18.4",
|
||||
"@kubb/plugin-orpc": "link:../../../Library/pnpm/global/5/node_modules/@kubb/plugin-orpc",
|
||||
"@kubb/plugin-react-query": "4.18.4",
|
||||
"@kubb/plugin-ts": "4.18.4",
|
||||
"@kubb/plugin-zod": "link:../../../Library/pnpm/global/5/node_modules/@kubb/plugin-zod",
|
||||
"@mdx-js/loader": "3.1.1",
|
||||
"@mdx-js/react": "3.1.1",
|
||||
"@next/bundle-analyzer": "16.1.4",
|
||||
"@next/eslint-plugin-next": "16.1.4",
|
||||
"@next/mdx": "16.1.4",
|
||||
"@rgrove/parse-xml": "4.2.0",
|
||||
"@scalar/openapi-parser": "0.24.3",
|
||||
"@serwist/turbopack": "9.5.0",
|
||||
"@storybook/addon-docs": "9.1.13",
|
||||
"@storybook/addon-links": "9.1.13",
|
||||
|
||||
1353
web/pnpm-lock.yaml
generated
1353
web/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user