-
Notifications
You must be signed in to change notification settings - Fork 1
Document Contract
Paul Scarrone edited this page Jan 29, 2016
·
3 revisions
I am just thinking this through I want to expose Comments and Responses linked to a user pre-prepared so the application can display them but I don't want to see too much duplication in the payload. Also I could expand these at runtime but I want to keep the front end as naive as possible.
"user": {
"name": "",
"responses": [{
"body": "",
"prompt": {},
"comments": [{
"user": {},
"body": ""
}]
}],
"comments": [{
"response": {
// Might be some duplication here
},
"body": ""
}]
},
"sampledPrompt":{
"id": "",
"title": "",
"body": "",
"responses": [{
"id": "",
"body": "",
"comments": [{
"user": {},
"body": ""
}]
}]
}