Commit 5cbb5b14 authored by Rosana Aurélio's avatar Rosana Aurélio

Inclusão de rotas para obter inscrições e para submissão de inscrição.

parent 004c154e
openapi: 3.0.0 openapi: 3.0.0
info: info:
title: Competition API title: Competition API
version: 1.0.0 version: 0.1.0
description: >- description: >-
Api of the competition. This API should be used by the competition Api of the competition. This API should be used by the competition
application to perform assessments application to perform assessments
license: license:
name: Apache 2.0 name: Apache 2.0
url: 'https://www.apache.org/licenses/LICENSE-2.0.html' url: 'https://www.apache.org/licenses/LICENSE-2.0.html'
servers:
- url: http://competition.competify.test.evologica.com.br
components:
securitySchemes:
auth: # arbitrary name for the security scheme
type: http
scheme: bearer
bearerFormat: JWT
competitionToken:
type: apiKey
in: header
name: Competition-Token
tags: tags:
- name: authentication - name: authentication
description: Operations involving the user authentication description: Operations involving the user authentication
...@@ -24,8 +36,6 @@ paths: ...@@ -24,8 +36,6 @@ paths:
parameters: parameters:
- $ref: >- - $ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/parameters.yaml/#/language https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/parameters.yaml/#/language
- $ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/parameters.yaml/#/competition_token
post: post:
tags: tags:
- authentication - authentication
...@@ -55,9 +65,59 @@ paths: ...@@ -55,9 +65,59 @@ paths:
'500': '500':
$ref: >- $ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/responses.yaml/#/InternalServerError https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/responses.yaml/#/InternalServerError
/register:
post:
tags:
- authentication
summary: Register a new competify
parameters:
- in: query
name: invitation
schema:
type: string
description: The invitation token
requestBody:
content:
application/json:
schema:
type: object
properties:
username:
type: string
fullname:
type: string
email:
type: string
password:
type: string
required: true
responses:
'200':
description: 'registered competify'
content:
application/json:
schema:
type: object
properties:
id:
type: integer
username:
type: string
fullname:
type: string
email:
type: string
'422':
description: 'validation error'
content:
application/json:
schema:
type: string
/competition: /competition:
get: get:
security:
- competitionToken: []
tags: tags:
- public - public
summary: Retrieves information about this competition summary: Retrieves information about this competition
...@@ -72,6 +132,8 @@ paths: ...@@ -72,6 +132,8 @@ paths:
/subscription: /subscription:
get: get:
security:
- competitionToken: []
tags: tags:
- public - public
summary: Retrieves the subscription rule summary: Retrieves the subscription rule
...@@ -83,10 +145,12 @@ paths: ...@@ -83,10 +145,12 @@ paths:
schema: schema:
type: object type: object
oneOf: 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/#/SoloSubscription'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubscriptionRule' - $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamSubscription'
/subscription/team-template: /subscription/team-template:
get: get:
security:
- competitionToken: []
tags: tags:
- public - public
summary: Retrieves the team form template summary: Retrieves the team form template
...@@ -99,6 +163,8 @@ paths: ...@@ -99,6 +163,8 @@ paths:
$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/participant-template: /subscription/participant-template:
get: get:
security:
- competitionToken: []
tags: tags:
- public - public
summary: Retrieves the participant form template summary: Retrieves the participant form template
...@@ -108,9 +174,32 @@ paths: ...@@ -108,9 +174,32 @@ paths:
content: content:
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/invitations/{invitationToken}:
get:
security:
- competitionToken: []
tags:
- public
summary: Retrieves the invitations
parameters:
- in: path
name: invitationToken
required: true
schema:
type: string
minimum: 1
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/Invitations'
/subscription/submissions:
post: post:
security:
- competitionToken: []
tags: tags:
- public - public
summary: Creates a submission for the competition summary: Creates a submission for the competition
...@@ -132,8 +221,8 @@ paths: ...@@ -132,8 +221,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/#/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/#/TeamSubscriptionSubmission'
...@@ -839,12 +928,6 @@ paths: ...@@ -839,12 +928,6 @@ paths:
'500': '500':
$ref: >- $ref: >-
https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/responses.yaml/#/InternalServerError https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/responses.yaml/#/InternalServerError
components:
securitySchemes:
Authorization:
type: http
scheme: bearer
bearerFormat: JWT
externalDocs: externalDocs:
description: Gitlab documentation description: Gitlab documentation
url: 'https://gitlab.dev.evologica.com.br/Competify/Docs' url: 'https://gitlab.dev.evologica.com.br/Competify/Docs'
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