diff options
Diffstat (limited to 'SCHEMA.md')
-rw-r--r-- | SCHEMA.md | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -169,10 +169,25 @@ Textareas require no additional configuration. | `_id`/`id` | MongoDB ObjectID | Random identifier used for the response | | `user` | Optional [user details object](#user-details-object) | An object describing the user that submitted if the form is not anonymous | | `antispam` | Optional [anti spam object](#anti-spam-object) | An object containing information about the anti-spam on the form submission | -| `response` | Object | Object containing question IDs mapping to the users answer | +| `response` | Object | Object containing question IDs mapping to the users answer* | | `form_id` | String | ID of the form that the user is submitting to | | `timestamp` | String | ISO formatted string of submission time. | + + * If the question is of type `code`, the response has the following structure: +```json +"response": { + "<QUESTION ID>": { + "value": "<USER CODE>", + "passed": bool, + "failures": ["<TEST NAME 1>", "<TEST NAME 4>", "<HIDDEN TEST 1>", ...] + }, + ... +} +``` +* Values in `<>` are placeholders, while the rest are actual keys +* `passed` is True only if all tests in the suite passed. + ### User details object The user details contains the information returned by Discord alongside an `admin` boolean key representing that the user has admin privileges. The information returned from Discord can be found in the [Discord Developer portal](https://discord.com/developers/docs/resources/user#user-object). |