Commit 245d087f authored by bernardosunderhus's avatar bernardosunderhus Committed by Bernardo Lucas Almeida Sunderhus

[API] Conserto dos mapping por enumerado

parent 9354acba
...@@ -54,6 +54,7 @@ paths: ...@@ -54,6 +54,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloCompetifier' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloCompetifier'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamCompetifier' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamCompetifier'
...@@ -64,6 +65,7 @@ paths: ...@@ -64,6 +65,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloCompetifier' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloCompetifier'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamCompetifier' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamCompetifier'
...@@ -167,6 +169,7 @@ paths: ...@@ -167,6 +169,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/ObjectiveQuestion' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/ObjectiveQuestion'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SubjectiveQuestion' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SubjectiveQuestion'
...@@ -177,6 +180,7 @@ paths: ...@@ -177,6 +180,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/ObjectiveQuestion' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/ObjectiveQuestion'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SubjectiveQuestion' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SubjectiveQuestion'
...@@ -200,6 +204,7 @@ paths: ...@@ -200,6 +204,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/ObjectiveQuestion' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/ObjectiveQuestion'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SubjectiveQuestion' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SubjectiveQuestion'
...@@ -222,6 +227,7 @@ paths: ...@@ -222,6 +227,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/ObjectiveQuestion' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/ObjectiveQuestion'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SubjectiveQuestion' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SubjectiveQuestion'
...@@ -264,6 +270,7 @@ paths: ...@@ -264,6 +270,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubscription' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubscription'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubscription' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubscription'
...@@ -274,6 +281,7 @@ paths: ...@@ -274,6 +281,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubscription' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubscription'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubscription' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubscription'
...@@ -315,6 +323,7 @@ paths: ...@@ -315,6 +323,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubscription' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubscription'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubscription' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubscription'
...@@ -345,6 +354,7 @@ paths: ...@@ -345,6 +354,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubscription' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubscription'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubscription' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubscription'
...@@ -359,6 +369,7 @@ paths: ...@@ -359,6 +369,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubscriptionRule' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubscriptionRule'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubscriptionRule' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubscriptionRule'
...@@ -753,6 +764,7 @@ paths: ...@@ -753,6 +764,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessment' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessment'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessment' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessment'
...@@ -763,6 +775,7 @@ paths: ...@@ -763,6 +775,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessment' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessment'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessment' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessment'
...@@ -784,6 +797,7 @@ paths: ...@@ -784,6 +797,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessment' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessment'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessment' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessment'
...@@ -805,6 +819,7 @@ paths: ...@@ -805,6 +819,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessment' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessment'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessment' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessment'
...@@ -888,6 +903,7 @@ paths: ...@@ -888,6 +903,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessmentSubmission' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessmentSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessmentSubmission' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessmentSubmission'
...@@ -899,6 +915,7 @@ paths: ...@@ -899,6 +915,7 @@ paths:
content: content:
application/json-patch+json: application/json-patch+json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessmentSubmission' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessmentSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessmentSubmission' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessmentSubmission'
...@@ -909,6 +926,7 @@ paths: ...@@ -909,6 +926,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessmentSubmission' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessmentSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessmentSubmission' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessmentSubmission'
...@@ -936,6 +954,7 @@ paths: ...@@ -936,6 +954,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessmentSubmission' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessmentSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessmentSubmission' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessmentSubmission'
...@@ -1007,6 +1026,7 @@ paths: ...@@ -1007,6 +1026,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/MinimumPerformance' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/MinimumPerformance'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/BestRanked' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/BestRanked'
...@@ -1028,6 +1048,7 @@ paths: ...@@ -1028,6 +1048,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/MinimumPerformance' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/MinimumPerformance'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/BestRanked' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/BestRanked'
......
...@@ -172,6 +172,7 @@ paths: ...@@ -172,6 +172,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: >- - $ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessment https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/VirtualAssessment
...@@ -489,6 +490,7 @@ paths: ...@@ -489,6 +490,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: >- - $ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessmentSubmission https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessmentSubmission
...@@ -523,6 +525,7 @@ paths: ...@@ -523,6 +525,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: >- - $ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessmentSubmission https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/HandmadeAssessmentSubmission
...@@ -573,6 +576,7 @@ paths: ...@@ -573,6 +576,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: >- - $ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloCompetifier https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloCompetifier
...@@ -599,6 +603,7 @@ paths: ...@@ -599,6 +603,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object
oneOf: oneOf:
- $ref: >- - $ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloCompetifier https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloCompetifier
......
...@@ -62,8 +62,8 @@ Assessment: ...@@ -62,8 +62,8 @@ Assessment:
discriminator: discriminator:
propertyName: type propertyName: type
mapping: mapping:
0: '#/VirtualAssessment' VIRTUAL: '#/VirtualAssessment'
1: '#/HandmadeAssessment' HANDMADE: '#/HandmadeAssessment'
VirtualAssessment: VirtualAssessment:
required: required:
- enforceSequence - enforceSequence
......
...@@ -31,7 +31,10 @@ Question: ...@@ -31,7 +31,10 @@ Question:
properties: properties:
type: type:
description: Inheritance type identifcation description: Inheritance type identifcation
type: integer type: string
enum:
- SUBJECTIVE
- OBJECTIVE
statement: statement:
$ref: '#/QuestionStatement' $ref: '#/QuestionStatement'
oid: oid:
...@@ -55,8 +58,8 @@ Question: ...@@ -55,8 +58,8 @@ Question:
discriminator: discriminator:
propertyName: type propertyName: type
mapping: mapping:
0: '#/SubjectiveQuestion' SUBJECTIVE: '#/SubjectiveQuestion'
1: '#/ObjectiveQuestion' OBJECTIVE: '#/ObjectiveQuestion'
SubjectiveQuestion: SubjectiveQuestion:
allOf: allOf:
- $ref: '#/Question' - $ref: '#/Question'
......
...@@ -9,7 +9,7 @@ Competition: ...@@ -9,7 +9,7 @@ Competition:
oid: oid:
type: integer type: integer
subscriptionConf: subscriptionConf:
$ref: '#/SubscriptionRule' $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/SubscriptionRule'
Phase: Phase:
required: required:
- label - label
...@@ -98,8 +98,8 @@ ClassificationRule: ...@@ -98,8 +98,8 @@ ClassificationRule:
discriminator: discriminator:
propertyName: type propertyName: type
mapping: mapping:
'0': '#/BestRanked' BEST_RANKED: '#/BestRanked'
'1': '#/MinimumPerformance' MINIMUM_PERFORMANCE: '#/MinimumPerformance'
EvaluationRule: EvaluationRule:
required: required:
- expression - expression
......
...@@ -57,8 +57,8 @@ Subscription: ...@@ -57,8 +57,8 @@ Subscription:
discriminator: discriminator:
propertyName: type propertyName: type
mapping: mapping:
'0': '#/TeamSubscription' TEAM: '#/TeamSubscription'
'1': '#/SoloSubscription' SOLO: '#/SoloSubscription'
SoloSubscription: SoloSubscription:
allOf: allOf:
- $ref: '#/Subscription' - $ref: '#/Subscription'
...@@ -83,7 +83,10 @@ FormTemplate: ...@@ -83,7 +83,10 @@ FormTemplate:
- type - type
properties: properties:
type: type:
type: integer type: string
enum:
- TEAM
- PARTICIPANT
fields: fields:
type: array type: array
items: items:
...@@ -100,7 +103,10 @@ FormField: ...@@ -100,7 +103,10 @@ FormField:
label: label:
type: string type: string
type: type:
type: integer type: string
enum:
- TEXT
- DATE
unique: unique:
type: boolean type: boolean
required: required:
...@@ -141,4 +147,5 @@ FormSection: ...@@ -141,4 +147,5 @@ FormSection:
oid: oid:
type: integer type: integer
type: type:
type: integer type: string
enum:
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