2024-03-27 11:18:57 +01:00
|
|
|
openapi: 3.0.1
|
|
|
|
info:
|
|
|
|
title: API Joueurs des J.O. 2024
|
|
|
|
description: |-
|
|
|
|
Cette API uService sert à afficher les informations sur les joueurs des JO 2024.
|
|
|
|
version: 0.0.1
|
|
|
|
servers:
|
2024-03-27 17:29:54 +01:00
|
|
|
- url: /athletes/
|
2024-03-27 11:18:57 +01:00
|
|
|
tags:
|
|
|
|
- name: athlete
|
|
|
|
description: Joueur des J.O.
|
|
|
|
paths:
|
|
|
|
/:
|
|
|
|
get:
|
|
|
|
tags:
|
|
|
|
- athlete
|
|
|
|
parameters:
|
|
|
|
- in: query
|
|
|
|
name: offset
|
|
|
|
schema:
|
|
|
|
type: integer
|
2024-03-27 14:17:05 +01:00
|
|
|
default: 0
|
2024-03-27 11:18:57 +01:00
|
|
|
description: Le nombre d'éléments à ignorer avant de commencer à collecter l'ensemble de résultats
|
|
|
|
- in: query
|
|
|
|
name: limit
|
|
|
|
schema:
|
|
|
|
type: integer
|
2024-03-27 14:17:05 +01:00
|
|
|
default: 10
|
2024-03-27 11:18:57 +01:00
|
|
|
description: Le nombre d'éléments à ignorer
|
|
|
|
summary: Liste l'ensemble des athlètes
|
|
|
|
description: Affiche la liste des athlètes enregistrés sur les J.O. 2024.
|
|
|
|
operationId: listeAthletes
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: Athlète
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Athlete'
|
|
|
|
post:
|
|
|
|
tags:
|
|
|
|
- athlete
|
|
|
|
summary: Créer un athlète
|
|
|
|
operationId: createAthelte
|
|
|
|
requestBody:
|
|
|
|
description: Objet athlète a créer
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Athlete'
|
|
|
|
responses:
|
|
|
|
default:
|
|
|
|
description: Opération avec succès
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Athlete'
|
|
|
|
/{id}:
|
|
|
|
parameters:
|
|
|
|
- name: id
|
|
|
|
in: path
|
|
|
|
description: ID de l'Athlète à récupérer
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
get:
|
|
|
|
tags:
|
|
|
|
- athlete
|
|
|
|
summary: Récupération d'un athlète selon son id
|
|
|
|
operationId: getAthlete
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: Opération avec succès
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Athlete'
|
|
|
|
'400':
|
|
|
|
description: ID donné invalide
|
|
|
|
'404':
|
|
|
|
description: Athlète introuvable
|
|
|
|
patch:
|
|
|
|
tags:
|
|
|
|
- athlete
|
|
|
|
summary: Mettre à jour un athlète
|
|
|
|
operationId: updateAthlete
|
|
|
|
requestBody:
|
|
|
|
description: Mettre à jour un athlète existant
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Athlete'
|
|
|
|
responses:
|
|
|
|
default:
|
|
|
|
description: Opération avec succès
|
|
|
|
delete:
|
|
|
|
tags:
|
|
|
|
- athlete
|
|
|
|
summary: Supprimer un athlète
|
|
|
|
operationId: deleteAthlete
|
|
|
|
responses:
|
|
|
|
'400':
|
|
|
|
description: ID donné invalide
|
|
|
|
'404':
|
|
|
|
description: Athlète introuvable
|
|
|
|
/ping:
|
|
|
|
get:
|
|
|
|
summary: Vérifier la disponibilité du service
|
|
|
|
operationId: ping
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: Service disponible
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
example: pong
|
|
|
|
components:
|
|
|
|
schemas:
|
|
|
|
Athlete:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
format: uuid
|
|
|
|
example: 123456789
|
|
|
|
prenom:
|
|
|
|
type: string
|
|
|
|
example: Teddy
|
|
|
|
nom:
|
|
|
|
type: string
|
|
|
|
example: Rinner
|
|
|
|
pays:
|
|
|
|
type: string
|
|
|
|
example: France
|
|
|
|
sexe:
|
|
|
|
type: string
|
|
|
|
example: Homme
|
|
|
|
image:
|
|
|
|
type: string
|
|
|
|
example: http://www.humanite.fr/wp-content/uploads/2023/05/311202.hr_.jpg?w=1024
|
|
|
|
disciplines:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: integer
|
|
|
|
example: 1235
|
|
|
|
records:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: integer
|
|
|
|
example: 1235
|
|
|
|
requestBodies:
|
|
|
|
User:
|
|
|
|
description: Objet athlète à ajouter
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Athlete'
|