Commit 4a156d3c authored by Rosana Aurélio's avatar Rosana Aurélio

[API] Correção api submission

parent c9bb66ca
......@@ -202,8 +202,8 @@ paths:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubscriptionSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubscriptionSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubmission'
required: true
responses:
'200':
......@@ -213,8 +213,8 @@ paths:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubscriptionSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubscriptionSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubmission'
/assessments:
parameters:
- $ref: >-
......
......@@ -187,8 +187,8 @@ paths:
type: array
items:
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubscriptionSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubscriptionSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubmission'
/subscription/submissions/{submissionId}:
get:
tags:
......@@ -203,8 +203,8 @@ paths:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubscriptionSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubscriptionSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubmission'
parameters:
- name: submissionId
in: path
......@@ -225,8 +225,8 @@ paths:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubscriptionSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubscriptionSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubmission'
required: true
responses:
'200':
......@@ -236,8 +236,8 @@ paths:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubscriptionSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubscriptionSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubmission'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubmission'
parameters:
- name: submissionId
in: path
......
......@@ -130,12 +130,12 @@ TeamSubscription:
SubscriptionSubmission:
$ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/SubscriptionSubmission
SoloSubscriptionSubmission:
SoloSubmission:
$ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/SoloSubscriptionSubmission
TeamSubscriptionSubmission:
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/SoloSubmission
TeamSubmission:
$ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/TeamSubscriptionSubmission
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/TeamSubmission
Invitation:
$ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/Invitation
......
......@@ -114,34 +114,6 @@ VirtualAssessmentSubmissionDraft:
type: string
assessment:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Assessment.yaml/#/Assignment'
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
......@@ -163,21 +135,6 @@ SubmissionSection:
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
......@@ -185,4 +142,4 @@ TeamSubmissionSection:
ParticipantSubmissionSection:
allOf:
type: object
$ref: '#/SubmissionSection'
\ No newline at end of file
$ref: '#/SubmissionSection'
......@@ -141,3 +141,55 @@ TeamSubscription:
type: integer
maxMembers:
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: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.yaml/#/SubmissionSection'
invitations:
type: array
items:
$ref: '#/Invitation'
discriminator:
propertyName: type
mapping:
SOLO: '#/SoloSubmission'
TEAM: '#/TeamSubmission'
TeamSubmission:
required:
- team
allOf:
- type: object
- $ref: '#/Submission'
properties:
team:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.yaml/#/TeamSubmissionSection'
leader:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.yaml/#/ParticipantSubmissionSection'
participants:
type: array
items:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.yaml/#/ParticipantSubmissionSection'
SoloSubmission:
required:
- participant
allOf:
- type: object
- $ref: '#/Submission'
properties:
participant:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Submission.yaml/#/ParticipantSubmissionSection'
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