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

[API] Atualização dos schemas para convertendo os arquivos de yaml para json.

parent c31cf232
...@@ -122,11 +122,7 @@ paths: ...@@ -122,11 +122,7 @@ paths:
schema: schema:
type: array type: array
items: items:
- $ref: >- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/Competition'
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/Competition
'500':
$ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/responses.yaml/#/InternalServerError
post: post:
security: security:
- bearerAuth: [] - bearerAuth: []
...@@ -181,7 +177,7 @@ paths: ...@@ -181,7 +177,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: boolean $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/Competition'
parameters: parameters:
- name: competitionId - name: competitionId
in: path in: path
...@@ -214,5 +210,4 @@ paths: ...@@ -214,5 +210,4 @@ paths:
schema: schema:
format: int32 format: int32
type: integer type: integer
{
"Assessment": {
"required": [
"id",
"title",
"showResult",
"showAnswerKey",
"type",
"locationType",
"status"
],
"properties": {
"id": {
"description": "Object identifier",
"type": "integer"
},
"title": {
"type": "string"
},
"location": {
"description": null,
"type": "string"
},
"exam": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Exam.yaml/#/Exam"
},
"showResult": {
"type": "boolean",
"description": "Boolean indicating if the result is already avialable to exhibition"
},
"showAnswerKey": {
"type": "boolean",
"description": "Boolean indicating if the answerKey is already available to exhibition"
},
"type": {
"type": "string",
"enum": [
"VIRTUAL",
"HANDMADE"
]
},
"locationType": {
"type": "string",
"enum": [
"ONLINE",
"ON_SITE"
]
},
"status": {
"type": "string",
"enum": [
"PREP",
"SUBMISSION",
"EVALUATION"
]
},
"assignments": {
"type": "array",
"items": {
"$ref": "#/Assignment"
}
}
},
"discriminator": {
"propertyName": "type",
"mapping": {
"VIRTUAL": "#/VirtualAssessment",
"HANDMADE": "#/HandmadeAssessment"
}
}
},
"AssessmentEvent": {
"required": [
"timestamp",
"type"
],
"properties": {
"timestamp": {
"type": "string"
},
"desc": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"ASSESSMENT_CREATED",
"EXAM_UPDATED",
"SUBMISSION_ACCEPTANCE_OPENED",
"SUBMISSION_ACCEPTANCE_CLOSED",
"EVALUATION_PERFORMED",
"ANSWER_KEY_ACCESS_ENABLED",
"ANSWER_KEY_ACCESS_DISABLED",
"EVALUATIONS_ACCESS_ENABLED",
"EVALUATIONS_ACCESS_DISABLED",
"ASSESSMENT_CLOSED"
]
}
}
},
"Assignment": {
"required": "status",
"properties": {
"status": {
"type": "string",
"enum": [
"PENDING",
"STARTED",
"DONE",
"EVALUATED"
]
},
"drafts": {
"type": "array",
"items": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.yaml/#/VirtualAssessmentsSubmissionsDraft"
}
},
"submissions": {
"type": "array",
"items": {
"$ref": "#AssessmentSubmission"
}
},
"currentSubmissions": {
"$ref": "#AssessmentSubmission"
},
"assessment": {
"$ref": "#Assessment"
},
"competifier": {
"$ref": "#Competifier"
}
}
},
"HandmadeAssessment": {
"required": [
"submitterType"
],
"allOf": [
{
"$ref": "#/Assessment"
},
{
"type": "object",
"properties": {
"submitterType": {
"type": "string",
"enum": [
"ADMIN",
"ADMIN_OR_COMPETIFIER"
]
}
}
}
]
},
"ScheduledEvent": {
"required": [
"id",
"startsAt",
"endsAt"
],
"properties": {
"id": {
"description": "The object identification",
"type": "integer"
},
"startsAt": {
"format": "date-time",
"description": "The time of the begining of the assessment",
"type": "string"
},
"endsAt": {
"format": "date-time",
"description": "The time of the ending of the assessment",
"type": "string"
}
}
},
"VirtualAssessment": {
"required": [
"enforceSequence"
],
"allOf": [
{
"$ref": "#/Assessment"
},
{
"type": "object",
"properties": {
"enforceSequence": {
"type": "boolean",
"description": "Boolean indicating if the assessment must be done in order"
}
}
}
]
}
}
\ No newline at end of file
{
"User": {
"required": [
"username",
"password",
"email"
],
"properties": {
"username": {
"type": "string"
},
"password": {
"type": "string"
},
"email": {
"type": "string"
},
"userProfile": {
"type": "string",
"enum": [
"SYS_ADMIN",
"COMPETITION_ADMIN",
"COMPETITOR"
]
}
}
},
"Access": {
"required": [
"user"
],
"properties": {
"user": {
"$ref": "#/user"
},
"resource": {
"$ref": "#/resource"
},
"type": {
"type": "string",
"enum": [
"MASTER",
"HOST",
"USER",
"ANONYM"
]
}
}
},
"Resource": {
"required": [
"resourceId"
],
"properties": {
"resourceId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"COMPETITION"
]
}
}
}
}
\ No newline at end of file
{
"Competifier": {
"required": [
"type",
"user",
"competition"
],
"properties": {
"type": {
"type": "string",
"enum": [
"SOLO",
"TEAM"
]
},
"user": {
"type": "number"
},
"email": {
"type": "string"
},
"registration": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.yaml/#/Submission"
},
"tags": {
"type": "array",
"items": {
"$ref": "#/Tag"
}
},
"participations": {
"type": "array",
"items": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Phase.yaml/#/PhaseParticipation"
}
},
"competition": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Phase.yaml/#/Competition"
},
"assignments": {
"type": "array",
"items": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.yaml/#/Assignment"
}
}
},
"discriminator": {
"propertyName": "type",
"mapping": {
"SOLO": "#/SoloCompetifier",
"TEAM": "#/TeamCompetifier"
}
}
},
"Participant": {
"required": [
"firstName",
"email"
],
"properties": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"email": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"$ref": "#/Tag"
}
}
}
},
"SoloCompetifier": {
"required": [
"firstName"
],
"allOf": [
{
"$ref": "#/Competifier"
},
{
"type": "object",
"properties": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
}
}
}
]
},
"TeamCompetifier": {
"required": [
"name"
],
"allOf": [
{
"$ref": "#/Competifier"
},
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"leader": {
"$ref": "#/Participant"
},
"participants": {
"type": "array",
"items": {
"$ref": "#/Participant"
}
}
}
}
]
},
"Tag": {
"required": [
"label",
"value"
],
"properties": {
"label": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
\ No newline at end of file
{
"Alternative": {
"required": [
"order",
"statement"
],
"properties": {
"order": {
"type": "number"
},
"statement": {
"type": "string"
}
}
},
"Exam": {
"required": [
"id",
"title",
"type",
"cover",
"questions",
"groups"
],
"properties": {
"id": {
"description": "Object identifier",
"type": "integer"
},
"title": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"SUBJECTIVE-ONLY",
"OBJECTIVE-ONLY",
"MIXED"
]
},
"cover": {
"$ref": "#/ExamCover"
},
"groups": {
"type": "array",
"items": {
"$ref": "#/QuestionGroup"
}
},
"questions": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/SubjectiveQuestion"
},
{
"$ref": "#/ObjectiveQuestion"
}
]
}
}
}
},
"ExamCover": {
"required": [
"id",
"content"
],
"properties": {
"content": {
"type": "string"
},
"id": {
"type": "integer"
}
}
},
"ExamQuestionComplaint": {
"properties": {
"timestamp": {
"format": "date-time",
"type": "string"
},
"text": {
"type": "string"
},
"question": {
"$ref": "#/Question"
}
}
},
"ObjectiveQuestion": {
"allOf": [
{
"$ref": "#/Question"
},
{
"type": "object",
"properties": {
"answerKey": {
"$ref": "#/Alternative"
},
"alternatives": {
"type": "array",
"items": {
"$ref": "#/Alternative"
}
}
}
}
]
},
"Question": {
"required": [
"id",
"order",
"type",
"status",
"group",
"statement"
],
"properties": {
"id": {
"description": "object identifier of this Question",
"type": "integer"
},
"order": {
"description": "Position of this Question in this Exam",
"type": "integer"
},
"weight": {
"format": "float",
"description": "Weight associated with this Question",
"type": "number"
},
"type": {
"description": "Inheritance type identifcation",
"type": "string",
"enum": [
"SUBJECTIVE",
"OBJECTIVE"
]
},
"status": {
"type": "string",
"enum": [
"ACTIVE",
"CANCELED"
]
},
"group": {
"description": "Group for which this given Question belongs in this Exam",
"type": "integer"
},
"statement": {
"type": "string"
}
},
"discriminator": {
"propertyName": "type",
"mapping": {
"SUBJECTIVE": "#/SubjectiveQuestion",
"OBJECTIVE": "#/ObjectiveQuestion"
}
}
},
"QuestionGroup": {
"required": [
"id",
"label",
"weight"
],
"properties": {
"id": {
"type": "integer"
},
"label": {
"type": "string"
},
"weight": {
"format": "float",
"type": "number"
}
}
},
"QuestionStatement": {
"required": [
"id",
"content"
],
"properties": {
"id": {
"type": "integer"
},
"content": {
"type": "string"
}
}
},
"SubjectiveQuestion": {
"allOf": [
{
"$ref": "#/Question"
},
{
"type": "object",
"properties": {
"answerKey": {
"format": "string",
"type": "string"
}
}
}
]
}
}
\ No newline at end of file
Alternative: {
required: "Alternative": {
- order "required": [
- statement "order",
properties: "statement"
order: ],
type: number "properties": {
statement: "order": {
type: string "type": "number"
Exam: },
required: "statement": {
- id "type": "string"
- title }
- type }
- cover },
- questions "Exam": {
- groups "required": [
properties: "id",
id: "title",
description: Object identifier "type",
type: integer "cover",
title: "questions",
type: string "groups"
type: ],
type: string "properties": {
enum: "id": {
- SUBJECTIVE-ONLY "description": "Object identifier",
- OBJECTIVE-ONLY "type": "integer"
- MIXED },
cover: "title": {
$ref: '#/ExamCover' "type": "string"
groups: },
type: array "type": {
items: "type": "string",
$ref: '#/QuestionGroup' "enum": [
questions: "SUBJECTIVE-ONLY",
type: array "OBJECTIVE-ONLY",
items: "MIXED"
oneOf: ]
- $ref: '#/SubjectiveQuestion' },
- $ref: '#/ObjectiveQuestion' "cover": {
ExamCover: "$ref": "#/ExamCover"
required: },
- id "groups": {
- content "type": "array",
properties: "items": {
content: "$ref": "#/QuestionGroup"
type: string }
id: },
type: integer "questions": {
ExamQuestionComplaint: "type": "array",
properties: "items": {
timestamp: "oneOf": [
format: date-time {
type: string "$ref": "#/SubjectiveQuestion"
text: },
type: string {
question: "$ref": "#/ObjectiveQuestion"
$ref: '#/Question' }
ObjectiveQuestion: ]
allOf: }
- $ref: '#/Question' }
- type: object }
properties: },
answerKey: "ExamCover": {
$ref: '#/Alternative' "required": [
alternatives: "id",
type: array "content"
items: ],
$ref: '#/Alternative' "properties": {
Question: "content": {
required: "type": "string"
- id },
- order "id": {
- type "type": "integer"
- status }
- group }
- statement },
properties: "ExamQuestionComplaint": {
id: "properties": {
description: object identifier of this Question "timestamp": {
type: integer "format": "date-time",
order: "type": "string"
description: Position of this Question in this Exam },
type: integer "text": {
weight: "type": "string"
format: float },
description: Weight associated with this Question "question": {
type: number "$ref": "#/Question"
type: }
description: Inheritance type identifcation }
type: string },
enum: "ObjectiveQuestion": {
- SUBJECTIVE "allOf": [
- OBJECTIVE {
status: "$ref": "#/Question"
type: string },
enum: {
- ACTIVE "type": "object",
- CANCELED "properties": {
group: "answerKey": {
description: Group for which this given Question belongs in this Exam "$ref": "#/Alternative"
type: integer },
statement: "alternatives": {
type: string "type": "array",
discriminator: "items": {
propertyName: type "$ref": "#/Alternative"
mapping: }
SUBJECTIVE: '#/SubjectiveQuestion' }
OBJECTIVE: '#/ObjectiveQuestion' }
QuestionGroup: }
required: ]
- id },
- label "Question": {
- weight "required": [
properties: "id",
id: "order",
type: integer "type",
label: "status",
type: string "group",
weight: "statement"
format: float ],
type: number "properties": {
QuestionStatement: "id": {
required: "description": "object identifier of this Question",
- id "type": "integer"
- content },
properties: "order": {
id: "description": "Position of this Question in this Exam",
type: integer "type": "integer"
content: },
type: string "weight": {
SubjectiveQuestion: "format": "float",
allOf: "description": "Weight associated with this Question",
- $ref: '#/Question' "type": "number"
- type: object },
properties: "type": {
answerKey: "description": "Inheritance type identifcation",
format: string "type": "string",
type: string "enum": [
"SUBJECTIVE",
"OBJECTIVE"
]
},
"status": {
"type": "string",
"enum": [
"ACTIVE",
"CANCELED"
]
},
"group": {
"description": "Group for which this given Question belongs in this Exam",
"type": "integer"
},
"statement": {
"type": "string"
}
},
"discriminator": {
"propertyName": "type",
"mapping": {
"SUBJECTIVE": "#/SubjectiveQuestion",
"OBJECTIVE": "#/ObjectiveQuestion"
}
}
},
"QuestionGroup": {
"required": [
"id",
"label",
"weight"
],
"properties": {
"id": {
"type": "integer"
},
"label": {
"type": "string"
},
"weight": {
"format": "float",
"type": "number"
}
}
},
"QuestionStatement": {
"required": [
"id",
"content"
],
"properties": {
"id": {
"type": "integer"
},
"content": {
"type": "string"
}
}
},
"SubjectiveQuestion": {
"allOf": [
{
"$ref": "#/Question"
},
{
"type": "object",
"properties": {
"answerKey": {
"format": "string",
"type": "string"
}
}
}
]
}
}
\ No newline at end of file
{
"AssessmentConclusionTime": {
"allOf": [
{
"$ref": "#/TieBreakStrategy"
},
{
"type": "object"
}
]
},
"AssessmentPriority": {
"required": [
"priority"
],
"allOf": {
"$ref": "#/TieBreakStrategy",
"type": "object",
"properties": {
"priority": {
"type": "integer"
}
}
}
},
"AssessmentPriorityStrategy": {
"properties": {
"priorities": {
"type": "array",
"items": [
{
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.yaml/#/AssessmentPriority"
}
]
}
}
},
"BestRanked": {
"required": [
"number"
],
"properties": {
"number": {
"type": "number"
},
"tieBreakStrategies": {
"type": "array",
"items": [
{
"$ref": "#/TieBreakStrategy"
}
]
}
}
},
"ClassificationStrategy": {
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"BEST_RANKED",
"MINIMUM_PERFORMANCE"
]
}
},
"discriminator": {
"propertyName": "type",
"mapping": {
"BEST_RANKED": "#/BestRanked",
"MINIMUM_PERFORMANCE": "#/MinimumPerformance"
}
}
},
"EvaluationFormula": {
"required": [
"expression"
],
"properties": {
"id": {
"type": "integer"
},
"expression": {
"type": "string"
}
}
},
"GroupPriority": {
"properties": {
"priority": {
"type": "number"
},
"questionGroup": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Exam.yaml/#/QuestionGroup"
}
}
},
"MinimumPerformance": {
"required": [
"cutOffMark"
],
"allOf": [
{
"$ref": "#/ClassificationStrategy"
},
{
"type": "object",
"properties": {
"cutOffMark": {
"type": "number"
}
}
}
]
},
"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.yaml/#/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",
"descr",
"type"
],
"properties": {
"timestamp": {
"type": "integer"
},
"descr": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"PHASE_CREATED",
"PHASE_STARTED",
"EVALUATION_FORMULA_UPDATED",
"RANKING_EVALUATED",
"PHASE_CLOSED"
]
}
}
},
"PhaseParticipation": {
"properties": {
"competifier": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Competifier.yaml/#/Competifier"
},
"phase": {
"$ref": "#/Phase"
},
"status": {
"type": "string",
"enum": [
"ACTIVE",
"APPROVED",
"DISQUALIFIED",
"REJECTED"
]
},
"assignments": {
"type": "array",
"items": [
{
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.yaml/#/Assignment"
}
]
}
}
},
"QuestionGroupPriorityStrategy": {
"allOf": {
"$ref": "#/TieBreakStrategy",
"type": "object",
"properties": {
"priorities": {
"type": "array",
"items": [
{
"$ref": "#/GroupPriority"
}
]
}
}
}
},
"Rank": {
"required": [
"position",
"grade",
"status"
],
"properties": {
"position": {
"type": "integer"
},
"grade": {
"type": "number"
},
"status": {
"type": "string",
"enum": [
"QUALIFIED",
"DISQUALIFIED"
]
},
"participation": {
"$ref": "#/PhaseParticipation"
}
}
},
"Ranking": {
"required": [
"id",
"timestamp"
],
"properties": {
"id": {
"type": "integer"
},
"evaluationFormula": {
"$ref": "#/EvaluationFormula"
},
"positions": {
"type": "array",
"items": {
"$ref": "#/Rank"
}
},
"classificationStrategy": {
"$ref": "#/ClassificationStrategy"
},
"qualified": {
"type": "array",
"items": {
"$ref": "#/Rank"
}
}
}
},
"TieBreakStrategy": {
"required": [
"type"
],
"properties": {
"id": {
"type": "integer"
},
"type": {
"type": "string",
"enum": [
"ASSESSMENT_PRIORITY",
"QUESTION_PRIORITY",
"ASSESSMENT_CONCLUSION_TIME"
]
},
"priority": {
"type": "integer"
}
},
"discriminator": {
"propertyName": "type",
"mapping": {
"ASSESSMENT_PRIORITY": "#/AssessmentPriority",
"QUESTION_PRIORITY": "#/QuestionGroupPriorityStrategy",
"ASSESSMENT_CONCLUSION_TIME": "#/AssessmentConclusionTime"
}
}
},
"Competition": {
"required": [
"id",
"uri",
"name",
"status",
"subscription"
],
"properties": {
"uri": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"subscription": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/Subscription"
},
"exams": {
"type": "array",
"items": [
{
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Exam.yaml/#/Exam"
}
]
},
"phase": {
"type": "array",
"items": [
{
"$ref": "#/Phase"
}
]
},
"finalPhase": {
"$ref": "#/Phase"
},
"initialPhase": {
"$ref": "#/Phase"
},
"currentPhase": {
"$ref": "#/Phase"
},
"competifiers": {
"type": "array",
"items": [
{
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Competifier.yaml/#/Competifier"
}
]
}
}
}
}
\ No newline at end of file
{
"Answer": {
"required": [
"type",
"question"
],
"properties": {
"type": {
"type": "string",
"enum": [
"SUBJECTIVE",
"OBJECTIVE"
]
},
"question": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Exam.yaml/#/Question"
}
}
},
"AnswerGrade": {
"required": [
"grade",
"question"
],
"properties": {
"grade": {
"format": "float",
"type": "number"
},
"question": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Exam.yaml/#/Question"
}
}
},
"AssessmentSubmission": {
"required": [
"type"
],
"properties": {
"lastUpdate": {
"type": "number",
"description": "Last time this submission was modified"
},
"assignment": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.yaml/#/Assignment"
},
"type": {
"type": "string",
"enum": [
"VIRTUAL",
"HANDMADE"
]
}
},
"discriminator": {
"propertyName": "type"
}
},
"AssessmentSubmissionEvaluation": {
"required": [
"timestamp",
"submission"
],
"properties": {
"timestamp": {
"type": "integer"
},
"grade": {
"type": "number",
"format": "float"
},
"submission": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.yaml/#/AssessmentSubmission"
},
"grades": {
"type": "array",
"items": {
"$ref": "#/AnswerGrade"
}
}
}
},
"HandmadeAssessmentSubmission": {
"allOf": [
{
"$ref": "#/AssessmentSubmission"
},
{
"type": "object",
"required": [
"uploadUri"
],
"properties": {
"uploadUri": {
"type": "string"
}
}
}
]
},
"ObjectiveAnswer": {
"allOf": [
{
"$ref": "#/Answer"
},
{
"type": "object",
"required": [
"alternativeKey"
],
"properties": {
"alternativeKey": {
"type": "string"
}
}
}
]
},
"SubjectiveAnswer": {
"allOf": [
{
"$ref": "#/Answer"
},
{
"type": "object",
"required": [
"freeText"
],
"properties": {
"freeText": {
"type": "string"
}
}
}
]
},
"VirtualAssessmentSubmission": {
"allOf": [
{
"$ref": "#/AssessmentSubmission"
},
{
"type": "object",
"required": [
"startedAt"
],
"properties": {
"startedAt": {
"type": "string",
"format": "date-time"
},
"finishedAt": {
"type": "string",
"format": "date-time"
},
"answers": {
"type": "array",
"items": {
"$ref": "#/Answer"
}
},
"draft": {
"$ref": "#/VirtualAssessmentSubmissionDraft"
}
}
}
]
},
"VirtualAssessmentSubmissionDraft": {
"required": [
"createdAt",
"content",
"assignment"
],
"properties": {
"createdAt": {
"format": "date-time",
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
},
"content": {
"type": "string"
},
"assessment": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.yaml/#/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.yaml/#/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
...@@ -137,8 +137,8 @@ SubmissionSection: ...@@ -137,8 +137,8 @@ SubmissionSection:
TEAM: '#/TeamSubmissionSection' TEAM: '#/TeamSubmissionSection'
TeamSubmissionSection: TeamSubmissionSection:
allOf: allOf:
- type: object type: object
- $ref: '#/SubmissionSection' $ref: '#/SubmissionSection'
ParticipantSubmissionSection: ParticipantSubmissionSection:
allOf: allOf:
type: object type: object
......
{
"Answer": {
"required": [
"type",
"question"
],
"properties": {
"type": {
"type": "string",
"enum": [
"SUBJECTIVE",
"OBJECTIVE"
]
},
"question": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Exam.yaml/#/Question"
}
}
},
"AnswerGrade": {
"required": [
"grade",
"question"
],
"properties": {
"grade": {
"format": "float",
"type": "number"
},
"question": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Exam.yaml/#/Question"
}
}
},
"AssessmentSubmission": {
"required": [
"type"
],
"properties": {
"lastUpdate": {
"type": "number",
"description": "Last time this submission was modified"
},
"assignment": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.yaml/#/Assignment"
},
"type": {
"type": "string",
"enum": [
"VIRTUAL",
"HANDMADE"
]
}
},
"discriminator": {
"propertyName": "type"
}
},
"AssessmentSubmissionEvaluation": {
"required": [
"timestamp",
"submission"
],
"properties": {
"timestamp": {
"type": "integer"
},
"grade": {
"type": "number",
"format": "float"
},
"submission": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.yaml/#/AssessmentSubmission"
},
"grades": {
"type": "array",
"items": {
"$ref": "#/AnswerGrade"
}
}
}
},
"HandmadeAssessmentSubmission": {
"allOf": [
{
"$ref": "#/AssessmentSubmission"
},
{
"type": "object",
"required": [
"uploadUri"
],
"properties": {
"uploadUri": {
"type": "string"
}
}
}
]
},
"ObjectiveAnswer": {
"allOf": [
{
"$ref": "#/Answer"
},
{
"type": "object",
"required": [
"alternativeKey"
],
"properties": {
"alternativeKey": {
"type": "string"
}
}
}
]
},
"SubjectiveAnswer": {
"allOf": [
{
"$ref": "#/Answer"
},
{
"type": "object",
"required": [
"freeText"
],
"properties": {
"freeText": {
"type": "string"
}
}
}
]
},
"VirtualAssessmentSubmission": {
"allOf": [
{
"$ref": "#/AssessmentSubmission"
},
{
"type": "object",
"required": [
"startedAt"
],
"properties": {
"startedAt": {
"type": "string",
"format": "date-time"
},
"finishedAt": {
"type": "string",
"format": "date-time"
},
"answers": {
"type": "array",
"items": {
"$ref": "#/Answer"
}
},
"draft": {
"$ref": "#/VirtualAssessmentSubmissionDraft"
}
}
}
]
},
"VirtualAssessmentSubmissionDraft": {
"required": [
"createdAt",
"content",
"assignment"
],
"properties": {
"createdAt": {
"format": "date-time",
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
},
"content": {
"type": "string"
},
"assessment": {
"$ref": "https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.yaml/#/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.yaml/#/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