🔥 Cleanup: Remove unused templates and simplify signatures#178
Open
MadsBogeskov wants to merge 1 commit intoios-434-convert-apirequest-generator-to-stencil-templatefrom
Conversation
…Swift() signature [IOS-435](https://linear.app/lunar/issue/IOS-435) Amp-Thread-ID: https://ampcode.com/threads/T-019ce7c8-1f05-731c-b8f7-97566a458110 Co-authored-by: Amp <amp@ampcode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After completing the Stencil template migration (IOS-427 through IOS-434), some unused artifacts and dead code remain in the codebase.
Solution
DummyTest.stenciltemplate (not referenced anywhere)swaggerFileandaccessControlparameters fromGlobalHeadersModel.toSwift()— these were leftover from before the Stencil migration and are not used in the method bodyimport SwaggerSwiftMLfromGlobalHeadersModel.swiftNote: The
Static Files/directory was already removed in PR #170. Helpers likeindentLines(),addNewlinesIfNonEmpty(), anddocumentationFormat()are still actively used for building pre-rendered body strings passed to Stencil templates, so they are intentionally kept.Testing
All 70 tests pass, including golden file tests (byte-for-byte identical output).
Stack
#169 → #170 → #171 → #172 → #173 → #174 → #175 → #176 → #177 → this PR
IOS-435
Note
Low Risk
Low risk cleanup that only removes unused template code and drops unused parameters/imports in
GlobalHeadersModel.toSwift(), with minimal behavioral impact aside from a signature change.Overview
Removes dead Stencil scaffolding by deleting the unused
DummyTest.stenciltemplate.Simplifies
GlobalHeadersModel.toSwift()by dropping unusedswaggerFile/accessControlparameters and removing an unusedSwaggerSwiftMLimport, updatingGeneratorto call the new signature when emittingGlobalHeaders.swift.Written by Cursor Bugbot for commit a2d0ade. This will update automatically on new commits. Configure here.