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

[API] Correção api submission

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