mirror of
https://github.com/encounter/JSONAPI.git
synced 2026-03-30 11:18:38 -07:00
woops, abstract wrapper protocol landed in wrong module by accident
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user