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: ...@@ -248,12 +248,12 @@ paths:
schema: schema:
format: int32 format: int32
type: integer type: integer
/subscription/applicants: /subscription/submissions:
get: get:
tags: tags:
- subscription - subscription
summary: Retrieves all applicants for this competition summary: Retrieves all submissions for this competition
description: Retrieves all applicants for this competition. description: Retrieves all submissions for this competition.
responses: responses:
'200': '200':
description: '' description: ''
...@@ -262,20 +262,22 @@ paths: ...@@ -262,20 +262,22 @@ paths:
schema: schema:
type: array type: array
items: 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: post:
tags: tags:
- subscription - subscription
summary: Creates an application for the competition summary: Creates a submission for the competition
description: Creates a new application for the competition. description: Creates a new submission for the competition.
requestBody: requestBody:
content: content:
application/json: application/json:
schema: schema:
type: object 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/#/SoloSubscriptionSubmission'
- $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/#/TeamSubscriptionSubmission'
required: true required: true
responses: responses:
'200': '200':
...@@ -285,13 +287,13 @@ paths: ...@@ -285,13 +287,13 @@ paths:
schema: schema:
type: object 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/#/SoloSubscriptionSubmission'
- $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/#/TeamSubscriptionSubmission'
patch: patch:
tags: tags:
- subscription - subscription
summary: Updates multiple Applications summary: Updates multiple Submissions
description: Updates multiple Applications. description: Updates multiple Submissions.
requestBody: requestBody:
content: content:
application/json-schema+json: application/json-schema+json:
...@@ -299,8 +301,8 @@ paths: ...@@ -299,8 +301,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/#/SoloSubscription' - $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/#/TeamSubscription' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubscriptionSubmission'
required: true required: true
responses: responses:
'200': '200':
...@@ -311,9 +313,9 @@ paths: ...@@ -311,9 +313,9 @@ paths:
type: array type: array
items: items:
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/#/SoloSubscriptionSubmission'
- $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/#/TeamSubscriptionSubmission'
'/subscription/applicants/{applicantId}': '/subscription/submissions/{submissionId}':
get: get:
tags: tags:
- subscription - subscription
...@@ -327,10 +329,10 @@ paths: ...@@ -327,10 +329,10 @@ paths:
schema: schema:
type: object 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/#/SoloSubscriptionSubmission'
- $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/#/TeamSubscriptionSubmission'
parameters: parameters:
- name: applicantId - name: submissionId
in: path in: path
description: The unique identifier of the application. description: The unique identifier of the application.
required: true required: true
...@@ -358,8 +360,8 @@ paths: ...@@ -358,8 +360,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/#/SoloSubscription' - $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/#/TeamSubscription' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubscriptionSubmission'
/subscription: /subscription:
get: get:
tags: tags:
...@@ -393,22 +395,24 @@ paths: ...@@ -393,22 +395,24 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SubscriptionRule' oneOf:
/subscription/templates: - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloSubscriptionRule'
get: - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubscriptionRule'
tags: # /subscription/templates:
- public # get:
summary: Retrieves all form templates # tags:
responses: # - public
'200': # summary: Retrieves all form templates
description: '' # responses:
content: # '200':
application/json: # description: ''
schema: # content:
type: array # application/json:
items: # schema:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/FormTemplate' # type: array
/subscription/templates/team: # items:
# $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/FormTemplate'
/subscription/team-template:
get: get:
tags: tags:
- public - public
...@@ -439,7 +443,7 @@ paths: ...@@ -439,7 +443,7 @@ paths:
application/json: application/json:
schema: schema:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/FormTemplate' $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/FormTemplate'
/subscription/templates/participant: /subscription/participant-template:
get: get:
tags: tags:
- public - public
......
...@@ -124,15 +124,15 @@ SoloSubscriptionRule: ...@@ -124,15 +124,15 @@ SoloSubscriptionRule:
TeamSubscriptionRule: TeamSubscriptionRule:
$ref: >- $ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/TeamSubscriptionRule https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/TeamSubscriptionRule
Subscription: SubscriptionSubmission:
$ref: >- $ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/Subscription https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/SubscriptionSubmission
SoloSubscription: SoloSubscriptionSubmission:
$ref: >- $ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/SoloSubscription https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/SoloSubscriptionSubmission
TeamSubscription: TeamSubscriptionSubmission:
$ref: >- $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: FormTemplate:
$ref: >- $ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/FormTemplate https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas/Subscription.yaml/#/FormTemplate
......
...@@ -36,7 +36,7 @@ SubscriptionRule: ...@@ -36,7 +36,7 @@ SubscriptionRule:
mapping: mapping:
- SOLO: '#/SoloSubscriptionRule' - SOLO: '#/SoloSubscriptionRule'
- TEAM: '#/TeamSubscriptionRule' - TEAM: '#/TeamSubscriptionRule'
Subscription: SubscriptionSubmission:
required: required:
- status - status
- timestamp - timestamp
...@@ -61,18 +61,18 @@ Subscription: ...@@ -61,18 +61,18 @@ Subscription:
discriminator: discriminator:
propertyName: type propertyName: type
mapping: mapping:
TEAM: '#/TeamSubscription' TEAM: '#/TeamSubscriptionSubmission'
SOLO: '#/SoloSubscription' SOLO: '#/SoloSubscriptionSubmission'
SoloSubscription: SoloSubscriptionSubmission:
allOf: allOf:
- $ref: '#/Subscription' - $ref: '#/SubscriptionSubmission'
- type: object - type: object
properties: properties:
participant: participant:
$ref: '#/FormSection' $ref: '#/FormSection'
TeamSubscription: TeamSubscriptionSubmission:
allOf: allOf:
- $ref: '#/Subscription' - $ref: '#/SubscriptionSubmission'
- type: object - type: object
properties: properties:
team: team:
...@@ -135,6 +135,8 @@ FormAnswer: ...@@ -135,6 +135,8 @@ FormAnswer:
type: integer type: integer
value: value:
type: string type: string
error:
type: string
oid: oid:
type: integer type: integer
FormSection: FormSection:
......
This diff is collapsed.
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