Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Docs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Registry
Registry
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Competify
Docs
Commits
6c032ff6
Commit
6c032ff6
authored
May 07, 2018
by
Bernardo Lucas Almeida Sunderhus
Committed by
bernardosunderhus
May 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[API] Adiciona rotas ao Competifier e refatora rotas de Ranking do Admin
parent
3e11a351
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1161 additions
and
174 deletions
+1161
-174
Admin.openapi.yaml
Api/Admin.openapi.yaml
+64
-66
Competifier.openapi.yaml
Api/Competifier.openapi.yaml
+125
-71
package.json
Api/package.json
+3
-3
Assessment.yaml
Api/schemas/Assessment.yaml
+1
-1
Phase.yaml
Api/schemas/Phase.yaml
+9
-30
yarn.lock
Api/yarn.lock
+959
-3
No files found.
Api/Admin.openapi.yaml
View file @
6c032ff6
...
...
@@ -523,11 +523,11 @@ paths:
schema
:
format
:
int32
type
:
integer
'
/phases/{phaseId}/ranking
s
'
:
'
/phases/{phaseId}/ranking'
:
get
:
tags
:
-
phases
summary
:
Retrieves
all Rankings
for the Phase
summary
:
Retrieves
the last Ranking
for the Phase
responses
:
'
200'
:
description
:
'
'
...
...
@@ -536,62 +536,24 @@ paths:
schema
:
type
:
array
items
:
$ref
:
'
#/components/schemas/Ranking'
post
:
tags
:
-
phases
summary
:
Creates a new Ranking for the Phase
requestBody
:
content
:
application/json
:
schema
:
$ref
:
'
#/components/schemas/Ranking'
required
:
true
responses
:
'
200'
:
description
:
'
'
content
:
application/json
:
schema
:
$ref
:
'
#/components/schemas/Ranking'
parameters
:
-
name
:
phaseId
in
:
path
required
:
true
schema
:
format
:
int32
type
:
integer
'
/phases/{phaseId}/rankings/{rankingId}'
:
get
:
tags
:
-
phases
summary
:
Retrieves the specific Ranking
responses
:
'
200'
:
description
:
'
'
content
:
application/json
:
schema
:
$ref
:
'
#/components/schemas/Ranking'
patch
:
tags
:
-
phases
summary
:
Updates the specific Ranking
requestBody
:
content
:
application/json-patch+json
:
schema
:
type
:
array
items
:
$ref
:
'
#/components/schemas/JsonPatch'
required
:
true
responses
:
'
200'
:
description
:
'
'
content
:
application/json
:
schema
:
$ref
:
'
#/components/schemas/Ranking'
$ref
:
'
#/components/schemas/Rank'
# post:
# tags:
# - phases
# summary: Creates a new Ranking for the Phase
# requestBody:
# content:
# application/json:
# schema:
# $ref: '#/components/schemas/Ranking'
# required: true
# responses:
# '200':
# description: ''
# content:
# application/json:
# schema:
# $ref: '#/components/schemas/Ranking'
parameters
:
-
name
:
phaseId
in
:
path
...
...
@@ -599,12 +561,50 @@ paths:
schema
:
format
:
int32
type
:
integer
-
name
:
rankingId
in
:
path
required
:
true
schema
:
format
:
int32
type
:
integer
# '/phases/{phaseId}/rankings/{rankingId}':
# get:
# tags:
# - phases
# summary: Retrieves the specific Ranking
# responses:
# '200':
# description: ''
# content:
# application/json:
# schema:
# $ref: '#/components/schemas/Ranking'
# patch:
# tags:
# - phases
# summary: Updates the specific Ranking
# requestBody:
# content:
# application/json-patch+json:
# schema:
# type: array
# items:
# $ref: '#/components/schemas/JsonPatch'
# required: true
# responses:
# '200':
# description: ''
# content:
# application/json:
# schema:
# $ref: '#/components/schemas/Ranking'
# parameters:
# - name: phaseId
# in: path
# required: true
# schema:
# format: int32
# type: integer
# - name: rankingId
# in: path
# required: true
# schema:
# format: int32
# type: integer
'
/phases/{phaseId}/participations'
:
get
:
tags
:
...
...
@@ -1156,8 +1156,6 @@ components:
$ref
:
'
./schemas/Phase.yaml/#/EvaluationRule'
TieBreakCriteria
:
$ref
:
'
./schemas/Phase.yaml/#/TieBreakCriteria'
Ranking
:
$ref
:
'
./schemas/Phase.yaml/#/Ranking'
Rank
:
$ref
:
'
./schemas/Phase.yaml/#/Rank'
SubscriptionRule
:
...
...
Api/Competifier.openapi.yaml
View file @
6c032ff6
...
...
@@ -62,7 +62,6 @@ paths:
schema
:
format
:
int32
type
:
integer
/preferences
:
{}
/assessments
:
get
:
tags
:
...
...
@@ -100,25 +99,6 @@ 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
:
...
...
@@ -403,6 +383,24 @@ paths:
oneOf
:
-
$ref
:
'
#/components/schemas/HandmadeAssessmentSubmission'
-
$ref
:
'
#/components/schemas/VirtualAssessmentSubmission'
'
/assessments/{assessmentId}/evaluation'
:
get
:
tags
:
-
assessments
summary
:
Retrieves the Assessment Submission Evaluation.
responses
:
'
200'
:
description
:
'
'
content
:
application/json
:
schema
:
$ref
:
'
#/components/schemas/AssessmentSubmissionEvaluation'
parameters
:
-
name
:
assessmentId
in
:
path
required
:
true
schema
:
type
:
integer
/competifier
:
get
:
tags
:
...
...
@@ -491,112 +489,168 @@ paths:
'
/phases'
:
get
:
tags
:
-
phases
summary
:
Retrives all phases
-
phases
summary
:
Retri
e
ves all phases
responses
:
'
200'
:
description
:
'
'
content
:
application/json
:
schema
:
type
:
object
type
:
array
items
:
$ref
:
'
#/components/schemas/Phase'
'
/phases/{phaseId}'
:
get
:
tags
:
-
phases
summary
:
Retrieves a specific phase
responses
:
'
200'
:
description
:
'
'
content
:
application/json
:
schema
:
$ref
:
'
#/components/schemas/Phase'
parameters
:
-
name
:
phaseId
in
:
path
required
:
true
schema
:
type
:
integer
'
/phases/{phaseId}/ranking'
:
get
:
tags
:
-
phases
summary
:
Retrieves the last ranking of a given Phase
responses
:
'
200'
:
description
:
'
'
content
:
application/json
:
schema
:
type
:
array
items
:
$ref
:
'
#/components/schemas/Rank'
parameters
:
-
name
:
phaseId
in
:
path
required
:
true
schema
:
type
:
integer
'
/phases/{phaseId}/ranking/me'
:
get
:
tags
:
-
phases
summary
:
Retrieves the Competifier's Rank
responses
:
'
200'
:
description
:
'
Must
return
the
Classification
Rule,
the
Evaluation
Rule
and
evaluations.'
content
:
application/json
:
schema
:
$ref
:
'
#/components/schemas/Rank'
parameters
:
-
name
:
phaseId
in
:
path
required
:
true
schema
:
type
:
integer
components
:
schemas
:
ScheduledEvent
:
$ref
:
'
./schemas/Assessment.yaml
/
#/ScheduledEvent'
$ref
:
'
./schemas/Assessment.yaml#/ScheduledEvent'
Assessment
:
$ref
:
'
./schemas/Assessment.yaml
/
#/Assessment'
$ref
:
'
./schemas/Assessment.yaml#/Assessment'
VirtualAssessment
:
$ref
:
'
./schemas/Assessment.yaml
/
#/VirtualAssessment'
$ref
:
'
./schemas/Assessment.yaml#/VirtualAssessment'
HandmadeAssessment
:
$ref
:
'
./schemas/Assessment.yaml
/
#/HandmadeAssessment'
$ref
:
'
./schemas/Assessment.yaml#/HandmadeAssessment'
AssessmentEvent
:
$ref
:
'
./schemas/Assessment.yaml
/
#/AssessmentEvent'
$ref
:
'
./schemas/Assessment.yaml#/AssessmentEvent'
QuestionGroup
:
$ref
:
'
./schemas/Exam.yaml
/
#/QuestionGroup'
$ref
:
'
./schemas/Exam.yaml#/QuestionGroup'
QuestionStatement
:
$ref
:
'
./schemas/Exam.yaml
/
#/QuestionStatement'
$ref
:
'
./schemas/Exam.yaml#/QuestionStatement'
Question
:
$ref
:
'
./schemas/Exam.yaml
/
#/Question'
$ref
:
'
./schemas/Exam.yaml#/Question'
SubjectiveQuestion
:
$ref
:
'
./schemas/Exam.yaml
/
#/SubjectiveQuestion'
$ref
:
'
./schemas/Exam.yaml#/SubjectiveQuestion'
ObjectiveQuestion
:
$ref
:
'
./schemas/Exam.yaml
/
#/ObjectiveQuestion'
$ref
:
'
./schemas/Exam.yaml#/ObjectiveQuestion'
ExamCover
:
$ref
:
'
./schemas/Exam.yaml
/
#/ExamCover'
$ref
:
'
./schemas/Exam.yaml#/ExamCover'
Exam
:
$ref
:
'
./schemas/Exam.yaml
/
#/Exam'
$ref
:
'
./schemas/Exam.yaml#/Exam'
Alternative
:
$ref
:
'
./schemas/Exam.yaml
/
#/Alternative'
$ref
:
'
./schemas/Exam.yaml#/Alternative'
ExamQuestionComplaint
:
$ref
:
'
./schemas/Exam.yaml
/
#/ExamQuestionComplaint'
$ref
:
'
./schemas/Exam.yaml#/ExamQuestionComplaint'
AssessmentSubmission
:
$ref
:
'
./schemas/Submission.yaml
/
#/AssessmentSubmission'
$ref
:
'
./schemas/Submission.yaml#/AssessmentSubmission'
HandmadeAssessmentSubmission
:
$ref
:
'
./schemas/Submission.yaml
/
#/HandmadeAssessmentSubmission'
$ref
:
'
./schemas/Submission.yaml#/HandmadeAssessmentSubmission'
VirtualAssessmentSubmission
:
$ref
:
'
./schemas/Submission.yaml
/
#/VirtualAssessmentSubmission'
$ref
:
'
./schemas/Submission.yaml#/VirtualAssessmentSubmission'
Answer
:
$ref
:
'
./schemas/Submission.yaml
/
#/Answer'
$ref
:
'
./schemas/Submission.yaml#/Answer'
AssessmentSubmissionEvaluation
:
$ref
:
'
./schemas/Submission.yaml
/
#/AssessmentSubmissionEvaluation'
$ref
:
'
./schemas/Submission.yaml#/AssessmentSubmissionEvaluation'
AnswerGrade
:
$ref
:
'
./schemas/Submission.yaml
/
#/AnswerGrade'
$ref
:
'
./schemas/Submission.yaml#/AnswerGrade'
VirtualAssessmentSubmissionDraft
:
$ref
:
'
./schemas/Submission.yaml
/
#/VirtualAssessmentSubmissionDraft'
$ref
:
'
./schemas/Submission.yaml#/VirtualAssessmentSubmissionDraft'
Competifier
:
$ref
:
'
./schemas/Competifier.yaml
/
#/Competifier'
$ref
:
'
./schemas/Competifier.yaml#/Competifier'
SoloCompetifier
:
$ref
:
'
./schemas/Competifier.yaml
/
#/SoloCompetifier'
$ref
:
'
./schemas/Competifier.yaml#/SoloCompetifier'
TeamCompetifier
:
$ref
:
'
./schemas/Competifier.yaml
/
#/TeamCompetifier'
$ref
:
'
./schemas/Competifier.yaml#/TeamCompetifier'
CompetifierEvent
:
$ref
:
'
./schemas/Competifier.yaml
/
#/CompetifierEvent'
$ref
:
'
./schemas/Competifier.yaml#/CompetifierEvent'
Tag
:
$ref
:
'
./schemas/Competifier.yaml
/
#/Tag'
$ref
:
'
./schemas/Competifier.yaml#/Tag'
Participant
:
$ref
:
'
./schemas/Competifier.yaml
/
#/Participant'
$ref
:
'
./schemas/Competifier.yaml#/Participant'
Message
:
$ref
:
'
./schemas/Competifier.yaml
/
#/Message'
$ref
:
'
./schemas/Competifier.yaml#/Message'
JsonPatch
:
$ref
:
'
./schemas/JsonPatch.yaml'
Competition
:
$ref
:
'
./schemas/Phase.yaml
/
#/Competition'
$ref
:
'
./schemas/Phase.yaml#/Competition'
Phase
:
$ref
:
'
./schemas/Phase.yaml
/
#/Phase'
$ref
:
'
./schemas/Phase.yaml#/Phase'
PhaseEvent
:
$ref
:
'
./schemas/Phase.yaml
/
#/PhaseEvent'
$ref
:
'
./schemas/Phase.yaml#/PhaseEvent'
PhaseParticipation
:
$ref
:
'
./schemas/Phase.yaml
/
#/PhaseParticipation'
$ref
:
'
./schemas/Phase.yaml#/PhaseParticipation'
BestRanked
:
$ref
:
'
./schemas/Phase.yaml
/
#/BestRanked'
$ref
:
'
./schemas/Phase.yaml#/BestRanked'
MinimumPerformance
:
$ref
:
'
./schemas/Phase.yaml
/
#/MinimumPerformance'
$ref
:
'
./schemas/Phase.yaml#/MinimumPerformance'
ClassificationRule
:
$ref
:
'
./schemas/Phase.yaml
/
#/ClassificationRule'
$ref
:
'
./schemas/Phase.yaml#/ClassificationRule'
EvaluationRule
:
$ref
:
'
./schemas/Phase.yaml
/
#/EvaluationRule'
$ref
:
'
./schemas/Phase.yaml#/EvaluationRule'
TieBreakCriteria
:
$ref
:
'
./schemas/Phase.yaml/#/TieBreakCriteria'
Ranking
:
$ref
:
'
./schemas/Phase.yaml/#/Ranking'
$ref
:
'
./schemas/Phase.yaml#/TieBreakCriteria'
Rank
:
$ref
:
'
./schemas/Phase.yaml
/
#/Rank'
$ref
:
'
./schemas/Phase.yaml#/Rank'
SubscriptionRule
:
$ref
:
'
./schemas/Subscription.yaml
/
#/SubscriptionRule'
$ref
:
'
./schemas/Subscription.yaml#/SubscriptionRule'
Subscription
:
$ref
:
'
./schemas/Subscription.yaml
/
#/Subscription'
$ref
:
'
./schemas/Subscription.yaml#/Subscription'
SoloSubscription
:
$ref
:
'
./schemas/Subscription.yaml
/
#/SoloSubscription'
$ref
:
'
./schemas/Subscription.yaml#/SoloSubscription'
TeamSubscription
:
$ref
:
'
./schemas/Subscription.yaml
/
#/TeamSubscription'
$ref
:
'
./schemas/Subscription.yaml#/TeamSubscription'
FormTemplate
:
$ref
:
'
./schemas/Subscription.yaml
/
#/FormTemplate'
$ref
:
'
./schemas/Subscription.yaml#/FormTemplate'
FormField
:
$ref
:
'
./schemas/Subscription.yaml
/
#/FormField'
$ref
:
'
./schemas/Subscription.yaml#/FormField'
FormAnswer
:
$ref
:
'
./schemas/Subscription.yaml
/
#/FormAnswer'
$ref
:
'
./schemas/Subscription.yaml#/FormAnswer'
FormSection
:
$ref
:
'
./schemas/Subscription.yaml
/
#/FormSection'
$ref
:
'
./schemas/Subscription.yaml#/FormSection'
Api/package.json
View file @
6c032ff6
...
...
@@ -5,12 +5,12 @@
"license"
:
"MIT"
,
"scripts"
:
{
"start"
:
"concurrently
\"
npm run start:files
\"
\"
npm run start:editor
\"
"
,
"start:editor"
:
"
http-server ./node_modules/swagger-editor-dist -p 3000
"
,
"start:files"
:
"
http-server . -p
3001"
"start:editor"
:
"
live-server ./node_modules/swagger-editor-dist --port=3000 --no-browser
"
,
"start:files"
:
"
live-server . --no-browser --port=
3001"
},
"dependencies"
:
{
"concurrently"
:
"^3.5.1"
,
"
http-server"
:
"^0.11.1
"
,
"
live-server"
:
"^1.2.0
"
,
"swagger-editor-dist"
:
"^3.5.5"
}
}
Api/schemas/Assessment.yaml
View file @
6c032ff6
...
...
@@ -37,7 +37,7 @@ Assessment:
description
:
Why the fuck is this a string?
type
:
string
exam
:
$ref
:
'
.
./Exam.yaml/
#/Exam'
$ref
:
'
.
/Exam.yaml
#/Exam'
oid
:
description
:
Object identifier
type
:
integer
...
...
Api/schemas/Phase.yaml
View file @
6c032ff6
...
...
@@ -7,7 +7,6 @@ Competition:
name
:
type
:
string
oid
:
format
:
int32
type
:
integer
subscriptionConf
:
$ref
:
'
#/SubscriptionRule'
...
...
@@ -22,13 +21,11 @@ Phase:
order
:
type
:
integer
type
:
format
:
int32
description
:
{
CLASSIFICATORY
,
FINAL
}
type
:
integer
status
:
format
:
int32
type
:
integer
oid
:
format
:
int32
type
:
integer
events
:
type
:
array
...
...
@@ -46,11 +43,9 @@ PhaseEvent:
properties
:
timestamp
:
type
:
integer
format
:
int64
descr
:
type
:
string
type
:
format
:
int32
description
:
'
{PHASE_CREATED,
PHASE_STARTED,
EVALUATION_FORMULA_UPDATED,
RANKING_EVALUATED,
PHASE_CLOSED}'
type
:
integer
PhaseParticipation
:
...
...
@@ -87,10 +82,8 @@ ClassificationRule:
-
type
properties
:
oid
:
format
:
int32
type
:
integer
type
:
format
:
int32
description
:
'
{BEST_RANKED,
MINIMUM_PERFORMANCE}'
type
:
integer
discriminator
:
...
...
@@ -103,7 +96,6 @@ EvaluationRule:
-
expression
properties
:
oid
:
format
:
int32
type
:
integer
expression
:
type
:
string
...
...
@@ -112,35 +104,22 @@ TieBreakCriteria:
-
type
properties
:
oid
:
format
:
int32
type
:
integer
type
:
format
:
int32
type
:
integer
Rank
ing
:
Rank
:
required
:
-
position
-
grade
-
status
-
timestamp
-
evaluationRule
properties
:
timestamp
:
type
:
integer
format
:
int64
qualified
:
type
:
array
items
:
$ref
:
'
#/Rank'
classificationRule
:
$ref
:
'
#/ClassificationRule'
evaluationRule
:
$ref
:
'
#/EvaluationRule'
positions
:
type
:
array
items
:
$ref
:
'
#/Rank'
Rank
:
required
:
-
position
-
grade
-
status
properties
:
position
:
type
:
integer
grade
:
...
...
@@ -148,7 +127,7 @@ Rank:
status
:
description
:
'
[QUALIFIED,
DISQUALIFIED]'
type
:
integer
assessmentE
valuations
:
e
valuations
:
type
:
array
items
:
$ref
:
'
#/AssessmentSubmissionEvaluation'
$ref
:
'
./Submission.yaml
#/AssessmentSubmissionEvaluation'
Api/yarn.lock
View file @
6c032ff6
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment