Ext_publiScientifique #5
@ -122,11 +122,11 @@ paths:
|
|||||||
description: Successfully changed.
|
description: Successfully changed.
|
||||||
'401':
|
'401':
|
||||||
$ref: '#/components/responses/UnauthorizedError'
|
$ref: '#/components/responses/UnauthorizedError'
|
||||||
/user/{mat}:
|
/user/{RegNo}:
|
||||||
parameters:
|
parameters:
|
||||||
- name: mat
|
- name: RegNo
|
||||||
in: path
|
in: path
|
||||||
description: Matricule of the user (unique id)
|
description: Regestration number of the user (unique id)
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
@ -390,15 +390,14 @@ paths:
|
|||||||
requestBody:
|
requestBody:
|
||||||
required : true
|
required : true
|
||||||
content:
|
content:
|
||||||
application/pdf:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format : binary
|
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
acces:
|
pdf:
|
||||||
|
type: string
|
||||||
|
description : the B64 version encoding of the pdf file
|
||||||
|
access:
|
||||||
type: string
|
type: string
|
||||||
summary:
|
summary:
|
||||||
type: string
|
type: string
|
||||||
@ -410,7 +409,19 @@ paths:
|
|||||||
type: string
|
type: string
|
||||||
description: Follow the iso 8601 ("YYYY-MM-DD")
|
description: Follow the iso 8601 ("YYYY-MM-DD")
|
||||||
views:
|
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}:
|
/article/{id}:
|
||||||
parameters:
|
parameters:
|
||||||
- name: id
|
- name: id
|
||||||
@ -450,15 +461,14 @@ paths:
|
|||||||
requestBody:
|
requestBody:
|
||||||
required : true
|
required : true
|
||||||
content:
|
content:
|
||||||
application/pdf:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format : binary
|
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
acces:
|
pdf:
|
||||||
|
type: string
|
||||||
|
description : the B64 version encoding of the pdf file
|
||||||
|
access:
|
||||||
type: string
|
type: string
|
||||||
summary:
|
summary:
|
||||||
type: string
|
type: string
|
||||||
@ -471,6 +481,18 @@ paths:
|
|||||||
description: Follow the iso 8601 ("YYYY-MM-DD")
|
description: Follow the iso 8601 ("YYYY-MM-DD")
|
||||||
views:
|
views:
|
||||||
type: integer
|
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:
|
delete:
|
||||||
summary: delete own article
|
summary: delete own article
|
||||||
@ -485,8 +507,39 @@ paths:
|
|||||||
'401':
|
'401':
|
||||||
$ref: '#/components/responses/UnauthorizedError'
|
$ref: '#/components/responses/UnauthorizedError'
|
||||||
|
|
||||||
|
/Display-Article:
|
||||||
tonitch
commented
c'est pas très grave mais ça me parait weird d'avoir un endpoint avec un tired. j'utiliserait personnelment du PascalCase c'est pas très grave mais ça me parait weird d'avoir un endpoint avec un tired. j'utiliserait personnelment du PascalCase `/DisplayArticle` ou camelCase `/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/Display-Article"
|
||||||
|
|
||||||
components:
|
components:
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
@ -587,7 +640,7 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
articleId:
|
articleId:
|
||||||
type: integer
|
type: integer
|
||||||
acces :
|
access :
|
||||||
type : string
|
type : string
|
||||||
pdf :
|
pdf :
|
||||||
type : string
|
type : string
|
||||||
@ -610,7 +663,7 @@ components:
|
|||||||
example:
|
example:
|
||||||
{
|
{
|
||||||
"articleId": 42,
|
"articleId": 42,
|
||||||
"acces": "private",
|
"access": "private",
|
||||||
"pdf": "/articles/42",
|
"pdf": "/articles/42",
|
||||||
"summary": "looks in details about graph's second theorem",
|
"summary": "looks in details about graph's second theorem",
|
||||||
"language": "english",
|
"language": "english",
|
||||||
@ -619,9 +672,33 @@ components:
|
|||||||
"views": 420,
|
"views": 420,
|
||||||
"authors" : []
|
"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:
|
responses:
|
||||||
UnauthorizedError:
|
UnauthorizedError:
|
||||||
description: Unauthorized access or missing bearer
|
description: Unauthorized access or missing bearer
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user
changer pour le pdf dans B64 trou du cul va