From b8897cd6979ab3f4bdcc466efd600c7d048cd4e2 Mon Sep 17 00:00:00 2001
From: Debucquoy <debucqquoy.anthony@gmail.com>
Date: Fri, 8 Dec 2023 15:48:09 +0100
Subject: [PATCH 1/3] =?UTF-8?q?Englishisation=20des=20loies=20du=20march?=
 =?UTF-8?q?=C3=A9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 Documents/proto/general/openapi.yaml | 100 ++++++++++++---------------
 1 file changed, 45 insertions(+), 55 deletions(-)

diff --git a/Documents/proto/general/openapi.yaml b/Documents/proto/general/openapi.yaml
index 028edc6..6a2c29e 100644
--- a/Documents/proto/general/openapi.yaml
+++ b/Documents/proto/general/openapi.yaml
@@ -11,10 +11,10 @@ servers:
 paths:
   /ping:
     get:
-      summary: Vérifie l'état de l'api. 
+      summary: Check the API status 
       responses:
         default:
-          description: Retourne pong 
+          description: pong 
           content:
             text/plain:
               schema:
@@ -22,7 +22,7 @@ paths:
                 example: pong
   /users:
     get:
-      summary: Liste les utilisateurs
+      summary: list all users 
       tags:
         - SI
       security:
@@ -48,7 +48,7 @@ paths:
   
   /user:
     get:
-      summary: Récupére ses informations 
+      summary: get informations about yourself 
       tags:
         - Users
       responses:
@@ -59,7 +59,7 @@ paths:
               schema:
                 $ref: "#/components/schemas/User"
     post:
-      summary: Créer un utilisateur
+      summary: Create user
       tags:
         - Users
       requestBody:
@@ -86,7 +86,7 @@ paths:
                 "FirstName": "John",
                 "Email": "John.Doe@example.com",
                 "Address": {
-                  "Address": "Rue de Tounais 42",
+                  "Address": "Rue de Tournais 42",
                   "Country": "BE"},
                 "BirthDate": "1941-02-22",
                 }
@@ -96,7 +96,7 @@ paths:
         '401':
           $ref: '#/components/responses/UnauthorizedError'
     patch:
-      summary: modifier ses informations
+      summary: Change informations about yourself 
       tags:
         - Users
       security:
@@ -109,21 +109,10 @@ paths:
               $ref: '#/components/schemas/User'
       responses:
         '201':
-          description: Informations modifiées 
+          description: Successfully changed. 
         '401':
           $ref: '#/components/responses/UnauthorizedError'
   /user/{mat}:
-    get:
-      summary: Récupérer les informations d'un utilisateur
-      tags:
-        - Admin
-      responses:
-        '200':
-          description: Utilisateur trouvé
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/User"
     parameters:
       - name: mat
         in: path
@@ -131,8 +120,19 @@ paths:
         required: true
         schema:
           type: integer
+    get:
+      summary: Get user's informations 
+      tags:
+        - Admin
+      responses:
+        '200':
+          description: User found 
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/User"
     patch:
-      summary: modifier les informations d'un utilisateur
+      summary: Alter user's informations 
       tags:
         - Admin
       security:
@@ -145,13 +145,12 @@ paths:
               $ref: '#/components/schemas/User'
       responses:
         '201':
-          description: Informations modifiées 
+          description: Successfully changed
         '401':
           $ref: '#/components/responses/UnauthorizedError'
-
   /course:
     post:
-      summary: Créer un nouveau cours
+      summary: Create new course 
       tags:
         - Courses
         - Secretariat
@@ -172,12 +171,12 @@ paths:
                     type: string
       responses:
         '201':
-          description: Nouveau cours crée
+          description: course created 
         '401':
           $ref: '#/components/responses/UnauthorizedError'
   /courses/{id}:
     get:
-      summary: Voir les informations sur un cours
+      summary: see courses informations 
       tags:
         - Courses
       responses:
@@ -194,7 +193,7 @@ paths:
         schema:
           type: integer
     delete:
-      summary: Suprimer un cours
+      summary: delete a course 
       tags:
         - Courses
         - Secretariat
@@ -206,7 +205,7 @@ paths:
         '401':
           $ref: '#/components/responses/UnauthorizedError'
     patch:
-      summary: Changer les options du cours
+      summary: Change course options 
       tags:
         - Secretariat
         - Courses
@@ -242,13 +241,13 @@ paths:
                 }
       responses:
         '201':
-          description: Cours modifié 
+          description: Course modified
         '401':
           $ref: '#/components/responses/UnauthorizedError'
           
   /cursus:
     post:
-      summary: Créer un nouveau cursus
+      summary: Create a cursus
       tags:
         - cursus
       security: 
@@ -262,33 +261,24 @@ paths:
               properties:
                 name:
                   type: string
-                credits:
-                  type: integer
-                faculty:
-                  type: string
-                teachers:
-                  type: object
-                  $ref: '#/components/schemas/User'
-                assistants:
-                  type: array
+                courses: 
+                  type: array 
                   items:
-                    $ref: '#/components/schemas/User'
+                    type: integer
+                    description: id of courses
               example:
                 {
-                "name": "Math pour l'info",
-                "credits": 11,
-                "faculty": "science",
-                "Teacher": ,
-                "Assistants": [ ]
+                "name": "Bac1",
+                []
                 }
       responses:
         '201':
-          description: Nouveau cursus crée
+          description: Cursus created 
         '401':
           $ref: '#/components/responses/UnauthorizedError'
   /cursus/{id}:
     get:
-      summary: Voir les informations sur un cursus
+      summary: See Cursus's informations 
       tags:
         - cursus
       responses:
@@ -305,7 +295,7 @@ paths:
         schema:
           type: integer
     delete:
-      summary: Suprimer un cursus
+      summary: Delete cursus
       tags:
         - cursus
       security: 
@@ -316,7 +306,7 @@ paths:
         '401':
           $ref: '#/components/responses/UnauthorizedError'
     patch:
-      summary: Changer les options du cursus
+      summary: Modify cursus 
       tags:
         - cursus
       security:
@@ -351,7 +341,7 @@ paths:
                 }
       responses:
         '201':
-          description: Cours modifié 
+          description: Cursus modified 
         '401':
           $ref: '#/components/responses/UnauthorizedError'
           
@@ -417,19 +407,20 @@ components:
         faculty:
           type: string
         teachers:
-          type: object
-          $ref: '#/components/schemas/User'
+          type: integer 
+          description: user's id 
         assistants:
           type: array
           items:
-            $ref: '#/components/schemas/User'
+            type: integer
+            description: user's id
       example:
         {
         "id": 42,
         "name": "Math pour l'info",
         "credits": 11,
         "faculty": "science",
-        "Teacher": ,
+        "Teacher": 42,
         "Assistants": [ ]
         }
     Cursus:
@@ -450,5 +441,4 @@ components:
         }
   responses:
     UnauthorizedError:
-      description: Permission non accordée
-
+      description: Unauthorized access or missing bearer 

From b50e0db3fccb1edd208e0f0e80ac0954dab2542e Mon Sep 17 00:00:00 2001
From: Anthony Debucquoy <debucquoy.anthony@gmail.com>
Date: Sun, 10 Dec 2023 21:21:11 +0100
Subject: [PATCH 2/3] small changes

---
 Documents/proto/general/openapi.yaml | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/Documents/proto/general/openapi.yaml b/Documents/proto/general/openapi.yaml
index 6a2c29e..adfc66c 100644
--- a/Documents/proto/general/openapi.yaml
+++ b/Documents/proto/general/openapi.yaml
@@ -1,7 +1,9 @@
 openapi: 3.0.0
 info:
   title: ClydeAPI
-  description: Clyde's api
+  description:
+    This is the Clyde's api documentation. <br/>
+    Each endpoints are organised by endpoints **AND** by extensions making it easier to navigate.
   version: 0.0.1
 
 servers:
@@ -51,6 +53,8 @@ paths:
       summary: get informations about yourself 
       tags:
         - Users
+      security:
+        - bearer: []
       responses:
         '200':
           description: Ok
@@ -58,6 +62,8 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/User"
+        '401':
+          $ref: '#/components/responses/UnauthorizedError'
     post:
       summary: Create user
       tags:
@@ -377,7 +383,7 @@ components:
         "firstName": "John",
         "email": "John.Doe@example.com",
         "address": {
-          "address": "Rue de Tounais 42",
+          "address": "Rue de Tournais 42",
           "country": "BE"},
         "birthDate": "1941-02-22",
         "staffMember": true,
@@ -392,7 +398,7 @@ components:
           description: Follow the ISO-3166-1 alpha-2 standard.
       example:
         {
-          "address": "Rue de Tounais 42",
+          "address": "Rue de Tournais 42",
           "country": "BE"
         }
     Course:

From f0b2c31a066dc04e27655f25f6109c9fecbe3a7d Mon Sep 17 00:00:00 2001
From: Anthony Debucquoy <debucquoy.anthony@gmail.com>
Date: Sun, 10 Dec 2023 21:26:51 +0100
Subject: [PATCH 3/3] Adding all endpoint to "general" tag

---
 Documents/proto/general/openapi.yaml | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/Documents/proto/general/openapi.yaml b/Documents/proto/general/openapi.yaml
index adfc66c..5054813 100644
--- a/Documents/proto/general/openapi.yaml
+++ b/Documents/proto/general/openapi.yaml
@@ -26,6 +26,7 @@ paths:
     get:
       summary: list all users 
       tags:
+        - General
         - SI
       security:
         - bearer: []
@@ -52,6 +53,7 @@ paths:
     get:
       summary: get informations about yourself 
       tags:
+        - General
         - Users
       security:
         - bearer: []
@@ -67,6 +69,7 @@ paths:
     post:
       summary: Create user
       tags:
+        - General
         - Users
       requestBody:
         required: true
@@ -104,6 +107,7 @@ paths:
     patch:
       summary: Change informations about yourself 
       tags:
+        - General
         - Users
       security:
         - bearer: []
@@ -129,6 +133,7 @@ paths:
     get:
       summary: Get user's informations 
       tags:
+        - General
         - Admin
       responses:
         '200':
@@ -140,6 +145,7 @@ paths:
     patch:
       summary: Alter user's informations 
       tags:
+        - General
         - Admin
       security:
         - bearer: []
@@ -158,6 +164,7 @@ paths:
     post:
       summary: Create new course 
       tags:
+        - General
         - Courses
         - Secretariat
       security: 
@@ -184,6 +191,7 @@ paths:
     get:
       summary: see courses informations 
       tags:
+        - General
         - Courses
       responses:
         '200':
@@ -201,6 +209,7 @@ paths:
     delete:
       summary: delete a course 
       tags:
+        - General
         - Courses
         - Secretariat
       security: 
@@ -213,6 +222,7 @@ paths:
     patch:
       summary: Change course options 
       tags:
+        - General
         - Secretariat
         - Courses
       security:
@@ -255,6 +265,7 @@ paths:
     post:
       summary: Create a cursus
       tags:
+        - General
         - cursus
       security: 
         - bearer: []
@@ -286,6 +297,7 @@ paths:
     get:
       summary: See Cursus's informations 
       tags:
+        - General
         - cursus
       responses:
         '200':
@@ -303,6 +315,7 @@ paths:
     delete:
       summary: Delete cursus
       tags:
+        - General
         - cursus
       security: 
         - bearer: []
@@ -314,6 +327,7 @@ paths:
     patch:
       summary: Modify cursus 
       tags:
+        - General
         - cursus
       security:
         - bearer: []