mattpolzin / JSONAPI

Swift Codable JSON:API framework
MIT License
75 stars 19 forks source link

connect EncodableJSONAPIDocument and ResourceObjectType via PrimaryResourceBody #50

Closed mattpolzin closed 4 years ago

mattpolzin commented 4 years ago

Right now there is no way to constrain on EncodableJSONAPIDocument.PrimaryResourceBody such that you know anything about what the primary resource body looks like (specifically that it contains resources that conform to ResourceObjectType). PrimaryResourceBody is currently only required to be equatable and encodable.