Commit 6a754cca authored by Rosana Aurélio's avatar Rosana Aurélio

[API] Correções nos schemas e API.

parent d0124af2
......@@ -68,30 +68,6 @@ paths:
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloCompetifier'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamCompetifier'
post:
tags:
- admin
summary: Creates a new Competifier for the competition
description: Creates a new Competifier for the competition.
requestBody:
content:
application/json:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloCompetifier'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamCompetifier'
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloCompetifier'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamCompetifier'
/exams:
get:
tags:
......@@ -145,11 +121,9 @@ paths:
description: Updates the specified Exam.
requestBody:
content:
application/json-patch+json:
application/json:
schema:
type: array
items:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/JsonPatch'
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/Exam'
required: true
responses:
'200':
......@@ -276,7 +250,8 @@ paths:
schema:
type: array
items:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/Question'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/ObjectiveQuestion'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SubjectiveQuestion'
required: true
responses:
'200':
......@@ -285,6 +260,14 @@ paths:
application/json:
schema:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/Question'
delete:
tags:
- exams
summary: Delete a question group of a exam
description: Delete a question group of a exam.
responses:
'200':
description: 'Successfully deleted'
parameters:
- name: examId
in: path
......@@ -300,14 +283,6 @@ paths:
schema:
format: int32
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}/questions/{questionId}/answer:
patch:
tags:
......@@ -320,7 +295,8 @@ paths:
schema:
type: array
items:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/Question'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/ObjectiveQuestion'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SubjectiveQuestion'
required: true
responses:
'200':
......@@ -330,7 +306,8 @@ paths:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/Question'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/ObjectiveQuestion'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SubjectiveQuestion'
/exams/{examId}/groups:
get:
tags:
......
......@@ -172,7 +172,7 @@ PhaseEvent:
PhaseParticipation:
properties:
competifier:
$ref: '#/Competifier'
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Competifier.yaml/#/Competifier'
phase:
$ref: '#/Phase'
status:
......
......@@ -28,7 +28,7 @@ AssessmentSubmission:
type: number
description: Last time this submission was modified
assignment:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.yaml/#Assignment'
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.yaml/#/Assignment'
type:
type: string
enum:
......@@ -47,7 +47,7 @@ AssessmentSubmissionEvaluation:
type: number
format: float
submission:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.yaml/#AssessmentSubmission'
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.yaml/#/AssessmentSubmission'
grades:
type: array
items:
......@@ -155,9 +155,9 @@ SubmissionSection:
answers:
type: array
items:
$ref: '#/answers'
$ref: '#/answer'
template:
$ref: '#/FormTemplate'
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/FormTemplate'
discriminator:
propertyName: type
mapping:
......@@ -181,7 +181,7 @@ TeamSubmission:
TeamSubmissionSection:
allOf:
- type: object
- $ref: '#SubmissionSection'
- $ref: '#/SubmissionSection'
ParticipantSubmissionSection:
allOf:
type: object
......
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