Answer
Schema
-
An answer:
-
must be an object
-
must have an id property
-
must have a questionId property
-
may have a tries property
-
may have a score property
-
may have a feedback property
-
may have a data property
-
may have a usedHints property
-
The id property:
- must be a string
-
The questionId property:
- must be a string
-
The tries property:
- must be a number
-
The score property:
- must be a number
-
The feedback property:
- must be a string
-
The usedHints property:
-
must be an array
-
Each item:
-
must be unique
-
must satisfy the hint schemas
-
-
-
The data property:
- must satisfy the answer-data schema
-
Examples
With tries
{
"id": "123",
"questionId": "1",
"tries": 2,
"type": "application/x.choice+json"
}
With score
{
"id": "123",
"questionId": "1",
"score": 0,
"type": "application/x.choice+json"
}
With feedback
{
"id": "123",
"questionId": "1",
"score": 1,
"feedback": "this really is a bad score dude !",
"type": "application/x.choice+json"
}
With used hints
{
"id": "123",
"questionId": "1",
"usedHints": [
{
"id": "1",
"value": "Lorem"
}
],
"type": "application/x.choice+json"
}
With data
{
"id": "123",
"questionId": "1",
"data": ["1", "2"],
"type": "application/x.choice+json"
}
Full
{
"id": "123",
"questionId": "1",
"score": 5,
"tries": 2,
"usedHints": [
{
"id": "1",
"value": "Lorem"
}
],
"data": ["1", "2"],
"type": "application/x.choice+json"
}