Skip to content

Conversation

at15
Copy link
Contributor

@at15 at15 commented Aug 4, 2025

Motivation

This solves the missing import issue described in #755

Modifications

Update the version of generator inMakefile
Updated runtime versions to latest released version

Result

Solved the is not available due to missing import of defining module 'Foundation' issue

 13 | //===----------------------------------------------------------------------===//
 14 | import OpenAPIKit
 15 |
    | `- note: add import of module 'Foundation'
 16 | /// Represents a server variable and the function of generation that should be applied.
 17 | protocol ServerVariableGenerator {
    :
166 |             self.key = key
167 |             swiftSafeKey = context.safeNameGenerator.swiftMemberName(for: key)
168 |             enumName = context.safeNameGenerator.swiftTypeName(for: key.localizedCapitalized)
    |                                                                         `- error: property 'localizedCapitalized' is not available due to missing import of defining module 'Foundation'
169 |             self.variable = variable
170 |             self.enumValues = enumValues
/Volumes/w/src/github.com/apple/swift-openapi-generator/Examples/manual-generation-generator-cli-example/.swift-openapi-generator/Sources/_OpenAPIGeneratorCore/Translator/TypesTranslator/translateServersVariables.swift:168:73: error: property 'localizedCapitalized' is not available due to missing import of defining module 'Foundation'
 13 | //===----------------------------------------------------------------------===//
 14 | import OpenAPIKit

Test Plan

Passed locally, make generate and swift run.

This solves the missing import issue described in apple#755
@at15 at15 mentioned this pull request Aug 4, 2025
@simonjbeaumont
Copy link
Collaborator

Thank you @at15 🙏

@simonjbeaumont simonjbeaumont enabled auto-merge (squash) August 4, 2025 06:15
@simonjbeaumont simonjbeaumont added the semver/none No version bump required. label Aug 4, 2025
@simonjbeaumont simonjbeaumont merged commit 340ee95 into apple:main Aug 4, 2025
45 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/none No version bump required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants