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