Compare commits

..

No commits in common. "351c0dbfb2a60c6d8b8c74b69d82d592b288ffd2" and "9e299b39bdae191c2597869a4e202fbbe6dabe42" have entirely different histories.

View File

@ -122,11 +122,11 @@ paths:
description: Successfully changed.
'401':
$ref: '#/components/responses/UnauthorizedError'
/user/{RegNo}:
/user/{mat}:
parameters:
- name: RegNo
- name: mat
in: path
description: Regestration number of the user (unique id)
description: Matricule of the user (unique id)
required: true
schema:
type: integer
@ -147,8 +147,6 @@ paths:
tags:
- General
- Admin
- Secretariat
- Ext (scientific articles)
security:
- bearer: []
requestBody:
@ -190,12 +188,6 @@ paths:
'401':
$ref: '#/components/responses/UnauthorizedError'
/courses/{id}:
parameters:
- name: id
in: path
required: true
schema:
type: integer
get:
summary: see courses informations
tags:
@ -208,7 +200,12 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Course'
parameters:
- name: id
in: path
required: true
schema:
type: integer
delete:
summary: delete a course
tags:
@ -268,7 +265,7 @@ paths:
summary: Create a cursus
tags:
- General
- Cursus
- cursus
security:
- bearer: []
requestBody:
@ -300,7 +297,7 @@ paths:
summary: See Cursus's informations
tags:
- General
- Cursus
- cursus
responses:
'200':
description: OK
@ -318,7 +315,7 @@ paths:
summary: Delete cursus
tags:
- General
- Cursus
- cursus
security:
- bearer: []
responses:
@ -330,7 +327,7 @@ paths:
summary: Modify cursus
tags:
- General
- Cursus
- cursus
security:
- bearer: []
requestBody:
@ -366,10 +363,9 @@ paths:
'401':
$ref: '#/components/responses/UnauthorizedError'
/lesson:
post:
summary: create a new lesson
summary: Create a new lesson
tags:
- Secretariat
- Lesson
@ -608,174 +604,7 @@ paths:
responses:
'201':
description: Display modified
# Extension publication scientifique
/article:
post:
summary: create an article
tags:
- Ext (scientific articles)
- Researcher
security:
- bearer : []
responses:
"201" :
description: OK
'401':
$ref: '#/components/responses/UnauthorizedError'
requestBody:
required : true
content:
application/json:
schema:
type: object
properties:
pdf:
type: string
description : the B64 version encoding of the pdf file
access:
type: string
summary:
type: string
language:
type: string
title:
type: string
date:
type: string
description: Follow the iso 8601 ("YYYY-MM-DD")
views:
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
in: path
required: true
schema:
type: integer
get:
summary: get a certain article
tags:
- Users
- Ext (scientific articles)
security:
- bearer: []
responses:
"201":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Article'
'401':
$ref: '#/components/responses/UnauthorizedError'
patch:
summary: modify an article
tags:
- Researcher
- Ext (scientific articles)
security:
- bearer : []
responses:
"201":
description: article modifié
'401':
$ref: '#/components/responses/UnauthorizedError'
requestBody:
required : true
content:
application/json:
schema:
type: object
properties:
pdf:
type: string
description : the B64 version encoding of the pdf file
access:
type: string
summary:
type: string
language:
type: string
title:
type: string
date:
type: string
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
tags:
- Researcher
- Ext (scientific articles)
security:
- bearer: []
responses:
'201':
description: OK
'401':
$ref: '#/components/responses/UnauthorizedError'
/DisplayArticle:
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/DisplayArticle"
components:
securitySchemes:
bearer:
@ -869,66 +698,6 @@ components:
"id": 42,
"courses": ['Math', 'Info']
}
Article:
type: object
properties:
articleId:
type: integer
access :
type : string
pdf :
type : string
description : file location
summary:
type : string
language:
type : string
title :
type : string
date:
type : string
views :
type : integer
authors:
type: array
items:
$ref: '#/components/schemas/User'
description: first user is the author, the remaining users are co-authors
example:
{
"articleId": 42,
"access": "private",
"pdf": "/articles/42",
"summary": "looks in details about graph's second theorem",
"language": "english",
"title": "graph's second theorem study",
"date":"2023-02-01",
"views": 420,
"authors" : []
}
DisplayArticle:
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"
}
Lesson :
type: object
properties:
@ -1004,7 +773,3 @@ components:
responses:
UnauthorizedError:
description: Unauthorized access or missing bearer