Add more robust Codable configuration APIs#318
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #318 +/- ##
==========================================
+ Coverage 94.72% 95.48% +0.76%
==========================================
Files 35 39 +4
Lines 2879 3303 +424
==========================================
+ Hits 2727 3154 +427
+ Misses 152 149 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
67354b8 to
decccce
Compare
be7502b to
d3bdac3
Compare
4a35082 to
b0e3e07
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 221fb6270e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if isUpper(b) { | ||
| out.append(Character(UnicodeScalar(b + 32))) | ||
| } else { | ||
| out.append(Character(UnicodeScalar(b))) | ||
| } |
There was a problem hiding this comment.
Preserve non-ASCII key characters during snake-case conversion
This conversion operates on raw UTF-8 bytes and turns each byte into a UnicodeScalar, which corrupts any non-ASCII key name (e.g., "café" becomes "café" and multi‑byte characters split into Latin‑1 bytes). That means .convertToSnakeCase will change keys even when no case conversion is needed, breaking decoding/encoding for payloads with non‑ASCII field names. Consider iterating over String.unicodeScalars or Characters (or only applying the ASCII case/underscore logic while appending untouched scalar segments) so non‑ASCII characters are preserved.
Useful? React with 👍 / 👎.
No description provided.