Commit 9f96699f authored by Isaac Pereira's avatar Isaac Pereira

[API] Corrige referências para schemas em .json

parent 2a5dcb3e
......@@ -122,7 +122,7 @@ paths:
schema:
type: array
items:
$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'
post:
security:
- bearerAuth: []
......@@ -136,8 +136,8 @@ paths:
schema:
type: object
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#/SoloCompetifier'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/TeamCompetifier'
required: true
responses:
'200':
......@@ -147,8 +147,8 @@ paths:
schema:
type: object
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#/SoloCompetifier'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.json#/TeamCompetifier'
/competitions/{competitionId}:
get:
security:
......@@ -163,7 +163,7 @@ paths:
content:
application/json:
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'
delete:
security:
- bearerAuth: []
......@@ -177,7 +177,7 @@ paths:
content:
application/json:
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'
parameters:
- name: competitionId
in: path
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -56,8 +56,9 @@
},
"assignments": {
"type": "array",
"description": "Assignment ids",
"items": {
"$ref": "#/Assignment"
"type": "integer"
}
}
},
......@@ -113,23 +114,23 @@
"drafts": {
"type": "array",
"items": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.json#/VirtualAssessmentSubmissionsDraft"
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.json#/VirtualAssessmentSubmissionDraft"
}
},
"submissions": {
"type": "array",
"items": {
"$ref": "#AssessmentSubmission"
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.json#/AssessmentSubmission"
}
},
"currentSubmissions": {
"$ref": "#AssessmentSubmission"
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.json#/AssessmentSubmission"
},
"assessment": {
"$ref": "#Assessment"
"$ref": "#/Assessment"
},
"competifier": {
"$ref": "#Competifier"
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Competifier.json#/Competifier"
}
}
},
......
......@@ -20,7 +20,7 @@
"type": "string"
},
"registration": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.json#/Submission"
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.json#/Submission"
},
"tags": {
"type": "array",
......
{
"Phase": {
"required": [
"id",
"label",
"status",
"evaluationFormula",
"classificationStrategy",
"competition"
],
"properties": {
"id": {
"type": "integer"
},
"label": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"PREP",
"ONGOING",
"EVALUATION",
"CLOSED"
]
},
"previous": "integer",
"next": "integer",
"evaluationFormula": {
"$ref": "#/EvaluationFormula"
},
"classificationStrategy": {
"$ref": "#/ClassificationStrategy"
},
"ranking": {
"$ref": "#/Ranking"
},
"assessments": {
"type": "array",
"items": [
{
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.json#/Assessment"
}
]
},
"evaluations": {
"type": "array",
"items": [
{
"$ref": "#/Ranking"
}
]
},
"events": {
"type": "array",
"items": [
{
"$ref": "#/PhaseEvent"
}
]
},
"participations": {
"type": "array",
"items": [
{
"$ref": "#/PhaseParticipation"
}
]
},
"competition": {
"$ref": "#/Competition"
}
}
},
"AssessmentConclusionTime": {
"allOf": [
{
......@@ -13,7 +86,7 @@
"required": [
"priority"
],
"allOf": {
"allOf": [{
"$ref": "#/TieBreakStrategy",
"type": "object",
"properties": {
......@@ -21,7 +94,7 @@
"type": "integer"
}
}
}
}]
},
"AssessmentPriorityStrategy": {
"properties": {
......@@ -115,83 +188,6 @@
}
]
},
"Phase": {
"required": [
"id",
"label",
"status",
"evaluationFormula",
"classificationStrategy",
"competition"
],
"properties": {
"id": {
"type": "integer"
},
"label": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"PREP",
"ONGOING",
"EVALUATION",
"CLOSED"
]
},
"previous": {
"$ref": "#/Phase"
},
"next": {
"$ref": "#/Phase"
},
"evaluationFormula": {
"$ref": "#/EvaluationFormula"
},
"classificationStrategy": {
"$ref": "#/ClassificationStrategy"
},
"ranking": {
"$ref": "#/Ranking"
},
"assessments": {
"type": "array",
"items": [
{
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.json#/Assessment"
}
]
},
"evaluations": {
"type": "array",
"items": [
{
"$ref": "#/Ranking"
}
]
},
"events": {
"type": "array",
"items": [
{
"$ref": "#/PhaseEvent"
}
]
},
"participations": {
"type": "array",
"items": [
{
"$ref": "#/PhaseParticipation"
}
]
},
"competition": {
"$ref": "#/Competition"
}
}
},
"PhaseEvent": {
"required": [
"timestamp",
......@@ -222,9 +218,7 @@
"competifier": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Competifier.json#/Competifier"
},
"phase": {
"$ref": "#/Phase"
},
"phase": "integer",
"status": {
"type": "string",
"enum": [
......@@ -245,7 +239,7 @@
}
},
"QuestionGroupPriorityStrategy": {
"allOf": {
"allOf": [{
"$ref": "#/TieBreakStrategy",
"type": "object",
"properties": {
......@@ -258,7 +252,7 @@
]
}
}
}
}]
},
"Rank": {
"required": [
......@@ -379,23 +373,17 @@
}
]
},
"phase": {
"phases": {
"type": "array",
"items": [
{
"$ref": "#/Phase"
"type": "integer"
}
]
},
"finalPhase": {
"$ref": "#/Phase"
},
"initialPhase": {
"$ref": "#/Phase"
},
"currentPhase": {
"$ref": "#/Phase"
},
"finalPhase": "integer",
"initialPhase": "integer",
"currentPhase": "integer",
"competifiers": {
"type": "array",
"items": [
......
......@@ -188,52 +188,5 @@
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.json#/Assignment"
}
}
},
"SubmissionSection": {
"required": [
"type",
"template"
],
"properties": {
"type": {
"type": "string",
"enum": [
"PARTICIPANT",
"TEAM"
]
},
"answers": {
"type": "array",
"items": {
"$ref": "#/answer"
}
},
"template": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.json#/FormTemplate"
}
},
"discriminator": {
"propertyName": "type",
"mapping": {
"PARTICIPANT": "#/ParticipantSubmissionSection",
"TEAM": "#/TeamSubmissionSection"
}
}
},
"TeamSubmissionSection": {
"allOf": [
{
"type": "object"
},
{
"$ref": "#/SubmissionSection"
}
]
},
"ParticipantSubmissionSection": {
"allOf": {
"type": "object",
"$ref": "#/SubmissionSection"
}
}
}
\ No newline at end of file
......@@ -120,9 +120,7 @@
"subject": {
"type": "string"
},
"submission": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.yaml#/Submission"
},
"submission": "integer",
"status": {
"type": "string",
"enum": [
......@@ -134,10 +132,12 @@
}
},
"SoloSubscription": {
"allOf": {
"type": "object",
"$ref": "#/Subscription"
}
"allOf": [
{
"type": "object",
"$ref": "#/Subscription"
}
]
},
"Subscription": {
"required": [
......@@ -161,7 +161,7 @@
]
},
"schedule": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.yaml#/ScheduledEvent"
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.json#/ScheduledEvent"
},
"type": {
"type": "string",
......@@ -216,7 +216,7 @@
],
"properties": {
"competition": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Phase.yaml#/Competition"
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Phase.json#/Competition"
},
"timestamp": {
"type": "number"
......@@ -231,7 +231,7 @@
"sections": {
"type": "array",
"items": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.yaml#/SubmissionSection"
"$ref": "#/SubmissionSection"
}
},
"invitations": {
......@@ -253,37 +253,82 @@
"required": [
"team"
],
"allOf": {
"allOf": [{
"type": "object",
"$ref": "#/Submission",
"properties": {
"team": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.yaml#/TeamSubmissionSection"
},
"leader": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.yaml#/ParticipantSubmissionSection"
"$ref": "#/TeamSubmissionSection"
},
"participants": {
"type": "array",
"items": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.yaml#/ParticipantSubmissionSection"
"$ref": "#/ParticipantSubmissionSection"
}
}
}
}
}]
},
"SoloSubmission": {
"required": [
"participant"
],
"allOf": {
"allOf": [{
"type": "object",
"$ref": "#/Submission",
"properties": {
"participant": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.yaml#/ParticipantSubmissionSection"
"$ref": "#/ParticipantSubmissionSection"
}
}
}]
},
"SubmissionSection": {
"required": [
"type",
"template"
],
"properties": {
"type": {
"type": "string",
"enum": [
"PARTICIPANT",
"TEAM"
]
},
"answers": {
"type": "array",
"items": {
"$ref": "#/FormFieldAnswer"
}
},
"template": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.json#/FormTemplate"
}
},
"discriminator": {
"propertyName": "type",
"mapping": {
"PARTICIPANT": "#/ParticipantSubmissionSection",
"TEAM": "#/TeamSubmissionSection"
}
}
},
"TeamSubmissionSection": {
"allOf": [
{
"type": "object"
},
{
"$ref": "#/SubmissionSection"
}
]
},
"ParticipantSubmissionSection": {
"allOf": [{
"type": "object",
"$ref": "#/SubmissionSection"
}]
}
}
\ No newline at end of file
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