From 1d415bdc485c8f257b0615eb7ab8ea014c72dbbe Mon Sep 17 00:00:00 2001 From: Shannon Young Date: Wed, 15 Mar 2023 16:48:05 -0700 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Erin-Mounts --- Sources/JsonModel/PolymorphicSerializer.swift | 2 +- Sources/JsonModel/PolymorphicWrapper.swift | 2 +- Tests/JsonModelTests/PolymorphicSerializerTests.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/JsonModel/PolymorphicSerializer.swift b/Sources/JsonModel/PolymorphicSerializer.swift index 6013923..f1bd052 100644 --- a/Sources/JsonModel/PolymorphicSerializer.swift +++ b/Sources/JsonModel/PolymorphicSerializer.swift @@ -29,7 +29,7 @@ public protocol PolymorphicRepresentable : PolymorphicTyped, Decodable { /// serialization protocols defined in Swift 2.0 where an object could conform to either the /// `Encodable` protocol or the `Decodable` protocol without conforming to the `Codable` /// protocol. Additionally, these older objects often had serialization strategies that -/// conflicted with either encoding or decoding. To work-around this, we introduced the +/// conflicted with either encoding or decoding. To work around this, we introduced the /// `PolymorphicRepresentable` protocol which **only** required adherence to the `Decodable` /// protocol and not to the `Encodable` protocol. This allowed developers who only needed /// to decode their objects, to use the ``SerializationFactory`` to handle polymorphic diff --git a/Sources/JsonModel/PolymorphicWrapper.swift b/Sources/JsonModel/PolymorphicWrapper.swift index 85710f3..e52d604 100644 --- a/Sources/JsonModel/PolymorphicWrapper.swift +++ b/Sources/JsonModel/PolymorphicWrapper.swift @@ -12,7 +12,7 @@ import Foundation /// limitations, it is **highly recommended** that you thoroughly unit test your implementations /// for the expected encoding and decoding of polymorphic objects. /// -/// The simpliest example is a non-null, read/write, required value without a default such as: +/// The simplest example is a non-null, read/write, required value without a default such as: /// /// ``` /// struct SampleTest : Codable { diff --git a/Tests/JsonModelTests/PolymorphicSerializerTests.swift b/Tests/JsonModelTests/PolymorphicSerializerTests.swift index 496ffe5..5947655 100644 --- a/Tests/JsonModelTests/PolymorphicSerializerTests.swift +++ b/Tests/JsonModelTests/PolymorphicSerializerTests.swift @@ -61,7 +61,7 @@ final class PolymorphicSerializerTests: XCTestCase { XCTAssertEqual("a", typeName) } else { - XCTFail("Encoding does not include 'valtypeue' keyword. \(dictionary)") + XCTFail("Encoding does not include 'type' keyword. \(dictionary)") } }