File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -84,4 +84,6 @@ extension String {
84
84
let lastElementIndex = reversed ( ) . firstIndex ( where: { !$0. isWhitespace } ) !
85
85
return self [ firstElementIndex ..< lastElementIndex. base]
86
86
}
87
+
88
+ var lowercasedFirst : String { return prefix ( 1 ) . lowercased ( ) + dropFirst( ) }
87
89
}
Original file line number Diff line number Diff line change @@ -36,7 +36,11 @@ struct EnumerationChoiceViewModel {
36
36
let value : String
37
37
38
38
init ( from schema: ChoiceValue ) {
39
- self . name = schema. name
39
+ // Model4 passed in ChoiceValue name with first letter in Upper case despite the setting
40
+ // for ChoiceValue is set to `camelcase` in README.md
41
+ // Enum value starts with an Upper case will cause swiftlint error and swiftlint autocorrect will not fix this issue.
42
+ // As a workaround, we lower caes the first letter of ChoiceValue in the view model.
43
+ self . name = schema. name. lowercasedFirst
40
44
self . comment = ViewModelComment ( from: schema. description)
41
45
self . value = schema. value
42
46
}
Original file line number Diff line number Diff line change @@ -26,13 +26,6 @@ let package = Package(
26
26
dependencies: ["AzureCore"],
27
27
path: "Source"
28
28
),
29
- // TODO: Add test targets when test code is generated
30
- // Test targets
31
- //.testTarget(
32
- // name: "{{ model.name }}Tests",
33
- // dependencies: ["{{ model.name }}"],
34
- // sources: ["Tests"]
35
- //),
36
29
],
37
30
swiftLanguageVersions: [.v5]
38
31
)
You can’t perform that action at this time.
0 commit comments