Skip to content

Commit 63c8268

Browse files
committed
Include attribute name in CodableType protocols
Updates the CodableType construction to include the node's attribute name alongside existing protocols. This ensures that the attribute is considered when generating codable types.
1 parent 407f2f3 commit 63c8268

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sources/CodableKitMacros/CodeGenCore.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ extension CodeGenCore {
224224
return
225225
}
226226

227-
let codableType = CodableType.from(protocols)
227+
let codableType = CodableType.from(protocols + [node.attributeName])
228228
codableTypes[id] = codableType
229229

230230
try validateDeclaration(for: declaration, in: context)

0 commit comments

Comments
 (0)