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: ...@@ -38,6 +38,7 @@ tags:
- name: exams - name: exams
description: 'Exam operations' description: 'Exam operations'
paths: paths:
# Competition # Competition
/competition: /competition:
get: get:
...@@ -52,7 +53,7 @@ paths: ...@@ -52,7 +53,7 @@ paths:
application/json: application/json:
schema: schema:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/Competition' $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/Competition'
# Competifiers # Competifiers
/competifiers: /competifiers:
get: get:
...@@ -70,8 +71,8 @@ paths: ...@@ -70,8 +71,8 @@ paths:
items: items:
oneOf: 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#/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
/subscription: /subscription:
get: get:
...@@ -107,6 +108,7 @@ paths: ...@@ -107,6 +108,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: 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#/SoloSubscription'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/TeamSubscription' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/TeamSubscription'
...@@ -130,9 +132,7 @@ paths: ...@@ -130,9 +132,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/FormTemplate'
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/FormTemplate'
required: true required: true
responses: responses:
'200': '200':
...@@ -161,9 +161,7 @@ paths: ...@@ -161,9 +161,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/FormTemplate'
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/FormTemplate'
required: true required: true
responses: responses:
'200': '200':
...@@ -172,6 +170,8 @@ paths: ...@@ -172,6 +170,8 @@ paths:
application/json: application/json:
schema: schema:
$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'
# Submission
/subscription/submissions: /subscription/submissions:
get: get:
tags: tags:
...@@ -295,8 +295,8 @@ paths: ...@@ -295,8 +295,8 @@ paths:
schema: schema:
format: int32 format: int32
type: integer type: integer
# Exams # Exams
/exams: /exams:
get: get:
tags: tags:
...@@ -352,9 +352,7 @@ paths: ...@@ -352,9 +352,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/Exam'
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/Exam'
required: true required: true
responses: responses:
'200': '200':
...@@ -391,7 +389,7 @@ paths: ...@@ -391,7 +389,7 @@ paths:
description: Retrieves all Questions for the specified Exam. description: Retrieves all Questions for the specified Exam.
responses: responses:
'200': '200':
description: '' description: A JSON object containing exam information
content: content:
application/json: application/json:
schema: schema:
...@@ -403,20 +401,20 @@ paths: ...@@ -403,20 +401,20 @@ paths:
post: post:
tags: tags:
- exams - exams
summary: 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. description: Creates a new question for the specified Exam.
requestBody: requestBody:
description: A object JSON with exam information
required: true
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: 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#/ObjectiveQuestion'
- $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#/SubjectiveQuestion'
required: true
responses: responses:
'200': '200':
description: '' description: A JSON object containing the new exam information
content: content:
application/json: application/json:
schema: schema:
...@@ -430,13 +428,13 @@ paths: ...@@ -430,13 +428,13 @@ paths:
summary: Updates questions of a exam summary: Updates questions of a exam
description: Updates questions of a exam description: Updates questions of a exam
requestBody: requestBody:
required: true
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: 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'
required: true - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/ObjectiveQuestion'
responses: responses:
'200': '200':
description: '' description: ''
...@@ -445,7 +443,8 @@ paths: ...@@ -445,7 +443,8 @@ paths:
schema: schema:
type: object type: object
oneOf: 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: parameters:
- name: examId - name: examId
in: path in: path
...@@ -524,7 +523,6 @@ paths: ...@@ -524,7 +523,6 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: 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#/ObjectiveQuestion'
- $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#/SubjectiveQuestion'
...@@ -576,16 +574,14 @@ paths: ...@@ -576,16 +574,14 @@ paths:
summary: Create a question group for a exam summary: Create a question group for a exam
description: Create a question group for a exam description: Create a question group for a exam
requestBody: requestBody:
required: true
content: content:
application/json: application/json:
schema: schema:
type: object $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/QuestionGroup'
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/QuestionGroup'
required: true
responses: responses:
'200': '200':
description: '' description: Return object JSON containing question group information.
content: content:
application/json: application/json:
schema: schema:
...@@ -620,9 +616,7 @@ paths: ...@@ -620,9 +616,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/QuestionGroup'
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/QuestionGroup'
required: true required: true
responses: responses:
'200': '200':
...@@ -710,9 +704,7 @@ paths: ...@@ -710,9 +704,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/Phase'
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/Phase'
required: true required: true
responses: responses:
'200': '200':
...@@ -776,16 +768,15 @@ paths: ...@@ -776,16 +768,15 @@ paths:
- phases - phases
summary: Updates the evaluation formula for the specified phase summary: Updates the evaluation formula for the specified phase
requestBody: requestBody:
required: true
content: content:
application/json: application/json:
schema: schema:
type: object $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/EvaluationFormula'
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/EvaluationFormula'
required: true
responses: responses:
'200': '200':
description: '' description: Return a object json containing forma data.
content: content:
application/json: application/json:
schema: schema:
...@@ -965,9 +956,7 @@ paths: ...@@ -965,9 +956,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/PhaseParticipation'
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/PhaseParticipation'
required: true required: true
responses: responses:
'200': '200':
...@@ -998,9 +987,7 @@ paths: ...@@ -998,9 +987,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/Phase'
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/Phase'
required: true required: true
responses: responses:
'200': '200':
...@@ -1017,7 +1004,7 @@ paths: ...@@ -1017,7 +1004,7 @@ paths:
schema: schema:
format: int32 format: int32
type: integer type: integer
# Assessments # Assessments
/assessments/{assessmentId}/status: /assessments/{assessmentId}/status:
patch: patch:
...@@ -1028,9 +1015,7 @@ paths: ...@@ -1028,9 +1015,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/Assessment'
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/Assessment'
required: true required: true
responses: responses:
'200': '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 @@ ...@@ -302,9 +302,7 @@
"$ref": "#/FormFieldAnswer" "$ref": "#/FormFieldAnswer"
} }
}, },
"template": { "template": "integer"
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.json#/FormTemplate"
}
}, },
"discriminator": { "discriminator": {
"propertyName": "type", "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