Skip to content

Conversation

@abnegate
Copy link
Member

@abnegate abnegate commented Nov 14, 2025

What does this PR do?

(Provide a description of what this PR does.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

Summary by CodeRabbit

Release Notes

  • New Features
    • JSONCodable is now directly exported from Swift client modules, providing easier access to encoding and decoding functionality through the client interface.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 14, 2025

Walkthrough

Added @_exported import JSONCodable statements to two Swift client template files: templates/apple/Sources/Client.swift.twig and templates/swift/Sources/Client.swift.twig. The change re-exports the JSONCodable module through the generated client module's public interface, expanding what consumers of the generated code can access without additional imports.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Homogeneous, repetitive changes applied consistently across two template files
  • Minimal scope: only adding import statements with no logic modifications
  • Verify that JSONCodable re-export is intentional and required for the generated API surface
  • Confirm no naming conflicts or circular dependencies introduced by the re-export

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Re-export JSONCodable module' is directly related to the main change: adding @_exported import JSONCodable to both Swift client templates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat-expose-anycodable

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 50fd27e and 7871aef.

📒 Files selected for processing (2)
  • templates/apple/Sources/Client.swift.twig (1 hunks)
  • templates/swift/Sources/Client.swift.twig (1 hunks)
🔇 Additional comments (2)
templates/apple/Sources/Client.swift.twig (1)

8-8: Consistent re-export with Swift template.

This change mirrors the re-export in the Swift template, ensuring consistent public API across both Apple and Swift client generations.

Please ensure the verification requested for templates/swift/Sources/Client.swift.twig (line 8) confirms JSONCodable is properly configured as a dependency and that the re-export serves the intended use case for both platforms.

templates/swift/Sources/Client.swift.twig (1)

8-8: JSONCodable dependency and re-export is intentional and appropriate.

Verification confirms all three concerns are satisfied:

  1. JSONCodable is a published Swift package available on GitHub and properly declared as a dependency in Package.swift.

  2. The @_exported import is a standard Swift attribute that enables a module to re-export another one, making the re-exported module accessible to all files that import the initial module. This feature is particularly useful when you want to expose an entire module's API through your own module. The re-export in Client.swift is an intentional pattern to allow SDK consumers access to JSONCodable's toJson() extension functionality used internally.

  3. No naming conflicts detected in the codebase—the re-export is used consistently across both swift and apple templates.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@abnegate abnegate merged commit 1f3686e into master Nov 14, 2025
52 checks passed
@abnegate abnegate deleted the feat-expose-anycodable branch November 14, 2025 05:56
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.

3 participants