Skip to content

Add more robust Codable configuration APIs#318

Merged
vsanthanam merged 20 commits intomainfrom
vsanthanam/more-codable-support
Jan 17, 2026
Merged

Add more robust Codable configuration APIs#318
vsanthanam merged 20 commits intomainfrom
vsanthanam/more-codable-support

Conversation

@vsanthanam
Copy link
Copy Markdown
Owner

No description provided.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 14, 2026

Codecov Report

❌ Patch coverage is 96.32495% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.48%. Comparing base (36d706e) to head (221fb62).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
Sources/JBirdCodableSupport/Decoder/Decoder.swift 97.22% 4 Missing ⚠️
...ces/JBirdCodableSupport/Decoder/ValueDecoder.swift 60.00% 4 Missing ⚠️
...es/JBirdCodableSupport/Encoder/ObjectEncoder.swift 92.00% 4 Missing ⚠️
...ces/JBirdCodableSupport/Encoder/ValueEncoder.swift 62.50% 3 Missing ⚠️
...CodableSupport/CodingKeys/CamelCaseCodingKey.swift 93.75% 2 Missing ⚠️
...CodableSupport/CodingKeys/SnakeCaseCodingKey.swift 97.77% 1 Missing ⚠️
...es/JBirdCodableSupport/Decoder/ObjectDecoder.swift 95.23% 1 Missing ⚠️
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     
Flag Coverage Δ
llvm-cov 95.48% <96.32%> (+0.76%) ⬆️
swiftpm 95.48% <96.32%> (+0.76%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@vsanthanam vsanthanam force-pushed the vsanthanam/more-codable-support branch 6 times, most recently from 67354b8 to decccce Compare January 15, 2026 22:12
@vsanthanam vsanthanam force-pushed the vsanthanam/more-codable-support branch from be7502b to d3bdac3 Compare January 17, 2026 01:42
@vsanthanam vsanthanam force-pushed the vsanthanam/more-codable-support branch from 4a35082 to b0e3e07 Compare January 17, 2026 16:25
@vsanthanam vsanthanam marked this pull request as ready for review January 17, 2026 17:18
@vsanthanam vsanthanam merged commit 0669165 into main Jan 17, 2026
47 checks passed
@vsanthanam vsanthanam deleted the vsanthanam/more-codable-support branch January 17, 2026 17:18
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +45 to +49
if isUpper(b) {
out.append(Character(UnicodeScalar(b + 32)))
} else {
out.append(Character(UnicodeScalar(b)))
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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.

1 participant