Commit a50ba17d authored by Isaac Pereira's avatar Isaac Pereira

[API] Inclui endpoint DELETE p/ questão

- [x] corrigir PATCH em /exams/:examId/groups/:groupId do valor esperado na request de array de Group para somente um Group;
- [x] criar DELETE para /exams/:examId/questions/:questionId
- [x] alterar esquema da questão para apresentar `statement` não objetificado
parent 89338d7b
...@@ -298,6 +298,15 @@ paths: ...@@ -298,6 +298,15 @@ paths:
schema: schema:
format: int32 format: int32
type: integer type: integer
delete:
tags:
- exams
summary: Delete a question group of a exam
description: Delete a question group of a exam.
responses:
'200':
description: 'Successfully deleted'
/exams/{examId}/groups: /exams/{examId}/groups:
get: get:
tags: tags:
...@@ -366,8 +375,7 @@ paths: ...@@ -366,8 +375,7 @@ paths:
schema: schema:
type: array type: array
items: items:
oneOf: $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/QuestionGroup'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/QuestionGroup'
required: true required: true
responses: responses:
'200': '200':
...@@ -375,10 +383,7 @@ paths: ...@@ -375,10 +383,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: array $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/QuestionGroup'
items:
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/QuestionGroup'
delete: delete:
tags: tags:
- exams - exams
......
...@@ -36,7 +36,7 @@ Question: ...@@ -36,7 +36,7 @@ Question:
- SUBJECTIVE - SUBJECTIVE
- OBJECTIVE - OBJECTIVE
statement: statement:
$ref: '#/QuestionStatement' type: string
id: id:
description: object identifier of this Question description: object identifier of this Question
type: integer type: integer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment