Add todos for Entity Id and type. Add example usage of OpenAPI entity schema support in Playground

This commit is contained in:
Mathew Polzin
2019-01-20 16:10:31 -08:00
parent 531a7f35bd
commit 1ed34b00dc
5 changed files with 34 additions and 26 deletions
@@ -0,0 +1,16 @@
import Foundation
import JSONAPI
import JSONAPITesting // for the convenience of literal initialization
import JSONAPIOpenAPI
extension PersonDescription.Attributes: Sampleable {
public static var sample: PersonDescription.Attributes {
return .init(name: ["Abbie", "Eibba"], favoriteColor: "Blue")
}
}
extension PersonDescription.Relationships: Sampleable {
public static var sample: PersonDescription.Relationships {
return .init(friends: ["1", "2"], dogs: ["2"], home: "1")
}
}