Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Cleanup comments
Browse files Browse the repository at this point in the history
  • Loading branch information
syoung-smallwisdom committed Mar 15, 2023
1 parent 59ad2fa commit 7373c52
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 22 deletions.
4 changes: 2 additions & 2 deletions Sources/ResultModel/ResultDataSerializer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ public final class ResultDataSerializer : GenericPolymorphicSerializer<ResultDat
/// Insert the given example into the example array, replacing any existing example with the
/// same `typeName` as one of the new example.
public func add(_ example: SerializableResultData) {
try? add(example as ResultData)
try! add(example as ResultData)
}

/// Insert the given examples into the example array, replacing any existing examples with the
/// same `typeName` as one of the new examples.
public func add(contentsOf newExamples: [SerializableResultData]) {
try? add(contentsOf: newExamples as [ResultData])
try! add(contentsOf: newExamples as [ResultData])
}

private enum InterfaceKeys : String, OrderedEnumCodingKey, OpenOrderedCodingKey {
Expand Down
19 changes: 0 additions & 19 deletions Tests/JsonModelTests/GooProcotolExampleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,25 +91,6 @@ public struct MooObject : Codable, PolymorphicTyped, GooProtocol {
}
}

/// This object must be wrapped to allow serialization at the root.
///
/// - Example:
/// ```
/// let factory = GooFactory()
/// let decoder = factory.createJSONDecoder()
/// let encoder = factory.createJSONEncoder()
///
/// let json = """
/// {
/// "type" : "ragu",
/// "value" : 7,
/// "goo" : { "type" : "foo", "value" : 2 }
/// }
/// """.data(using: .utf8)!
///
/// let decodedObject = try decoder.decode(PolymorphicValue<GooProtocol>.self, from: json)
/// let encodedData = try encoder.encode(decodedObject)
/// ```
public struct RaguObject : Codable, PolymorphicStaticTyped, GooProtocol {
public static let typeName: String = "ragu"

Expand Down
1 change: 0 additions & 1 deletion Tests/JsonModelTests/PolymorphicSerializerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ struct SampleWrapper : Codable {
}

class SampleSerializer : GenericPolymorphicSerializer<Sample>, DocumentableInterface {
//AbstractPolymorphicSerializer, PolymorphicSerializer {
var jsonSchema: URL {
URL(string: "Sample.json", relativeTo: kSageJsonSchemaBaseURL)!
}
Expand Down

0 comments on commit 7373c52

Please sign in to comment.