You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notice that in the last example, since the OpenAPI name contains the pound (`#`) character, the idiomatic naming strategy falls back to the defensive naming strategy. In all the other cases, however, the resulting names are more idiomatic Swift identifiers.
@@ -96,6 +100,8 @@ The idiomatic naming strategy (check out the current code [here][impl], look for
96
100
- dashes (`-`, ASCII: `0x2d`)
97
101
- underscores (`_`, ASCII: `0x5f`)
98
102
- spaces (``, ASCII: `0x20`)
103
+
- slashes (`/`, ASCII: `0x2f`) _Added in v1.1_
104
+
- curly braces (`{` and `}`, ASCII: `0x7b` and `0x7d`) _Added in v1.1_
99
105
100
106
> Note: We let [`Swift.String.isLetter`](https://developer.apple.com/documentation/swift/character/isletter) decide whether a character is a letter, which has the advantage of including letters in the non-ASCII range. Swift identifiers also support a [wide range](https://docs.swift.org/swift-book/documentation/the-swift-programming-language/lexicalstructure/#Identifiers) of alphanumeric characters.
0 commit comments