@@ -2,13 +2,13 @@ import SwiftSyntax
2
2
import SwiftSyntaxBuilder
3
3
4
4
struct EnumSchemaGenerator {
5
- let declModifer : DeclModifierSyntax ?
5
+ let declModifier : DeclModifierSyntax ?
6
6
let name : TokenSyntax
7
7
let members : MemberBlockItemListSyntax
8
8
let attributes : AttributeListSyntax
9
9
10
10
init ( fromEnum enumDecl: EnumDeclSyntax ) {
11
- declModifer = enumDecl. modifiers. first
11
+ declModifier = enumDecl. modifiers. first
12
12
name = enumDecl. name. trimmed
13
13
members = enumDecl. memberBlock. members
14
14
attributes = enumDecl. attributes
@@ -46,7 +46,7 @@ struct EnumSchemaGenerator {
46
46
}
47
47
48
48
let variableDecl : DeclSyntax = """
49
- \( declModifer ) static var schema: some JSONSchemaComponent< \( name) > {
49
+ \( declModifier ) static var schema: some JSONSchemaComponent< \( name) > {
50
50
\( codeBlockItem)
51
51
}
52
52
"""
@@ -87,20 +87,20 @@ struct EnumSchemaGenerator {
87
87
}
88
88
89
89
struct SchemaGenerator {
90
- let declModifer : DeclModifierSyntax ?
90
+ let declModifier : DeclModifierSyntax ?
91
91
let name : TokenSyntax
92
92
let members : MemberBlockItemListSyntax
93
93
let attributes : AttributeListSyntax
94
94
95
95
init ( fromClass classDecl: ClassDeclSyntax ) {
96
- declModifer = classDecl. modifiers. first
96
+ declModifier = classDecl. modifiers. first
97
97
name = classDecl. name. trimmed
98
98
members = classDecl. memberBlock. members
99
99
attributes = classDecl. attributes
100
100
}
101
101
102
102
init ( fromStruct structDecl: StructDeclSyntax ) {
103
- declModifer = structDecl. modifiers. first
103
+ declModifier = structDecl. modifiers. first
104
104
name = structDecl. name. trimmed
105
105
members = structDecl. memberBlock. members
106
106
attributes = structDecl. attributes
@@ -131,7 +131,7 @@ struct SchemaGenerator {
131
131
}
132
132
133
133
let variableDecl : DeclSyntax = """
134
- \( declModifer ) static var schema: some JSONSchemaComponent< \( name) > {
134
+ \( declModifier ) static var schema: some JSONSchemaComponent< \( name) > {
135
135
JSONSchema( \( name) .init) { \( codeBlockItem) }
136
136
}
137
137
"""
0 commit comments