backend-test #10
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,3 +2,5 @@
|
|||||||
.idea
|
.idea
|
||||||
keycloak/CAS/target
|
keycloak/CAS/target
|
||||||
docker-compose.yaml
|
docker-compose.yaml
|
||||||
|
node_modules
|
||||||
|
.vscode
|
@ -18,49 +18,55 @@ components:
|
|||||||
user:
|
user:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
nom:
|
idUser:
|
||||||
|
type: integer
|
||||||
|
userSurname:
|
||||||
type: string
|
type: string
|
||||||
prenom:
|
userName:
|
||||||
type: string
|
type: string
|
||||||
email:
|
primaryMail:
|
||||||
type: string
|
type: string
|
||||||
example: "example@exmaple.com"
|
example: "example@exmaple.com"
|
||||||
secondaryEmail:
|
secondaryMail:
|
||||||
type: string
|
type: string
|
||||||
example: "example@exmaple.com"
|
example: "example@exmaple.com"
|
||||||
tel:
|
phoneNumber:
|
||||||
type: string
|
type: string
|
||||||
example: "0612345678"
|
example: "0612345678"
|
||||||
|
|
||||||
user-entrepreneur:
|
user-entrepreneur:
|
||||||
type: object
|
allOf:
|
||||||
properties:
|
- $ref: "#/components/schemas/user"
|
||||||
user:
|
- type: object
|
||||||
$ref: "#/components/schemas/user"
|
properties:
|
||||||
entrepreneur:
|
school:
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
ecole:
|
|
||||||
type: string
|
type: string
|
||||||
example: "enseirb"
|
example: "enseirb"
|
||||||
filiere:
|
course:
|
||||||
type: string
|
type: string
|
||||||
example: "info"
|
example: "info"
|
||||||
status:
|
sneeStatus:
|
||||||
type: boolean
|
type: boolean
|
||||||
example: false
|
example: false
|
||||||
|
|
||||||
user-admin:
|
user-admin:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/user"
|
||||||
|
|
||||||
|
sectionCell:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
admin:
|
idSectionCell:
|
||||||
$ref: "#/components/schemas/user"
|
type: integer
|
||||||
lcsection:
|
example: this the cell (postit id)
|
||||||
type: object
|
sectionId:
|
||||||
properties:
|
type: integer
|
||||||
title:
|
contentSectionCell:
|
||||||
type: string
|
type: string
|
||||||
txt:
|
modificationDate:
|
||||||
type: string
|
type: string
|
||||||
projects:
|
|
||||||
|
project:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
idProject:
|
idProject:
|
||||||
@ -69,6 +75,33 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
creationDate:
|
creationDate:
|
||||||
type: string
|
type: string
|
||||||
|
logo:
|
||||||
|
example: to be discussed not yet fixed
|
||||||
|
type: string
|
||||||
|
format: binary
|
||||||
|
|
||||||
|
report:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
idReport:
|
||||||
|
type: integer
|
||||||
|
reportContent:
|
||||||
|
type: string
|
||||||
|
|
||||||
|
appointement:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
appointmentDate:
|
||||||
|
type: string
|
||||||
|
appointmentTime:
|
||||||
|
type: string
|
||||||
|
appointmentDuration:
|
||||||
|
type: string
|
||||||
|
appointmentPlace:
|
||||||
|
type: string
|
||||||
|
appointmentSubject:
|
||||||
|
type: string
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -111,13 +144,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: object
|
$ref: "#/components/schemas/project"
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
E_names:
|
|
||||||
type: string
|
|
||||||
description: entrepreneur names
|
|
||||||
"400":
|
"400":
|
||||||
description: Bad request
|
description: Bad request
|
||||||
"401":
|
"401":
|
||||||
@ -174,12 +201,7 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: "#/components/schemas/project"
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
founder:
|
|
||||||
$ref: "#/components/schemas/user-entrepreneur"
|
|
||||||
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
@ -213,14 +235,7 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: "#/components/schemas/report"
|
||||||
properties:
|
|
||||||
title:
|
|
||||||
type: string
|
|
||||||
body:
|
|
||||||
type: string
|
|
||||||
conclusion:
|
|
||||||
type: string
|
|
||||||
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
@ -251,14 +266,7 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: "#/components/schemas/report"
|
||||||
properties:
|
|
||||||
title:
|
|
||||||
type: string
|
|
||||||
body:
|
|
||||||
type: string
|
|
||||||
conclusion:
|
|
||||||
type: string
|
|
||||||
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
@ -308,8 +316,8 @@ paths:
|
|||||||
- MyINPulse-admin
|
- MyINPulse-admin
|
||||||
description:
|
description:
|
||||||
JSON array of who's elements are objects containing
|
JSON array of who's elements are objects containing
|
||||||
necessary information for the view (project name,
|
necessary information for the view (project name, etc..)
|
||||||
entrepreneur names, etc..) of all pending projects.
|
of all pending projects.
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
@ -318,12 +326,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: object
|
$ref: "#/components/schemas/project"
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
founder:
|
|
||||||
$ref: "#/components/schemas/user-entrepreneur"
|
|
||||||
"400":
|
"400":
|
||||||
description: Bad request
|
description: Bad request
|
||||||
"401":
|
"401":
|
||||||
@ -356,20 +359,13 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: object
|
$ref: "#/components/schemas/appointement"
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
date:
|
|
||||||
type: string
|
|
||||||
time:
|
|
||||||
type: string
|
|
||||||
"400":
|
"400":
|
||||||
description: Bad request
|
description: Bad request
|
||||||
"401":
|
"401":
|
||||||
description: Authorization information is missing or invalid
|
description: Authorization information is missing or invalid
|
||||||
|
|
||||||
/shared/projects/lcsection/{projectId}/{title}/{date}:
|
/shared/projects/sectionCell/{projectId}/{sectionId}/{date}:
|
||||||
get:
|
get:
|
||||||
summary: Retourne la liste de sections de LC avec un titre donné
|
summary: Retourne la liste de sections de LC avec un titre donné
|
||||||
tags:
|
tags:
|
||||||
@ -391,12 +387,11 @@ paths:
|
|||||||
type: integer
|
type: integer
|
||||||
- in: path
|
- in: path
|
||||||
required: true
|
required: true
|
||||||
description: this number can be 1, 2,...,8. It is associated with the title of the lcsection
|
description: this number can be 1, 2,...,8. It is associated with the title of the sectionCell
|
||||||
name: title
|
name: sectionId
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
enum: [1, 2, 3, 4, 5, 6, 7, 8]
|
enum: [1, 2, 3, 4, 5, 6, 7, 8]
|
||||||
|
|
||||||
- in: path
|
- in: path
|
||||||
required: true
|
required: true
|
||||||
name: date
|
name: date
|
||||||
@ -413,7 +408,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: "#/components/schemas/lcsection"
|
$ref: "#/components/schemas/sectionCell"
|
||||||
"400":
|
"400":
|
||||||
description: Bad request
|
description: Bad request
|
||||||
"401":
|
"401":
|
||||||
@ -508,22 +503,13 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: object
|
$ref: "#/components/schemas/appointement"
|
||||||
properties:
|
|
||||||
appointementId:
|
|
||||||
type: integer
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
date:
|
|
||||||
type: string
|
|
||||||
time:
|
|
||||||
type: string
|
|
||||||
"400":
|
"400":
|
||||||
description: Bad request
|
description: Bad request
|
||||||
"401":
|
"401":
|
||||||
description: Authorization information is
|
description: Authorization information is
|
||||||
missing or invalid
|
missing or invalid
|
||||||
/shared/projects/appointments/report/{apointementId}:
|
/shared/projects/appointments/report/{appointmentId}:
|
||||||
get:
|
get:
|
||||||
summary: Retourne le rapport pdf du rendez-vous
|
summary: Retourne le rapport pdf du rendez-vous
|
||||||
tags:
|
tags:
|
||||||
@ -648,7 +634,7 @@ paths:
|
|||||||
missing or invalid
|
missing or invalid
|
||||||
|
|
||||||
|
|
||||||
/entrepreneur/lcsection/add/{projectId}:
|
/entrepreneur/sectionCell/add:
|
||||||
post:
|
post:
|
||||||
summary: ajouter une sections au LC
|
summary: ajouter une sections au LC
|
||||||
description:
|
description:
|
||||||
@ -659,18 +645,12 @@ paths:
|
|||||||
security:
|
security:
|
||||||
- MyINPulse:
|
- MyINPulse:
|
||||||
- MyINPulse-entrepreneur
|
- MyINPulse-entrepreneur
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: projectId
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
required: true
|
|
||||||
requestBody:
|
requestBody:
|
||||||
required: true
|
required: true
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/lcsection"
|
$ref: "#/components/schemas/sectionCell"
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
@ -679,7 +659,7 @@ paths:
|
|||||||
"401":
|
"401":
|
||||||
description: Authorization information is
|
description: Authorization information is
|
||||||
missing or invalid
|
missing or invalid
|
||||||
/entrepreneur/lcsection/modify/{sectionId}:
|
/entrepreneur/sectionCell/modify:
|
||||||
put:
|
put:
|
||||||
summary: modifier les données d'une section LC
|
summary: modifier les données d'une section LC
|
||||||
description:
|
description:
|
||||||
@ -691,18 +671,12 @@ paths:
|
|||||||
security:
|
security:
|
||||||
- MyINPulse:
|
- MyINPulse:
|
||||||
- MyINPulse-entrepreneur
|
- MyINPulse-entrepreneur
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: sectionId
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
required: true
|
|
||||||
requestBody:
|
requestBody:
|
||||||
required: true
|
required: true
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/lcsection"
|
$ref: "#/components/schemas/sectionCell"
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
@ -712,7 +686,7 @@ paths:
|
|||||||
description: Authorization information is
|
description: Authorization information is
|
||||||
missing or invalid
|
missing or invalid
|
||||||
|
|
||||||
/entrepreneur/lcsection/remove/{sectionId}:
|
/entrepreneur/sectionCell/remove/{sectionCellId}:
|
||||||
delete:
|
delete:
|
||||||
summary: supprimer une section LC.
|
summary: supprimer une section LC.
|
||||||
description:
|
description:
|
||||||
@ -724,7 +698,7 @@ paths:
|
|||||||
- MyINPulse-entrepreneur
|
- MyINPulse-entrepreneur
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: sectionId
|
name: sectionCellId
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
required: true
|
required: true
|
47
documentation/openapi/notes.md
Normal file
47
documentation/openapi/notes.md
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
## API Endpoints notes
|
||||||
|
|
||||||
|
### EntrepreneurApi and SharedApi
|
||||||
|
#### Endpoint Name Changes
|
||||||
|
- `/entrepreneur/lcsection/modify/{sectionId}` → `/entrepreneur/sectionCell/modify/{sectionId}`
|
||||||
|
|
||||||
|
### Admin api
|
||||||
|
- `/admin/appointments/upcoming`: is shared not admin
|
||||||
|
- `/admin/projects/decision`: instanciates classes with `adminId` instead of taking the id from the token
|
||||||
|
- `/admin/project/add`:
|
||||||
|
- point 1: the doc has this `projects` everywhere this should be `/admin/projects/add` to avoid confusion I think
|
||||||
|
- point 2: this doesn't assiociate users with a project I need to add other endopint for that
|
||||||
|
- `/admin/appoitements/report/{appointmentId}`:
|
||||||
|
- typo: `appoitements` → `appointments`
|
||||||
|
- `/admin/projects/remove/{projectId}`, `/admin/project/add`, `/admin/projects/decision`, `/admin/projects/pending`:
|
||||||
|
- should need token to delete or add project
|
||||||
|
|
||||||
|
### Entrepreneur api
|
||||||
|
- `/entrepreneur/sectionCell/modify/{sectionId}`:
|
||||||
|
- the section-id because of the definition of `sectionCell` schema the `sectionId` is given twice possibly leading to inconsistency. Which is why the path var to be removed:
|
||||||
|
- → `/entrepreneur/sectionCell/modify`
|
||||||
|
|
||||||
|
### Shared api
|
||||||
|
- `/shared/project/sectionCell/{projectId}/{sectionId}/{date}`:
|
||||||
|
- point 1:
|
||||||
|
same point for `project` → `projects`
|
||||||
|
- point 2:
|
||||||
|
have yet to read `sharedApiService` to see how dates are handled and to see if we agree on values of `date` to make it so it gets the version relative to current date
|
||||||
|
- `/shared/entrepreneurs/{projectId}`:
|
||||||
|
- maybe change to `/shared/projects/entrepreneurs/{projectId}` to match other similair endpoints like `/shared/projects/admin/{projectId}`
|
||||||
|
- `/shared/appointment/request`:
|
||||||
|
- creates the apointement but don't know how it associates other users, potentially multiple classes in one request body, is that possible ?
|
||||||
|
|
||||||
|
## TODOs for me
|
||||||
|
|
||||||
|
### list 1:
|
||||||
|
- add back-end server links (backend and auth) for interacting with api through swagger
|
||||||
|
- get config for that set up in the project
|
||||||
|
|
||||||
|
### list 2:
|
||||||
|
- see what to do about logo img
|
||||||
|
- see format for date and add it in examples
|
||||||
|
- ask the form of return of the json of iterables, for now I have put array
|
||||||
|
- add endpoint for adding users to a project
|
||||||
|
- update endpoint descriptions
|
||||||
|
- add examples for values in schemas
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user