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

Newest version of swagger-ui-dist (3.30.1) breaks the Swagger UI #862

Closed
Octopixell opened this issue Jul 22, 2020 · 3 comments
Closed

Newest version of swagger-ui-dist (3.30.1) breaks the Swagger UI #862

Octopixell opened this issue Jul 22, 2020 · 3 comments

Comments

@Octopixell
Copy link

I'm submitting a...


[x] Regression 
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

None of the schema's or endpoints in the Swagger UI have any content and clicking the endpoints transfers them to the default tag without loading any new content.

Expected behavior

Schema's should show their actual properties and endpoints should expand properly showing the schema content other data.

Minimal reproduction of the problem with instructions

When installing @nestjs/swagger and swagger-ui-express as instructed on the docs (https://docs.nestjs.com/openapi/introduction#installation) the swagger-ui-express package simply picks the latest version of swagger-ui-dist. This is usually fine but in this case it's causing issues.

Looking at the readme for swagger-ui-express they also advice freezing the version of swagger-ui-dist to prevent issues like this. I quote:
Swagger version is pulled from npm module swagger-ui-dist. Please use a lock file or specify the version of swagger-ui-dist you want to ensure it is consistent across environments.

What I did to fix the issue is locally install the previous version of swagger-ui-dist with npm i --save [email protected].

Perhaps we should take this into account and also instruct users to do so in the docs?

Environment


Nest version: ^7.0.0
 
For Tooling issues:
- Node version: `12.18.2`
- Platform:  Mac
@Octopixell
Copy link
Author

You can follow the issue closer through this issue: swagger-api/swagger-ui#6249

@kamilmysliwiec
Copy link
Member

This should be fixed in the [email protected] swagger-api/swagger-ui#6249

@Octopixell
Copy link
Author

@kamilmysliwiec should we not follow the instructions and freeze the version of swagger-ui-dist and instruct users to do so from the NestJS docs? To prevent issues like these in the future?

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

No branches or pull requests

2 participants