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

Swagger UI doesn't work without internet access #3674

Closed
hossamkhader opened this issue Dec 9, 2024 · 3 comments · Fixed by GNS3/gns3-server#2456
Closed

Swagger UI doesn't work without internet access #3674

hossamkhader opened this issue Dec 9, 2024 · 3 comments · Fixed by GNS3/gns3-server#2456

Comments

@hossamkhader
Copy link

I tested it in an air-gapped network. It keeps trying to access the below URLs:

https://cdn.jsdelivr.net/npm/swagger-ui-dist@5/swagger-ui.css
https://cdn.jsdelivr.net/npm/swagger-ui-dist@5/swagger-ui-bundle.js
https://fastapi.tiangolo.com/img/favicon.png

@grossmj
Copy link
Member

grossmj commented Dec 16, 2024

Unfortunately, Swagger UI is bundled in one of our dependencies: FastAPI

Not sure we can easily use our own Swagger UI.

@muriloglix
Copy link

Unfortunately, Swagger UI is bundled in one of our dependencies: FastAPI

Not sure we can easily use our own Swagger UI.

It is relatively simple to keep the files statically on the server:
https://fastapi.tiangolo.com/how-to/custom-docs-ui-assets/#self-hosting-javascript-and-css-for-docs

@grossmj
Copy link
Member

grossmj commented Dec 19, 2024

@muriloglix thanks for the link. I implemented the changes to serve static files now 👍

@grossmj grossmj closed this as completed Dec 19, 2024
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

Successfully merging a pull request may close this issue.

3 participants