133 lines
3.5 KiB
YAML
133 lines
3.5 KiB
YAML
openapi: 3.0.1
|
|
info:
|
|
title: API Disciplines des J.O. 2024
|
|
description: |-
|
|
Cette API uService sert à afficher les informations sur les Disciplines des JO 2024.
|
|
version: 0.0.1
|
|
servers:
|
|
- url: /disciplines/
|
|
tags:
|
|
- name: discipline
|
|
description: discipline des J.O.
|
|
paths:
|
|
/:
|
|
get:
|
|
tags:
|
|
- discipline
|
|
parameters:
|
|
- in: query
|
|
name: offset
|
|
schema:
|
|
type: integer
|
|
description: Le nombre d'éléments à ignorer avant de commencer à collecter l'ensemble de résultats
|
|
- in: query
|
|
name: limit
|
|
schema:
|
|
type: integer
|
|
description: Le nombre d'éléments à ignorer
|
|
summary: Liste l'ensemble des disciplines
|
|
description: Affiche la liste des disciplines enregistrés sur les J.O. 2024.
|
|
operationId: listedisciplines
|
|
responses:
|
|
'200':
|
|
description: discipline
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/discipline'
|
|
post:
|
|
tags:
|
|
- discipline
|
|
summary: Créer une discipline
|
|
operationId: createAthelte
|
|
requestBody:
|
|
description: Objet discipline a créer
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/discipline'
|
|
responses:
|
|
default:
|
|
description: Opération avec succès
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/discipline'
|
|
/{id}:
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
description: ID de l'discipline à récupérer
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
get:
|
|
tags:
|
|
- discipline
|
|
summary: Récupération d'une discipline selon son id
|
|
operationId: getdiscipline
|
|
responses:
|
|
'200':
|
|
description: Opération avec succès
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/discipline'
|
|
'400':
|
|
description: ID donné invalide
|
|
'404':
|
|
description: discipline introuvable
|
|
patch:
|
|
tags:
|
|
- discipline
|
|
summary: Mettre à jour une discipline
|
|
operationId: updatediscipline
|
|
requestBody:
|
|
description: Mettre à jour une discipline existant
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/discipline'
|
|
responses:
|
|
default:
|
|
description: Opération avec succès
|
|
delete:
|
|
tags:
|
|
- discipline
|
|
summary: Supprimer une discipline
|
|
operationId: deletediscipline
|
|
responses:
|
|
'400':
|
|
description: ID donné invalide
|
|
'404':
|
|
description: discipline introuvable
|
|
components:
|
|
schemas:
|
|
discipline:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: integer
|
|
format: uuid
|
|
example: 123456789
|
|
intitule:
|
|
type: string
|
|
example: Judo
|
|
type:
|
|
type: string
|
|
example: terrestre
|
|
description:
|
|
type: string
|
|
example: Le judo est un sport de combat issu du pays du soleil levant
|
|
logo:
|
|
type: string
|
|
example: https://olympics.com/images/static/sports/pictograms/v2/kte.svg
|
|
requestBodies:
|
|
User:
|
|
description: Objet discipline à ajouter
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/discipline'
|