Skip to content

Commit 340ee95

Browse files
authored
Update generator version in manual cli example (#802)
### Motivation This solves the missing import issue described in #755 ### Modifications Update the version of generator in`Makefile` Updated runtime versions to latest released version ### Result Solved the `is not available due to missing import of defining module 'Foundation'` issue ```text 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`.
1 parent bb9a135 commit 340ee95

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Examples/manual-generation-generator-cli-example/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# The following values can be changed here, or passed on the command line.
66
SWIFT_OPENAPI_GENERATOR_GIT_URL ?= https://github.com/apple/swift-openapi-generator
7-
SWIFT_OPENAPI_GENERATOR_GIT_TAG ?= 1.6.0
7+
SWIFT_OPENAPI_GENERATOR_GIT_TAG ?= 1.10.2
88
SWIFT_OPENAPI_GENERATOR_CLONE_DIR ?= $(CURRENT_MAKEFILE_DIR)/.swift-openapi-generator
99
SWIFT_OPENAPI_GENERATOR_BUILD_CONFIGURATION ?= debug
1010
OPENAPI_YAML_PATH ?= $(CURRENT_MAKEFILE_DIR)/openapi.yaml

Examples/manual-generation-generator-cli-example/Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ let package = Package(
1818
name: "manual-generation-generator-cli-example",
1919
platforms: [.macOS(.v10_15), .iOS(.v13), .tvOS(.v13), .watchOS(.v6), .visionOS(.v1)],
2020
dependencies: [
21-
.package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.7.0"),
22-
.package(url: "https://github.com/apple/swift-openapi-urlsession", from: "1.0.0"),
21+
.package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.8.2"),
22+
.package(url: "https://github.com/apple/swift-openapi-urlsession", from: "1.1.0"),
2323
],
2424
targets: [
2525
.executableTarget(

0 commit comments

Comments
 (0)