ajout Display-Article
(et Mat -> RegNo)
This commit is contained in:
		| @ -122,11 +122,11 @@ paths: | ||||
|           description: Successfully changed.  | ||||
|         '401': | ||||
|           $ref: '#/components/responses/UnauthorizedError' | ||||
|   /user/{mat}: | ||||
|   /user/{RegNo}: | ||||
|     parameters: | ||||
|       - name: mat | ||||
|       - name: RegNo | ||||
|         in: path | ||||
|         description: Matricule of the user (unique id) | ||||
|         description: Regestration number of the user (unique id) | ||||
|         required: true | ||||
|         schema: | ||||
|           type: integer | ||||
| @ -390,15 +390,14 @@ paths: | ||||
|       requestBody: | ||||
|         required : true | ||||
|         content:  | ||||
|           application/pdf: | ||||
|             schema: | ||||
|               type: string | ||||
|               format : binary | ||||
|           application/json: | ||||
|             schema: | ||||
|               type: object | ||||
|               properties: | ||||
|                 acces: | ||||
|                 pdf: | ||||
|                   type: string  | ||||
|                   description : the B64 version encoding of the pdf file | ||||
|                 access: | ||||
|                   type: string | ||||
|                 summary: | ||||
|                   type: string | ||||
| @ -410,7 +409,19 @@ paths: | ||||
|                   type: string | ||||
|                   description: Follow the iso 8601 ("YYYY-MM-DD") | ||||
|                 views: | ||||
|                   type: integer #TODO check comment envoyer fichier + json | ||||
|                   type: integer  | ||||
|             example: | ||||
|                     { | ||||
|         "access": "private", | ||||
|         "pdf": " *the b64 encoding of the pdf* ", | ||||
|         "summary": "looks in details about graph's second theorem", | ||||
|         "language": "english", | ||||
|         "title": "graph's second theorem study", | ||||
|         "date":"2023-02-01", | ||||
|         "views": 420, | ||||
|         "authors" : [] | ||||
|         } | ||||
|                | ||||
|   /article/{id}: | ||||
|     parameters: | ||||
|       - name: id | ||||
| @ -450,15 +461,14 @@ paths: | ||||
|       requestBody: | ||||
|         required : true | ||||
|         content:  | ||||
|           application/pdf: | ||||
|             schema: | ||||
|               type: string | ||||
|               format : binary | ||||
|           application/json: | ||||
|             schema: | ||||
|               type: object | ||||
|               properties: | ||||
|                 acces: | ||||
|                 pdf: | ||||
|                   type: string  | ||||
|                   description : the B64 version encoding of the pdf file | ||||
|                 access: | ||||
|                   type: string | ||||
|                 summary: | ||||
|                   type: string | ||||
| @ -471,6 +481,18 @@ paths: | ||||
|                   description: Follow the iso 8601 ("YYYY-MM-DD") | ||||
|                 views: | ||||
|                   type: integer | ||||
|               example: | ||||
|                                   { | ||||
|         "access": "public", | ||||
|         "pdf": " *the new b64 encoding of the pdf* ", | ||||
|         "summary": "looks in details about the duck's algorithm problem", | ||||
|         "language": "english", | ||||
|         "title": "duck's algorithm problem solving", | ||||
|         "date":"2023-02-01", | ||||
|         "views": 10, | ||||
|         "authors" : [] | ||||
|         } | ||||
|                | ||||
|  | ||||
|     delete: | ||||
|       summary: delete own article | ||||
| @ -485,8 +507,39 @@ paths: | ||||
|         '401': | ||||
|           $ref: '#/components/responses/UnauthorizedError' | ||||
|        | ||||
|    | ||||
|        | ||||
|   /Display-Article: | ||||
|       parameters: | ||||
|         - in: query | ||||
|           name: author | ||||
|           required: false  | ||||
|           schema: | ||||
|             type: string | ||||
|         - in: query | ||||
|           name: access | ||||
|           required: false  | ||||
|           schema: | ||||
|             type: string | ||||
|             enum: [public, restricted, private] | ||||
|         - in: query | ||||
|           name: name | ||||
|           required: false  | ||||
|           schema: | ||||
|             type: string | ||||
|              | ||||
|       get: | ||||
|         summary: get a list of article's data | ||||
|         tags: | ||||
|           - Users | ||||
|           - Ext (scientific articles) | ||||
|         responses:  | ||||
|           '200': | ||||
|             description: OK | ||||
|             content:  | ||||
|               application/json: | ||||
|                 schema: | ||||
|                   type: array | ||||
|                   items: | ||||
|                     $ref: "#/components/schemas/Display-Article" | ||||
|  | ||||
| components: | ||||
|   securitySchemes: | ||||
| @ -587,7 +640,7 @@ components: | ||||
|       properties: | ||||
|         articleId:  | ||||
|           type: integer | ||||
|         acces : | ||||
|         access : | ||||
|           type : string | ||||
|         pdf : | ||||
|           type : string | ||||
| @ -610,7 +663,7 @@ components: | ||||
|       example: | ||||
|         { | ||||
|         "articleId": 42, | ||||
|         "acces": "private", | ||||
|         "access": "private", | ||||
|         "pdf": "/articles/42", | ||||
|         "summary": "looks in details about graph's second theorem", | ||||
|         "language": "english", | ||||
| @ -619,9 +672,33 @@ components: | ||||
|         "views": 420, | ||||
|         "authors" : [] | ||||
|         } | ||||
|          | ||||
|     Display-Article:    | ||||
|       type: object | ||||
|       properties: | ||||
|         articleId:  | ||||
|           type: integer | ||||
|         access: | ||||
|           type: string | ||||
|         summary: | ||||
|           type: string | ||||
|         title: | ||||
|           type: string  | ||||
|         author: | ||||
|           type: string | ||||
|           items: | ||||
|             $ref: '#/components/schemas/User' | ||||
|       example: | ||||
|         { | ||||
|         "articleId": 42, | ||||
|         "access": "private", | ||||
|         "summary": "looks in details about graph's second theorem", | ||||
|         "title": "graph's second theorem study", | ||||
|         "author" : "john doe" | ||||
|         } | ||||
|        | ||||
|          | ||||
|   responses: | ||||
|     UnauthorizedError: | ||||
|       description: Unauthorized access or missing bearer  | ||||
|  | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user