Keep generated Hashable conformance only for public models#4163
Conversation
Regenerate models with the current generator, which now emits a Hashable conformance for each model. For the models we expose ourselves (AppSettings, UploadConfig), publicize_model now also makes the == and hash(into:) requirements public so the conformance is usable outside the module.
📝 WalkthroughWalkthroughModifies the OpenAPI generation script to introduce an allowlist controlling which generated model types retain Hashable conformance, publicize the generated ChangesOpenAPI Generator Script Updates
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Generated by 🚫 Danger |
Public Interface+ extension AppSettings: Hashable
+
+ public static func ==(lhs: AppSettings,rhs: AppSettings)-> Bool
+ public func hash(into hasher: inout Hasher)
+ extension UploadConfig: Hashable
+
+ public static func ==(lhs: UploadConfig,rhs: UploadConfig)-> Bool
+ public func hash(into hasher: inout Hasher)
|
SDK Size
|
SDK Performance
|
StreamChat XCSize
|
|



🔗 Issue Links
Related: CHA-3742
🎯 Goal
The OpenAPI generator now emits a
Hashableconformance for every model; keep it only for the publicly exposed models (AppSettings,UploadConfig) and strip it from the rest to avoid shipping unused API surface.📝 Summary
Hashableconformance forAppSettings/UploadConfigand add anallowed_hashable_modelsallow-list inopenapi_generate.shthat strips theHashableextension from all other generated models.☑️ Contributor Checklist
docs-contentrepoSummary by CodeRabbit