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

Generated client can't be unzipped (With Quick Fix) #5383

Open
SeanBritsDev opened this issue Mar 7, 2025 · 3 comments
Open

Generated client can't be unzipped (With Quick Fix) #5383

SeanBritsDev opened this issue Mar 7, 2025 · 3 comments

Comments

@SeanBritsDev
Copy link

System and Browser info


Describe the bug you're encountering

I am not able to extract the zip files being generated when I use the generate client > android feature. I tested with some others as well and I am also not able to extract them. The zip being downloaded is (520Bytes).

I got this message when I used the 5.0.0-alpha.134

Uh oh, an error has occurred
The request was made and the server responded with a status code that falls out of the range of 2xx

In the console of the alpha I also got this error (Not allowed to share the content of the .yaml)

generate-client-code-from-openapi-20.js:95
GET https://generator.swagger.io/api/gen/download/*******-****-****-****-************ 500 (Internal Server Error)


To reproduce...

Steps to reproduce the behavior:

  1. Go to 'https://editor.swagger.io/' or ''https://editor-next.swagger.io/''
  2. Click on 'File'
  3. Import the .yaml file
  4. Click on 'Generate Client'
  5. Click on 'Android' (but I think the others are broken as well)
  6. A zip file will be downloaded (520 Bytes), and the fill will not be extractable

Additional context or thoughts

I see that this issue has been mentioned in the passed, however I am sure that i used this feature after that issue was logged. I also want others experiencing the same issue to have a quick fix, so that the Swagger team has time to work on the bug.


Quick Solution

If you inspect the page of the Alpha Verison after getting the error when you try to generate the client code, you wil see an error message in the console. Open the link in a new tab and the zip should download normally and you can unzip with no issue.

@fasfsfgs
Copy link

Same here. Thanks for the workaround, @SeanBritsDev! It really works.

@zhsama
Copy link

zhsama commented Mar 26, 2025

i got the same issue in Python,this method effectively solved the problem.

@adcStefanAdam
Copy link

editor.swagger.io is having the zip problem so i tried editor-next.swagger.io which is giving me the error from issue #5432.
So how to use your tool to get a full working PHP client. Both versions don't work at the moment. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants