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

[API] Correção nos schemas

parent 152ec00f
ScheduledEvent: Assessment:
required: required:
- id - id
- startsAt - title
- endsAt - showResult
- showAnswerKey
- type
- locationType
- status
properties: properties:
id: id:
description: The object identification description: Object identifier
type: integer type: integer
startsAt: title:
format: date-time
description: The time of the begining of the assessment
type: string type: string
endsAt: location:
format: date-time description:
description: The time of the ending of the assessment
type: string
Assessment:
required:
- status
- type
- id
- resultAvailable
- answerKeyAvailable
- locationType
- schedule
properties:
status:
type: string type: string
enum: exam:
- PREP $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Exam.yaml/#/Exam'
- SUBMISSION showResult:
- EVALUATION 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:
type: string type: string
enum: enum:
- VIRTUAL - VIRTUAL
- HANDMADE - HANDMADE
schedule:
$ref: '#/ScheduledEvent'
location:
description: Why the fuck is this a string?
type: string
exam:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Exam.yaml/#/Exam'
id:
description: Object identifier
type: integer
locationType: locationType:
type: string type: string
enum: enum:
- ONLINE - ONLINE
- ON_SITE - ON_SITE
resultAvailable: status:
description: type: string
Boolean indicating if the result is already avialable to exhibition enum:
type: boolean - PREP
answerKeyAvailable: - SUBMISSION
description: - EVALUATION
Boolean indicating if the answerKey is already available to exhibition assignments:
type: boolean type: array
items:
$ref: '#/Assignment'
discriminator: discriminator:
propertyName: type propertyName: type
mapping: mapping:
VIRTUAL: '#/VirtualAssessment' VIRTUAL: '#/VirtualAssessment'
HANDMADE: '#/HandmadeAssessment' HANDMADE: '#/HandmadeAssessment'
VirtualAssessment: AssessmentEvent:
required: required:
- enforceSequence - timestamp
allOf: - type
- $ref: '#/Assessment' properties:
- type: object timestamp:
properties: type: string
enforceSequence: desc:
type: boolean type: string
description: type:
Boolean indicating if the assessment must be done in order 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: HandmadeAssessment:
required: required:
- submitterType - submitterType
...@@ -87,9 +110,31 @@ HandmadeAssessment: ...@@ -87,9 +110,31 @@ HandmadeAssessment:
enum: enum:
- ADMIN - ADMIN
- ADMIN_OR_COMPETIFIER - ADMIN_OR_COMPETIFIER
AssessmentEvent: ScheduledEvent:
required:
- id
- startsAt
- endsAt
properties: properties:
timestamp: id:
description: The object identification
type: integer
startsAt:
format: date-time
description: The time of the begining of the assessment
type: string type: string
desc: endsAt:
format: date-time
description: The time of the ending of the assessment
type: string 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
Competifier: Competifier:
required:
- type
- user
- competition
properties: properties:
tags:
type: array
items:
$ref: '#/Tag'
type: type:
type: string type: string
enum: enum:
- SOLO - SOLO
- TEAM - TEAM
events: 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 type: array
items: items:
$ref: '#/CompetifierEvent' $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: discriminator:
propertyName: type 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: SoloCompetifier:
required:
- firstName
allOf: allOf:
- $ref: '#/Competifier' - $ref: '#/Competifier'
- type: object - type: object
...@@ -25,6 +61,8 @@ SoloCompetifier: ...@@ -25,6 +61,8 @@ SoloCompetifier:
lastName: lastName:
type: string type: string
TeamCompetifier: TeamCompetifier:
required:
- name
allOf: allOf:
- $ref: '#/Competifier' - $ref: '#/Competifier'
- type: object - type: object
...@@ -38,43 +76,14 @@ TeamCompetifier: ...@@ -38,43 +76,14 @@ TeamCompetifier:
items: items:
$ref: '#/Participant' $ref: '#/Participant'
Tag: Tag:
required:
- label
- value
properties: properties:
label: label:
type: string type: string
value: value:
type: string type: string
Participant:
properties:
firstName:
type: string
lastName:
type: string
tags:
type: array
items:
$ref: '#/Tag'
Message:
properties:
timestamp:
format: date-time
type: string
title:
type: string
body:
type: string
read:
type: boolean
CompetifierEvent:
required:
- timestamp
- descr
- type
properties:
timestamp:
type: integer
descr:
type: string
type:
type: string
QuestionGroup: Alternative:
required:
- order
- statement
properties:
order:
type: number
statement:
type: string
Exam:
required: required:
- id - id
- label - title
- weight - type
- cover
- questions
- groups
properties: properties:
id: id:
description: Object identifier
type: integer type: integer
label: title:
type: string
type:
type: string type: string
weight: enum:
format: float - SUBJECTIVE-ONLY
type: number - OBJECTIVE-ONLY
QuestionStatement: - MIXED
cover:
$ref: '#/ExamCover'
groups:
type: array
items:
$ref: '#/QuestionGroup'
questions:
type: array
items:
oneOf:
- $ref: '#/SubjectiveQuestion'
- $ref: '#/ObjectiveQuestion'
ExamCover:
required: required:
- id - id
- content - content
properties: properties:
content:
type: string
id: id:
type: integer type: integer
content: ExamQuestionComplaint:
properties:
timestamp:
format: date-time
type: string
text:
type: string type: string
question:
$ref: '#/Question'
ObjectiveQuestion:
allOf:
- $ref: '#/Question'
- type: object
properties:
answerKey:
$ref: '#/Alternative'
alternatives:
type: array
items:
$ref: '#/Alternative'
Question: Question:
required: required:
- type
- id - id
- group - order
- order - type
- weight
- status - status
- group
- statement
properties: properties:
type:
description: Inheritance type identifcation
type: string
enum:
- SUBJECTIVE
- OBJECTIVE
statement:
type: string
id: id:
description: object identifier of this Question description: object identifier of this Question
type: integer type: integer
group:
description: Group for which this given Question belongs in this Exam
type: integer
order: order:
description: Position of this Question in this Exam description: Position of this Question in this Exam
type: integer type: integer
weight: weight:
format: float format: float
description: Weight associated with this Question description: Weight associated with this Question
type: number type: number
type:
description: Inheritance type identifcation
type: string
enum:
- SUBJECTIVE
- OBJECTIVE
status: status:
type: string type: string
enum: enum:
- ACTIVE - ACTIVE
- CANCELED - CANCELED
group:
description: Group for which this given Question belongs in this Exam
type: integer
statement:
type: string
discriminator: discriminator:
propertyName: type propertyName: type
mapping: mapping:
SUBJECTIVE: '#/SubjectiveQuestion' SUBJECTIVE: '#/SubjectiveQuestion'
OBJECTIVE: '#/ObjectiveQuestion' OBJECTIVE: '#/ObjectiveQuestion'
SubjectiveQuestion: QuestionGroup:
allOf:
- $ref: '#/Question'
- type: object
properties:
answerKey:
format: string
type: string
ObjectiveQuestion:
allOf:
- $ref: '#/Question'
- type: object
properties:
alternatives:
type: array
items:
$ref: '#/Alternative'
answerKey:
type: integer
ExamCover:
required: required:
- content
- id - id
- label
- weight
properties: properties:
content:
type: string
id: id:
type: integer type: integer
Exam: label:
required:
- type
- title
- groups
- questions
- id
properties:
type:
type: string
enum:
- SUBJECTIVE-ONLY
- OBJECTIVE-ONLY
- MIXED
title:
type: string type: string
cover: weight:
$ref: '#/ExamCover' format: float
groups: type: number
type: array QuestionStatement:
items:
$ref: '#/QuestionGroup'
questions:
type: array
items:
oneOf:
- $ref: '#/SubjectiveQuestion'
- $ref: '#/ObjectiveQuestion'
id:
description: Object identifier
type: integer
Alternative:
required: required:
- order
- statement
- id - id
- content
properties: properties:
order:
title: order
description: position of this alternative to it's question
type: integer
statement:
description: the alternative statement
type: string
id: id:
description: Object identifier
type: integer type: integer
ExamQuestionComplaint: content:
properties:
timestamp:
format: date-time
type: string
text:
type: string type: string
question: SubjectiveQuestion:
$ref: '#/Question' allOf:
- $ref: '#/Question'
- type: object
properties:
answerKey:
format: string
type: string
Competition: Competition:
required: required:
- subscription
- name
- uri
- id - id
- uri
- name
- status - status
- exams - subscription
properties: properties:
id:
type: integer
uri: uri:
type: string type: string
name: name:
...@@ -17,53 +14,148 @@ Competition: ...@@ -17,53 +14,148 @@ Competition:
type: string type: string
status: status:
type: string type: string
enum: enum:
- ACTIVE - ACTIVE
- INACTIVE - INACTIVE
subscription: subscription:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/Subscription' $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/Subscription'
token:
type: string
exams: exams:
type: array type: array
items: 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'
AssessmentConclusionTime:
allOf:
- $ref: '#/TieBreakStrategy'
- type: object
AssessmentPriority:
required:
- priority
allOf:
$ref: '#/TieBreakStrategy'
type: object
properties:
priority:
type: integer 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: Phase:
required: required:
- id
- label - label
- type - status
- evaluationFormula
- classificationStrategy
- competition
properties: properties:
id: id:
type: integer type: integer
label: label:
type: string type: string
status:
type: string
enum:
- PREP
- ONGOING
- EVALUATION
- CLOSED
previous: previous:
type: integer $ref: '#/Phase'
next: next:
type: integer $ref: '#/Phase'
status: evaluationFormula:
type: integer $ref: '#/EvaluationFormula'
events:
type: array
items:
type: integer
classificationStrategy: classificationStrategy:
$ref: '#/ClassificationStrategy' $ref: '#/ClassificationStrategy'
formula: ranking:
type: string $ref: '#/Ranking'
assessments: assessments:
type: array type: array
items: items:
type: integer $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: participations:
type: array type: array
items: items:
type: integer $ref: '#/PhaseParticipation'
competition:
$ref: '#/Competition'
PhaseEvent: PhaseEvent:
required: required:
- type
- timestamp - timestamp
- descr - descr
- type
properties: properties:
timestamp: timestamp:
type: integer type: integer
...@@ -79,78 +171,36 @@ PhaseEvent: ...@@ -79,78 +171,36 @@ PhaseEvent:
- PHASE_CLOSED - PHASE_CLOSED
PhaseParticipation: PhaseParticipation:
properties: properties:
rank: competifier:
$ref: '#/Rank' $ref: '#/Competifier'
phase: phase:
$ref: '#/Phase' $ref: '#/Phase'
BestRanked: status:
required:
- tieBreakCriterias
- number
allOf:
- $ref: '#/ClassificationStrategy'
- type: object
properties:
number:
type: integer
tieBreakCriterias:
type: array
items:
$ref: '#/TieBreakCriteria'
MinimumPerformance:
required:
- cutOffMark
allOf:
- $ref: '#/ClassificationStrategy'
- type: object
properties:
cutOffMark:
type: number
ClassificationStrategy:
required:
- type
properties:
id:
type: integer
type:
type: string type: string
enum: enum:
- BEST_RANKED - ACTIVE
- MINIMUM_PERFORMANCE - APPROVED
discriminator: - DISQUALIFIED
propertyName: type - REJECTED
mapping: assignments:
BEST_RANKED: '#/BestRanked' type: array
MINIMUM_PERFORMANCE: '#/MinimumPerformance' items:
EvaluationFormula: $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.yaml/#/Assignment'
required: QuestionGroupPriorityStrategy:
- expression allOf:
properties: $ref: '#/TieBreakStrategy'
id: type: object
type: integer properties:
expression: priorities:
type: string type: array
TieBreakCriteria: items:
required: $ref: '#/GroupPriority'
- type
properties:
id:
type: integer
type:
type: integer
Rank: Rank:
required: required:
- position - position
- grade - grade
- status - status
- timestamp
properties: properties:
timestamp:
type: integer
classificationStrategy:
$ref: '#/ClassificationStrategy'
EvaluationFormula:
$ref: '#/EvaluationFormula'
position: position:
type: integer type: integer
grade: grade:
...@@ -160,20 +210,44 @@ Rank: ...@@ -160,20 +210,44 @@ Rank:
enum: enum:
- QUALIFIED - QUALIFIED
- DISQUALIFIED - DISQUALIFIED
evaluations: participation:
type: array $ref: '#/PhaseParticipation'
items:
type: integer
Ranking: Ranking:
required: required:
- id
- timestamp - timestamp
properties: properties:
id: id:
type: integer type: integer
ranks: evaluationFormula:
$ref: '#/EvaluationFormula'
positions:
type: array type: array
items: items:
$ref: '#/Rank' $ref: '#/Rank'
timestamp: 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 type: integer
discriminator:
\ No newline at end of file propertyName: type
mapping:
ASSESSMENT_PRIORITY: '#/AssessmentPriority'
QUESTION_PRIORITY: '#/QuestionGroupPriorityStrategy'
ASSESSMENT_CONCLUSION_TIME: '#/AssessmentConclusionTime'
AssessmentSubmission: Answer:
required:
- type
- question
properties: properties:
assessment:
description: The id assessment that this submission refers to
type: integer
type: type:
type: string type: string
enum: enum:
- VIRTUAL - SUBJECTIVE
- HANDMADE - 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: lastUpdate:
format: date-time type: number
description: Last time this submission was modified 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 type: string
competifier: enum:
type: integer - VIRTUAL
description: The id of the competifier that this submission refers to - HANDMADE
discriminator: discriminator:
propertyName: type 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: HandmadeAssessmentSubmission:
allOf: allOf:
- $ref: '#/AssessmentSubmission' - $ref: '#/AssessmentSubmission'
- type: object - type: object
required:
- uploadUri
properties: properties:
loadUri: uploadUri:
type: string 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: VirtualAssessmentSubmission:
allOf: allOf:
- $ref: '#/AssessmentSubmission' - $ref: '#/AssessmentSubmission'
- type: object - type: object
required:
- startedAt
properties: properties:
startedAt: startedAt:
type: string type: string
...@@ -39,32 +96,13 @@ VirtualAssessmentSubmission: ...@@ -39,32 +96,13 @@ VirtualAssessmentSubmission:
type: array type: array
items: items:
$ref: '#/Answer' $ref: '#/Answer'
Answer: draft:
properties: $ref: '#/VirtualAssessmentSubmissionDraft'
type:
type: integer
freeText:
type: string
choice:
type: integer
question:
type: integer
AssessmentSubmissionEvaluation:
properties:
timestamp:
type: integer
grades:
type: array
items:
$ref: '#/AnswerGrade'
AnswerGrade:
properties:
grade:
format: float
type: number
question:
type: integer
VirtualAssessmentSubmissionDraft: VirtualAssessmentSubmissionDraft:
required:
- createdAt
- content
- assignment
properties: properties:
createdAt: createdAt:
format: date-time format: date-time
...@@ -75,5 +113,76 @@ VirtualAssessmentSubmissionDraft: ...@@ -75,5 +113,76 @@ VirtualAssessmentSubmissionDraft:
content: content:
type: string type: string
assessment: assessment:
format: int32 $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.yaml/#/Assignment'
type: integer Submission:
required:
- timestamp
- type
- status
properties:
competition:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Phase.yaml/#/Competition'
timestamp:
type: number
type:
type: string
enum:
- SOLO
- TEAM
sections:
type: array
items:
$ref: '#/SubmissionSection'
invitations:
type: array
items:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/Invitation'
discriminator:
propertyName: type
mapping:
SOLO: '#/SoloSubmission'
TEAM: '#/TeamSubmission'
SubmissionSection:
required:
- type
- template
properties:
type:
type: string
enum:
- PARTICIPANT
- TEAM
answers:
type: array
items:
$ref: '#/answers'
template:
$ref: '#/FormTemplate'
discriminator:
propertyName: type
mapping:
PARTICIPANT: '#/ParticipantSubmissionSection'
TEAM: '#/TeamSubmissionSection'
TeamSubmission:
required:
- team
allOf:
- type: object
- $ref: '#/Submission'
properties:
team:
$ref: '#/TeamSubmissionSection'
leader:
$ref: '#/ParticipantSubmissionSection'
participants:
type: array
items:
$ref: '#/ParticipantSubmissionSection'
TeamSubmissionSection:
allOf:
- type: object
- $ref: '#SubmissionSection'
ParticipantSubmissionSection:
allOf:
type: object
$ref: '#/SubmissionSection'
\ No newline at end of file
SoloSubscription:
$ref: '#/Subscription'
TeamSubscription:
allOf:
- $ref: '#/Subscription'
- type: object
properties:
teamTemplate:
description: The team template id of this subscription
type: integer
minMembers:
type: integer
maxMembers:
type: integer
Subscription:
required:
- type
- status
properties:
participantTemplate:
description: The participant template id of this subscription
type: integer
type:
type: string
enum:
- SOLO
- TEAM
status:
type: string
enum:
- PREP
- OPEN
- CLOSED
id:
type: integer
discriminator:
propertyName: type
mapping:
- SOLO: '#/SoloSubscription'
- TEAM: '#/TeamSubscription'
SubscriptionSubmission:
required:
- status
- timestamp
- type
type: object
properties:
timestamp:
type: integer
status:
type: string
enum:
- WAITING_REVIEW
- ACCEPTED
- REJECTED
id:
type: integer
type:
type: string
enum:
- TEAM
- SOLO
discriminator:
propertyName: type
mapping:
TEAM: '#/TeamSubscriptionSubmission'
SOLO: '#/SoloSubscriptionSubmission'
SoloSubscriptionSubmission:
allOf:
- $ref: '#/SubscriptionSubmission'
- type: object
properties:
participant:
$ref: '#/ParticipantSubscriptionSection'
TeamSubscriptionSubmission:
allOf:
- $ref: '#/SubscriptionSubmission'
- type: object
properties:
team:
$ref: '#/TeamSubscriptionSection'
participants:
type: array
items:
$ref: '#/ParticipantSubscriptionSection'
leader:
$ref: '#/ParticipantSubscriptionSection'
FormTemplate:
required:
- fields
- type
properties:
type:
type: string
enum:
- TEAM
- PARTICIPANT
fields:
type: array
items:
$ref: '#/FormField'
id:
type: integer
FormField: FormField:
required: required:
- id
- label - label
- removable - qualifier
- order
- required - required
- type
- unique - unique
- removable
- type
properties: properties:
id:
type: integer
label: label:
type: string type: string
type:
type: string
enum:
- TEXT
- DATE
unique:
type: boolean
required:
type: boolean
removable:
type: boolean
qualifier: qualifier:
type: string type: string
enum: enum:
...@@ -130,68 +21,64 @@ FormField: ...@@ -130,68 +21,64 @@ FormField:
- TEAM_NAME - TEAM_NAME
- EMAIL - EMAIL
- OTHER - OTHER
id: order:
type: integer type: integer
FormAnswer: required:
title: Root Type for FormAnswer type: boolean
description: The root of the FormAnswer type's schema. unique:
type: boolean
removable:
type: boolean
type:
type: string
enum:
- TEXT
- DATE
FormFieldAnswer:
required: required:
- field - field
- value - value
type: object
properties: properties:
field: field:
type: integer $ref: '#/FormField'
value: value:
type: string type: string
error:
type: string
qualifier: qualifier:
type: string type: string
enum: enum:
- FIRST_NAME - FIRST_NAME
- LAST_NAME - LAST_NAME
- TEAM_NAME - TEAM_NAME
- EMAIL - EMAIL
- OTHER - OTHER
id: FormTemplate:
type: integer
SubscriptionSection:
title: Root Type for SubscriptionSection
description: The root of the SubscriptionSection type's schema.
required: required:
- answers - id
- template - field
- type - value
type: object properties:
properties:
template:
type: integer
answers:
type: array
items:
$ref: '#/FormAnswer'
id: id:
type: integer type: integer
type: field:
$ref: '#/FormField'
value:
type: string
qualifier:
type: string type: string
enum: enum:
- TEAM - FIRST_NAME
- PARTICIPANT - LAST_NAME
TeamSubscriptionSection: - TEAM_NAME
type: object - EMAIL
allOf: - OTHER
- $ref: '#/SubscriptionSection'
ParticipantSubscriptionSection:
type: object
allOf:
- $ref: '#/SubscriptionSection'
Invitation: Invitation:
title: Submission invitation token. title: Submission invitation token.
required: required:
- id
- token - token
- subject - subject
- submission - submission
- status
type: object type: object
properties: properties:
id: id:
...@@ -199,12 +86,58 @@ Invitation: ...@@ -199,12 +86,58 @@ Invitation:
token: token:
type: string type: string
subject: subject:
type: string type: string
type: submission:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.yaml/#/Submission'
status:
type: string type: string
enum: enum:
- AVAILABLE - AVAILABLE
- CONSUMED - CONSUMED
- EXPIRED - EXPIRED
submission: SoloSubscription:
$ref: '#/SubscriptionSubmission' allOf:
\ No newline at end of file type: object
$ref: '#/Subscription'
Subscription:
required:
- requestReview
- status
- participantTemplate
properties:
id:
type: integer
requestReview:
type: boolean
status:
type: string
enum:
- PREP
- OPEN
- CLOSED
schedule:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.yaml/#/ScheduleEvent'
type:
type: string
enum:
- SOLO
- TEAM
participantTemplate:
$ref: '#/FormTemplate'
discriminator:
propertyName: type
mapping:
- SOLO: '#/SoloSubscription'
- TEAM: '#/TeamSubscription'
TeamSubscription:
allOf:
- $ref: '#/Subscription'
- type: object
properties:
teamTemplate:
description: The team template id of this subscription
$ref: '#/FormTemplate'
minMembers:
type: integer
maxMembers:
type: integer
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