Skip to content

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

@SeanBritsDev

Description

@SeanBritsDev

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions