Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Si Beaumont <[email protected]>
  • Loading branch information
czechboy0 and simonjbeaumont authored Dec 16, 2024
1 parent 21e5f05 commit 3da75b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions Sources/_OpenAPIGeneratorCore/Config.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,11 @@ public enum NamingStrategy: String, Sendable, Codable, Equatable {

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

/// An idiomatic strategy that produces Swift identifiers that more likely conform to Swift conventions.
///
/// Opt-in since Swift OpenAPI Generator 1.6.0.
///
/// Introduced in [SOAR-0013](https://swiftpackageindex.com/apple/swift-openapi-generator/documentation/swift-openapi-generator/soar-0013).
case idiomatic
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ The configuration file has the following keys:
- `tags`: Operations tagged with these tags will be included in the filter.
- `paths`: Operations for these paths will be included in the filter.
- `schemas`: These (additional) schemas will be included in the filter.
- `namingStrategy` (optional): a string. Customizes the strategy of converting OpenAPI identifiers into Swift identifiers.
- `namingStrategy` (optional): a string. The strategy of converting OpenAPI identifiers into Swift identifiers.
- `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.
- `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.
- `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.
- `nameOverrides` (optional): a string to string dictionary. Allows customizing how individual OpenAPI identifiers get converted to Swift identifiers.
- `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).

Expand Down

0 comments on commit 3da75b8

Please sign in to comment.