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
info:
title: Competition API
version: 1.0.0
version: 0.1.0
description: >-
Api of the competition. This API should be used by the competition
application to perform assessments
license:
name: Apache 2.0
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:
- name: authentication
description: Operations involving the user authentication
......@@ -24,8 +36,6 @@ paths:
parameters:
- $ref: >-
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:
tags:
- authentication
......@@ -55,9 +65,59 @@ paths:
'500':
$ref: >-
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:
get:
security:
- competitionToken: []
tags:
- public
summary: Retrieves information about this competition
......@@ -72,6 +132,8 @@ paths:
/subscription:
get:
security:
- competitionToken: []
tags:
- public
summary: Retrieves the subscription rule
......@@ -83,10 +145,12 @@ paths:
schema:
type: object
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'
- $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/team-template:
get:
security:
- competitionToken: []
tags:
- public
summary: Retrieves the team form template
......@@ -99,6 +163,8 @@ paths:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/FormTemplate'
/subscription/participant-template:
get:
security:
- competitionToken: []
tags:
- public
summary: Retrieves the participant form template
......@@ -109,8 +175,31 @@ paths:
application/json:
schema:
$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:
security:
- competitionToken: []
tags:
- public
summary: Creates a submission for the competition
......@@ -839,12 +928,6 @@ paths:
'500':
$ref: >-
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:
description: Gitlab documentation
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