Skip to content

Commit 3da75b8

Browse files
Apply suggestions from code review
Co-authored-by: Si Beaumont <[email protected]>
1 parent 21e5f05 commit 3da75b8

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

Sources/_OpenAPIGeneratorCore/Config.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,11 @@ public enum NamingStrategy: String, Sendable, Codable, Equatable {
1717

1818
/// A defensive strategy that can handle any OpenAPI identifier and produce a non-conflicting Swift identifier.
1919
///
20-
/// This strategy is the default in Swift OpenAPI Generator 1.x.
21-
///
2220
/// Introduced in [SOAR-0001](https://swiftpackageindex.com/apple/swift-openapi-generator/documentation/swift-openapi-generator/soar-0001).
2321
case defensive
2422

2523
/// An idiomatic strategy that produces Swift identifiers that more likely conform to Swift conventions.
2624
///
27-
/// Opt-in since Swift OpenAPI Generator 1.6.0.
28-
///
2925
/// Introduced in [SOAR-0013](https://swiftpackageindex.com/apple/swift-openapi-generator/documentation/swift-openapi-generator/soar-0013).
3026
case idiomatic
3127
}

Sources/swift-openapi-generator/Documentation.docc/Articles/Configuring-the-generator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ The configuration file has the following keys:
4040
- `tags`: Operations tagged with these tags will be included in the filter.
4141
- `paths`: Operations for these paths will be included in the filter.
4242
- `schemas`: These (additional) schemas will be included in the filter.
43-
- `namingStrategy` (optional): a string. Customizes the strategy of converting OpenAPI identifiers into Swift identifiers.
43+
- `namingStrategy` (optional): a string. The strategy of converting OpenAPI identifiers into Swift identifiers.
4444
- `defensive` (default): Produces non-conflicting Swift identifiers for any OpenAPI identifiers. Check out [SOAR-0001](https://swiftpackageindex.com/apple/swift-openapi-generator/documentation/swift-openapi-generator/soar-0001) for details.
45-
- `idiomatic`: Produces more idiomatic Swift identifiers for OpenAPI identifiers, might produce name conflicts (in that case, switch back to `defensive`.) Check out [SOAR-0013](https://swiftpackageindex.com/apple/swift-openapi-generator/documentation/swift-openapi-generator/soar-0013) for details.
45+
- `idiomatic`: Produces more idiomatic Swift identifiers for OpenAPI identifiers. Might produce name conflicts (in that case, switch back to `defensive`). Check out [SOAR-0013](https://swiftpackageindex.com/apple/swift-openapi-generator/documentation/swift-openapi-generator/soar-0013) for details.
4646
- `nameOverrides` (optional): a string to string dictionary. Allows customizing how individual OpenAPI identifiers get converted to Swift identifiers.
4747
- `featureFlags` (optional): array of strings. Each string must be a valid feature flag to enable. For a list of currently supported feature flags, check out [FeatureFlags.swift](https://github.com/apple/swift-openapi-generator/blob/main/Sources/_OpenAPIGeneratorCore/FeatureFlags.swift).
4848

0 commit comments

Comments
 (0)