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

Use fs::read to overwrite swagger UI contents #1022

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

joaquin041
Copy link
Contributor

@joaquin041 joaquin041 commented Sep 4, 2024

When using SWAGGER_UI_OVERWRITE_FOLDER, text files get properly overwritten, but other files like icons fail with:
cannot read content from file: icon.png

Using fs::read instead of fs:: read_to_string solves the issue. It overwrites the files using bytes instead of strings.

Copy link
Owner

@juhaku juhaku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat, thanks for the patch 👍

@juhaku juhaku merged commit c36f877 into juhaku:master Sep 4, 2024
9 checks passed
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 this pull request may close these issues.

2 participants