Commit f553262d authored by bernardosunderhus's avatar bernardosunderhus

[API] Adicionando .json

parent c11d4ecd
{
"openapi": "3.0.0",
"info": {
"title": "Competifier API",
"description": "Competifier API",
"version": "0.1.0"
},
"tags": [
{
"name": "competifier",
"description": "Operations involving the competifier"
},
{
"name": "assessments",
"description": "Operations involving the assessments"
},
{
"name": "phases",
"description": "Operations involving the phases"
}
],
"paths": {
"/competifier/messages": {
"get": {
"tags": [
"competifier"
],
"summary": "Retrieves all messages from the competifier",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Message"
}
}
}
}
}
}
}
},
"/competifier/messages/{messageId}": {
"get": {
"tags": [
"competifier"
],
"summary": "Retrieves one message from a competifier",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Message"
}
}
}
}
}
},
"patch": {
"tags": [
"competifier"
],
"summary": "Updates the message read state",
"description": "The only attribute allowed to be altered is read",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JsonPatch"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Message"
}
}
}
}
}
},
"parameters": [
{
"name": "messageId",
"in": "path",
"required": true,
"schema": {
"format": "int32",
"type": "integer"
}
}
]
},
"/preferences": {},
"/assessments": {
"get": {
"tags": [
"assessments"
],
"summary": "Retrieves all assessments",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/VirtualAssessment"
},
{
"$ref": "#/components/schemas/HandmadeAssessment"
}
]
}
}
}
}
}
}
}
},
"/assessments/{assessmentId}": {
"get": {
"tags": [
"assessments"
],
"summary": "Retrives an Assessment",
"responses": {
"200": {
"description": "Successfully retrieved assessment",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/VirtualAssessment"
},
{
"$ref": "#/components/schemas/HandmadeAssessment"
}
]
}
}
}
}
}
},
"parameters": [
{
"name": "assessmentId",
"in": "path",
"required": true,
"schema": {
"format": "int32",
"type": "integer"
}
}
]
},
"/assessments/{assessmentId}/evaluation": {
"get": {
"tags": [
"assessments"
],
"summary": "Retrives an Assessment evaluation",
"responses": {
"200": {
"description": "Successfully retrieved assessment evaluation",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
},
"parameters": [
{
"name": "assessmentId",
"in": "path",
"required": true,
"schema": {
"format": "int32",
"type": "integer"
}
}
]
},
"/assessments/{assessmentId}/submissions": {
"get": {
"tags": [
"assessments"
],
"summary": "Retrives all submissions from an assessment",
"responses": {
"200": {
"description": "Successfully retrieved all submissions from an assessment",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AssessmentSubmission"
}
},
"examples": {
"Dummy Submissions": {
"value": "[\n {\n \"answers\": [\n {\n \"choice\": 0,\n \"freeText\": \"\",\n \"question\": 0\n }\n ],\n \"assessment\": 0,\n \"finishedAt\": \"date-time\",\n \"lastUpdate\": \"date-time\",\n \"startedAt\": \"date-time\",\n \"status\": 0,\n \"type\": 0,\n \"uploadUri\": \"\"\n }\n]"
}
}
}
}
}
}
},
"post": {
"tags": [
"assessments"
],
"summary": "Creates or updates a submission from an assessment",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AssessmentSubmission"
},
"examples": {
"Dummy Submission Post": {
"value": {
"answers": [
{
"choice": 0,
"freeText": null,
"question": 0
}
],
"assessment": 0,
"finishedAt": "date-time",
"lastUpdate": "date-time",
"startedAt": "date-time",
"status": 0,
"type": 0,
"uploadUri": null
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successfully created the submission",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AssessmentSubmission"
}
}
}
}
}
},
"parameters": [
{
"name": "assessmentId",
"in": "path",
"required": true,
"schema": {
"format": "int32",
"type": "integer"
}
}
]
},
"/assessments/{assessmentId}/submissions/{submissionId}": {
"get": {
"tags": [
"assessments"
],
"summary": "Retrieves a single submission from an assessment",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AssessmentSubmission"
},
"examples": {
"Dummy Submission": {
"value": {
"answers": [
{
"choice": 0,
"freeText": null,
"question": 0
}
],
"assessment": 0,
"finishedAt": "date-time",
"lastUpdate": "date-time",
"startedAt": "date-time",
"status": 0,
"type": 0,
"uploadUri": null
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "assessmentId",
"in": "path",
"required": true,
"schema": {
"format": "int32",
"type": "integer"
}
},
{
"name": "submissionId",
"in": "path",
"required": true,
"schema": {
"format": "int32",
"type": "integer"
}
}
]
},
"/assessments/{assessmentId}/questions": {
"get": {
"tags": [
"assessments"
],
"summary": "Retrives all questions from an assessment",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/components/schemas/ObjectiveQuestion"
},
{
"$ref": "#/components/schemas/SubjectiveQuestion"
}
]
}
}
}
}
}
}
},
"parameters": [
{
"name": "assessmentId",
"in": "path",
"required": true,
"schema": {
"format": "int32",
"type": "integer"
}
}
]
},
"/assessments/{assessmentId}/questions/{questionId}": {
"get": {
"tags": [
"assessments"
],
"summary": "Retrieves single question from a given assessment",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/SubjectiveQuestion"
},
{
"$ref": "#/components/schemas/ObjectiveQuestion"
}
]
}
}
}
}
}
},
"parameters": [
{
"name": "assessmentId",
"in": "path",
"required": true,
"schema": {
"format": "int32",
"type": "integer"
}
},
{
"name": "questionId",
"in": "path",
"required": true,
"schema": {
"format": "int32",
"type": "integer"
}
}
]
},
"/assessments/{assessmentId}/questions/{questionId}/statement": {
"get": {
"tags": [
"assessments"
],
"summary": "Retrieves statement from a question",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/QuestionStatement"
}
}
}
}
}
},
"parameters": [
{
"name": "assessmentId",
"in": "path",
"required": true,
"schema": {
"format": "int32",
"type": "integer"
}
},
{
"name": "questionId",
"in": "path",
"required": true,
"schema": {
"format": "int32",
"type": "integer"
}
}
]
},
"/assessments/{assessmentId}/questions/{questionId}/alternatives": {
"get": {
"tags": [
"assessments"
],
"summary": "Retrieves alternatives from an objective question",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Alternative"
}
}
}
}
}
}
},
"parameters": [
{
"name": "assessmentId",
"in": "path",
"required": true,
"schema": {
"format": "int32",
"type": "integer"
}
},
{
"name": "questionId",
"in": "path",
"required": true,
"schema": {
"format": "int32",
"type": "integer"
}
}
]
},
"/assessments/{assessmentId}/drafts": {
"get": {
"tags": [
"assessments"
],
"summary": "Retrieves all drafts",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/HandmadeAssessmentSubmission"
},
{
"$ref": "#/components/schemas/VirtualAssessmentSubmission"
}
]
}
}
}
}
}
}
},
"post": {
"tags": [
"assessments"
],
"summary": "Creates or overrides an existing draft",
"requestBody": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/HandmadeAssessmentSubmission"
},
{
"$ref": "#/components/schemas/VirtualAssessmentSubmission"
}
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/HandmadeAssessmentSubmission"
},
{
"$ref": "#/components/schemas/VirtualAssessmentSubmission"
}
]
}
}
}
}
}
},
"parameters": [
{
"name": "assessmentId",
"in": "path",
"required": true,
"schema": {
"format": "int32",
"type": "integer"
}
}
]
},
"/assessments/{assessmentId}/drafts/{draftId}": {
"parameters": [
{
"name": "assessmentId",
"in": "path",
"required": true,
"schema": {
"format": "int32",
"type": "integer"
}
},
{
"name": "draftId",
"in": "path",
"required": true,
"schema": {
"format": "int32",
"type": "integer"
}
}
],
"get": {
"tags": [
"assessments"
],
"summary": "Retrieves a draft",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/HandmadeAssessmentSubmission"
},
{
"$ref": "#/components/schemas/VirtualAssessmentSubmission"
}
]
}
}
}
}
}
}
},
"/competifier": {
"get": {
"tags": [
"competifier"
],
"summary": "Retrives competifier",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/SoloCompetifier"
},
{
"$ref": "#/components/schemas/TeamCompetifier"
}
]
}
}
}
}
}
},
"patch": {
"tags": [
"competifier"
],
"summary": "Updates competifier",
"description": "All except password",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JsonPatch"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/SoloCompetifier"
},
{
"$ref": "#/components/schemas/TeamCompetifier"
}
]
}
}
}
}
}
}
},
"/competifier/participants": {
"get": {
"tags": [
"competifier"
],
"summary": "Retrives all participants from a competifier",
"description": "only valid if the competifier is of type TEAM",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Participant"
}
}
}
}
}
}
}
},
"/competifier/participants/{participantId}": {
"get": {
"tags": [
"competifier"
],
"summary": "Retrieves a single participant from a competifier",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Participant"
}
}
}
}
}
},
"patch": {
"tags": [
"competifier"
],
"summary": "Updates participant",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/JsonPatch"
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Participant"
}
}
}
}
}
},
"parameters": [
{
"name": "participantId",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
]
},
"/phases": {
"get": {
"tags": [
"phases"
],
"summary": "Retrives all phases",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"ScheduledEvent": {
"$ref": "./schemas/Assessment.yaml/#/ScheduledEvent"
},
"Assessment": {
"$ref": "./schemas/Assessment.yaml/#/Assessment"
},
"VirtualAssessment": {
"$ref": "./schemas/Assessment.yaml/#/VirtualAssessment"
},
"HandmadeAssessment": {
"$ref": "./schemas/Assessment.yaml/#/HandmadeAssessment"
},
"AssessmentEvent": {
"$ref": "./schemas/Assessment.yaml/#/AssessmentEvent"
},
"QuestionGroup": {
"$ref": "./schemas/Exam.yaml/#/QuestionGroup"
},
"QuestionStatement": {
"$ref": "./schemas/Exam.yaml/#/QuestionStatement"
},
"Question": {
"$ref": "./schemas/Exam.yaml/#/Question"
},
"SubjectiveQuestion": {
"$ref": "./schemas/Exam.yaml/#/SubjectiveQuestion"
},
"ObjectiveQuestion": {
"$ref": "./schemas/Exam.yaml/#/ObjectiveQuestion"
},
"ExamCover": {
"$ref": "./schemas/Exam.yaml/#/ExamCover"
},
"Exam": {
"$ref": "./schemas/Exam.yaml/#/Exam"
},
"Alternative": {
"$ref": "./schemas/Exam.yaml/#/Alternative"
},
"ExamQuestionComplaint": {
"$ref": "./schemas/Exam.yaml/#/ExamQuestionComplaint"
},
"AssessmentSubmission": {
"$ref": "./schemas/Submission.yaml/#/AssessmentSubmission"
},
"HandmadeAssessmentSubmission": {
"$ref": "./schemas/Submission.yaml/#/HandmadeAssessmentSubmission"
},
"VirtualAssessmentSubmission": {
"$ref": "./schemas/Submission.yaml/#/VirtualAssessmentSubmission"
},
"Answer": {
"$ref": "./schemas/Submission.yaml/#/Answer"
},
"AssessmentSubmissionEvaluation": {
"$ref": "./schemas/Submission.yaml/#/AssessmentSubmissionEvaluation"
},
"AnswerGrade": {
"$ref": "./schemas/Submission.yaml/#/AnswerGrade"
},
"VirtualAssessmentSubmissionDraft": {
"$ref": "./schemas/Submission.yaml/#/VirtualAssessmentSubmissionDraft"
},
"Competifier": {
"$ref": "./schemas/Competifier.yaml/#/Competifier"
},
"SoloCompetifier": {
"$ref": "./schemas/Competifier.yaml/#/SoloCompetifier"
},
"TeamCompetifier": {
"$ref": "./schemas/Competifier.yaml/#/TeamCompetifier"
},
"CompetifierEvent": {
"$ref": "./schemas/Competifier.yaml/#/CompetifierEvent"
},
"Tag": {
"$ref": "./schemas/Competifier.yaml/#/Tag"
},
"Participant": {
"$ref": "./schemas/Competifier.yaml/#/Participant"
},
"Message": {
"$ref": "./schemas/Competifier.yaml/#/Message"
},
"JsonPatch": {
"$ref": "./schemas/JsonPatch.yaml"
},
"Competition": {
"$ref": "./schemas/Phase.yaml/#/Competition"
},
"Phase": {
"$ref": "./schemas/Phase.yaml/#/Phase"
},
"PhaseEvent": {
"$ref": "./schemas/Phase.yaml/#/PhaseEvent"
},
"PhaseParticipation": {
"$ref": "./schemas/Phase.yaml/#/PhaseParticipation"
},
"BestRanked": {
"$ref": "./schemas/Phase.yaml/#/BestRanked"
},
"MinimumPerformance": {
"$ref": "./schemas/Phase.yaml/#/MinimumPerformance"
},
"ClassificationRule": {
"$ref": "./schemas/Phase.yaml/#/ClassificationRule"
},
"EvaluationRule": {
"$ref": "./schemas/Phase.yaml/#/EvaluationRule"
},
"TieBreakCriteria": {
"$ref": "./schemas/Phase.yaml/#/TieBreakCriteria"
},
"Ranking": {
"$ref": "./schemas/Phase.yaml/#/Ranking"
},
"Rank": {
"$ref": "./schemas/Phase.yaml/#/Rank"
},
"SubscriptionRule": {
"$ref": "./schemas/Subscription.yaml/#/SubscriptionRule"
},
"Subscription": {
"$ref": "./schemas/Subscription.yaml/#/Subscription"
},
"SoloSubscription": {
"$ref": "./schemas/Subscription.yaml/#/SoloSubscription"
},
"TeamSubscription": {
"$ref": "./schemas/Subscription.yaml/#/TeamSubscription"
},
"FormTemplate": {
"$ref": "./schemas/Subscription.yaml/#/FormTemplate"
},
"FormField": {
"$ref": "./schemas/Subscription.yaml/#/FormField"
},
"FormAnswer": {
"$ref": "./schemas/Subscription.yaml/#/FormAnswer"
},
"FormSection": {
"$ref": "./schemas/Subscription.yaml/#/FormSection"
}
}
}
}
\ 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