Skip to content

fix(event_handler): read swagger files with UTF-8 encoding#8131

Merged
leandrodamascena merged 1 commit intoaws-powertools:developfrom
JustinBerger:develop
Apr 8, 2026
Merged

fix(event_handler): read swagger files with UTF-8 encoding#8131
leandrodamascena merged 1 commit intoaws-powertools:developfrom
JustinBerger:develop

Conversation

@JustinBerger
Copy link
Copy Markdown
Contributor

Issue number: closes #8129

Summary

Changes

  • When reading the swagger_ui js and css files, they are opened with UTF-8 encoding.

User experience

  • The js and css files will be loaded as UTF-8 regardless of the default encoding set on the runtime environment. Other than fixing the bug, I would not expect this to have an impact on user experience.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@JustinBerger JustinBerger requested a review from a team as a code owner April 8, 2026 14:56
@boring-cyborg
Copy link
Copy Markdown

boring-cyborg bot commented Apr 8, 2026

Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.
In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link

@powertools-for-aws-oss-automation powertools-for-aws-oss-automation bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 8, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 8, 2026

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.64%. Comparing base (12aeb50) to head (82eff76).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #8131   +/-   ##
========================================
  Coverage    96.64%   96.64%           
========================================
  Files          284      284           
  Lines        14079    14079           
  Branches      1153     1153           
========================================
  Hits         13606    13606           
  Misses         344      344           
  Partials       129      129           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@leandrodamascena leandrodamascena left a comment

Choose a reason for hiding this comment

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

Hey @JustinBerger thanks a lot for sending this PR and contributing to Powertools!

APPROVED!

@leandrodamascena leandrodamascena merged commit f1d07ab into aws-powertools:develop Apr 8, 2026
18 checks passed
@boring-cyborg
Copy link
Copy Markdown

boring-cyborg bot commented Apr 8, 2026

Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience!

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

Labels

event_handlers size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: API Gateway Swagger UI files are loaded using the default system encoding instead of UTF-8

2 participants