You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/**
* Generated by orval v7.4.1 🍺
* Do not edit manually.
* API
* Petstore API
* OpenAPI spec version: v1
*/
import { z as zod } from 'zod';
…
What were you expecting to happen?
3 output this file hono/src/index.zod.ts
/**
* Generated by orval v7.4.1 🍺
* Do not edit manually.
* API
* Petstore API
* OpenAPI spec version: v1
*/
import { z as zod } from 'zod';
import { CurrentUser } from './schemas/resources-paths-api-current_user.yml';
export const getCurrentUserResponse: zod.ZodType<CurrentUser> = zod.object({
name: zod.string(),
email: zod.string(),
});
…
Any logs, error output, etc?
yarn run v1.22.22
$ /Users/manabu/devbase/power_ageless/node_modules/.bin/orval
🍻 Start orval v7.4.1 - A swagger client generator for typescript
(node:60513) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
fe: Cleaning output folder
⚠️ SyntaxError: Swagger schema validation failed.
#/paths/~1api~1current_user must NOT have additional properties
🎉 fe - Your OpenAPI spec has been converted into ready to use orval!
⚠️ SyntaxError: Swagger schema validation failed.
#/paths/~1api~1current_user must NOT have additional properties
🎉 be - Your OpenAPI spec has been converted into ready to use orval!
✨ Done in 0.63s.
…
Any other comments?
Any ideas, even workarounds, would be appreciated!
…
What versions are you using?
Please execute npx envinfo --system --npmPackages orval,zod,axios,msw,swr,@tanstack/react-query,@tanstack/vue-query,react,vue and paste the results here.
Hi @manabu0926 thanks for made this issue.
I understand that ref of OpenAPI is not resolved with zod.
Until the issue is resolved, use another tool to merge into a single OpenAPI definition and specify it as input.
This plugin is very useful! Thanks for making it!
The following sample writing style works well. (And without hono with zod is works well.)
https://github.com/orval-labs/orval/blob/master/samples/hono/hono-with-fetch-client/petstore.yaml
But Our project, splitted schema files like this.
openapi/
openapi/schemas/
openapi/paths/
openapi/openapi.yml
What are the steps to reproduce this issue?
What happens?
1 define like this.
openapi/openapi.yml
openapi/resources/paths/api/current_user.yml
orval.config.ts
2 command
yarn orval
3 output this empty file
hono/src/index.zod.ts
…
What were you expecting to happen?
3 output this file
hono/src/index.zod.ts
…
Any logs, error output, etc?
…
Any other comments?
Any ideas, even workarounds, would be appreciated!
…
What versions are you using?
Please execute
npx envinfo --system --npmPackages orval,zod,axios,msw,swr,@tanstack/react-query,@tanstack/vue-query,react,vue
and paste the results here.System:
OS: macOS 15.2
CPU: (12) arm64 Apple M4 Pro
Memory: 2.43 GB / 48.00 GB
Shell: 5.9 - /bin/zsh
npmPackages:
@tanstack/react-query: ^5.63.0 => 5.63.0
axios: ^1.7.9 => 1.7.9
orval: ^7.4.1 => 7.4.1
react: ^18.3.1 => 18.3.1
zod: ^3.24.1 => 3.24.1
The text was updated successfully, but these errors were encountered: