From 5286f72f056578d4bad5f735bd391c92bebc06f9 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Sun, 7 May 2023 20:01:05 +0000 Subject: [PATCH] [Bugifx] Lossy codable list documentation (#20) This PR contains the work done to amend some documentation in the `LossyCodableList` struct. Co-authored-by: Javier Cicchelli Reviewed-on: https://repo.rock-n-code.com/rock-n-code/swift-libs/pulls/20 --- Sources/Core/Property Wrappers/LossyCodableList.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sources/Core/Property Wrappers/LossyCodableList.swift b/Sources/Core/Property Wrappers/LossyCodableList.swift index f052718..76d6bff 100644 --- a/Sources/Core/Property Wrappers/LossyCodableList.swift +++ b/Sources/Core/Property Wrappers/LossyCodableList.swift @@ -10,8 +10,10 @@ // //===----------------------------------------------------------------------===// +/// This struct (that could also be used as a property wrapper as well) provides a generic type that acts as a thin wrapper around an array of `Elements` instances to allow a lossy decoding and or encoding process. +/// +/// This implementation is heavily influenced by this [article](https://www.swiftbysundell.com/articles/ignoring-invalid-json-elements-codable/). @propertyWrapper -/// This property wrapper provides a generic type that acts as a thin wrapper around an array of `Elements` instances to allow a lossy decoding and or encoding process. public struct LossyCodableList { // MARK: Properties @@ -26,7 +28,7 @@ public struct LossyCodableList { // MARK: Initialisers - /// Initialises this property wrapper. + /// Initialises this struct. public init() { self.elements = [] }