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: ...@@ -122,7 +122,7 @@ paths:
schema: schema:
type: array type: array
items: 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: post:
security: security:
- bearerAuth: [] - bearerAuth: []
...@@ -136,8 +136,8 @@ paths: ...@@ -136,8 +136,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/#/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'
required: true required: true
responses: responses:
'200': '200':
...@@ -147,8 +147,8 @@ paths: ...@@ -147,8 +147,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/#/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'
/competitions/{competitionId}: /competitions/{competitionId}:
get: get:
security: security:
...@@ -163,7 +163,7 @@ paths: ...@@ -163,7 +163,7 @@ paths:
content: content:
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'
delete: delete:
security: security:
- bearerAuth: [] - bearerAuth: []
...@@ -177,7 +177,7 @@ paths: ...@@ -177,7 +177,7 @@ paths:
content: content:
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'
parameters: parameters:
- name: competitionId - name: competitionId
in: path in: path
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -56,8 +56,9 @@ ...@@ -56,8 +56,9 @@
}, },
"assignments": { "assignments": {
"type": "array", "type": "array",
"description": "Assignment ids",
"items": { "items": {
"$ref": "#/Assignment" "type": "integer"
} }
} }
}, },
...@@ -113,23 +114,23 @@ ...@@ -113,23 +114,23 @@
"drafts": { "drafts": {
"type": "array", "type": "array",
"items": { "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": { "submissions": {
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#AssessmentSubmission" "$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.json#/AssessmentSubmission"
} }
}, },
"currentSubmissions": { "currentSubmissions": {
"$ref": "#AssessmentSubmission" "$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.json#/AssessmentSubmission"
}, },
"assessment": { "assessment": {
"$ref": "#Assessment" "$ref": "#/Assessment"
}, },
"competifier": { "competifier": {
"$ref": "#Competifier" "$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Competifier.json#/Competifier"
} }
} }
}, },
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
"type": "string" "type": "string"
}, },
"registration": { "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": { "tags": {
"type": "array", "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": { "AssessmentConclusionTime": {
"allOf": [ "allOf": [
{ {
...@@ -13,7 +86,7 @@ ...@@ -13,7 +86,7 @@
"required": [ "required": [
"priority" "priority"
], ],
"allOf": { "allOf": [{
"$ref": "#/TieBreakStrategy", "$ref": "#/TieBreakStrategy",
"type": "object", "type": "object",
"properties": { "properties": {
...@@ -21,7 +94,7 @@ ...@@ -21,7 +94,7 @@
"type": "integer" "type": "integer"
} }
} }
} }]
}, },
"AssessmentPriorityStrategy": { "AssessmentPriorityStrategy": {
"properties": { "properties": {
...@@ -115,83 +188,6 @@ ...@@ -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": { "PhaseEvent": {
"required": [ "required": [
"timestamp", "timestamp",
...@@ -222,9 +218,7 @@ ...@@ -222,9 +218,7 @@
"competifier": { "competifier": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Competifier.json#/Competifier" "$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Competifier.json#/Competifier"
}, },
"phase": { "phase": "integer",
"$ref": "#/Phase"
},
"status": { "status": {
"type": "string", "type": "string",
"enum": [ "enum": [
...@@ -245,7 +239,7 @@ ...@@ -245,7 +239,7 @@
} }
}, },
"QuestionGroupPriorityStrategy": { "QuestionGroupPriorityStrategy": {
"allOf": { "allOf": [{
"$ref": "#/TieBreakStrategy", "$ref": "#/TieBreakStrategy",
"type": "object", "type": "object",
"properties": { "properties": {
...@@ -258,7 +252,7 @@ ...@@ -258,7 +252,7 @@
] ]
} }
} }
} }]
}, },
"Rank": { "Rank": {
"required": [ "required": [
...@@ -379,23 +373,17 @@ ...@@ -379,23 +373,17 @@
} }
] ]
}, },
"phase": { "phases": {
"type": "array", "type": "array",
"items": [ "items": [
{ {
"$ref": "#/Phase" "type": "integer"
} }
] ]
}, },
"finalPhase": { "finalPhase": "integer",
"$ref": "#/Phase" "initialPhase": "integer",
}, "currentPhase": "integer",
"initialPhase": {
"$ref": "#/Phase"
},
"currentPhase": {
"$ref": "#/Phase"
},
"competifiers": { "competifiers": {
"type": "array", "type": "array",
"items": [ "items": [
......
...@@ -188,52 +188,5 @@ ...@@ -188,52 +188,5 @@
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.json#/Assignment" "$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 @@ ...@@ -120,9 +120,7 @@
"subject": { "subject": {
"type": "string" "type": "string"
}, },
"submission": { "submission": "integer",
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.yaml#/Submission"
},
"status": { "status": {
"type": "string", "type": "string",
"enum": [ "enum": [
...@@ -134,10 +132,12 @@ ...@@ -134,10 +132,12 @@
} }
}, },
"SoloSubscription": { "SoloSubscription": {
"allOf": { "allOf": [
{
"type": "object", "type": "object",
"$ref": "#/Subscription" "$ref": "#/Subscription"
} }
]
}, },
"Subscription": { "Subscription": {
"required": [ "required": [
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
] ]
}, },
"schedule": { "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": {
"type": "string", "type": "string",
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
], ],
"properties": { "properties": {
"competition": { "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": { "timestamp": {
"type": "number" "type": "number"
...@@ -231,7 +231,7 @@ ...@@ -231,7 +231,7 @@
"sections": { "sections": {
"type": "array", "type": "array",
"items": { "items": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.yaml#/SubmissionSection" "$ref": "#/SubmissionSection"
} }
}, },
"invitations": { "invitations": {
...@@ -253,37 +253,82 @@ ...@@ -253,37 +253,82 @@
"required": [ "required": [
"team" "team"
], ],
"allOf": { "allOf": [{
"type": "object", "type": "object",
"$ref": "#/Submission", "$ref": "#/Submission",
"properties": { "properties": {
"team": { "team": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.yaml#/TeamSubmissionSection" "$ref": "#/TeamSubmissionSection"
},
"leader": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.yaml#/ParticipantSubmissionSection"
}, },
"participants": { "participants": {
"type": "array", "type": "array",
"items": { "items": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.yaml#/ParticipantSubmissionSection" "$ref": "#/ParticipantSubmissionSection"
}
} }
} }
} }
}]
}, },
"SoloSubmission": { "SoloSubmission": {
"required": [ "required": [
"participant" "participant"
], ],
"allOf": { "allOf": [{
"type": "object", "type": "object",
"$ref": "#/Submission", "$ref": "#/Submission",
"properties": { "properties": {
"participant": { "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