Commit cf543a25 authored by bernardosunderhus's avatar bernardosunderhus

[API] Adicionado arquivo da api do competifier

parent c68b85ee
---
openapi: 3.0.0
info:
title: Competifier API
description: Competifier API
version: 0.1.0
paths:
/phases: {}
/phases/{phaseId}: {}
/phases/{phaseId}/assessments: {}
/team: {}
/account: {}
/claims: {}
/messages: {}
/team/members/{memberId}: {}
/claims/{claimId}: {}
/messages/{messageId}: {}
/preferences: {}
/assessments: {}
/assessments/{assessmentId}:
get:
summary: Retrives an Assessment
responses:
200:
description: Successfully retrieved assessment
content:
application/json:
schema:
$ref: '#/components/schemas/Assessment'
parameters:
- name: assessmentId
in: path
required: true
schema:
format: int32
type: integer
/submissions: {}
/submissions/{submissionId}: {}
/assessments/{assessmentId}/submissions:
get:
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'
post:
summary: Creates new submission from an assessment
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AssessmentSubmission'
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:
summary: Retrieves a single submission from an assessment
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/AssessmentSubmission'
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:
summary: Retrives all questions from an assessment
responses:
200:
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Question'
parameters:
- name: assessmentId
in: path
required: true
schema:
format: int32
type: integer
/assessments/{assessmentId}/questions/{questionId}:
get:
summary: Retrieves single question from a given assessment
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/Question'
parameters:
- name: assessmentId
in: path
required: true
schema:
format: int32
type: integer
- name: questionId
in: path
required: true
schema:
format: int32
type: integer
components:
schemas:
QuestionCategory:
title: QuestionCategory
description: Category for which the Question belongs
type: object
properties:
label:
title: Label
description: The label of the category
type: string
oid:
format: int32
title: OID
description: The object persistence identification
type: integer
readOnly: true
ScheduledEvent:
title: ScheduledEvent
description: The begining and ending of the assessment
type: object
properties:
oid:
format: int32
title: OID
description: The object identification
type: integer
readOnly: true
startsAt:
format: date-time
title: startsAt
description: The time of the begining of the assessment
type: string
endsAt:
format: date-time
title: endsAt
description: The time of the ending of the assessment
type: string
Assessment:
title: Assessment
description: The assessment
type: object
properties:
status:
format: int32
description: Enumerator idicading status
type: integer
readOnly: true
type:
format: int32
description: '{GUIDED, HAND_MADE}'
type: integer
readOnly: true
schedule:
$ref: '#/components/schemas/ScheduledEvent'
description: The event schedule
readOnly: true
enforceSequence:
title: enforceSequence
description: Boolean indicading if the assessment must enforce the exams
to be done in it's order
type: boolean
location:
title: location
description: Why the fuck is this a string?
type: string
exam:
$ref: '#/components/schemas/Exam'
description: The exam itself
oid:
format: int32
description: Object identifier
type: integer
locationType:
format: int32
description: '{ONLINE, ON_SITE}'
type: integer
submitterType:
format: int32
description: '{ADMIN, ADMIN_OR_COMPETIFIER}'
type: integer
QuestionGroup:
title: QuestionGroup
type: object
properties:
oid:
format: int32
title: OID
type: integer
readOnly: true
label:
title: label
type: string
weight:
format: float
title: weight
type: number
ExamQuestion:
title: ExamQuestion
type: object
properties:
group:
format: int32
title: group
description: Group for which this given ExamQuestion belongs in this Exam
type: integer
readOnly: true
order:
format: int32
title: order
description: Position of this ExamQuestion in this Exam
type: integer
weight:
format: float
title: weight
description: Weight associated with this ExamQuestion
type: number
question:
format: int32
title: question oid
description: The oid of the question that this ExamQuestion represents
type: integer
readOnly: true
status:
format: int32
description: '{ACTIVE, CANCELED}'
type: integer
oid:
format: int32
description: Object identifier
type: integer
Exam:
title: Exam
description: The gathering of multiple *ExamQuestion* with their respective
*QuestionGroup*
type: object
properties:
type:
format: int32
description: '{SUBJECTIVE, OBJECTIVE}'
type: integer
readOnly: true
label:
title: label
description: A name to the exam
type: string
cover:
title: cover
description: An html to be embedded as cover
type: string
groups:
title: groups
description: The possible QuestionGroup of this Exam
type: array
items:
$ref: '#/components/schemas/QuestionGroup'
questions:
title: questions
description: All the ExamQuestions of this Exam
type: array
items:
$ref: '#/components/schemas/ExamQuestion'
oid:
format: int32
description: Object identifier
type: integer
Alternative:
title: Alternative
description: Alternative for a *ObjectiveQuestion*
type: object
properties:
order:
format: int32
title: order
description: position of this alternative to it's question
type: integer
statement:
title: statement
description: the alternative statement
type: string
oid:
format: int32
description: Object identifier
type: integer
Question:
title: Question
type: object
properties:
categories:
title: categories
uniqueItems: true
type: array
items:
$ref: '#/components/schemas/QuestionCategory'
type:
format: int32
type: integer
readOnly: true
statement:
title: statement
type: string
answerKey:
allOf:
- title: answerKey
description: Answer key for a *Subjective Question*
type: string
- format: int32
title: oid
description: OID of the correct alternative in an *Objective Question*
type: integer
alternatives:
title: alternatives
uniqueItems: true
type: array
items:
$ref: '#/components/schemas/Alternative'
oid:
format: int32
type: integer
AssessmentSubmission:
properties:
assessment:
$ref: '#/components/schemas/Assessment'
description: The assessment that this submission refers to
status:
format: int32
description: '{DRAFT, SUBMITTED}'
type: integer
type:
format: int32
description: '{GUIDED, HANDMADE}'
type: integer
lastUpdate:
format: date-time
description: Last time this submission was modified
type: string
startedAt:
format: date-time
type: string
finishedAt:
format: date-time
type: string
answers:
type: array
items:
$ref: '#/components/schemas/Answer'
uploadUri:
type: string
Answer:
properties:
type:
format: int32
type: integer
freeText:
type: string
choice:
format: int32
type: integer
question:
$ref: '#/components/schemas/ExamQuestion'
AssessmentSubmissionEvaluation:
properties:
timestamp:
format: int32
type: integer
grades:
type: array
items:
$ref: '#/components/schemas/AnswerGrade'
AnswerGrade:
properties:
grade:
format: float
type: number
question:
$ref: '#/components/schemas/ExamQuestion'
tags:
- name: competify
description:
- name: competifier
description:
...@@ -5,9 +5,11 @@ info: ...@@ -5,9 +5,11 @@ info:
version: 0.1.0 version: 0.1.0
tags: tags:
- name: competifier - name: competifier
description: Competifier operations description: Operations involving the competifier
- name: assessments - name: assessments
description: Operations involving assessments description: Operations involving the assessments
- name: phases
description: Operations involving the phases
paths: paths:
/competifier/messages: /competifier/messages:
get: get:
...@@ -98,6 +100,25 @@ paths: ...@@ -98,6 +100,25 @@ paths:
schema: schema:
format: int32 format: int32
type: integer 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': '/assessments/{assessmentId}/submissions':
get: get:
tags: tags:
...@@ -223,9 +244,9 @@ paths: ...@@ -223,9 +244,9 @@ paths:
schema: schema:
type: array type: array
items: items:
oneOf: anyOf:
- $ref: '#/components/schemas/SubjectiveQuestion'
- $ref: '#/components/schemas/ObjectiveQuestion' - $ref: '#/components/schemas/ObjectiveQuestion'
- $ref: '#/components/schemas/SubjectiveQuestion'
parameters: parameters:
- name: assessmentId - name: assessmentId
in: path in: path
...@@ -244,7 +265,7 @@ paths: ...@@ -244,7 +265,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
oneOf: anyOf:
- $ref: '#/components/schemas/SubjectiveQuestion' - $ref: '#/components/schemas/SubjectiveQuestion'
- $ref: '#/components/schemas/ObjectiveQuestion' - $ref: '#/components/schemas/ObjectiveQuestion'
parameters: parameters:
...@@ -260,6 +281,58 @@ paths: ...@@ -260,6 +281,58 @@ paths:
schema: schema:
format: int32 format: int32
type: integer 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': '/assessments/{assessmentId}/drafts':
get: get:
tags: tags:
...@@ -415,10 +488,25 @@ paths: ...@@ -415,10 +488,25 @@ paths:
required: true required: true
schema: schema:
type: integer type: integer
'/phases':
get:
tags:
- phases
summary: Retrives all phases
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
components: components:
schemas: schemas:
ScheduledEvent: ScheduledEvent:
type: object required:
- oid
- startsAt
- endsAt
properties: properties:
oid: oid:
description: The object identification description: The object identification
...@@ -432,7 +520,6 @@ components: ...@@ -432,7 +520,6 @@ components:
description: The time of the ending of the assessment description: The time of the ending of the assessment
type: string type: string
Assessment: Assessment:
type: object
required: required:
- status - status
- type - type
...@@ -440,7 +527,6 @@ components: ...@@ -440,7 +527,6 @@ components:
- resultAvailable - resultAvailable
- answerKeyAvailable - answerKeyAvailable
- locationType - locationType
- exam
- schedule - schedule
properties: properties:
status: status:
...@@ -554,8 +640,6 @@ components: ...@@ -554,8 +640,6 @@ components:
0: '#/components/schemas/SubjectiveQuestion' 0: '#/components/schemas/SubjectiveQuestion'
1: '#/components/schemas/ObjectiveQuestion' 1: '#/components/schemas/ObjectiveQuestion'
SubjectiveQuestion: SubjectiveQuestion:
required:
- answerKey
allOf: allOf:
- $ref: '#/components/schemas/Question' - $ref: '#/components/schemas/Question'
- type: object - type: object
...@@ -564,8 +648,6 @@ components: ...@@ -564,8 +648,6 @@ components:
format: string format: string
type: string type: string
ObjectiveQuestion: ObjectiveQuestion:
required:
- answerKey
allOf: allOf:
- $ref: '#/components/schemas/Question' - $ref: '#/components/schemas/Question'
- type: object - type: object
...@@ -575,48 +657,58 @@ components: ...@@ -575,48 +657,58 @@ components:
items: items:
$ref: '#/components/schemas/Alternative' $ref: '#/components/schemas/Alternative'
answerKey: answerKey:
format: int32 type: integer
ExamCover:
required:
- content
- oid
properties:
content:
type: string
oid:
type: integer type: integer
Exam: Exam:
required:
- type
- title
- groups
- questions
- oid
properties: properties:
type: type:
description: '{SUBJECTIVE, OBJECTIVE}' description: '{SUBJECTIVE, OBJECTIVE}'
type: integer type: integer
label: title:
description: A name to the exam
type: string type: string
cover: cover:
description: An html to be embedded as cover $ref: '#/components/schemas/ExamCover'
type: string
groups: groups:
description: The possible QuestionGroup of this Exam
type: array type: array
items: items:
$ref: '#/components/schemas/QuestionGroup' $ref: '#/components/schemas/QuestionGroup'
questions: questions:
description: All the ExamQuestions of this Exam
type: array type: array
items: items:
$ref: '#/components/schemas/Question' oneOf:
- $ref: '#/components/schemas/SubjectiveQuestion'
- $ref: '#/components/schemas/ObjectiveQuestion'
oid: oid:
description: Object identifier description: Object identifier
type: integer type: integer
Alternative: Alternative:
title: Alternative required:
description: Alternative for a *ObjectiveQuestion* - order
type: object - statement
- oid
properties: properties:
order: order:
format: int32
title: order title: order
description: position of this alternative to it's question description: position of this alternative to it's question
type: integer type: integer
statement: statement:
title: statement
description: the alternative statement description: the alternative statement
type: string type: string
oid: oid:
format: int32
description: Object identifier description: Object identifier
type: integer type: integer
AssessmentSubmission: AssessmentSubmission:
...@@ -642,7 +734,7 @@ components: ...@@ -642,7 +734,7 @@ components:
- $ref: '#/components/schemas/AssessmentSubmission' - $ref: '#/components/schemas/AssessmentSubmission'
- type: object - type: object
properties: properties:
oloadUri: loadUri:
type: string type: string
VirtualAssessmentSubmission: VirtualAssessmentSubmission:
allOf: allOf:
......
...@@ -9942,7 +9942,7 @@ ...@@ -9942,7 +9942,7 @@
"height": 13, "height": 13,
"autoResize": false, "autoResize": false,
"underline": false, "underline": false,
"text": "+statement", "text": "+content",
"horizontalAlignment": 0, "horizontalAlignment": 0,
"verticalAlignment": 5, "verticalAlignment": 5,
"wordWrap": false "wordWrap": false
...@@ -12071,7 +12071,7 @@ ...@@ -12071,7 +12071,7 @@
"_parent": { "_parent": {
"$ref": "AAAAAAFjK7inaCwwiDo=" "$ref": "AAAAAAFjK7inaCwwiDo="
}, },
"name": "statement", "name": "content",
"visibility": "public", "visibility": "public",
"isStatic": false, "isStatic": false,
"isLeaf": false, "isLeaf": false,
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