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