Commit 6b882ec5 authored by Gabriel Macena's avatar Gabriel Macena

[API] Refatora rotas de Assessments

parent 7d5ea61c
...@@ -33,6 +33,8 @@ tags: ...@@ -33,6 +33,8 @@ tags:
description: 'Subscription operations' description: 'Subscription operations'
- name: phases - name: phases
description: 'Phase operations' description: 'Phase operations'
- name: assessments
description: 'Assessment operations'
- name: exams - name: exams
description: 'Exam operations' description: 'Exam operations'
paths: paths:
...@@ -827,20 +829,6 @@ paths: ...@@ -827,20 +829,6 @@ paths:
application/json: application/json:
schema: schema:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/Ranking' $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/Ranking'
'/phases/{phaseId}/participations':
get:
tags:
- phases
summary: Retrieves all Participations for the Phase
responses:
'200':
description: ''
content:
application/json:
schema:
type: array
items:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/PhaseParticipation'
parameters: parameters:
- name: phaseId - name: phaseId
in: path in: path
...@@ -894,10 +882,10 @@ paths: ...@@ -894,10 +882,10 @@ paths:
schema: schema:
format: int32 format: int32
type: integer type: integer
'/phases/{phaseId}/assessments/{assessmentId}': '/assessments/{assessmentId}':
get: get:
tags: tags:
- phases - assessments
summary: Retrieves the specific assessment summary: Retrieves the specific assessment
responses: responses:
'200': '200':
...@@ -909,45 +897,17 @@ paths: ...@@ -909,45 +897,17 @@ paths:
oneOf: oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessment' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessment'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessment' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessment'
patch:
tags:
- phases
summary: Updates the specific assessment
requestBody:
content:
application/json-patch+json:
schema:
type: array
items:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/JsonPatch'
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/#/HandmadeAssessment'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessment'
parameters: parameters:
- name: phaseId
in: path
required: true
schema:
format: int32
type: integer
- name: assessmentId - name: assessmentId
in: path in: path
required: true required: true
schema: schema:
format: int32 format: int32
type: integer type: integer
'/phases/{phaseId}/assessments/{assessmentId}/submissions': '/assessments/{assessmentId}/submissions':
get: get:
tags: tags:
- phases - assessments
summary: Retrieves all submissions summary: Retrieves all submissions
responses: responses:
'200': '200':
...@@ -955,50 +915,22 @@ paths: ...@@ -955,50 +915,22 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object type: array
oneOf: items:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessmentSubmission' oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessmentSubmission' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessmentSubmission'
post: - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessmentSubmission'
tags:
- phases
summary: Creates a new submission
requestBody:
content:
application/json-patch+json:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessmentSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessmentSubmission'
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/#/HandmadeAssessmentSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessmentSubmission'
parameters: parameters:
- name: phaseId
in: path
required: true
schema:
format: int32
type: integer
- name: assessmentId - name: assessmentId
in: path in: path
required: true required: true
schema: schema:
format: int32 format: int32
type: integer type: integer
'/phases/{phaseId}/assessments/{assessmentId}/submissions/{submissionId}': '/assessments/{assessmentId}/submissions/{submissionId}':
get: get:
tags: tags:
- phases - assessments
summary: Retrieves the specific submission summary: Retrieves the specific submission
responses: responses:
'200': '200':
...@@ -1011,12 +943,6 @@ paths: ...@@ -1011,12 +943,6 @@ paths:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessmentSubmission' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessmentSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessmentSubmission' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessmentSubmission'
parameters: parameters:
- name: phaseId
in: path
required: true
schema:
format: int32
type: integer
- name: assessmentId - name: assessmentId
in: path in: path
required: true required: true
......
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