Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate fails when using a big remote localhost openapi file #1687

Open
mortezakarimi opened this issue Nov 3, 2024 · 3 comments
Open

Generate fails when using a big remote localhost openapi file #1687

mortezakarimi opened this issue Nov 3, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@mortezakarimi
Copy link
Contributor

mortezakarimi commented Nov 3, 2024

What are the steps to reproduce this issue?

  1. Create a big open API file (about 600KB) with lots of relations models and params
  2. Run the orval generate command to generate models and services

What happens?

I get the following error.

Error: ENOENT: no such file or directory, open ‘http://localhost:4000/api.json’

What were you expecting to happen?

Generate API files correctly.

Any logs, error output, etc?

curl -sS -D - http://localhost:4000/api.json -o /dev/null
HTTP/1.1 200 OK
Content-Security-Policy: default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Resource-Policy: same-origin
Origin-Agent-Cluster: ?1
Referrer-Policy: no-referrer
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-DNS-Prefetch-Control: off
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 0
Vary: Origin
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Set-Cookie
Content-Type: application/json; charset=utf-8
Content-Length: 547435
ETag: W/"85a6b-W8TvwJwd0RjECxheQDEw8JNuOCQ"
Date: Sun, 03 Nov 2024 14:05:10 GMT
Connection: keep-alive
Keep-Alive: timeout=5

Any other comments?

I think there is a problem with the processing
because I tested it multiple times using a remote server other than localhost everything works fine, also the same file when saved into the project for processing works fine, I don't know the problem related to the package or MacOS, but when I remove some relations from the API file the command works fine same as always.

What versions are you using?

  System:
    OS: macOS 15.1
    CPU: (14) arm64 Apple M3 Max
    Memory: 382.83 MB / 36.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.11.0 
    npm: 10.5.2 
  npmPackages:
    @tanstack/react-query: ^5.59.17 => 5.59.17 
    axios: ^1.7.7 => 1.7.7 
    orval: ^7.2.0 => 7.2.0 
    react: 18.3.1 => 18.3.1 
    zod: ^3.23.8 => 3.23.8 
@melloware
Copy link
Collaborator

Looks like the same issue as this old one which was fixed: #219

@melloware melloware added the bug Something isn't working label Nov 3, 2024
@mortezakarimi
Copy link
Contributor Author

@melloware This is not the same as the old issue because in the new issue, everything works fine but when the API size and relation get big the issue happens, I think the solution is to save the API response in a file and then, process the result,
when I save the file and try to execute the command everything works fine

@melloware
Copy link
Collaborator

OK good to know its related definitely to the size of the document downloaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants