mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-30 16:01:14 -04:00
feat(api): create endpoints for exams (#51062)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
70
api-server/src/server/models/exam.json
Normal file
70
api-server/src/server/models/exam.json
Normal file
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"name": "Exam",
|
||||
"description": "Exam questions for exam style challenges",
|
||||
"base": "PersistedModel",
|
||||
"idInjection": true,
|
||||
"options": {
|
||||
"strict": true
|
||||
},
|
||||
"properties": {
|
||||
"numberOfQuestionsInExam": {
|
||||
"type": "number",
|
||||
"required": true
|
||||
},
|
||||
"passingPercent": {
|
||||
"type": "number",
|
||||
"required": true
|
||||
},
|
||||
"prerequisites": {
|
||||
"type": [
|
||||
{
|
||||
"id": "string",
|
||||
"title": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"questions": {
|
||||
"type": [
|
||||
{
|
||||
"id": "string",
|
||||
"question": "string",
|
||||
"wrongAnswers": {
|
||||
"type": [
|
||||
{
|
||||
"id": "string",
|
||||
"answer": "string"
|
||||
}
|
||||
],
|
||||
"required": true
|
||||
},
|
||||
"correctAnswers": {
|
||||
"type": [
|
||||
{
|
||||
"id": "string",
|
||||
"answer": "string"
|
||||
}
|
||||
],
|
||||
"required": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"required": true,
|
||||
"itemType": "Question"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
"validations": [],
|
||||
"relations": {},
|
||||
"acls": [
|
||||
{
|
||||
"accessType": "*",
|
||||
"principalType": "ROLE",
|
||||
"principalId": "$everyone",
|
||||
"permission": "DENY"
|
||||
}
|
||||
],
|
||||
"methods": {}
|
||||
}
|
||||
Reference in New Issue
Block a user