Commit ff49cd5f authored by Gabriel Macena's avatar Gabriel Macena

[API] Refatora rotas de Subscription e corrige os nomes das entidades

parent 5f338820
......@@ -248,12 +248,12 @@ paths:
schema:
format: int32
type: integer
/subscription/applicants:
/subscription/submissions:
get:
tags:
- subscription
summary: Retrieves all applicants for this competition
description: Retrieves all applicants for this competition.
summary: Retrieves all submissions for this competition
description: Retrieves all submissions for this competition.
responses:
'200':
description: ''
......@@ -262,20 +262,22 @@ paths:
schema:
type: array
items:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/Subscription'
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'
post:
tags:
- subscription
summary: Creates an application for the competition
description: Creates a new application for the competition.
summary: Creates a submission for the competition
description: Creates a new submission for the competition.
requestBody:
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'
- $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'
required: true
responses:
'200':
......@@ -285,13 +287,13 @@ paths:
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'
- $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'
patch:
tags:
- subscription
summary: Updates multiple Applications
description: Updates multiple Applications.
summary: Updates multiple Submissions
description: Updates multiple Submissions.
requestBody:
content:
application/json-schema+json:
......@@ -299,8 +301,8 @@ paths:
type: array
items:
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'
- $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'
required: true
responses:
'200':
......@@ -311,9 +313,9 @@ paths:
type: array
items:
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'
'/subscription/applicants/{applicantId}':
- $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'
'/subscription/submissions/{submissionId}':
get:
tags:
- subscription
......@@ -327,10 +329,10 @@ paths:
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'
- $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'
parameters:
- name: applicantId
- name: submissionId
in: path
description: The unique identifier of the application.
required: true
......@@ -358,8 +360,8 @@ paths:
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'
- $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'
/subscription:
get:
tags:
......@@ -393,22 +395,24 @@ paths:
content:
application/json:
schema:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SubscriptionRule'
/subscription/templates:
get:
tags:
- public
summary: Retrieves all form templates
responses:
'200':
description: ''
content:
application/json:
schema:
type: array
items:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/FormTemplate'
/subscription/templates/team:
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'
# /subscription/templates:
# get:
# tags:
# - public
# summary: Retrieves all form templates
# responses:
# '200':
# description: ''
# content:
# application/json:
# schema:
# type: array
# items:
# $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/FormTemplate'
/subscription/team-template:
get:
tags:
- public
......@@ -439,7 +443,7 @@ paths:
application/json:
schema:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/FormTemplate'
/subscription/templates/participant:
/subscription/participant-template:
get:
tags:
- public
......
......@@ -124,15 +124,15 @@ SoloSubscriptionRule:
TeamSubscriptionRule:
$ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/TeamSubscriptionRule
Subscription:
SubscriptionSubmission:
$ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/Subscription
SoloSubscription:
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/SubscriptionSubmission
SoloSubscriptionSubmission:
$ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/SoloSubscription
TeamSubscription:
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/SoloSubscriptionSubmission
TeamSubscriptionSubmission:
$ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/TeamSubscription
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/TeamSubscriptionSubmission
FormTemplate:
$ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/FormTemplate
......
......@@ -36,7 +36,7 @@ SubscriptionRule:
mapping:
- SOLO: '#/SoloSubscriptionRule'
- TEAM: '#/TeamSubscriptionRule'
Subscription:
SubscriptionSubmission:
required:
- status
- timestamp
......@@ -61,18 +61,18 @@ Subscription:
discriminator:
propertyName: type
mapping:
TEAM: '#/TeamSubscription'
SOLO: '#/SoloSubscription'
SoloSubscription:
TEAM: '#/TeamSubscriptionSubmission'
SOLO: '#/SoloSubscriptionSubmission'
SoloSubscriptionSubmission:
allOf:
- $ref: '#/Subscription'
- $ref: '#/SubscriptionSubmission'
- type: object
properties:
participant:
$ref: '#/FormSection'
TeamSubscription:
TeamSubscriptionSubmission:
allOf:
- $ref: '#/Subscription'
- $ref: '#/SubscriptionSubmission'
- type: object
properties:
team:
......@@ -135,6 +135,8 @@ FormAnswer:
type: integer
value:
type: string
error:
type: string
oid:
type: integer
FormSection:
......
......@@ -68636,11 +68636,11 @@
"containerExtending": false,
"left": 893,
"top": 639,
"width": 129,
"width": 155,
"height": 13,
"autoResize": false,
"underline": false,
"text": "Subscription",
"text": "SubscriptionSubmission",
"horizontalAlignment": 2,
"verticalAlignment": 5,
"wordWrap": false
......@@ -68708,7 +68708,7 @@
"containerExtending": false,
"left": 888,
"top": 632,
"width": 139,
"width": 165,
"height": 25,
"autoResize": false,
"stereotypeLabel": {
......@@ -68754,7 +68754,7 @@
"containerExtending": false,
"left": 893,
"top": 662,
"width": 129,
"width": 155,
"height": 13,
"autoResize": false,
"underline": false,
......@@ -68775,7 +68775,7 @@
"containerExtending": false,
"left": 888,
"top": 657,
"width": 139,
"width": 165,
"height": 23,
"autoResize": false
},
......@@ -68799,7 +68799,7 @@
"containerExtending": false,
"left": 888,
"top": 680,
"width": 139,
"width": 165,
"height": 10,
"autoResize": false
},
......@@ -68863,7 +68863,7 @@
"containerExtending": false,
"left": 888,
"top": 632,
"width": 139,
"width": 165,
"height": 58,
"autoResize": false,
"stereotypeDisplay": "label",
......@@ -69249,7 +69249,7 @@
"containerExtending": false,
"left": 1181,
"top": 637,
"width": 147,
"width": 194,
"height": 13,
"autoResize": false,
"underline": false,
......@@ -69275,11 +69275,11 @@
"containerExtending": false,
"left": 1181,
"top": 652,
"width": 147,
"width": 194,
"height": 13,
"autoResize": false,
"underline": false,
"text": "SubscriptionStatus",
"text": "SubscriptionSubmissionStatus",
"horizontalAlignment": 2,
"verticalAlignment": 5,
"wordWrap": false
......@@ -69347,7 +69347,7 @@
"containerExtending": false,
"left": 1176,
"top": 632,
"width": 157,
"width": 204,
"height": 38,
"autoResize": false,
"stereotypeLabel": {
......@@ -69393,7 +69393,7 @@
"containerExtending": false,
"left": 1181,
"top": 675,
"width": 147,
"width": 194,
"height": 13,
"autoResize": false,
"underline": false,
......@@ -69414,7 +69414,7 @@
"containerExtending": false,
"left": 1176,
"top": 670,
"width": 157,
"width": 204,
"height": 23,
"autoResize": false
},
......@@ -69438,7 +69438,7 @@
"containerExtending": false,
"left": 1176,
"top": 693,
"width": 157,
"width": 204,
"height": 10,
"autoResize": false
},
......@@ -69502,7 +69502,7 @@
"containerExtending": false,
"left": 1176,
"top": 632,
"width": 157,
"width": 204,
"height": 71,
"autoResize": false,
"stereotypeDisplay": "label",
......@@ -69560,7 +69560,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
"left": 1101,
"left": 1114,
"top": 643,
"width": 0,
"height": 13,
......@@ -69594,7 +69594,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
"left": 1101,
"left": 1114,
"top": 628,
"width": 0,
"height": 13,
......@@ -69628,7 +69628,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
"left": 1101,
"left": 1114,
"top": 673,
"width": 0,
"height": 13,
......@@ -69662,7 +69662,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
"left": 1051,
"left": 1077,
"top": 643,
"width": 0,
"height": 13,
......@@ -69696,7 +69696,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
"left": 1054,
"left": 1080,
"top": 629,
"width": 0,
"height": 13,
......@@ -69730,7 +69730,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
"left": 1045,
"left": 1071,
"top": 670,
"width": 5.05908203125,
"height": 13,
......@@ -69916,7 +69916,7 @@
"$ref": "AAAAAAFjIjRYn1/jlqc="
},
"lineStyle": 0,
"points": "1026:664;1176:664",
"points": "1052:664;1176:664",
"stereotypeDisplay": "label",
"showVisibility": true,
"showProperty": true,
......@@ -73347,11 +73347,11 @@
"containerExtending": false,
"left": 1021,
"top": 807,
"width": 142,
"width": 184,
"height": 13,
"autoResize": false,
"underline": false,
"text": "SoloSubscription",
"text": "SoloSubscriptionSubmission",
"horizontalAlignment": 2,
"verticalAlignment": 5,
"wordWrap": false
......@@ -73419,7 +73419,7 @@
"containerExtending": false,
"left": 1016,
"top": 800,
"width": 152,
"width": 194,
"height": 25,
"autoResize": false,
"stereotypeLabel": {
......@@ -73455,7 +73455,7 @@
"containerExtending": false,
"left": 1016,
"top": 825,
"width": 152,
"width": 194,
"height": 10,
"autoResize": false
},
......@@ -73479,7 +73479,7 @@
"containerExtending": false,
"left": 1016,
"top": 835,
"width": 152,
"width": 194,
"height": 10,
"autoResize": false
},
......@@ -73543,7 +73543,7 @@
"containerExtending": false,
"left": 1016,
"top": 800,
"width": 152,
"width": 194,
"height": 45,
"autoResize": false,
"stereotypeDisplay": "label",
......@@ -73635,11 +73635,11 @@
"containerExtending": false,
"left": 741,
"top": 807,
"width": 147,
"width": 189,
"height": 13,
"autoResize": false,
"underline": false,
"text": "TeamSubscription",
"text": "TeamSubscriptionSubmission",
"horizontalAlignment": 2,
"verticalAlignment": 5,
"wordWrap": false
......@@ -73707,7 +73707,7 @@
"containerExtending": false,
"left": 736,
"top": 800,
"width": 157,
"width": 199,
"height": 25,
"autoResize": false,
"stereotypeLabel": {
......@@ -73743,7 +73743,7 @@
"containerExtending": false,
"left": 736,
"top": 825,
"width": 157,
"width": 199,
"height": 10,
"autoResize": false
},
......@@ -73767,7 +73767,7 @@
"containerExtending": false,
"left": 736,
"top": 835,
"width": 157,
"width": 199,
"height": 10,
"autoResize": false
},
......@@ -73831,7 +73831,7 @@
"containerExtending": false,
"left": 736,
"top": 800,
"width": 157,
"width": 199,
"height": 45,
"autoResize": false,
"stereotypeDisplay": "label",
......@@ -78372,7 +78372,7 @@
},
"edgePosition": 0,
"underline": false,
"text": "+subscriptionConf",
"text": "+subscription",
"horizontalAlignment": 2,
"verticalAlignment": 5,
"wordWrap": false
......@@ -79847,19 +79847,19 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
"left": 96,
"left": 72,
"top": 428,
"width": 51,
"width": 75,
"height": 13,
"autoResize": false,
"alpha": -1.0963963702774593,
"distance": 41.593268686170845,
"alpha": -1.2008902307082379,
"distance": 52.55473337388365,
"hostEdge": {
"$ref": "AAAAAAFjJgwCZF1P4MI="
},
"edgePosition": 0,
"underline": false,
"text": "+contest",
"text": "+competition",
"horizontalAlignment": 2,
"verticalAlignment": 5,
"wordWrap": false
......@@ -82453,7 +82453,7 @@
"containerExtending": false,
"left": 917,
"top": 885,
"width": 110,
"width": 185,
"height": 13,
"autoResize": false,
"underline": false,
......@@ -82479,11 +82479,11 @@
"containerExtending": false,
"left": 917,
"top": 900,
"width": 110,
"width": 185,
"height": 13,
"autoResize": false,
"underline": false,
"text": "SubscriptionType",
"text": "SubscriptionSubmissionType",
"horizontalAlignment": 2,
"verticalAlignment": 5,
"wordWrap": false
......@@ -82551,7 +82551,7 @@
"containerExtending": false,
"left": 912,
"top": 880,
"width": 120,
"width": 195,
"height": 38,
"autoResize": false,
"stereotypeLabel": {
......@@ -82597,7 +82597,7 @@
"containerExtending": false,
"left": 917,
"top": 923,
"width": 110,
"width": 185,
"height": 13,
"autoResize": false,
"underline": false,
......@@ -82618,7 +82618,7 @@
"containerExtending": false,
"left": 912,
"top": 918,
"width": 120,
"width": 195,
"height": 23,
"autoResize": false
},
......@@ -82642,7 +82642,7 @@
"containerExtending": false,
"left": 912,
"top": 941,
"width": 120,
"width": 195,
"height": 10,
"autoResize": false
},
......@@ -82706,7 +82706,7 @@
"containerExtending": false,
"left": 912,
"top": 880,
"width": 120,
"width": 195,
"height": 71,
"autoResize": false,
"stereotypeDisplay": "label",
......@@ -84237,7 +84237,7 @@
"_parent": {
"$ref": "AAAAAAFjIjRYo2HC0VA="
},
"name": "Subscription",
"name": "SubscriptionSubmission",
"ownedElements": [
{
"_type": "UMLAssociation",
......@@ -84364,7 +84364,7 @@
"_parent": {
"$ref": "AAAAAAFjJgwCYl1Lrs8="
},
"name": "contest",
"name": "competition",
"reference": {
"$ref": "AAAAAAFjAwbOHpTN/AE="
},
......@@ -84589,7 +84589,7 @@
"_parent": {
"$ref": "AAAAAAFjIjUe5Wkov9I="
},
"name": "subscriptionConf",
"name": "subscription",
"reference": {
"$ref": "AAAAAAFjIjRYomFvs+g="
},
......@@ -84735,7 +84735,7 @@
"_parent": {
"$ref": "AAAAAAFjIjRYo2HC0VA="
},
"name": "SubscriptionStatus",
"name": "SubscriptionSubmissionStatus",
"stereotype": "enum",
"visibility": "public",
"attributes": [
......@@ -85456,7 +85456,7 @@
"_parent": {
"$ref": "AAAAAAFjIjRYo2HC0VA="
},
"name": "SoloSubscription",
"name": "SoloSubscriptionSubmission",
"ownedElements": [
{
"_type": "UMLGeneralization",
......@@ -85580,7 +85580,7 @@
"_parent": {
"$ref": "AAAAAAFjIjRYo2HC0VA="
},
"name": "TeamSubscription",
"name": "TeamSubscriptionSubmission",
"ownedElements": [
{
"_type": "UMLGeneralization",
......@@ -86177,7 +86177,7 @@
"_parent": {
"$ref": "AAAAAAFjIjRYo2HC0VA="
},
"name": "SubscriptionType",
"name": "SubscriptionSubmissionType",
"stereotype": "enum",
"visibility": "public",
"attributes": [
......@@ -86191,6 +86191,7 @@
"visibility": "public",
"isStatic": false,
"isLeaf": false,
"type": "",
"isReadOnly": false,
"isOrdered": false,
"isUnique": false,
......@@ -86224,6 +86225,7 @@
"visibility": "public",
"isStatic": false,
"isLeaf": false,
"type": "",
"isReadOnly": false,
"isOrdered": false,
"isUnique": false,
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