2023-12-04 19:58:00 +01:00
|
|
|
openapi: 3.0.0
|
|
|
|
info:
|
|
|
|
title: ClydeAPI
|
2023-12-10 21:21:11 +01:00
|
|
|
description:
|
|
|
|
This is the Clyde's api documentation. <br/>
|
|
|
|
Each endpoints are organised by endpoints **AND** by extensions making it easier to navigate.
|
2023-12-04 19:58:00 +01:00
|
|
|
version: 0.0.1
|
|
|
|
|
|
|
|
servers:
|
|
|
|
- url: https://clyde.herisson.ovh/api
|
|
|
|
description: default api point for clyde's service
|
|
|
|
|
|
|
|
paths:
|
|
|
|
/ping:
|
|
|
|
get:
|
2023-12-10 13:15:49 +01:00
|
|
|
summary: Check the API status
|
2023-12-04 19:58:00 +01:00
|
|
|
responses:
|
|
|
|
default:
|
2023-12-10 13:15:49 +01:00
|
|
|
description: pong
|
2023-12-04 19:58:00 +01:00
|
|
|
content:
|
|
|
|
text/plain:
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
example: pong
|
2023-12-10 13:15:49 +01:00
|
|
|
/users:
|
|
|
|
get:
|
|
|
|
summary: list all users
|
2023-12-04 19:58:00 +01:00
|
|
|
tags:
|
2023-12-10 21:26:51 +01:00
|
|
|
- General
|
2023-12-10 13:15:49 +01:00
|
|
|
- SI
|
2023-12-04 19:58:00 +01:00
|
|
|
security:
|
|
|
|
- bearer: []
|
2023-12-10 13:15:49 +01:00
|
|
|
parameters:
|
|
|
|
- in: query
|
|
|
|
name: type
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
enum: [teacher, student, secretary]
|
|
|
|
responses:
|
2023-12-04 19:58:00 +01:00
|
|
|
'200':
|
2023-12-10 13:15:49 +01:00
|
|
|
description: OK
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: "#/components/schemas/User"
|
2023-12-04 19:58:00 +01:00
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
2023-12-10 13:15:49 +01:00
|
|
|
|
|
|
|
/user:
|
2023-12-04 19:58:00 +01:00
|
|
|
get:
|
2023-12-10 13:15:49 +01:00
|
|
|
summary: get informations about yourself
|
2023-12-04 19:58:00 +01:00
|
|
|
tags:
|
2023-12-10 21:26:51 +01:00
|
|
|
- General
|
2023-12-10 13:15:49 +01:00
|
|
|
- Users
|
2023-12-10 21:21:11 +01:00
|
|
|
security:
|
|
|
|
- bearer: []
|
2023-12-11 11:02:29 +01:00
|
|
|
parameters:
|
|
|
|
- in: query
|
|
|
|
name: type
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
enum: [teacher, student, secretary]
|
|
|
|
responses:
|
2023-12-04 19:58:00 +01:00
|
|
|
'200':
|
2023-12-10 13:15:49 +01:00
|
|
|
description: Ok
|
2023-12-04 19:58:00 +01:00
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: "#/components/schemas/User"
|
2023-12-10 21:21:11 +01:00
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
2023-12-10 13:15:49 +01:00
|
|
|
post:
|
|
|
|
summary: Create user
|
|
|
|
tags:
|
2023-12-10 21:26:51 +01:00
|
|
|
- General
|
2023-12-10 13:15:49 +01:00
|
|
|
- Users
|
|
|
|
requestBody:
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/x-www-form-urlencoded:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
LastName:
|
|
|
|
type: string
|
|
|
|
FirstName:
|
|
|
|
type: string
|
|
|
|
Email:
|
|
|
|
type: string
|
|
|
|
Address:
|
|
|
|
$ref: "#/components/schemas/Address"
|
|
|
|
BirthDate:
|
|
|
|
type: string
|
|
|
|
description: Follow the iso 8601 ("YYYY-MM-DD")
|
|
|
|
example:
|
|
|
|
{
|
|
|
|
"LastName": "Doe" ,
|
|
|
|
"FirstName": "John",
|
|
|
|
"Email": "John.Doe@example.com",
|
|
|
|
"Address": {
|
|
|
|
"Address": "Rue de Tournais 42",
|
|
|
|
"Country": "BE"},
|
|
|
|
"BirthDate": "1941-02-22",
|
|
|
|
}
|
|
|
|
responses:
|
|
|
|
'201':
|
|
|
|
description: User created
|
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
patch:
|
|
|
|
summary: Change informations about yourself
|
|
|
|
tags:
|
2023-12-10 21:26:51 +01:00
|
|
|
- General
|
2023-12-10 13:15:49 +01:00
|
|
|
- Users
|
|
|
|
security:
|
|
|
|
- bearer: []
|
|
|
|
requestBody:
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/x-www-form-urlencoded:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/User'
|
|
|
|
responses:
|
|
|
|
'201':
|
|
|
|
description: Successfully changed.
|
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
/user/{mat}:
|
2023-12-04 19:58:00 +01:00
|
|
|
parameters:
|
|
|
|
- name: mat
|
|
|
|
in: path
|
|
|
|
description: Matricule of the user (unique id)
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
get:
|
2023-12-10 13:15:49 +01:00
|
|
|
summary: Get user's informations
|
2023-12-04 19:58:00 +01:00
|
|
|
tags:
|
2023-12-10 21:26:51 +01:00
|
|
|
- General
|
2023-12-10 13:15:49 +01:00
|
|
|
- Admin
|
2023-12-04 19:58:00 +01:00
|
|
|
responses:
|
|
|
|
'200':
|
2023-12-10 13:15:49 +01:00
|
|
|
description: User found
|
2023-12-04 19:58:00 +01:00
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2023-12-10 13:15:49 +01:00
|
|
|
$ref: "#/components/schemas/User"
|
|
|
|
patch:
|
|
|
|
summary: Alter user's informations
|
|
|
|
tags:
|
2023-12-10 21:26:51 +01:00
|
|
|
- General
|
2023-12-10 13:15:49 +01:00
|
|
|
- Admin
|
|
|
|
security:
|
|
|
|
- bearer: []
|
|
|
|
requestBody:
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/x-www-form-urlencoded:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/User'
|
|
|
|
responses:
|
|
|
|
'201':
|
|
|
|
description: Successfully changed
|
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
/course:
|
|
|
|
post:
|
|
|
|
summary: Create new course
|
|
|
|
tags:
|
2023-12-10 21:26:51 +01:00
|
|
|
- General
|
2023-12-10 13:15:49 +01:00
|
|
|
- Courses
|
|
|
|
- Secretariat
|
|
|
|
security:
|
|
|
|
- bearer: []
|
|
|
|
requestBody:
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/x-www-form-urlencoded:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
courses:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
responses:
|
|
|
|
'201':
|
|
|
|
description: course created
|
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
2023-12-04 19:58:00 +01:00
|
|
|
/courses/{id}:
|
|
|
|
get:
|
2023-12-10 13:15:49 +01:00
|
|
|
summary: see courses informations
|
2023-12-04 19:58:00 +01:00
|
|
|
tags:
|
2023-12-10 21:26:51 +01:00
|
|
|
- General
|
2023-12-04 19:58:00 +01:00
|
|
|
- Courses
|
|
|
|
responses:
|
2023-12-10 13:15:49 +01:00
|
|
|
'200':
|
|
|
|
description: OK
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Course'
|
|
|
|
parameters:
|
|
|
|
- name: id
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
delete:
|
|
|
|
summary: delete a course
|
2023-12-04 19:58:00 +01:00
|
|
|
tags:
|
2023-12-10 21:26:51 +01:00
|
|
|
- General
|
2023-12-04 19:58:00 +01:00
|
|
|
- Courses
|
2023-12-10 13:15:49 +01:00
|
|
|
- Secretariat
|
2023-12-04 19:58:00 +01:00
|
|
|
security:
|
|
|
|
- bearer: []
|
|
|
|
responses:
|
2023-12-10 13:15:49 +01:00
|
|
|
'201':
|
|
|
|
description: Success
|
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
patch:
|
|
|
|
summary: Change course options
|
2023-12-04 19:58:00 +01:00
|
|
|
tags:
|
2023-12-10 21:26:51 +01:00
|
|
|
- General
|
2023-12-10 13:15:49 +01:00
|
|
|
- Secretariat
|
2023-12-04 19:58:00 +01:00
|
|
|
- Courses
|
2023-12-10 13:15:49 +01:00
|
|
|
security:
|
|
|
|
- bearer: []
|
|
|
|
requestBody:
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/x-www-form-urlencoded:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
credits:
|
|
|
|
type: integer
|
|
|
|
faculty:
|
|
|
|
type: string
|
|
|
|
teachers:
|
|
|
|
type: object
|
|
|
|
$ref: '#/components/schemas/User'
|
|
|
|
assistants:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/User'
|
|
|
|
example:
|
|
|
|
{
|
|
|
|
"name": "Math pour l'info",
|
|
|
|
"credits": 11,
|
|
|
|
"faculty": "science",
|
|
|
|
"Teacher": ,
|
|
|
|
"Assistants": [ ]
|
|
|
|
}
|
|
|
|
responses:
|
|
|
|
'201':
|
|
|
|
description: Course modified
|
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
|
|
|
|
/cursus:
|
|
|
|
post:
|
|
|
|
summary: Create a cursus
|
|
|
|
tags:
|
2023-12-10 21:26:51 +01:00
|
|
|
- General
|
2023-12-10 13:15:49 +01:00
|
|
|
- cursus
|
2023-12-04 19:58:00 +01:00
|
|
|
security:
|
|
|
|
- bearer: []
|
2023-12-10 13:15:49 +01:00
|
|
|
requestBody:
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/x-www-form-urlencoded:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
courses:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: integer
|
|
|
|
description: id of courses
|
|
|
|
example:
|
|
|
|
{
|
|
|
|
"name": "Bac1",
|
|
|
|
[]
|
|
|
|
}
|
2023-12-04 19:58:00 +01:00
|
|
|
responses:
|
2023-12-10 13:15:49 +01:00
|
|
|
'201':
|
|
|
|
description: Cursus created
|
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
/cursus/{id}:
|
|
|
|
get:
|
|
|
|
summary: See Cursus's informations
|
|
|
|
tags:
|
2023-12-10 21:26:51 +01:00
|
|
|
- General
|
2023-12-10 13:15:49 +01:00
|
|
|
- cursus
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: OK
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Cursus'
|
|
|
|
parameters:
|
|
|
|
- name: id
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
delete:
|
|
|
|
summary: Delete cursus
|
|
|
|
tags:
|
2023-12-10 21:26:51 +01:00
|
|
|
- General
|
2023-12-10 13:15:49 +01:00
|
|
|
- cursus
|
|
|
|
security:
|
|
|
|
- bearer: []
|
|
|
|
responses:
|
|
|
|
'201':
|
|
|
|
description: Success
|
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
patch:
|
|
|
|
summary: Modify cursus
|
|
|
|
tags:
|
2023-12-10 21:26:51 +01:00
|
|
|
- General
|
2023-12-10 13:15:49 +01:00
|
|
|
- cursus
|
|
|
|
security:
|
|
|
|
- bearer: []
|
|
|
|
requestBody:
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/x-www-form-urlencoded:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
credits:
|
|
|
|
type: integer
|
|
|
|
faculty:
|
|
|
|
type: string
|
|
|
|
teachers:
|
|
|
|
type: object
|
|
|
|
$ref: '#/components/schemas/User'
|
|
|
|
assistants:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/User'
|
|
|
|
example:
|
|
|
|
{
|
|
|
|
"name": "Math pour l'info",
|
|
|
|
"credits": 11,
|
|
|
|
"faculty": "science",
|
|
|
|
"Teacher": ,
|
|
|
|
"Assistants": [ ]
|
|
|
|
}
|
|
|
|
responses:
|
|
|
|
'201':
|
|
|
|
description: Cursus modified
|
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
|
|
|
|
/lesson:
|
|
|
|
post:
|
|
|
|
summary: Create a new lesson
|
|
|
|
tags:
|
|
|
|
- Secretariat
|
|
|
|
- lesson
|
|
|
|
security:
|
|
|
|
- bearer: []
|
|
|
|
requestBody:
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/x-www-form-urlencoded:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
date:
|
|
|
|
type: string
|
|
|
|
description: Follow the iso 8601 ("YYYY-MM-DD")
|
|
|
|
IDcourse:
|
|
|
|
type: integer
|
|
|
|
duration:
|
|
|
|
type: number
|
|
|
|
classroom:
|
|
|
|
type: string
|
|
|
|
responses:
|
|
|
|
'201':
|
|
|
|
description: Lesson created
|
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
/lesson/{id}:
|
|
|
|
parameters:
|
|
|
|
- name: id
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
get:
|
|
|
|
summary : See lesson's informations
|
|
|
|
tags:
|
|
|
|
- Users
|
|
|
|
- lesson
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: OK
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Lesson'
|
|
|
|
patch:
|
|
|
|
summary : Modify Lesson
|
|
|
|
tags:
|
|
|
|
- Secretariat
|
|
|
|
- lesson
|
|
|
|
security:
|
|
|
|
- bearer: []
|
|
|
|
requestBody:
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/x-www-form-urlencoded:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
date:
|
|
|
|
type: string
|
|
|
|
description: Follow the iso 8601 ("YYYY-MM-DD")
|
|
|
|
IDcourse:
|
|
|
|
type: integer
|
|
|
|
duration:
|
|
|
|
type: number
|
|
|
|
classroom:
|
|
|
|
type: string
|
|
|
|
responses:
|
|
|
|
'201':
|
|
|
|
description: Lesson modified
|
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
|
|
|
|
delete:
|
|
|
|
summary: Delete lesson
|
|
|
|
tags:
|
|
|
|
- lesson
|
|
|
|
- Secretariat
|
|
|
|
security:
|
|
|
|
- bearer: []
|
|
|
|
responses:
|
|
|
|
'201':
|
|
|
|
description: Success
|
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
/request:
|
|
|
|
post:
|
|
|
|
summary: Create a new request
|
|
|
|
tags:
|
|
|
|
- Teacher
|
|
|
|
- request
|
|
|
|
requestBody:
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/x-www-form-urlencoded:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
requestType:
|
|
|
|
type: string
|
|
|
|
lessonId:
|
|
|
|
type: integer
|
|
|
|
responses:
|
|
|
|
'201':
|
|
|
|
description: Request created
|
|
|
|
/request/{id}:
|
|
|
|
parameters:
|
|
|
|
- name: id
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
get:
|
|
|
|
summary : See request information
|
|
|
|
tags:
|
|
|
|
- Teacher
|
|
|
|
- Secretariat
|
|
|
|
- request
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: OK
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Request'
|
|
|
|
patch:
|
|
|
|
summary : Modify request
|
|
|
|
tags:
|
|
|
|
- Teacher
|
|
|
|
- request
|
|
|
|
requestBody:
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/x-www-form-urlencoded:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
requestType:
|
|
|
|
type: string
|
|
|
|
lessonId:
|
|
|
|
type: integer
|
|
|
|
responses:
|
|
|
|
'201':
|
|
|
|
description: Request modified
|
|
|
|
delete:
|
|
|
|
summary: Delete request
|
|
|
|
tags:
|
|
|
|
- Teacher
|
|
|
|
- Secretariat
|
|
|
|
- request
|
|
|
|
responses:
|
|
|
|
'201':
|
|
|
|
description: Success
|
|
|
|
|
|
|
|
/display:
|
|
|
|
post:
|
|
|
|
summary: Create a new display
|
|
|
|
tags:
|
|
|
|
- display
|
|
|
|
requestBody:
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/x-www-form-urlencoded:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
time:
|
|
|
|
type: string
|
|
|
|
display:
|
|
|
|
type: string
|
|
|
|
userId:
|
|
|
|
type: integer
|
|
|
|
responses:
|
|
|
|
'201':
|
|
|
|
description: display created
|
|
|
|
|
|
|
|
/display/{id}:
|
|
|
|
parameters:
|
|
|
|
- name: id
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
get:
|
|
|
|
summary : See display information
|
|
|
|
tags:
|
|
|
|
- Users
|
|
|
|
- display
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: OK
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Display'
|
|
|
|
patch:
|
|
|
|
summary : Modify display
|
|
|
|
tags:
|
|
|
|
- Users
|
|
|
|
- display
|
|
|
|
requestBody:
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/x-www-form-urlencoded:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
time:
|
|
|
|
type: string
|
|
|
|
display:
|
|
|
|
type: string
|
|
|
|
userId:
|
|
|
|
type: integer
|
|
|
|
responses:
|
|
|
|
'201':
|
|
|
|
description: Display modified
|
2023-12-04 19:58:00 +01:00
|
|
|
|
|
|
|
components:
|
|
|
|
securitySchemes:
|
|
|
|
bearer:
|
|
|
|
type: http
|
|
|
|
scheme: bearer
|
|
|
|
schemas:
|
|
|
|
User:
|
|
|
|
type: object
|
|
|
|
properties:
|
2023-12-10 13:15:49 +01:00
|
|
|
regNo:
|
2023-12-04 19:58:00 +01:00
|
|
|
type: integer
|
2023-12-10 13:15:49 +01:00
|
|
|
photo:
|
2023-12-04 19:58:00 +01:00
|
|
|
type: object
|
2023-12-10 13:15:49 +01:00
|
|
|
lastName:
|
2023-12-04 19:58:00 +01:00
|
|
|
type: string
|
2023-12-10 13:15:49 +01:00
|
|
|
firstName:
|
2023-12-04 19:58:00 +01:00
|
|
|
type: string
|
2023-12-10 13:15:49 +01:00
|
|
|
email:
|
2023-12-04 19:58:00 +01:00
|
|
|
type: string
|
2023-12-10 13:15:49 +01:00
|
|
|
address:
|
2023-12-04 19:58:00 +01:00
|
|
|
$ref: "#/components/schemas/Address"
|
2023-12-10 13:15:49 +01:00
|
|
|
birthDate:
|
2023-12-04 19:58:00 +01:00
|
|
|
type: string
|
|
|
|
description: Follow the iso 8601 ("YYYY-MM-DD")
|
|
|
|
example:
|
|
|
|
{
|
2023-12-10 13:15:49 +01:00
|
|
|
"regNo": 42,
|
|
|
|
"lastName": "Doe" ,
|
|
|
|
"firstName": "John",
|
|
|
|
"email": "John.Doe@example.com",
|
|
|
|
"address": {
|
2023-12-10 21:21:11 +01:00
|
|
|
"address": "Rue de Tournais 42",
|
2023-12-10 13:15:49 +01:00
|
|
|
"country": "BE"},
|
|
|
|
"birthDate": "1941-02-22",
|
|
|
|
"staffMember": true,
|
2023-12-04 19:58:00 +01:00
|
|
|
}
|
|
|
|
Address:
|
|
|
|
type: object
|
|
|
|
properties:
|
2023-12-10 13:15:49 +01:00
|
|
|
address:
|
2023-12-04 19:58:00 +01:00
|
|
|
type: string
|
2023-12-10 13:15:49 +01:00
|
|
|
country:
|
2023-12-04 19:58:00 +01:00
|
|
|
type: string
|
|
|
|
description: Follow the ISO-3166-1 alpha-2 standard.
|
|
|
|
example:
|
|
|
|
{
|
2023-12-10 21:21:11 +01:00
|
|
|
"address": "Rue de Tournais 42",
|
2023-12-10 13:15:49 +01:00
|
|
|
"country": "BE"
|
|
|
|
}
|
|
|
|
Course:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
credits:
|
|
|
|
type: integer
|
|
|
|
faculty:
|
|
|
|
type: string
|
|
|
|
teachers:
|
|
|
|
type: integer
|
|
|
|
description: user's id
|
|
|
|
assistants:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: integer
|
|
|
|
description: user's id
|
|
|
|
example:
|
|
|
|
{
|
|
|
|
"id": 42,
|
|
|
|
"name": "Math pour l'info",
|
|
|
|
"credits": 11,
|
|
|
|
"faculty": "science",
|
|
|
|
"Teacher": 42,
|
|
|
|
"Assistants": [ ]
|
2023-12-04 19:58:00 +01:00
|
|
|
}
|
|
|
|
Cursus:
|
|
|
|
type: object
|
|
|
|
properties:
|
2023-12-10 13:15:49 +01:00
|
|
|
id:
|
2023-12-04 19:58:00 +01:00
|
|
|
type: integer
|
2023-12-10 13:15:49 +01:00
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
courses:
|
2023-12-04 19:58:00 +01:00
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
example:
|
|
|
|
{
|
|
|
|
"id": 42,
|
|
|
|
"courses": ['Math', 'Info']
|
|
|
|
}
|
2023-12-10 13:15:49 +01:00
|
|
|
Lesson :
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
date:
|
|
|
|
type: string
|
|
|
|
description: Follow the iso 8601 ("YYYY-MM-DD")
|
|
|
|
duration:
|
|
|
|
type: number
|
|
|
|
description: duration of a course in hours
|
|
|
|
classroom:
|
|
|
|
type: string
|
|
|
|
course:
|
|
|
|
$ref: "#/components/schemas/Course"
|
|
|
|
example:
|
|
|
|
{
|
|
|
|
"id": 12,
|
|
|
|
"date": "2023-12-01",
|
|
|
|
"duration": 1.5,
|
|
|
|
"classroom": "AMPHI01",
|
|
|
|
"course": }
|
|
|
|
Request:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
requestType:
|
|
|
|
type: string
|
|
|
|
lessonId:
|
|
|
|
type: integer
|
|
|
|
example:
|
|
|
|
{
|
|
|
|
"id": 12,
|
|
|
|
"requestType": "delete",
|
|
|
|
"lessonId": 72
|
|
|
|
}
|
|
|
|
Display:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
time:
|
|
|
|
type: string
|
|
|
|
description: Define the period displayed on the schedule (week,month,quadrimester..)
|
|
|
|
display:
|
|
|
|
type: string
|
|
|
|
userId:
|
|
|
|
type: integer
|
|
|
|
description: Id of the user who owns this display
|
|
|
|
example:
|
|
|
|
{
|
|
|
|
"id": 12,
|
|
|
|
"time": "month",
|
|
|
|
"display": "grid",
|
|
|
|
"UserId": 12
|
|
|
|
}
|
2023-12-04 19:58:00 +01:00
|
|
|
responses:
|
|
|
|
UnauthorizedError:
|
2023-12-08 15:48:09 +01:00
|
|
|
description: Unauthorized access or missing bearer
|