Commit 620bcac8 authored by Isaac Pereira's avatar Isaac Pereira Committed by Isaac Pereira

[API] Adiciona API do Competify

parent 48d7f20f
openapi: 3.0.0
info:
title: Competify API
description: >-
Api of the competition administration. This API should be used by the competify
application to control the competition itself
version: 1.0.0
servers:
- url: http://api.competify.test.evologica.com.br
components:
securitySchemes:
bearerAuth: # arbitrary name for the security scheme
type: http
scheme: bearer
bearerFormat: JWT
responses:
UnauthorizedError:
description: Access token is missing or invalid
tags:
- name: auth
description: 'Register and authentication'
- name: user
description: 'User operations'
- name: competition
description: 'Competition admin operations'
- name: assessments
description: 'Assessments operations'
paths:
/login:
post:
tags:
- auth
summary: Authenticate to retrieve an API auth token
description: Retrieves information about this competition
requestBody:
content:
application/json:
schema:
type: object
properties:
username:
type: string
password:
type: string
required: true
responses:
'200':
description: 'Auth token'
content:
application/json:
schema:
type: object
properties:
token:
type: string
redirectUrl:
type: string
'401':
description: 'Authetication failed'
content:
application/json:
schema:
type: string
/register:
post:
tags:
- auth
summary: Register a new admin user
description: Register a new admin user
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 user'
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
/competitions:
get:
security:
- bearerAuth: []
tags:
- competition
summary: Retrieves user's competition
description: Retrieves user's competition.
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/#/Competition'
post:
security:
- bearerAuth: []
tags:
- competition
summary: Creates a new competition
description: Creates a new competition
requestBody:
content:
application/json:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloCompetifier'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamCompetifier'
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
oneOf:
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/SoloCompetifier'
- $ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/TeamCompetifier'
/competitions/{competitionId}:
get:
security:
- bearerAuth: []
tags:
- competition
summary: Retrieves an user's specific competition
description: Retrieves an user's specific competition.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/Competition'
delete:
security:
- bearerAuth: []
tags:
- competition
summary: Retrieves an user's specific competition
description: Retrieves an user's specific competition.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: 'https://gitlab.dev.evologica.com.br/Competify/Docs/raw/master/Api/components/schemas.yaml/#/Competition'
parameters:
- name: competitionId
in: path
description: The unique identifier of the Competition.
required: true
schema:
format: int32
type: integer
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