Merge pull request 'openapi-dev' (#3) from openapi-dev into master
Reviewed-on: PGL/Clyde#3 Je suis ok les bg
This commit is contained in:
		@ -1,7 +1,9 @@
 | 
				
			|||||||
openapi: 3.0.0
 | 
					openapi: 3.0.0
 | 
				
			||||||
info:
 | 
					info:
 | 
				
			||||||
  title: ClydeAPI
 | 
					  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
 | 
					  version: 0.0.1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
servers:
 | 
					servers:
 | 
				
			||||||
@ -11,96 +13,71 @@ servers:
 | 
				
			|||||||
paths:
 | 
					paths:
 | 
				
			||||||
  /ping:
 | 
					  /ping:
 | 
				
			||||||
    get:
 | 
					    get:
 | 
				
			||||||
      summary: Test if the api is up.
 | 
					      summary: Check the API status 
 | 
				
			||||||
      responses:
 | 
					      responses:
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
          description: Standard response to ping
 | 
					          description: pong 
 | 
				
			||||||
          content:
 | 
					          content:
 | 
				
			||||||
            text/plain:
 | 
					            text/plain:
 | 
				
			||||||
              schema:
 | 
					              schema:
 | 
				
			||||||
                type: string
 | 
					                type: string
 | 
				
			||||||
                example: pong
 | 
					                example: pong
 | 
				
			||||||
  /user:
 | 
					  /users:
 | 
				
			||||||
    put:
 | 
					    get:
 | 
				
			||||||
      summary: create a new user
 | 
					      summary: list all users 
 | 
				
			||||||
      tags:
 | 
					      tags:
 | 
				
			||||||
        - users
 | 
					        - General
 | 
				
			||||||
 | 
					        - SI
 | 
				
			||||||
 | 
					      security:
 | 
				
			||||||
 | 
					        - bearer: []
 | 
				
			||||||
 | 
					      parameters:
 | 
				
			||||||
 | 
					        - in: query
 | 
				
			||||||
 | 
					          name: type
 | 
				
			||||||
 | 
					          required: false 
 | 
				
			||||||
 | 
					          schema:
 | 
				
			||||||
 | 
					            type: string
 | 
				
			||||||
 | 
					            enum: [teacher, student, secretary]
 | 
				
			||||||
 | 
					      responses: 
 | 
				
			||||||
 | 
					        '200':
 | 
				
			||||||
 | 
					          description: OK
 | 
				
			||||||
 | 
					          content: 
 | 
				
			||||||
 | 
					            application/json:
 | 
				
			||||||
 | 
					              schema:
 | 
				
			||||||
 | 
					                type: array
 | 
				
			||||||
 | 
					                items:
 | 
				
			||||||
 | 
					                  $ref: "#/components/schemas/User"
 | 
				
			||||||
 | 
					        '401':
 | 
				
			||||||
 | 
					          $ref: '#/components/responses/UnauthorizedError'
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					  /user:
 | 
				
			||||||
 | 
					    get:
 | 
				
			||||||
 | 
					      summary: get informations about yourself 
 | 
				
			||||||
 | 
					      tags:
 | 
				
			||||||
 | 
					        - General
 | 
				
			||||||
 | 
					        - Users
 | 
				
			||||||
      security:
 | 
					      security:
 | 
				
			||||||
        - bearer: []
 | 
					        - bearer: []
 | 
				
			||||||
      responses:
 | 
					      responses:
 | 
				
			||||||
        '200':
 | 
					        '200':
 | 
				
			||||||
          description: User created
 | 
					          description: Ok
 | 
				
			||||||
        '401':
 | 
					 | 
				
			||||||
          $ref: '#/components/responses/UnauthorizedError'
 | 
					 | 
				
			||||||
  /user/{mat}:
 | 
					 | 
				
			||||||
    get:
 | 
					 | 
				
			||||||
      summary: get user's info
 | 
					 | 
				
			||||||
      tags:
 | 
					 | 
				
			||||||
        - users
 | 
					 | 
				
			||||||
      responses:
 | 
					 | 
				
			||||||
        '200':
 | 
					 | 
				
			||||||
          description: User found 
 | 
					 | 
				
			||||||
          content:
 | 
					          content:
 | 
				
			||||||
            application/json:
 | 
					            application/json:
 | 
				
			||||||
              schema:
 | 
					              schema:
 | 
				
			||||||
                $ref: "#/components/schemas/User"
 | 
					                $ref: "#/components/schemas/User"
 | 
				
			||||||
    parameters:
 | 
					        '401':
 | 
				
			||||||
      - name: mat
 | 
					          $ref: '#/components/responses/UnauthorizedError'
 | 
				
			||||||
        in: path
 | 
					    post:
 | 
				
			||||||
        description: Matricule of the user (unique id)
 | 
					      summary: Create user
 | 
				
			||||||
 | 
					      tags:
 | 
				
			||||||
 | 
					        - General
 | 
				
			||||||
 | 
					        - Users
 | 
				
			||||||
 | 
					      requestBody:
 | 
				
			||||||
        required: true
 | 
					        required: true
 | 
				
			||||||
        schema:
 | 
					 | 
				
			||||||
          type: integer
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /cursus/{id}:
 | 
					 | 
				
			||||||
    get:
 | 
					 | 
				
			||||||
      summary: Voir les informations sur un Cursus
 | 
					 | 
				
			||||||
      tags:
 | 
					 | 
				
			||||||
        - Courses
 | 
					 | 
				
			||||||
      responses:
 | 
					 | 
				
			||||||
        '200':
 | 
					 | 
				
			||||||
          description: Cursus found
 | 
					 | 
				
			||||||
        content:
 | 
					        content:
 | 
				
			||||||
            application/json:
 | 
					          application/x-www-form-urlencoded:
 | 
				
			||||||
            schema:
 | 
					            schema:
 | 
				
			||||||
                $ref: '#/components/schemas/Cursus'
 | 
					 | 
				
			||||||
  /courses/{id}:
 | 
					 | 
				
			||||||
    get:
 | 
					 | 
				
			||||||
      summary: Voir les informations sur un cours*
 | 
					 | 
				
			||||||
      tags:
 | 
					 | 
				
			||||||
        - Courses
 | 
					 | 
				
			||||||
      responses:
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    put:
 | 
					 | 
				
			||||||
      summary: Créer un nouveau cours
 | 
					 | 
				
			||||||
      tags:
 | 
					 | 
				
			||||||
        - Courses
 | 
					 | 
				
			||||||
      security: 
 | 
					 | 
				
			||||||
        - bearer: []
 | 
					 | 
				
			||||||
      responses:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    delete:
 | 
					 | 
				
			||||||
      summary: Suprimer un cours
 | 
					 | 
				
			||||||
      tags:
 | 
					 | 
				
			||||||
        - Courses
 | 
					 | 
				
			||||||
      security: 
 | 
					 | 
				
			||||||
        - bearer: []
 | 
					 | 
				
			||||||
      responses:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
components:
 | 
					 | 
				
			||||||
  securitySchemes:
 | 
					 | 
				
			||||||
    bearer:
 | 
					 | 
				
			||||||
      type: http
 | 
					 | 
				
			||||||
      scheme: bearer
 | 
					 | 
				
			||||||
  schemas:
 | 
					 | 
				
			||||||
    User:
 | 
					 | 
				
			||||||
              type: object 
 | 
					              type: object 
 | 
				
			||||||
              properties:
 | 
					              properties:
 | 
				
			||||||
        RegNo:
 | 
					 | 
				
			||||||
          type: integer
 | 
					 | 
				
			||||||
        Photo:
 | 
					 | 
				
			||||||
          type: object
 | 
					 | 
				
			||||||
                LastName: 
 | 
					                LastName: 
 | 
				
			||||||
                  type: string
 | 
					                  type: string
 | 
				
			||||||
                FirstName:
 | 
					                FirstName:
 | 
				
			||||||
@ -112,39 +89,368 @@ components:
 | 
				
			|||||||
                BirthDate:
 | 
					                BirthDate:
 | 
				
			||||||
                  type: string
 | 
					                  type: string
 | 
				
			||||||
                  description: Follow the iso 8601 ("YYYY-MM-DD")
 | 
					                  description: Follow the iso 8601 ("YYYY-MM-DD")
 | 
				
			||||||
        StaffMember:
 | 
					 | 
				
			||||||
          type: boolean
 | 
					 | 
				
			||||||
              example:
 | 
					              example:
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
        "RegNo": 42,
 | 
					 | 
				
			||||||
                "LastName": "Doe" ,
 | 
					                "LastName": "Doe" ,
 | 
				
			||||||
                "FirstName": "John",
 | 
					                "FirstName": "John",
 | 
				
			||||||
                "Email": "John.Doe@example.com",
 | 
					                "Email": "John.Doe@example.com",
 | 
				
			||||||
                "Address": {
 | 
					                "Address": {
 | 
				
			||||||
          "Address": "Rue de Tounais 42",
 | 
					                  "Address": "Rue de Tournais 42",
 | 
				
			||||||
                  "Country": "BE"},
 | 
					                  "Country": "BE"},
 | 
				
			||||||
                "BirthDate": "1941-02-22",
 | 
					                "BirthDate": "1941-02-22",
 | 
				
			||||||
        "StaffMember": true
 | 
					                }
 | 
				
			||||||
 | 
					      responses:
 | 
				
			||||||
 | 
					        '201':
 | 
				
			||||||
 | 
					          description: User created
 | 
				
			||||||
 | 
					        '401':
 | 
				
			||||||
 | 
					          $ref: '#/components/responses/UnauthorizedError'
 | 
				
			||||||
 | 
					    patch:
 | 
				
			||||||
 | 
					      summary: Change informations about yourself 
 | 
				
			||||||
 | 
					      tags:
 | 
				
			||||||
 | 
					        - General
 | 
				
			||||||
 | 
					        - 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}:
 | 
				
			||||||
 | 
					    parameters:
 | 
				
			||||||
 | 
					      - name: mat
 | 
				
			||||||
 | 
					        in: path
 | 
				
			||||||
 | 
					        description: Matricule of the user (unique id)
 | 
				
			||||||
 | 
					        required: true
 | 
				
			||||||
 | 
					        schema:
 | 
				
			||||||
 | 
					          type: integer
 | 
				
			||||||
 | 
					    get:
 | 
				
			||||||
 | 
					      summary: Get user's informations 
 | 
				
			||||||
 | 
					      tags:
 | 
				
			||||||
 | 
					        - General
 | 
				
			||||||
 | 
					        - Admin
 | 
				
			||||||
 | 
					      responses:
 | 
				
			||||||
 | 
					        '200':
 | 
				
			||||||
 | 
					          description: User found 
 | 
				
			||||||
 | 
					          content:
 | 
				
			||||||
 | 
					            application/json:
 | 
				
			||||||
 | 
					              schema:
 | 
				
			||||||
 | 
					                $ref: "#/components/schemas/User"
 | 
				
			||||||
 | 
					    patch:
 | 
				
			||||||
 | 
					      summary: Alter user's informations 
 | 
				
			||||||
 | 
					      tags:
 | 
				
			||||||
 | 
					        - General
 | 
				
			||||||
 | 
					        - 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:
 | 
				
			||||||
 | 
					        - General
 | 
				
			||||||
 | 
					        - 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'
 | 
				
			||||||
 | 
					  /courses/{id}:
 | 
				
			||||||
 | 
					    get:
 | 
				
			||||||
 | 
					      summary: see courses informations 
 | 
				
			||||||
 | 
					      tags:
 | 
				
			||||||
 | 
					        - General
 | 
				
			||||||
 | 
					        - Courses
 | 
				
			||||||
 | 
					      responses:
 | 
				
			||||||
 | 
					        '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 
 | 
				
			||||||
 | 
					      tags:
 | 
				
			||||||
 | 
					        - General
 | 
				
			||||||
 | 
					        - Courses
 | 
				
			||||||
 | 
					        - Secretariat
 | 
				
			||||||
 | 
					      security: 
 | 
				
			||||||
 | 
					        - bearer: []
 | 
				
			||||||
 | 
					      responses:
 | 
				
			||||||
 | 
					        '201':
 | 
				
			||||||
 | 
					          description: Success
 | 
				
			||||||
 | 
					        '401':
 | 
				
			||||||
 | 
					          $ref: '#/components/responses/UnauthorizedError'
 | 
				
			||||||
 | 
					    patch:
 | 
				
			||||||
 | 
					      summary: Change course options 
 | 
				
			||||||
 | 
					      tags:
 | 
				
			||||||
 | 
					        - General
 | 
				
			||||||
 | 
					        - Secretariat
 | 
				
			||||||
 | 
					        - Courses
 | 
				
			||||||
 | 
					      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:
 | 
				
			||||||
 | 
					        - General
 | 
				
			||||||
 | 
					        - cursus
 | 
				
			||||||
 | 
					      security: 
 | 
				
			||||||
 | 
					        - bearer: []
 | 
				
			||||||
 | 
					      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",
 | 
				
			||||||
 | 
					                []
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					      responses:
 | 
				
			||||||
 | 
					        '201':
 | 
				
			||||||
 | 
					          description: Cursus created 
 | 
				
			||||||
 | 
					        '401':
 | 
				
			||||||
 | 
					          $ref: '#/components/responses/UnauthorizedError'
 | 
				
			||||||
 | 
					  /cursus/{id}:
 | 
				
			||||||
 | 
					    get:
 | 
				
			||||||
 | 
					      summary: See Cursus's informations 
 | 
				
			||||||
 | 
					      tags:
 | 
				
			||||||
 | 
					        - General
 | 
				
			||||||
 | 
					        - 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:
 | 
				
			||||||
 | 
					        - General
 | 
				
			||||||
 | 
					        - cursus
 | 
				
			||||||
 | 
					      security: 
 | 
				
			||||||
 | 
					        - bearer: []
 | 
				
			||||||
 | 
					      responses:
 | 
				
			||||||
 | 
					        '201':
 | 
				
			||||||
 | 
					          description: Success
 | 
				
			||||||
 | 
					        '401':
 | 
				
			||||||
 | 
					          $ref: '#/components/responses/UnauthorizedError'
 | 
				
			||||||
 | 
					    patch:
 | 
				
			||||||
 | 
					      summary: Modify cursus 
 | 
				
			||||||
 | 
					      tags:
 | 
				
			||||||
 | 
					        - General
 | 
				
			||||||
 | 
					        - 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'
 | 
				
			||||||
 | 
					          
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					components:
 | 
				
			||||||
 | 
					  securitySchemes:
 | 
				
			||||||
 | 
					    bearer:
 | 
				
			||||||
 | 
					      type: http
 | 
				
			||||||
 | 
					      scheme: bearer
 | 
				
			||||||
 | 
					  schemas:
 | 
				
			||||||
 | 
					    User:
 | 
				
			||||||
 | 
					      type: object 
 | 
				
			||||||
 | 
					      properties:
 | 
				
			||||||
 | 
					        regNo:
 | 
				
			||||||
 | 
					          type: integer
 | 
				
			||||||
 | 
					        photo:
 | 
				
			||||||
 | 
					          type: object
 | 
				
			||||||
 | 
					        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:
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					        "regNo": 42,
 | 
				
			||||||
 | 
					        "lastName": "Doe" ,
 | 
				
			||||||
 | 
					        "firstName": "John",
 | 
				
			||||||
 | 
					        "email": "John.Doe@example.com",
 | 
				
			||||||
 | 
					        "address": {
 | 
				
			||||||
 | 
					          "address": "Rue de Tournais 42",
 | 
				
			||||||
 | 
					          "country": "BE"},
 | 
				
			||||||
 | 
					        "birthDate": "1941-02-22",
 | 
				
			||||||
 | 
					        "staffMember": true,
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    Address:
 | 
					    Address:
 | 
				
			||||||
      type: object
 | 
					      type: object
 | 
				
			||||||
      properties:
 | 
					      properties:
 | 
				
			||||||
        Address:
 | 
					        address:
 | 
				
			||||||
          type: string
 | 
					          type: string
 | 
				
			||||||
        Country:
 | 
					        country:
 | 
				
			||||||
          type: string
 | 
					          type: string
 | 
				
			||||||
          description: Follow the ISO-3166-1 alpha-2 standard.
 | 
					          description: Follow the ISO-3166-1 alpha-2 standard.
 | 
				
			||||||
      example:
 | 
					      example:
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          "Address": "Rue de Tounais 42",
 | 
					          "address": "Rue de Tournais 42",
 | 
				
			||||||
          "Country": "BE"
 | 
					          "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": [ ]
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    Cursus:
 | 
					    Cursus:
 | 
				
			||||||
      type: object
 | 
					      type: object
 | 
				
			||||||
      properties:
 | 
					      properties:
 | 
				
			||||||
        Id:
 | 
					        id:
 | 
				
			||||||
          type: integer
 | 
					          type: integer
 | 
				
			||||||
        Courses:
 | 
					        name:
 | 
				
			||||||
 | 
					          type: string
 | 
				
			||||||
 | 
					        courses:
 | 
				
			||||||
          type: array
 | 
					          type: array
 | 
				
			||||||
          items:
 | 
					          items:
 | 
				
			||||||
            type: string
 | 
					            type: string
 | 
				
			||||||
@ -155,4 +461,4 @@ components:
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
  responses:
 | 
					  responses:
 | 
				
			||||||
    UnauthorizedError:
 | 
					    UnauthorizedError:
 | 
				
			||||||
      description: Access token is missing or invalid
 | 
					      description: Unauthorized access or missing bearer 
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user