Open totalknowledge opened 8 years ago
So for example the following insert would auto create the appropriate schema.
{
"type":"books",
"attributes": {
"title":"Bob",
"publication_year":"1924"
},
"relationships": {
"author":{
"data": {
"attributes": {
"name":"Bob Smith",
},
"type":"authors"
}
}
}
}
{
"data": {
"id":"100",
"type":"schemas",
"schema":"auto",
"collection":"books"
"attributes":{
"title": {
"type":"any",
"required":"false"
},
"publication_year": {
"type":"any",
"required":"false"
}
},
"relationships": {
"author": {
"collection":"authors",
"relationship":"to-one",
"required":"false",
"data":{
"id":"101",
"type":"schemas"
"links": {
"self":"api/v0/authors/schema",
"collection":"api/v0/authors",
"relation":"api/v0/books/schema/author"
}
}
}
},
"links":: {
"self":"api/v0/schemas/100",
"relation":"api/v0/books/schema",
"collection":"api/v0/books",
}
}
Not implementing actual restrictions in the web services at this time, just the ability to auto create schemas and have schemas in general.