Skip to content

Commit

Permalink
PR feedback, use the word import
Browse files Browse the repository at this point in the history
  • Loading branch information
czechboy0 committed Sep 18, 2024
1 parent 30379cd commit 257f0b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import OpenAPIKit
enum Constants {

/// Constants related to the library dependencies.
enum Dependency {
enum Import {

/// The module name of the OpenAPI runtime library.
static let runtime: String = "OpenAPIRuntime"
Expand All @@ -35,7 +35,7 @@ enum Constants {

/// The descriptions of modules imported by every generated file.
static let imports: [ImportDescription] = [
ImportDescription(moduleName: Constants.Dependency.runtime, spi: "Generated"),
ImportDescription(moduleName: Constants.Import.runtime, spi: "Generated"),
ImportDescription(
moduleName: "Foundation",
moduleTypes: ["struct Foundation.URL", "struct Foundation.Data", "struct Foundation.Date"],
Expand All @@ -45,7 +45,7 @@ enum Constants {

/// The descriptions of modules imported by client and server files.
static let clientServerImports: [ImportDescription] =
imports + [ImportDescription(moduleName: Constants.Dependency.httpTypes)]
imports + [ImportDescription(moduleName: Constants.Import.httpTypes)]
}

/// Constants related to the OpenAPI server object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ extension TypeName {
/// OpenAPIRuntime module.
/// - Parameter name: The name of the type.
/// - Returns: A TypeName representing the specified type within the OpenAPIRuntime module.
static func runtime(_ name: String) -> TypeName { TypeName(swiftKeyPath: [Constants.Dependency.runtime, name]) }
static func runtime(_ name: String) -> TypeName { TypeName(swiftKeyPath: [Constants.Import.runtime, name]) }

/// Returns a type name for a type with the specified name in the
/// HTTPTypes module.
/// - Parameter name: The name of the type.
/// - Returns: A TypeName representing the type with the given name in the HTTPTypes module.
static func httpTypes(_ name: String) -> TypeName {
TypeName(swiftKeyPath: [Constants.Dependency.httpTypes, name])
TypeName(swiftKeyPath: [Constants.Import.httpTypes, name])
}

/// Returns the type name for the Date type.
Expand Down

0 comments on commit 257f0b7

Please sign in to comment.