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:
version: 0.1.0
tags:
- name: competifier
description: Competifier operations
description: Operations involving the competifier
- name: assessments
description: Operations involving assessments
description: Operations involving the assessments
- name: phases
description: Operations involving the phases
paths:
/competifier/messages:
get:
......@@ -98,6 +100,25 @@ paths:
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:
......@@ -223,9 +244,9 @@ paths:
schema:
type: array
items:
oneOf:
- $ref: '#/components/schemas/SubjectiveQuestion'
anyOf:
- $ref: '#/components/schemas/ObjectiveQuestion'
- $ref: '#/components/schemas/SubjectiveQuestion'
parameters:
- name: assessmentId
in: path
......@@ -244,7 +265,7 @@ paths:
content:
application/json:
schema:
oneOf:
anyOf:
- $ref: '#/components/schemas/SubjectiveQuestion'
- $ref: '#/components/schemas/ObjectiveQuestion'
parameters:
......@@ -260,6 +281,58 @@ paths:
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:
......@@ -415,10 +488,25 @@ paths:
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:
type: object
required:
- oid
- startsAt
- endsAt
properties:
oid:
description: The object identification
......@@ -432,7 +520,6 @@ components:
description: The time of the ending of the assessment
type: string
Assessment:
type: object
required:
- status
- type
......@@ -440,7 +527,6 @@ components:
- resultAvailable
- answerKeyAvailable
- locationType
- exam
- schedule
properties:
status:
......@@ -554,8 +640,6 @@ components:
0: '#/components/schemas/SubjectiveQuestion'
1: '#/components/schemas/ObjectiveQuestion'
SubjectiveQuestion:
required:
- answerKey
allOf:
- $ref: '#/components/schemas/Question'
- type: object
......@@ -564,8 +648,6 @@ components:
format: string
type: string
ObjectiveQuestion:
required:
- answerKey
allOf:
- $ref: '#/components/schemas/Question'
- type: object
......@@ -575,48 +657,58 @@ components:
items:
$ref: '#/components/schemas/Alternative'
answerKey:
format: int32
type: integer
ExamCover:
required:
- content
- oid
properties:
content:
type: string
oid:
type: integer
Exam:
required:
- type
- title
- groups
- questions
- oid
properties:
type:
description: '{SUBJECTIVE, OBJECTIVE}'
type: integer
label:
description: A name to the exam
title:
type: string
cover:
description: An html to be embedded as cover
type: string
$ref: '#/components/schemas/ExamCover'
groups:
description: The possible QuestionGroup of this Exam
type: array
items:
$ref: '#/components/schemas/QuestionGroup'
questions:
description: All the ExamQuestions of this Exam
type: array
items:
$ref: '#/components/schemas/Question'
oneOf:
- $ref: '#/components/schemas/SubjectiveQuestion'
- $ref: '#/components/schemas/ObjectiveQuestion'
oid:
description: Object identifier
type: integer
Alternative:
title: Alternative
description: Alternative for a *ObjectiveQuestion*
type: object
required:
- order
- statement
- oid
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
AssessmentSubmission:
......@@ -642,7 +734,7 @@ components:
- $ref: '#/components/schemas/AssessmentSubmission'
- type: object
properties:
oloadUri:
loadUri:
type: string
VirtualAssessmentSubmission:
allOf:
......
......@@ -9942,7 +9942,7 @@
"height": 13,
"autoResize": false,
"underline": false,
"text": "+statement",
"text": "+content",
"horizontalAlignment": 0,
"verticalAlignment": 5,
"wordWrap": false
......@@ -12071,7 +12071,7 @@
"_parent": {
"$ref": "AAAAAAFjK7inaCwwiDo="
},
"name": "statement",
"name": "content",
"visibility": "public",
"isStatic": 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