Skip to content

Remove localizedDescription#173

Merged
czechboy0 merged 2 commits intoapple:mainfrom
madsodgaard:localized-description
Feb 25, 2026
Merged

Remove localizedDescription#173
czechboy0 merged 2 commits intoapple:mainfrom
madsodgaard:localized-description

Conversation

@madsodgaard
Copy link
Contributor

@madsodgaard madsodgaard commented Feb 25, 2026

Part of apple/swift-openapi-generator#868

Refactors error.localizedDescription to "\(error)" to prevent linking Foundation. This will change the error strings as can be seen in the tests. Alternatively, we would split the implementation by a trait FullFoundationSupport. Where that would use localizedDescription

@czechboy0 czechboy0 enabled auto-merge (squash) February 25, 2026 16:02
@czechboy0 czechboy0 added the 🔨 semver/patch No public API change. label Feb 25, 2026
@czechboy0 czechboy0 merged commit 7d9cb54 into apple:main Feb 25, 2026
48 of 49 checks passed
@ls-philippe-casgrain
Copy link

Thank you, I was just about to open a PR that does exactly this. My reason was different: when decoding JSON, the error's localized description is completely useless ("the data could not be found because it was missing"). Just replacing with error gives a detailed description of the parsing failure.

Looking forward to the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants