Skip to content

♻️ Convert ArrayModel generator to Stencil template#183

Open
MadsBogeskov wants to merge 1 commit intoios-432-convert-model-generator-to-stencil-template-v2from
ios-433-convert-arraymodel-generator-to-stencil-template-v2
Open

♻️ Convert ArrayModel generator to Stencil template#183
MadsBogeskov wants to merge 1 commit intoios-432-convert-model-generator-to-stencil-template-v2from
ios-433-convert-arraymodel-generator-to-stencil-template-v2

Conversation

@MadsBogeskov
Copy link
Contributor

@MadsBogeskov MadsBogeskov commented Mar 16, 2026

Problem

ArrayModel.toSwift() uses inline string interpolation for the file wrapper.

Solution

Extract file wrapper to ArrayModel.stencil, keep complex body logic in Swift.

Testing

All 70 tests pass including golden file tests.

Stack

#169#179#180#181#182 → this PR → …

IOS-433


Note

Low Risk
Low risk refactor that moves ArrayModel Swift output generation from inline string building to a Stencil template; behavior should remain the same aside from potential formatting/template rendering differences.

Overview
Refactors ArrayModel.toSwift() to stop manually assembling Swift source strings and instead render output via a new ArrayModel.stencil template using a context dictionary.

Updates ModelDefinition to pass the shared templateRenderer into the array model path, aligning array generation with the existing template-based approach used by other model types.

Written by Cursor Bugbot for commit b0313d8. This will update automatically on new commits. Configure here.

@MadsBogeskov MadsBogeskov force-pushed the ios-432-convert-model-generator-to-stencil-template-v2 branch from ef50499 to 4c4d9d2 Compare March 16, 2026 11:23
@MadsBogeskov MadsBogeskov force-pushed the ios-433-convert-arraymodel-generator-to-stencil-template-v2 branch from 878e823 to 6957630 Compare March 16, 2026 11:23
@MadsBogeskov MadsBogeskov force-pushed the ios-432-convert-model-generator-to-stencil-template-v2 branch from 4c4d9d2 to 21994cf Compare March 16, 2026 11:40
@MadsBogeskov MadsBogeskov force-pushed the ios-433-convert-arraymodel-generator-to-stencil-template-v2 branch from 6957630 to b0313d8 Compare March 16, 2026 11:40
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