salutcesmoileo #4
@ -378,6 +378,140 @@ paths:
 | 
				
			|||||||
        '401':
 | 
					        '401':
 | 
				
			||||||
          $ref: '#/components/responses/UnauthorizedError'
 | 
					          $ref: '#/components/responses/UnauthorizedError'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /Requests/{type}:
 | 
				
			||||||
 | 
					    get:
 | 
				
			||||||
 | 
					      summary: Give an array of every requests of the specified type
 | 
				
			||||||
 | 
					      tags : 
 | 
				
			||||||
 | 
					        - Requests
 | 
				
			||||||
 | 
					        - SI
 | 
				
			||||||
 | 
					        - Ext (Student Registration)
 | 
				
			||||||
 | 
					      responses : 
 | 
				
			||||||
 | 
					        '200':
 | 
				
			||||||
 | 
					          description : OK
 | 
				
			||||||
 | 
					          content : 
 | 
				
			||||||
 | 
					            application/json : 
 | 
				
			||||||
 | 
					              schema : 
 | 
				
			||||||
 | 
					                type : array
 | 
				
			||||||
 | 
					                items :
 | 
				
			||||||
 | 
					                  allOf:
 | 
				
			||||||
 | 
					                  - type : object
 | 
				
			||||||
 | 
					                    properties : 
 | 
				
			||||||
 | 
					                      id : 
 | 
				
			||||||
 | 
					                        type : integer
 | 
				
			||||||
 | 
					                  - oneOf : 
 | 
				
			||||||
 | 
					                    - $ref : '#/components/schemas/RRRequest'
 | 
				
			||||||
 | 
					                    - $ref : '#/components/schemas/SSRequest'
 | 
				
			||||||
 | 
					                    - $ref : '#/components/schemas/UnRegRequest'
 | 
				
			||||||
 | 
					                    - $ref : '#/components/schemas/ExempRequest'
 | 
				
			||||||
 | 
					                    - $ref : '#/components/schemas/RegRequest'
 | 
				
			||||||
 | 
					                  discriminator:
 | 
				
			||||||
 | 
					                    propertyName : type
 | 
				
			||||||
 | 
					    parameters:
 | 
				
			||||||
| 
						
							
	
	
	
	
	
	
	
	 | 
				|||||||
 | 
					      - name: type
 | 
				
			||||||
 | 
					        in: path
 | 
				
			||||||
 | 
					        description: type of the request
 | 
				
			||||||
 | 
					        required: true
 | 
				
			||||||
 | 
					        schema:
 | 
				
			||||||
 | 
					          type: integer
 | 
				
			||||||
 | 
					          
 | 
				
			||||||
 | 
					    post : 
 | 
				
			||||||
 | 
					      summary: create a request
 | 
				
			||||||
 | 
					      tags : 
 | 
				
			||||||
 | 
					        - Requests
 | 
				
			||||||
 | 
					        - Guest
 | 
				
			||||||
 | 
					        - Student
 | 
				
			||||||
 | 
					        - Ext (Student Registration)
 | 
				
			||||||
 | 
					      security: 
 | 
				
			||||||
 | 
					        - bearer: []
 | 
				
			||||||
 | 
					      requestBody:
 | 
				
			||||||
 | 
					        required: true
 | 
				
			||||||
 | 
					        content:
 | 
				
			||||||
 | 
					          application/x-www-form-urlencoded:
 | 
				
			||||||
 | 
					            schema:
 | 
				
			||||||
 | 
					              oneOf:
 | 
				
			||||||
 | 
					                - $ref : '#/components/schemas/RRRequest'
 | 
				
			||||||
 | 
					                - $ref : '#/components/schemas/SSRequest'
 | 
				
			||||||
 | 
					                - $ref : '#/components/schemas/UnRegRequest'
 | 
				
			||||||
 | 
					                - $ref : '#/components/schemas/ExempRequest'
 | 
				
			||||||
 | 
					                - $ref : '#/components/schemas/RegRequest'
 | 
				
			||||||
 | 
					              discriminator:
 | 
				
			||||||
 | 
					                    propertyName : type
 | 
				
			||||||
 | 
					      responses:
 | 
				
			||||||
 | 
					        '201':
 | 
				
			||||||
 | 
					          description: New request created
 | 
				
			||||||
| 
						
							
	
	
	
	
	
	
	
	 
					
					tonitch marked this conversation as resolved
					
				 
				
				
					
						tonitch
						commented  
			
		Il manque un / Il manque un /
 `/Requests/{type}/{id}` 
			
			
		 | 
				|||||||
 | 
					        '401':
 | 
				
			||||||
 | 
					          $ref : '#/components/responses/UnauthorizedError' 
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					  /Requests/{type}/{id}:
 | 
				
			||||||
 | 
					    parameters:
 | 
				
			||||||
 | 
					        - name: type
 | 
				
			||||||
 | 
					          in: path
 | 
				
			||||||
 | 
					          description: type of the request
 | 
				
			||||||
 | 
					          required: true
 | 
				
			||||||
 | 
					          schema:
 | 
				
			||||||
 | 
					            type: integer
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					        - name : id
 | 
				
			||||||
 | 
					          in : path
 | 
				
			||||||
 | 
					          description: id of the selected Request
 | 
				
			||||||
 | 
					          required : true
 | 
				
			||||||
 | 
					          schema : 
 | 
				
			||||||
 | 
					            type : integer
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					    get :
 | 
				
			||||||
 | 
					      summary : Get all the data composing a request
 | 
				
			||||||
 | 
					      tags : 
 | 
				
			||||||
 | 
					        - Requests
 | 
				
			||||||
 | 
					        - SI
 | 
				
			||||||
 | 
					        - Teacher
 | 
				
			||||||
 | 
					        - Ext (Student Registration)
 | 
				
			||||||
 | 
					      responses : 
 | 
				
			||||||
 | 
					        '200':
 | 
				
			||||||
 | 
					          description : OK
 | 
				
			||||||
 | 
					          content : 
 | 
				
			||||||
 | 
					            application/json :
 | 
				
			||||||
 | 
					              schema :
 | 
				
			||||||
 | 
					                allOf:
 | 
				
			||||||
 | 
					                  - type : object
 | 
				
			||||||
 | 
					                    properties : 
 | 
				
			||||||
 | 
					                      id : 
 | 
				
			||||||
 | 
					                        type : integer
 | 
				
			||||||
 | 
					                  - oneOf : 
 | 
				
			||||||
 | 
					                    - $ref : '#/components/schemas/RRRequest'
 | 
				
			||||||
 | 
					                    - $ref : '#/components/schemas/SSRequest'
 | 
				
			||||||
 | 
					                    - $ref : '#/components/schemas/UnRegRequest'
 | 
				
			||||||
 | 
					                    - $ref : '#/components/schemas/ExempRequest'
 | 
				
			||||||
 | 
					                    - $ref : '#/components/schemas/RegRequest'
 | 
				
			||||||
 | 
					                discriminator:
 | 
				
			||||||
 | 
					                  propertyName : type 
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    patch:
 | 
				
			||||||
 | 
					        summary: Change the state of request
 | 
				
			||||||
 | 
					        tags:
 | 
				
			||||||
 | 
					          - Requests
 | 
				
			||||||
 | 
					          - SI
 | 
				
			||||||
 | 
					          - Teacher
 | 
				
			||||||
 | 
					          - Ext (Student Registration)
 | 
				
			||||||
 | 
					        security:
 | 
				
			||||||
 | 
					          - bearer: []
 | 
				
			||||||
 | 
					        requestBody:
 | 
				
			||||||
 | 
					          required : true
 | 
				
			||||||
 | 
					          content:
 | 
				
			||||||
 | 
					              application/x-www-form-urlencoded:
 | 
				
			||||||
 | 
					                schema:
 | 
				
			||||||
 | 
					                  oneOf : 
 | 
				
			||||||
 | 
					                    - $ref : '#/components/schemas/RRRequest'
 | 
				
			||||||
 | 
					                    - $ref : '#/components/schemas/SSRequest'
 | 
				
			||||||
 | 
					                    - $ref : '#/components/schemas/UnRegRequest'
 | 
				
			||||||
 | 
					                    - $ref : '#/components/schemas/ExempRequest'
 | 
				
			||||||
 | 
					                    - $ref : '#/components/schemas/RegRequest'
 | 
				
			||||||
 | 
					                  discriminator:
 | 
				
			||||||
 | 
					                    propertyName : type 
 | 
				
			||||||
 | 
					        responses:
 | 
				
			||||||
 | 
					          '201':
 | 
				
			||||||
 | 
					            description: State modified
 | 
				
			||||||
 | 
					          '401':
 | 
				
			||||||
 | 
					            $ref: '#/components/responses/UnauthorizedError' 
 | 
				
			||||||
             
 | 
					             
 | 
				
			||||||
  /lesson:
 | 
					  /lesson:
 | 
				
			||||||
    post:
 | 
					    post:
 | 
				
			||||||
@ -886,6 +1020,84 @@ components:
 | 
				
			|||||||
    Roles:
 | 
					    Roles:
 | 
				
			||||||
     type: string
 | 
					     type: string
 | 
				
			||||||
      enum: [teacher, student, secretary]
 | 
					      enum: [teacher, student, secretary]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    RegRequest:
 | 
				
			||||||
 | 
					      type : object
 | 
				
			||||||
 | 
					      properties:
 | 
				
			||||||
 | 
					        Name :
 | 
				
			||||||
 | 
					          type: string
 | 
				
			||||||
 | 
					        Firstname :
 | 
				
			||||||
 | 
					          type : string
 | 
				
			||||||
 | 
					        Address :
 | 
				
			||||||
 | 
					          $ref: "#/components/schemas/Address"
 | 
				
			||||||
 | 
					        Email:
 | 
				
			||||||
 | 
					          type : string
 | 
				
			||||||
 | 
					        BirthDate:
 | 
				
			||||||
 | 
					          type : string
 | 
				
			||||||
 | 
					          description: Follow the iso 8601 ("YYYY-MM-DD")
 | 
				
			||||||
 | 
					        Cursus:
 | 
				
			||||||
 | 
					          type : integer
 | 
				
			||||||
 | 
					          description : ID of a specific cursus
 | 
				
			||||||
 | 
					        Photo:
 | 
				
			||||||
 | 
					          type : string
 | 
				
			||||||
 | 
					          description: Path of the picture that the user uploaded
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        IdentityCard:
 | 
				
			||||||
 | 
					          type : string
 | 
				
			||||||
 | 
					          description: Path of the picture of the user's identity card
 | 
				
			||||||
 | 
					        Degree:
 | 
				
			||||||
 | 
					          type : string
 | 
				
			||||||
 | 
					          description: Path of the pdf containing the user's degree
 | 
				
			||||||
 | 
					        Certificate:
 | 
				
			||||||
 | 
					          type : string
 | 
				
			||||||
 | 
					          description: Path of the pdf containing the user's admission certificate (optionnal)
 | 
				
			||||||
 | 
					        ForeignerCertificate:
 | 
				
			||||||
 | 
					          type : string
 | 
				
			||||||
 | 
					          description: Path of the pdf containing the user's foreigner certificate (optionnal)
 | 
				
			||||||
 | 
					        State:
 | 
				
			||||||
 | 
					          type : string
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    RRRequest:
 | 
				
			||||||
 | 
					      type : object
 | 
				
			||||||
 | 
					      properties :
 | 
				
			||||||
 | 
					        RegNo : 
 | 
				
			||||||
 | 
					          type : integer
 | 
				
			||||||
 | 
					        NewCursusid : 
 | 
				
			||||||
 | 
					          type : integer
 | 
				
			||||||
 | 
					        State : 
 | 
				
			||||||
 | 
					          type : string
 | 
				
			||||||
 | 
					      
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    SSRequest: 
 | 
				
			||||||
 | 
					      type : object
 | 
				
			||||||
 | 
					      properties : 
 | 
				
			||||||
 | 
					        RegNo : 
 | 
				
			||||||
 | 
					          type : integer
 | 
				
			||||||
 | 
					        Amount : 
 | 
				
			||||||
 | 
					          type : integer
 | 
				
			||||||
 | 
					        Document : 
 | 
				
			||||||
 | 
					          type : string
 | 
				
			||||||
 | 
					          description : justification document for a scholarship
 | 
				
			||||||
 | 
					              
 | 
				
			||||||
 | 
					    UnRegRequest :
 | 
				
			||||||
 | 
					      type : object
 | 
				
			||||||
 | 
					      properties : 
 | 
				
			||||||
 | 
					        RegNo : 
 | 
				
			||||||
 | 
					          type : integer
 | 
				
			||||||
 | 
					        State :
 | 
				
			||||||
 | 
					          type : string
 | 
				
			||||||
 | 
					          
 | 
				
			||||||
 | 
					    ExempRequest :
 | 
				
			||||||
 | 
					      type : object
 | 
				
			||||||
 | 
					      properties :
 | 
				
			||||||
 | 
					        RegNo : 
 | 
				
			||||||
 | 
					          type : integer
 | 
				
			||||||
 | 
					        Courseid :
 | 
				
			||||||
 | 
					          type : integer
 | 
				
			||||||
 | 
					        State :
 | 
				
			||||||
 | 
					          type : string
 | 
				
			||||||
 | 
					          
 | 
				
			||||||
    Article:
 | 
					    Article:
 | 
				
			||||||
      type: object
 | 
					      type: object
 | 
				
			||||||
      properties:
 | 
					      properties:
 | 
				
			||||||
@ -1018,6 +1230,7 @@ components:
 | 
				
			|||||||
          "displayMode": "grid",
 | 
					          "displayMode": "grid",
 | 
				
			||||||
          "UserId": 12
 | 
					          "UserId": 12
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  responses:
 | 
					  responses:
 | 
				
			||||||
    UnauthorizedError:
 | 
					    UnauthorizedError:
 | 
				
			||||||
      description: Unauthorized access or missing bearer 
 | 
					      description: Unauthorized access or missing bearer 
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user
	
je ne sais pas si c'est l'intention, mais tu n'as pas la possibilité de faire un fetch de toutes les requests.
le plus simple est de changer l'endpoint à
/Requestset le paramètre tu peux le mettre à
in: query. enrequired: false