Extension Article Scientifique
ajout endpoint dans : secretariat, users, researcher ajout schemas : article
This commit is contained in:
parent
407b881144
commit
05fc134281
@ -1,4 +1,3 @@
|
||||
# hihi
|
||||
openapi: 3.0.0
|
||||
info:
|
||||
title: ClydeAPI
|
||||
@ -136,6 +135,7 @@ paths:
|
||||
summary: modifier les informations d'un utilisateur
|
||||
tags:
|
||||
- Admin
|
||||
- Secretariat
|
||||
security:
|
||||
- bearer: []
|
||||
requestBody:
|
||||
@ -227,7 +227,6 @@ paths:
|
||||
faculty:
|
||||
type: string
|
||||
teachers:
|
||||
type: object
|
||||
$ref: '#/components/schemas/User'
|
||||
assistants:
|
||||
type: array
|
||||
@ -268,7 +267,6 @@ paths:
|
||||
faculty:
|
||||
type: string
|
||||
teachers:
|
||||
type: object
|
||||
$ref: '#/components/schemas/User'
|
||||
assistants:
|
||||
type: array
|
||||
@ -336,7 +334,6 @@ paths:
|
||||
faculty:
|
||||
type: string
|
||||
teachers:
|
||||
type: object
|
||||
$ref: '#/components/schemas/User'
|
||||
assistants:
|
||||
type: array
|
||||
@ -357,6 +354,124 @@ paths:
|
||||
$ref: '#/components/responses/UnauthorizedError'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Extension publication scientifique
|
||||
|
||||
/article:
|
||||
post:
|
||||
summary: create an article
|
||||
tags:
|
||||
- Researcher
|
||||
security:
|
||||
- bearer : []
|
||||
responses:
|
||||
"201" :
|
||||
description: OK
|
||||
'401':
|
||||
$ref: '#/components/responses/UnauthorizedError'
|
||||
requestBody:
|
||||
required : true
|
||||
content:
|
||||
application/pdf:
|
||||
schema:
|
||||
type: string
|
||||
format : binary
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
acces:
|
||||
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 #TODO check comment envoyer fichier + json
|
||||
/article/{id}:
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
get:
|
||||
summary: get a certain article
|
||||
tags:
|
||||
- Users
|
||||
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
|
||||
security:
|
||||
- bearer : []
|
||||
responses:
|
||||
"201":
|
||||
description: article modifié
|
||||
'401':
|
||||
$ref: '#/components/responses/UnauthorizedError'
|
||||
requestBody:
|
||||
required : true
|
||||
content:
|
||||
application/pdf:
|
||||
schema:
|
||||
type: string
|
||||
format : binary
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
acces:
|
||||
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
|
||||
|
||||
delete:
|
||||
summary: delete own article
|
||||
tags:
|
||||
- Researcher
|
||||
security:
|
||||
- bearer: []
|
||||
responses:
|
||||
'201':
|
||||
description: OK
|
||||
'401':
|
||||
$ref: '#/components/responses/UnauthorizedError'
|
||||
|
||||
|
||||
|
||||
|
||||
components:
|
||||
securitySchemes:
|
||||
bearer:
|
||||
@ -418,7 +533,6 @@ components:
|
||||
faculty:
|
||||
type: string
|
||||
teachers:
|
||||
type: object
|
||||
$ref: '#/components/schemas/User'
|
||||
assistants:
|
||||
type: array
|
||||
@ -449,6 +563,47 @@ components:
|
||||
"id": 42,
|
||||
"courses": ['Math', 'Info']
|
||||
}
|
||||
|
||||
Article:
|
||||
type: object
|
||||
properties:
|
||||
articleId:
|
||||
type: integer
|
||||
acces :
|
||||
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,
|
||||
"acces": "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" : []
|
||||
}
|
||||
|
||||
|
||||
|
||||
responses:
|
||||
UnauthorizedError:
|
||||
description: Permission non accordée
|
||||
|
Loading…
Reference in New Issue
Block a user