Skip to content

Commit 665e044

Browse files
authored
Fixed swift-syntax dependency (#77)
1 parent 1db99b3 commit 665e044

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ let package = Package(
2929
],
3030
dependencies: [
3131
.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.0.0"),
32-
.package(url: "https://github.com/swiftlang/swift-syntax", "509.0.0"..<"601.0.0"),
32+
.package(url: "https://github.com/swiftlang/swift-syntax", from: "600.0.1"),
3333
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.17.6"),
3434
],
3535
targets: [

Sources/JSONSchemaMacro/Schemable/SchemaGenerator.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import SwiftSyntax
22
import SwiftSyntaxBuilder
33

44
struct EnumSchemaGenerator {
5-
let declModifer: DeclModifierSyntax?
5+
let declModifier: DeclModifierSyntax?
66
let name: TokenSyntax
77
let members: MemberBlockItemListSyntax
88
let attributes: AttributeListSyntax
99

1010
init(fromEnum enumDecl: EnumDeclSyntax) {
11-
declModifer = enumDecl.modifiers.first
11+
declModifier = enumDecl.modifiers.first
1212
name = enumDecl.name.trimmed
1313
members = enumDecl.memberBlock.members
1414
attributes = enumDecl.attributes
@@ -46,7 +46,7 @@ struct EnumSchemaGenerator {
4646
}
4747

4848
let variableDecl: DeclSyntax = """
49-
\(declModifer)static var schema: some JSONSchemaComponent<\(name)> {
49+
\(declModifier)static var schema: some JSONSchemaComponent<\(name)> {
5050
\(codeBlockItem)
5151
}
5252
"""
@@ -87,20 +87,20 @@ struct EnumSchemaGenerator {
8787
}
8888

8989
struct SchemaGenerator {
90-
let declModifer: DeclModifierSyntax?
90+
let declModifier: DeclModifierSyntax?
9191
let name: TokenSyntax
9292
let members: MemberBlockItemListSyntax
9393
let attributes: AttributeListSyntax
9494

9595
init(fromClass classDecl: ClassDeclSyntax) {
96-
declModifer = classDecl.modifiers.first
96+
declModifier = classDecl.modifiers.first
9797
name = classDecl.name.trimmed
9898
members = classDecl.memberBlock.members
9999
attributes = classDecl.attributes
100100
}
101101

102102
init(fromStruct structDecl: StructDeclSyntax) {
103-
declModifer = structDecl.modifiers.first
103+
declModifier = structDecl.modifiers.first
104104
name = structDecl.name.trimmed
105105
members = structDecl.memberBlock.members
106106
attributes = structDecl.attributes
@@ -131,7 +131,7 @@ struct SchemaGenerator {
131131
}
132132

133133
let variableDecl: DeclSyntax = """
134-
\(declModifer)static var schema: some JSONSchemaComponent<\(name)> {
134+
\(declModifier)static var schema: some JSONSchemaComponent<\(name)> {
135135
JSONSchema(\(name).init) { \(codeBlockItem) }
136136
}
137137
"""

0 commit comments

Comments
 (0)