woops, abstract wrapper protocol landed in wrong module by accident

This commit is contained in:
Mathew Polzin
2019-11-15 17:05:45 -08:00
parent 1010489a02
commit a6b7d7a94a
3 changed files with 2 additions and 4 deletions
-2
View File
@@ -408,8 +408,6 @@ extension Document: Decodable, CodableJSONAPIDocument where PrimaryResourceBody:
throw DocumentDecodingError(error)
}
// TODO come back to this and make robust
guard let metaVal = meta else {
throw JSONAPICodingError.missingOrMalformedMetadata(path: decoder.codingPath)
}
@@ -158,7 +158,7 @@ struct SparseFieldKeyedEncodingContainer<Key, SparseKey>: KeyedEncodingContainer
forKey key: Key) -> KeyedEncodingContainer<NestedKey> where NestedKey : CodingKey {
guard shouldAllow(key: key) else {
return KeyedEncodingContainer(
// TODO: not needed by JSONAPI library, but for completeness could
// NOTE: not needed by JSONAPI library, but for completeness could
// add an EmptyObjectEncoder that can be returned here so that
// at least nothing gets encoded within the nested container
SparseFieldKeyedEncodingContainer<NestedKey, SparseKey>(wrapping: wrappedContainer.nestedContainer(keyedBy: keyType,
@@ -176,7 +176,7 @@ struct SparseFieldKeyedEncodingContainer<Key, SparseKey>: KeyedEncodingContainer
public mutating func nestedUnkeyedContainer(forKey key: Key) -> UnkeyedEncodingContainer {
guard shouldAllow(key: key) else {
// TODO: not needed by JSONAPI library, but for completeness could
// NOTE: not needed by JSONAPI library, but for completeness could
// add an EmptyObjectEncoder that can be returned here so that
// at least nothing gets encoded within the nested container
return wrappedContainer.nestedUnkeyedContainer(forKey: key)