Commit da7a48c8 authored by Rosana Aurélio's avatar Rosana Aurélio

[API] Criação de arquivos parameters e responses no formato json.

Correções na api adm do competition.
parent 3fd5ef47
......@@ -38,6 +38,7 @@ tags:
- name: exams
description: 'Exam operations'
paths:
# Competition
/competition:
get:
......@@ -52,7 +53,7 @@ paths:
application/json:
schema:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/Competition'
# Competifiers
/competifiers:
get:
......@@ -70,8 +71,8 @@ paths:
items:
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/SoloCompetifier'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/TeamCompetifier'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/TeamCompetifier'
# Subscription
/subscription:
get:
......@@ -107,6 +108,7 @@ paths:
content:
application/json:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/SoloSubscription'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/TeamSubscription'
......@@ -130,9 +132,7 @@ paths:
content:
application/json:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/FormTemplate'
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/FormTemplate'
required: true
responses:
'200':
......@@ -161,9 +161,7 @@ paths:
content:
application/json:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/FormTemplate'
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/FormTemplate'
required: true
responses:
'200':
......@@ -172,6 +170,8 @@ paths:
application/json:
schema:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/FormTemplate'
# Submission
/subscription/submissions:
get:
tags:
......@@ -295,8 +295,8 @@ paths:
schema:
format: int32
type: integer
# Exams
# Exams
/exams:
get:
tags:
......@@ -352,9 +352,7 @@ paths:
content:
application/json:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/Exam'
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/Exam'
required: true
responses:
'200':
......@@ -391,7 +389,7 @@ paths:
description: Retrieves all Questions for the specified Exam.
responses:
'200':
description: ''
description: A JSON object containing exam information
content:
application/json:
schema:
......@@ -403,20 +401,20 @@ paths:
post:
tags:
- exams
summary: Creates a new Question for the specified Exam
description: Creates a new Question for the specified Exam.
summary: Creates a new question for the specified Exam
description: Creates a new question for the specified Exam.
requestBody:
description: A object JSON with exam information
required: true
content:
application/json:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/ObjectiveQuestion'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/SubjectiveQuestion'
required: true
responses:
'200':
description: ''
description: A JSON object containing the new exam information
content:
application/json:
schema:
......@@ -430,13 +428,13 @@ paths:
summary: Updates questions of a exam
description: Updates questions of a exam
requestBody:
required: true
content:
application/json:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/Question'
required: true
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/SubjectiveQuestion'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/ObjectiveQuestion'
responses:
'200':
description: ''
......@@ -445,7 +443,8 @@ paths:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/Question'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/SubjectiveQuestion'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/ObjectiveQuestion'
parameters:
- name: examId
in: path
......@@ -524,7 +523,6 @@ paths:
content:
application/json:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/ObjectiveQuestion'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/SubjectiveQuestion'
......@@ -576,16 +574,14 @@ paths:
summary: Create a question group for a exam
description: Create a question group for a exam
requestBody:
required: true
content:
application/json:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/QuestionGroup'
required: true
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/QuestionGroup'
responses:
'200':
description: ''
description: Return object JSON containing question group information.
content:
application/json:
schema:
......@@ -620,9 +616,7 @@ paths:
content:
application/json:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/QuestionGroup'
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/QuestionGroup'
required: true
responses:
'200':
......@@ -710,9 +704,7 @@ paths:
content:
application/json:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/Phase'
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/Phase'
required: true
responses:
'200':
......@@ -776,16 +768,15 @@ paths:
- phases
summary: Updates the evaluation formula for the specified phase
requestBody:
required: true
content:
application/json:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/EvaluationFormula'
required: true
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/EvaluationFormula'
responses:
'200':
description: ''
description: Return a object json containing forma data.
content:
application/json:
schema:
......@@ -965,9 +956,7 @@ paths:
content:
application/json:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/PhaseParticipation'
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/PhaseParticipation'
required: true
responses:
'200':
......@@ -998,9 +987,7 @@ paths:
content:
application/json:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/Phase'
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/Phase'
required: true
responses:
'200':
......@@ -1017,7 +1004,7 @@ paths:
schema:
format: int32
type: integer
# Assessments
/assessments/{assessmentId}/status:
patch:
......@@ -1028,9 +1015,7 @@ paths:
content:
application/json:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/Assessment'
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/Assessment'
required: true
responses:
'200':
......
{
"language": {
"name": "Accept-Language",
"in": "header",
"description": "preferred language",
"required": false,
"schema": {
"type": "string"
},
"style": "simple"
},
"competition_token": {
"name": "Competition-Token",
"in": "header",
"description": "The JWT Token that uniquely identifies this competition within the competify scope",
"required": true,
"schema": {
"type": "integer"
},
"style": "simple"
}
}
\ No newline at end of file
{
"NotFoundError": {
"description": "Resource Not Found",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"completeMessage": {
"type": "string"
}
}
}
}
}
},
"InternalServerError": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"completeMessage": {
"type": "string"
}
}
}
}
}
},
"UnprocessableEntityError": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"entities": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
\ No newline at end of file
......@@ -302,9 +302,7 @@
"$ref": "#/FormFieldAnswer"
}
},
"template": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.json#/FormTemplate"
}
"template": "integer"
},
"discriminator": {
"propertyName": "type",
......
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