Skip to content

Commit 510b7e4

Browse files
committed
Formatting, use the centralized default for naming strategy in more places
1 parent 5be3f9f commit 510b7e4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Sources/swift-openapi-generator/GenerateOptions.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ struct _GenerateOptions: ParsableArguments {
2828
"The Swift files to generate. Options: \(GeneratorMode.prettyListing). Note that '\(GeneratorMode.client.rawValue)' and '\(GeneratorMode.server.rawValue)' depend on declarations in '\(GeneratorMode.types.rawValue)'."
2929
) var mode: [GeneratorMode] = []
3030

31-
@Option(help: "The access modifier to use for the API of generated code. Default: \(Config.defaultAccessModifier.rawValue)")
32-
var accessModifier: AccessModifier?
31+
@Option(
32+
help:
33+
"The access modifier to use for the API of generated code. Default: \(Config.defaultAccessModifier.rawValue)"
34+
) var accessModifier: AccessModifier?
3335

3436
@Option(
3537
help:
@@ -84,7 +86,7 @@ extension _GenerateOptions {
8486
/// - Returns: The naming strategy requestd by the user.
8587
func resolvedNamingStrategy(_ config: _UserConfig?) -> NamingStrategy {
8688
if let namingStrategy { return namingStrategy }
87-
return config?.namingStrategy ?? .defensive
89+
return config?.namingStrategy ?? Config.defaultNamingStrategy
8890
}
8991

9092
/// Returns the name overrides requested by the user.

0 commit comments

Comments
 (0)