Closed ojun9 closed 4 months ago
Thanks for reporting this, @ojun9! I think the fix here is what you suggested - only generate the frozen attribute when the access modifier is public or package. Would you consider opening a PR for that?
Thank you for the feedback! I’ll work on the fix over the weekend and open a PR to ensure the frozen attribute is only generated when the access modifier is public or package.
Looks like #587 is already fixing this issue
@czechboy0
Since there were no changes in the PR https://github.com/apple/swift-openapi-generator/pull/587, I created a new PR https://github.com/apple/swift-openapi-generator/pull/595. Please let me know if there are any issues!
Fixed and released in 1.3.0: https://github.com/apple/swift-openapi-generator/releases/tag/1.3.0
Description
Using Xcode 16 Beta 3, the generated
Type.swift
file now shows multiple warnings due to the@frozen
attribute being applied to non-public enums. TheType.swift
file is generated with non-public enums that include the@frozen
attribute. For example:This results in the following warning:
Reproduction
To reproduce the issue, it is necessary to generate the
Type.swift
file.openapi-generator-config.yaml
Package version(s)
1.2.1
Expected behavior
The
@frozen
attribute should not be applied to non-public enums to avoid unnecessary warnings.Environment
Additional information
This issue arises from a new warning introduced in Xcode 16 Beta 3.