Compare commits
5 Commits
main
...
openapi_in
Author | SHA1 | Date | |
---|---|---|---|
d60cb8b48d | |||
50d35beb63 | |||
20bca79472 | |||
095f34581d | |||
6da9d762df |
@ -5,43 +5,9 @@
|
|||||||
- `/entrepreneur/lcsection/modify/{sectionId}` → `/entrepreneur/sectionCell/modify/{sectionId}`
|
- `/entrepreneur/lcsection/modify/{sectionId}` → `/entrepreneur/sectionCell/modify/{sectionId}`
|
||||||
|
|
||||||
### Admin api
|
### Admin api
|
||||||
- `/admin/appointments/upcoming`: is shared not admin
|
- `/admin/appointments/report/{appointmentId}` has no PUT and DELETE
|
||||||
- `/admin/projects/decision`: instanciates classes with `adminId` instead of taking the id from the token
|
- `/admin/request-join` and `/admin/request-join/decision/{joinRequestId}` have not yet been implemented
|
||||||
- `/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
|
### Unauth api
|
||||||
- `/entrepreneur/sectionCell/modify/{sectionId}`:
|
- `/unauth/request-join/{projectId}` has not yet been implemented
|
||||||
- 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
|
|
||||||
|
|
||||||
|
@ -1,214 +1,353 @@
|
|||||||
# _ ____ __ __ ___ _ _ _ ____ ___
|
# Admin API Endpoints
|
||||||
# / \ | _ \| \/ |_ _| \ | | / \ | _ \_ _|
|
|
||||||
# / _ \ | | | | |\/| || || \| | / _ \ | |_) | |
|
|
||||||
# / ___ \| |_| | | | || || |\ | / ___ \| __/| |
|
|
||||||
# /_/ \_\____/|_| |_|___|_| \_| /_/ \_\_| |___|
|
|
||||||
#
|
|
||||||
paths:
|
paths:
|
||||||
/admin/projects:
|
/admin/projects:
|
||||||
get:
|
get:
|
||||||
summary: Retourne la liste of projets associés à l'admin
|
operationId: getAdminProjects
|
||||||
tags:
|
summary: Get projects associated with the admin
|
||||||
- Admin API
|
tags:
|
||||||
|
- Admin API
|
||||||
security:
|
security:
|
||||||
- MyINPulse:
|
- MyINPulse: [MyINPulse-admin]
|
||||||
- MyINPulse-admin
|
description: Retrieves a list of projects managed by the requesting admin, including details for overview.
|
||||||
description:
|
|
||||||
JSON array of who's elements are objects containing necessary information for the view
|
|
||||||
(project name, entrepreneur names, etc..)
|
|
||||||
of the projects an admin is watching over.
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK - List of projects returned successfully.
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: "main.yaml#/components/schemas/project"
|
$ref: "./main.yaml#/components/schemas/project"
|
||||||
"400":
|
"400":
|
||||||
description: Bad request
|
description: Bad Request - Invalid project data provided (e.g., missing required fields).
|
||||||
"401":
|
"401":
|
||||||
description: Authorization information is missing or invalid
|
description: Unauthorized - Authentication required or invalid token.
|
||||||
|
|
||||||
|
post:
|
||||||
|
operationId: addProjectManually
|
||||||
|
summary: Manually add a new project
|
||||||
|
description: Creates a new project with the provided details. (NOTE that this meant for manually inserting projects, for example importing already existing projects).
|
||||||
|
tags:
|
||||||
|
- Admin API
|
||||||
|
security:
|
||||||
|
- MyINPulse: [MyINPulse-admin]
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
description: Project details to create. `idProject` and `creationDate` will be ignored if sent and set by the server.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "./main.yaml#/components/schemas/project"
|
||||||
|
responses:
|
||||||
|
"201": # Use 201 Created for successful creation
|
||||||
|
description: Created - Project added successfully. Returns the created project.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "./main.yaml#/components/schemas/project"
|
||||||
|
"409":
|
||||||
|
description: Bad Request - Project already exists.
|
||||||
|
"401":
|
||||||
|
description: Unauthorized.
|
||||||
|
|
||||||
|
|
||||||
|
/admin/projects/pending:
|
||||||
|
get:
|
||||||
|
operationId: getPendingProjects
|
||||||
|
summary: Get projects awaiting validation
|
||||||
|
tags:
|
||||||
|
- Admin API
|
||||||
|
security:
|
||||||
|
- MyINPulse: [MyINPulse-admin]
|
||||||
|
description: Retrieves a list of projects submitted by entrepreneurs that are pending admin approval.
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK - List of pending projects returned.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "./main.yaml#/components/schemas/project" # Assuming pending projects use the same schema
|
||||||
|
"401":
|
||||||
|
description: Unauthorized.
|
||||||
|
|
||||||
|
/admin/request-join:
|
||||||
|
get:
|
||||||
|
operationId: getPendingProjects
|
||||||
|
summary: Get entrepreneurs project join requests
|
||||||
|
tags:
|
||||||
|
- Admin API
|
||||||
|
security:
|
||||||
|
- MyINPulse: [MyINPulse-admin]
|
||||||
|
description: Retrieves a list of pending requests from entrepreneurs to join an existing project.
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK - List of pending project join requests.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "./main.yaml#/components/schemas/joinRequest"
|
||||||
|
"401":
|
||||||
|
description: Unauthorized.
|
||||||
|
|
||||||
|
/admin/request-join/decision/{joinRequestId}:
|
||||||
|
post:
|
||||||
|
summary: Approve or reject a pending project join request
|
||||||
|
tags:
|
||||||
|
- Admin API
|
||||||
|
security:
|
||||||
|
- MyINPulse: [MyINPulse-admin]
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: joinRequestId
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
description: The ID of the pending join request to decide upon.
|
||||||
|
|
||||||
|
description: |-
|
||||||
|
Allows an admin to make a decision on an ebtrepreneur's request to join an existing project awaiting validation.
|
||||||
|
If approved (isAccepted=true), the entrepreneur is linked to the project with ID joinRequestId.
|
||||||
|
If rejected (isAccepted=false), the pending request data might be archived or deleted based on business logic.
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK - No Content, decision processed successfully..
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
$ref: "./main.yaml#/components/schemas/joinRequestDecision"
|
||||||
|
"400":
|
||||||
|
description: Bad Request - Invalid input (e.g., missing decision).
|
||||||
|
"401":
|
||||||
|
description: Unauthorized.
|
||||||
|
|
||||||
|
|
||||||
/admin/projects/pending/decision:
|
/admin/projects/pending/decision:
|
||||||
post:
|
post:
|
||||||
summary: valider un projet en attente de validation
|
operationId: decidePendingProject
|
||||||
|
summary: Approve or reject a pending project
|
||||||
tags:
|
tags:
|
||||||
- Admin API
|
- Admin API
|
||||||
description:
|
description: |-
|
||||||
if the request is accepted the status of the
|
Allows an admin to make a decision on a project awaiting validation.
|
||||||
project is changed to ongoing, entrepreneur
|
If approved (isAccepted=true), the project status changes, and it's linked to the involved users.
|
||||||
account is confirmed and the project is linked
|
If rejected (isAccepted=false), the pending project data might be archived or deleted based on business logic.
|
||||||
to the admin accepting the request and the
|
|
||||||
entrepreneur requesting it. Else the pending
|
|
||||||
project and user info are deleted.
|
|
||||||
security:
|
security:
|
||||||
- MyINPulse:
|
- MyINPulse: [MyINPulse-admin]
|
||||||
- MyINPulse-admin
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: pendingProjectId # Corrected typo and name change
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
description: The ID of the pending project to decide upon.
|
||||||
|
example: 7
|
||||||
requestBody:
|
requestBody:
|
||||||
required: true
|
required: true
|
||||||
|
description: Decision payload.
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: './main.yaml#/components/schemas/projectDecision'
|
||||||
properties:
|
|
||||||
pedingProjectId:
|
|
||||||
type: integer
|
|
||||||
decision:
|
|
||||||
type: boolean
|
|
||||||
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"204": # Use 204 No Content for successful action with no body
|
||||||
description: OK
|
description: No Content - Decision processed successfully.
|
||||||
"400":
|
"400":
|
||||||
description: Bad request
|
description: Bad Request - Invalid input (e.g., missing decision).
|
||||||
"401":
|
"401":
|
||||||
description: Authorization information is
|
description: Unauthorized.
|
||||||
missing or invalid
|
|
||||||
|
|
||||||
/admin/projects/add:
|
/admin/pending-accounts: # Path updated
|
||||||
post:
|
get:
|
||||||
summary: Ajout manuel d'un projet
|
operationId: getPendingAccounts
|
||||||
description:
|
summary: Get accounts awaiting validation
|
||||||
Adds a project with the
|
description: Retrieves a list of entrepreneur user accounts that are pending admin validation.
|
||||||
inputed details
|
|
||||||
tags:
|
tags:
|
||||||
- Admin API
|
- Admin API
|
||||||
security:
|
security:
|
||||||
- MyINPulse:
|
- MyINPulse: [MyINPulse-admin]
|
||||||
- MyINPulse-admin
|
|
||||||
requestBody:
|
|
||||||
required: true
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: "main.yaml#/components/schemas/project"
|
|
||||||
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK - List of pending accounts returned.
|
||||||
"400":
|
content:
|
||||||
description: Bad request
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "./main.yaml#/components/schemas/user-entrepreneur"
|
||||||
"401":
|
"401":
|
||||||
description: Authorization information is
|
description: Unauthorized.
|
||||||
missing or invalid
|
|
||||||
|
/admin/accounts/validate/{userId}:
|
||||||
|
post: # Changed to POST as it changes state
|
||||||
|
operationId: validateUserAccount
|
||||||
|
summary: Validate a pending user account
|
||||||
|
description: Marks the user account specified by userId as validated/active.
|
||||||
|
tags:
|
||||||
|
- Admin API
|
||||||
|
security:
|
||||||
|
- MyINPulse: [MyINPulse-admin]
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: userId
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
description: The ID of the user account to validate.
|
||||||
|
example: 102
|
||||||
|
responses:
|
||||||
|
"204":
|
||||||
|
description: No Content - Account validated successfully.
|
||||||
|
"400":
|
||||||
|
description: Bad Request - Invalid user ID format.
|
||||||
|
|
||||||
|
"401":
|
||||||
|
description: Unauthorized.
|
||||||
|
|
||||||
|
/admin/appointments/upcoming:
|
||||||
|
get:
|
||||||
|
operationId: getUpcomingAppointments
|
||||||
|
summary: Get upcoming appointments for an admin
|
||||||
|
tags:
|
||||||
|
- Admin API
|
||||||
|
security:
|
||||||
|
- MyINPulse: [MyINPulse-admin]
|
||||||
|
description: Retrieves a list of appointments scheduled for an admin in the future.
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK - List of upcoming appointments.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "./main.yaml#/components/schemas/appointment"
|
||||||
|
"404":
|
||||||
|
description: no appointments found.
|
||||||
|
"401":
|
||||||
|
description: Unauthorized.
|
||||||
|
|
||||||
/admin/appointments/report/{appointmentId}:
|
/admin/appointments/report/{appointmentId}:
|
||||||
put:
|
|
||||||
summary: enregistrer un rapport du rendez-vous
|
|
||||||
description:
|
|
||||||
Generate a PDF file formatted
|
|
||||||
from input text and links it
|
|
||||||
to the appointement.
|
|
||||||
tags:
|
|
||||||
- Admin API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-admin
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: appointmentId
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
requestBody:
|
|
||||||
required: true
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: "main.yaml#/components/schemas/report"
|
|
||||||
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
"400":
|
|
||||||
description: Bad request
|
|
||||||
"401":
|
|
||||||
description: Authorization information is
|
|
||||||
missing or invalid
|
|
||||||
post:
|
post:
|
||||||
summary: modifier un rapport déja éxistant du rendez-vous
|
operationId: createAppointmentReport
|
||||||
description:
|
summary: Create a report for an appointment
|
||||||
Modifies the report file to input
|
description: Creates and links a new report (e.g., meeting minutes) to the specified appointment using the provided content.
|
||||||
text and links it to the appointement.
|
|
||||||
tags:
|
tags:
|
||||||
- Admin API
|
- Admin API
|
||||||
security:
|
security:
|
||||||
- MyINPulse:
|
- MyINPulse: [MyINPulse-admin]
|
||||||
- MyINPulse-admin
|
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: appointmentId
|
name: appointmentId
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
|
description: ID of the appointment to add a report to.
|
||||||
|
example: 303
|
||||||
requestBody:
|
requestBody:
|
||||||
required: true
|
required: true
|
||||||
|
description: Report content. `idReport` will be ignored if sent.
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "main.yaml#/components/schemas/report"
|
$ref: "./main.yaml#/components/schemas/report"
|
||||||
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"201":
|
||||||
description: OK
|
description: Created - Report created and linked successfully. Returns the created report.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema: { $ref: "./main.yaml#/components/schemas/report" }
|
||||||
"400":
|
"400":
|
||||||
description: Bad request
|
description: Bad Request - Invalid input (e.g., missing content, invalid appointment ID format).
|
||||||
"401":
|
"401":
|
||||||
description: Authorization information is
|
description: Unauthorized.
|
||||||
missing or invalid
|
|
||||||
|
put: # Changed to PUT for update/replacement
|
||||||
|
operationId: updateAppointmentReport
|
||||||
/admin/projects/remove/{projectId}:
|
summary: Update an existing appointment report
|
||||||
delete:
|
description: Updates the content of an existing report linked to the specified appointment. Replaces the entire report content.
|
||||||
summary: supression d'un project
|
|
||||||
description:
|
|
||||||
Removes the project
|
|
||||||
with the inputed id projectId
|
|
||||||
tags:
|
tags:
|
||||||
- Admin API
|
- Admin API
|
||||||
security:
|
security:
|
||||||
- MyINPulse:
|
- MyINPulse: [MyINPulse-admin]
|
||||||
- MyINPulse-admin
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: appointmentId
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
description: ID of the appointment whose report needs updating.
|
||||||
|
example: 303
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
description: New report content. `idReport` in the body should match the existing report's ID or will be ignored.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "./main.yaml#/components/schemas/report"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK - Report updated successfully. Returns the updated report.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema: { $ref: "./main.yaml#/components/schemas/report" }
|
||||||
|
"400":
|
||||||
|
description: Bad Request - Invalid input (e.g., missing content).
|
||||||
|
"401":
|
||||||
|
description: Unauthorized.
|
||||||
|
|
||||||
|
|
||||||
|
/admin/projects/{projectId}:
|
||||||
|
delete:
|
||||||
|
operationId: removeProject
|
||||||
|
summary: Remove a project
|
||||||
|
description: Permanently removes the project specified by projectId and potentially related data (use with caution).
|
||||||
|
tags:
|
||||||
|
- Admin API
|
||||||
|
security:
|
||||||
|
- MyINPulse: [MyINPulse-admin]
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: projectId
|
name: projectId
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
|
description: The ID of the project to remove.
|
||||||
|
example: 12
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"204":
|
||||||
description: OK
|
description: No Content - Project removed successfully.
|
||||||
"400":
|
"400":
|
||||||
description: Bad request
|
description: Bad Request - Invalid project ID format.
|
||||||
"401":
|
"401":
|
||||||
description: Authorization information is
|
description: Unauthorized.
|
||||||
missing or invalid
|
|
||||||
|
|
||||||
|
|
||||||
/admin/projects/pending:
|
|
||||||
get:
|
/admin/make-admin/{userId}:
|
||||||
summary: Retourne la liste des projets en attente de validation
|
post:
|
||||||
tags:
|
operationId: grantAdminRights
|
||||||
|
summary: Grant admin rights to a user
|
||||||
|
tags:
|
||||||
- Admin API
|
- Admin API
|
||||||
security:
|
security:
|
||||||
- MyINPulse:
|
- MyINPulse: [MyINPulse-admin]
|
||||||
- MyINPulse-admin
|
description: Elevates the specified user to also have administrator privileges. Assumes the user already exists.
|
||||||
description:
|
parameters:
|
||||||
JSON array of who's elements are objects containing
|
- in: path
|
||||||
necessary information for the view (project name, etc..)
|
name: userId
|
||||||
of all pending projects.
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
description: The ID of the user to grant admin rights.
|
||||||
|
example: 103
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"204": # Use 204 No Content
|
||||||
description: OK
|
description: No Content - Admin rights granted successfully.
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: "main.yaml#/components/schemas/project"
|
|
||||||
"400":
|
"400":
|
||||||
description: Bad request
|
description: Bad Request - Invalid user ID format or user is already an admin.
|
||||||
"401":
|
"401":
|
||||||
description: Authorization information is missing or invalid
|
description: Unauthorized.
|
@ -1,600 +0,0 @@
|
|||||||
openapi: 3.0.3
|
|
||||||
info:
|
|
||||||
title: MyInpulse Backend Api
|
|
||||||
description: this document servers as a documentation for the backend api.
|
|
||||||
version: 0.2.0
|
|
||||||
tags:
|
|
||||||
- name: Entrepreneurs API
|
|
||||||
description: La partie de l'api dédiée aux entrepreneurs
|
|
||||||
- name: Admin API
|
|
||||||
description: La partie de l'api dédiée aux entrepreneurs
|
|
||||||
- name: Shared API
|
|
||||||
description: La partie de l'api dédiée aux entrepreneurs et admins
|
|
||||||
components:
|
|
||||||
schemas:
|
|
||||||
user:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
idUser:
|
|
||||||
type: integer
|
|
||||||
userSurname:
|
|
||||||
type: string
|
|
||||||
userName:
|
|
||||||
type: string
|
|
||||||
primaryMail:
|
|
||||||
type: string
|
|
||||||
example: example@exmaple.com
|
|
||||||
secondaryMail:
|
|
||||||
type: string
|
|
||||||
example: example@exmaple.com
|
|
||||||
phoneNumber:
|
|
||||||
type: string
|
|
||||||
example: 0612345678
|
|
||||||
user-entrepreneur:
|
|
||||||
allOf:
|
|
||||||
- $ref: '#/components/schemas/user'
|
|
||||||
- type: object
|
|
||||||
properties:
|
|
||||||
school:
|
|
||||||
type: string
|
|
||||||
example: enseirb
|
|
||||||
course:
|
|
||||||
type: string
|
|
||||||
example: info
|
|
||||||
sneeStatus:
|
|
||||||
type: boolean
|
|
||||||
example: false
|
|
||||||
user-admin:
|
|
||||||
allOf:
|
|
||||||
- $ref: '#/components/schemas/user'
|
|
||||||
sectionCell:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
idSectionCell:
|
|
||||||
type: integer
|
|
||||||
example: this the cell (postit id)
|
|
||||||
sectionId:
|
|
||||||
type: integer
|
|
||||||
contentSectionCell:
|
|
||||||
type: string
|
|
||||||
modificationDate:
|
|
||||||
type: string
|
|
||||||
example: 02-05-2025
|
|
||||||
project:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
idProject:
|
|
||||||
type: integer
|
|
||||||
projectName:
|
|
||||||
type: string
|
|
||||||
creationDate:
|
|
||||||
type: string
|
|
||||||
example: 02-05-2025
|
|
||||||
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
|
|
||||||
example: 02-05-2025
|
|
||||||
appointmentTime:
|
|
||||||
type: string
|
|
||||||
example: '10:15:30'
|
|
||||||
appointmentDuration:
|
|
||||||
type: string
|
|
||||||
appointmentPlace:
|
|
||||||
type: string
|
|
||||||
appointmentSubject:
|
|
||||||
type: string
|
|
||||||
securitySchemes:
|
|
||||||
MyINPulse:
|
|
||||||
type: oauth2
|
|
||||||
flows:
|
|
||||||
implicit:
|
|
||||||
authorizationUrl: 'http://localhost:7080'
|
|
||||||
scopes:
|
|
||||||
MyINPulse-admin: Administrateur
|
|
||||||
MyINPulse-entrepreneur: Utilisateur
|
|
||||||
servers:
|
|
||||||
- url: 'http://localhost:8081/'
|
|
||||||
description: Backend server
|
|
||||||
paths:
|
|
||||||
/admin/projects:
|
|
||||||
get:
|
|
||||||
summary: Retourne la liste of projets associés à l'admin
|
|
||||||
tags:
|
|
||||||
- Admin API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-admin
|
|
||||||
description: 'JSON array of who''s elements are objects containing necessary information for the view (project name, entrepreneur names, etc..) of the projects an admin is watching over.'
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/project'
|
|
||||||
'400':
|
|
||||||
description: Bad request
|
|
||||||
'401':
|
|
||||||
description: Authorization information is missing or invalid
|
|
||||||
/admin/projects/pending/decision:
|
|
||||||
post:
|
|
||||||
summary: valider un projet en attente de validation
|
|
||||||
tags:
|
|
||||||
- Admin API
|
|
||||||
description: 'if the request is accepted the status of the project is changed to ongoing, entrepreneur account is confirmed and the project is linked to the admin accepting the request and the entrepreneur requesting it. Else the pending project and user info are deleted.'
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-admin
|
|
||||||
requestBody:
|
|
||||||
required: true
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
pedingProjectId:
|
|
||||||
type: integer
|
|
||||||
decision:
|
|
||||||
type: boolean
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
'400':
|
|
||||||
description: Bad request
|
|
||||||
'401':
|
|
||||||
description: Authorization information is missing or invalid
|
|
||||||
/admin/projects/add:
|
|
||||||
post:
|
|
||||||
summary: Ajout manuel d'un projet
|
|
||||||
description: Adds a project with the inputed details
|
|
||||||
tags:
|
|
||||||
- Admin API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-admin
|
|
||||||
requestBody:
|
|
||||||
required: true
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/project'
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
'400':
|
|
||||||
description: Bad request
|
|
||||||
'401':
|
|
||||||
description: Authorization information is missing or invalid
|
|
||||||
'/admin/appointments/report/{appointmentId}':
|
|
||||||
put:
|
|
||||||
summary: enregistrer un rapport du rendez-vous
|
|
||||||
description: Generate a PDF file formatted from input text and links it to the appointement.
|
|
||||||
tags:
|
|
||||||
- Admin API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-admin
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: appointmentId
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
requestBody:
|
|
||||||
required: true
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/report'
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
'400':
|
|
||||||
description: Bad request
|
|
||||||
'401':
|
|
||||||
description: Authorization information is missing or invalid
|
|
||||||
post:
|
|
||||||
summary: modifier un rapport déja éxistant du rendez-vous
|
|
||||||
description: Modifies the report file to input text and links it to the appointement.
|
|
||||||
tags:
|
|
||||||
- Admin API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-admin
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: appointmentId
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
requestBody:
|
|
||||||
required: true
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/report'
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
'400':
|
|
||||||
description: Bad request
|
|
||||||
'401':
|
|
||||||
description: Authorization information is missing or invalid
|
|
||||||
'/admin/projects/remove/{projectId}':
|
|
||||||
delete:
|
|
||||||
summary: supression d'un project
|
|
||||||
description: Removes the project with the inputed id projectId
|
|
||||||
tags:
|
|
||||||
- Admin API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-admin
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: projectId
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
'400':
|
|
||||||
description: Bad request
|
|
||||||
'401':
|
|
||||||
description: Authorization information is missing or invalid
|
|
||||||
/admin/projects/pending:
|
|
||||||
get:
|
|
||||||
summary: Retourne la liste des projets en attente de validation
|
|
||||||
tags:
|
|
||||||
- Admin API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-admin
|
|
||||||
description: 'JSON array of who''s elements are objects containing necessary information for the view (project name, etc..) of all pending projects.'
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/project'
|
|
||||||
'400':
|
|
||||||
description: Bad request
|
|
||||||
'401':
|
|
||||||
description: Authorization information is missing or invalid
|
|
||||||
/shared/appointments/upcoming:
|
|
||||||
get:
|
|
||||||
summary: Retourne la list des prochains rendez-vous de l'utilisateur
|
|
||||||
tags:
|
|
||||||
- Shared API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-admin
|
|
||||||
- MyINPulse-entrepreneur
|
|
||||||
description: 'JSON array of upcoming appointment data (name, date, time etc..) for a user.'
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/appointement'
|
|
||||||
'400':
|
|
||||||
description: Bad request
|
|
||||||
'401':
|
|
||||||
description: Authorization information is missing or invalid
|
|
||||||
'/shared/projects/sectionCell/{projectId}/{sectionId}/{date}':
|
|
||||||
get:
|
|
||||||
summary: Retourne la liste de sections de LC avec un titre donné
|
|
||||||
tags:
|
|
||||||
- Shared API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-admin
|
|
||||||
- MyINPulse-entrepreneur
|
|
||||||
description: JSON array containing Lean Canvas section data with a title for the current date (or given date if the date parameter is passed)
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
required: true
|
|
||||||
name: projectId
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
- in: path
|
|
||||||
required: true
|
|
||||||
description: 'this number can be 1, 2,...,8. It is associated with the title of the sectionCell'
|
|
||||||
name: sectionId
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
enum:
|
|
||||||
- 1
|
|
||||||
- 2
|
|
||||||
- 3
|
|
||||||
- 4
|
|
||||||
- 5
|
|
||||||
- 6
|
|
||||||
- 7
|
|
||||||
- 8
|
|
||||||
- in: path
|
|
||||||
required: true
|
|
||||||
name: date
|
|
||||||
description: the date corresponding to the wanted version of lc section. "Nan" for the latest version
|
|
||||||
example: NaN
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/sectionCell'
|
|
||||||
'400':
|
|
||||||
description: Bad request
|
|
||||||
'401':
|
|
||||||
description: Authorization information is missing or invalid
|
|
||||||
'/shared/projects/entrepreneurs/{projectId}':
|
|
||||||
get:
|
|
||||||
summary: Retourne la liste d'entrepreneurs associée à un projet donné
|
|
||||||
tags:
|
|
||||||
- Shared API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-admin
|
|
||||||
- MyINPulse-entrepreneur
|
|
||||||
description: JSON array of entrepreneur names associated with a project
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: projectId
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
required: true
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/user-entrepreneur'
|
|
||||||
'400':
|
|
||||||
description: Bad request
|
|
||||||
'401':
|
|
||||||
description: Authorization information is missing or invalid
|
|
||||||
'/shared/projects/admin/{projectId}':
|
|
||||||
get:
|
|
||||||
summary: Retourne les informations de l'admin qui accompagne le projet
|
|
||||||
tags:
|
|
||||||
- Shared API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-admin
|
|
||||||
- MyINPulse-entrepreneur
|
|
||||||
description: 'JSON object containing information (name, gmail, tel, etc..) the admin supervising the project with id projectID.'
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: projectId
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
required: true
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/user-admin'
|
|
||||||
'400':
|
|
||||||
description: Bad request
|
|
||||||
'401':
|
|
||||||
description: Authorization information is missing or invalid
|
|
||||||
'/shared/projects/appointments/{projectId}':
|
|
||||||
get:
|
|
||||||
summary: Retourne les rendez-vous du projet
|
|
||||||
tags:
|
|
||||||
- Shared API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-admin
|
|
||||||
- MyINPulse-entrepreneur
|
|
||||||
description: JSON array of upcoming and past appointment data for the project with id projectID.
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: projectId
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
required: true
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/appointement'
|
|
||||||
'400':
|
|
||||||
description: Bad request
|
|
||||||
'401':
|
|
||||||
description: Authorization information is missing or invalid
|
|
||||||
'/shared/projects/appointments/report/{appointmentId}':
|
|
||||||
get:
|
|
||||||
summary: Retourne le rapport pdf du rendez-vous
|
|
||||||
tags:
|
|
||||||
- Shared API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-admin
|
|
||||||
- MyINPulse-entrepreneur
|
|
||||||
description: PDF file containing the ap- pointment report
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: apointementId
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
required: true
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/pdf:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: binary
|
|
||||||
'400':
|
|
||||||
description: Bad request
|
|
||||||
'401':
|
|
||||||
description: Authorization information is missing or invalid
|
|
||||||
/shared/appointments/request:
|
|
||||||
post:
|
|
||||||
summary: demander un rendez-vous
|
|
||||||
description: will add an appointement request request by the applicant to have an appointment to be confirmed or denied by the specified participants of the appointement.
|
|
||||||
tags:
|
|
||||||
- Shared API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-entrepreneur
|
|
||||||
- MyINPulse-admin
|
|
||||||
requestBody:
|
|
||||||
description: \"participants\" property is an array containing userids of the participants in the appointement
|
|
||||||
required: true
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
title:
|
|
||||||
type: string
|
|
||||||
start_time:
|
|
||||||
type: string
|
|
||||||
end_time:
|
|
||||||
type: string
|
|
||||||
place:
|
|
||||||
type: string
|
|
||||||
applicantId:
|
|
||||||
type: integer
|
|
||||||
participants:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: integer
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
'400':
|
|
||||||
description: Bad request
|
|
||||||
'401':
|
|
||||||
description: Authorization information is missing or invalid
|
|
||||||
/entrepreneur/projects/request:
|
|
||||||
post:
|
|
||||||
summary: demander la création et validation d'un projet
|
|
||||||
tags:
|
|
||||||
- Entrepreneurs API
|
|
||||||
description: Adds project to pending projects to then be accepted or rejected by an admin
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-entrepreneur
|
|
||||||
requestBody:
|
|
||||||
required: true
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
founder:
|
|
||||||
$ref: '#/components/schemas/user-entrepreneur'
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
'400':
|
|
||||||
description: Bad request
|
|
||||||
'401':
|
|
||||||
description: Authorization information is missing or invalid
|
|
||||||
/entrepreneur/sectionCell/add:
|
|
||||||
post:
|
|
||||||
summary: ajouter une sections au LC
|
|
||||||
description: Adds input data to the user's LC with a specified title.
|
|
||||||
tags:
|
|
||||||
- Entrepreneurs API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-entrepreneur
|
|
||||||
requestBody:
|
|
||||||
required: true
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/sectionCell'
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
'400':
|
|
||||||
description: Bad request
|
|
||||||
'401':
|
|
||||||
description: Authorization information is missing or invalid
|
|
||||||
/entrepreneur/sectionCell/modify:
|
|
||||||
put:
|
|
||||||
summary: modifier les données d'une section LC
|
|
||||||
description: Modifies input Lean Canvas section by changing it to the information in the request body and changes the time stamp.
|
|
||||||
tags:
|
|
||||||
- Entrepreneurs API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-entrepreneur
|
|
||||||
requestBody:
|
|
||||||
required: true
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/sectionCell'
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
'400':
|
|
||||||
description: Bad request
|
|
||||||
'401':
|
|
||||||
description: Authorization information is missing or invalid
|
|
||||||
'/entrepreneur/sectionCell/remove/{sectionCellId}':
|
|
||||||
delete:
|
|
||||||
summary: supprimer une section LC.
|
|
||||||
description: Deletes section from Lean Canvas
|
|
||||||
tags:
|
|
||||||
- Entrepreneurs API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-entrepreneur
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: sectionCellId
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
required: true
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
'400':
|
|
||||||
description: Bad request
|
|
||||||
'401':
|
|
||||||
description: Authorization information is missing or invalid
|
|
@ -1,121 +1,112 @@
|
|||||||
# _____ _ _ _____ ____ _____ ____ ____ _____ _ _ _____ _ _ ____
|
# Entrepreneur API Endpoints
|
||||||
# | ____| \ | |_ _| _ \| ____| _ \| _ \| ____| \ | | ____| | | | _ \
|
|
||||||
# | _| | \| | | | | |_) | _| | |_) | |_) | _| | \| | _| | | | | |_) |
|
|
||||||
# | |___| |\ | | | | _ <| |___| __/| _ <| |___| |\ | |___| |_| | _ <
|
|
||||||
# |_____|_|_\_| |_| |_| \_\_____|_| |_| \_\_____|_| \_|_____|\___/|_| \_\
|
|
||||||
# / \ | _ \_ _|
|
|
||||||
# / _ \ | |_) | |
|
|
||||||
# / ___ \| __/| |
|
|
||||||
# /_/ \_\_| |___|
|
|
||||||
#
|
|
||||||
|
|
||||||
paths:
|
paths:
|
||||||
/entrepreneur/projects/request:
|
/entrepreneur/projects/request:
|
||||||
post:
|
post:
|
||||||
summary: demander la création et validation d'un projet
|
operationId: requestProjectCreation
|
||||||
|
summary: Request creation and validation of a new project
|
||||||
tags:
|
tags:
|
||||||
- Entrepreneurs API
|
- Entrepreneurs API
|
||||||
description:
|
description: |-
|
||||||
Adds project to pending projects
|
Submits a request for a new project. The project details are provided in the request body.
|
||||||
to then be accepted or rejected by
|
The requesting entrepreneur (identified by the token) will be associated to it.
|
||||||
an admin
|
The project is created with a 'pending' status, awaiting admin approval.
|
||||||
security:
|
security:
|
||||||
- MyINPulse:
|
- MyINPulse: [MyINPulse-entrepreneur]
|
||||||
- MyINPulse-entrepreneur
|
|
||||||
requestBody:
|
requestBody:
|
||||||
required: true
|
required: true
|
||||||
|
description: Project details for the request. `status`, `creationDate` are required by the model when being sent but is ignored by the server;
|
||||||
|
primarily expects a valid `projectId`, `name`, `logo`.
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: "./main.yaml#/components/schemas/project"
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
founder:
|
|
||||||
$ref: "main.yaml#/components/schemas/user-entrepreneur"
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"202":
|
||||||
description: OK
|
description: Accepted - Project creation request received and is pending validation.
|
||||||
"400":
|
"400":
|
||||||
description: Bad request
|
description: Bad Request - Invalid input (e.g., missing name).
|
||||||
"401":
|
"401":
|
||||||
description: Authorization information is
|
description: Unauthorized.
|
||||||
missing or invalid
|
|
||||||
|
/entrepreneur/sectionCells: # Base path
|
||||||
|
|
||||||
/entrepreneur/sectionCell/add:
|
|
||||||
post:
|
post:
|
||||||
summary: ajouter une sections au LC
|
operationId: addSectionCell
|
||||||
description:
|
summary: Add a cell to a Lean Canvas section
|
||||||
Adds input data to the user's LC
|
description: Adds a new cell (like a sticky note) with the provided content to a specific section of the entrepreneur's project's Lean Canvas. Assumes project context is known based on user's token.
|
||||||
with a specified title.
|
`idSectionCell` and `modificationDate` are server-generated so they're values in the request are ignored by the server.
|
||||||
tags:
|
tags:
|
||||||
- Entrepreneurs API
|
- Entrepreneurs API
|
||||||
security:
|
security:
|
||||||
- MyINPulse:
|
- MyINPulse: [MyINPulse-entrepreneur]
|
||||||
- MyINPulse-entrepreneur
|
|
||||||
requestBody:
|
requestBody:
|
||||||
required: true
|
required: true
|
||||||
|
description: Section cell details. `idSectionCell` and `modificationDate` will be ignored if sent.
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "main.yaml#/components/schemas/sectionCell"
|
$ref: "./main.yaml#/components/schemas/sectionCell"
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"201":
|
||||||
description: OK
|
description: Created - Section cell added successfully. Returns the created cell.
|
||||||
"400":
|
"400":
|
||||||
description: Bad request
|
description: Bad Request - Invalid input (e.g., missing content or sectionId).
|
||||||
"401":
|
"401":
|
||||||
description: Authorization information is
|
description: Unauthorized.
|
||||||
missing or invalid
|
|
||||||
/entrepreneur/sectionCell/modify:
|
/entrepreneur/sectionCells/{sectionCellId}:
|
||||||
put:
|
put:
|
||||||
summary: modifier les données d'une section LC
|
operationId: modifySectionCell
|
||||||
description:
|
summary: Modify data in a Lean Canvas section cell
|
||||||
Modifies input Lean Canvas section by changing it to
|
description: Updates the content of an existing Lean Canvas section cell specified by `sectionCellId`. The server "updates" (it keeps a record of the previous version to keep a history of all the sectionCells and creates a new ones with the specified modifications) the `modificationDate`.
|
||||||
the information in the request body and changes the
|
|
||||||
time stamp.
|
|
||||||
tags:
|
tags:
|
||||||
- Entrepreneurs API
|
- Entrepreneurs API
|
||||||
security:
|
security:
|
||||||
- MyINPulse:
|
- MyINPulse: [MyINPulse-entrepreneur]
|
||||||
- MyINPulse-entrepreneur
|
|
||||||
requestBody:
|
|
||||||
required: true
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: "main.yaml#/components/schemas/sectionCell"
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
"400":
|
|
||||||
description: Bad request
|
|
||||||
"401":
|
|
||||||
description: Authorization information is
|
|
||||||
missing or invalid
|
|
||||||
|
|
||||||
/entrepreneur/sectionCell/remove/{sectionCellId}:
|
|
||||||
delete:
|
|
||||||
summary: supprimer une section LC.
|
|
||||||
description:
|
|
||||||
Deletes section from Lean Canvas
|
|
||||||
tags:
|
|
||||||
- Entrepreneurs API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-entrepreneur
|
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: sectionCellId
|
name: sectionCellId
|
||||||
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
required: true
|
description: The ID of the section cell to modify.
|
||||||
|
example: 508
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
description: Updated section cell details. `sectionCellId` "the path parameter" is the only id that's consideredn the `sectionCellId` id in the request body is ignored. `modificationDate` should be updated by the server.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "./main.yaml#/components/schemas/sectionCell"
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK - Section cell updated successfully. Returns the updated cell.
|
||||||
"400":
|
"404":
|
||||||
description: Bad request
|
description: Bad Request - Invalid input or ID mismatch.
|
||||||
"401":
|
"401":
|
||||||
description: Authorization information is
|
description: Unauthorized.
|
||||||
missing or invalid
|
|
||||||
|
delete:
|
||||||
|
operationId: removeSectionCell
|
||||||
|
summary: Remove a Lean Canvas section cell
|
||||||
|
description: Deletes the Lean Canvas section cell specified by `sectionCellId`.
|
||||||
|
tags:
|
||||||
|
- Entrepreneurs API
|
||||||
|
security:
|
||||||
|
- MyINPulse: [MyINPulse-entrepreneur]
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: sectionCellId
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
description: The ID of the section cell to remove.
|
||||||
|
example: 509
|
||||||
|
responses:
|
||||||
|
"204":
|
||||||
|
description: No Content - Section cell removed successfully.
|
||||||
|
"400":
|
||||||
|
description: Bad Request - Invalid ID format.
|
||||||
|
"404":
|
||||||
|
description: Bad Request - sectionCell not found.
|
||||||
|
"401":
|
||||||
|
description: Unauthorized.
|
@ -1,17 +1,18 @@
|
|||||||
openapi: 3.0.3
|
openapi: 3.0.3
|
||||||
info:
|
info:
|
||||||
title: MyInpulse Backend Api
|
title: MyInpulse Backend API
|
||||||
description: this document servers as a documentation for the backend api.
|
description: This serves as an OpenAPI documentation for the MyInpulse backend service, covering operations for Entrepreneurs, Admins, and shared functionalities.
|
||||||
version: 0.2.0
|
version: 0.2.1
|
||||||
|
|
||||||
tags:
|
tags:
|
||||||
- name: Entrepreneurs API
|
- name: Entrepreneurs API
|
||||||
description: La partie de l'api dédiée aux entrepreneurs
|
description: API endpoints primarily for Entrepreneur users.
|
||||||
- name: Admin API
|
- name: Admin API
|
||||||
description: La partie de l'api dédiée aux entrepreneurs
|
description: API endpoints restricted to Admin users for management tasks.
|
||||||
- name: Shared API
|
- name: Shared API
|
||||||
description: La partie de l'api dédiée aux entrepreneurs et admins
|
description: API endpoints accessible by both Entrepreneurs and Admins.
|
||||||
|
- name: Unauth API
|
||||||
|
description: API endpoints related to user account management.
|
||||||
|
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
@ -27,88 +28,119 @@ components:
|
|||||||
$ref: "models.yaml#/project"
|
$ref: "models.yaml#/project"
|
||||||
report:
|
report:
|
||||||
$ref: "models.yaml#/report"
|
$ref: "models.yaml#/report"
|
||||||
appointement:
|
appointment:
|
||||||
$ref: "models.yaml#/appointement"
|
$ref: "models.yaml#/appointment"
|
||||||
|
joinRequest:
|
||||||
|
$ref: "models.yaml#/joinRequest"
|
||||||
|
projectDecision:
|
||||||
|
$ref: "models.yaml#/projectDecision"
|
||||||
|
joinRequestDecision:
|
||||||
|
$ref: "models.yaml#/joinRequestDecision"
|
||||||
|
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
MyINPulse:
|
MyINPulse:
|
||||||
type: oauth2
|
type: oauth2
|
||||||
|
description: OAuth2 authentication using Keycloak.
|
||||||
flows:
|
flows:
|
||||||
implicit:
|
implicit:
|
||||||
authorizationUrl: http://localhost:7080
|
authorizationUrl: '{keycloakBaseUrl}/realms/{keycloakRealm}/protocol/openid-connect/auth'
|
||||||
scopes:
|
scopes:
|
||||||
MyINPulse-admin: Administrateur
|
MyINPulse-admin: Grants administrator access.
|
||||||
MyINPulse-entrepreneur: Utilisateur
|
MyINPulse-entrepreneur: Grants standard entrepreneur user access.
|
||||||
|
|
||||||
servers:
|
servers:
|
||||||
- url: http://localhost:8081/
|
- url: '{serverProtocol}://{serverHost}:{serverPort}'
|
||||||
description: Backend server
|
description: API Server
|
||||||
|
variables:
|
||||||
|
serverProtocol:
|
||||||
|
enum: [http, https]
|
||||||
|
default: http
|
||||||
|
serverHost:
|
||||||
|
default: localhost
|
||||||
|
serverPort:
|
||||||
|
enum: ['8081']
|
||||||
|
default: '8081'
|
||||||
|
keycloakBaseUrl:
|
||||||
|
default: http://localhost:7080
|
||||||
|
description: Base URL for the Keycloak server.
|
||||||
|
keycloakRealm:
|
||||||
|
default: MyInpulseRealm
|
||||||
|
description: Keycloak realm name.
|
||||||
|
|
||||||
paths:
|
paths:
|
||||||
# _ ____ __ __ ___ _ _ _ ____ ___
|
# _ _ _ _ _ _
|
||||||
|
# | | | |_ __ __ _ _ _| |_| |__ / \ _ __ (_)
|
||||||
|
# | | | | '_ \ / _` | | | | __| '_ \ / _ \ | '_ \| |
|
||||||
|
# | |_| | | | | (_| | |_| | |_| | | |/ ___ \| |_) | |
|
||||||
|
# \___/|_| |_|\__,_|\__,_|\__|_| |_/_/ \_\ .__/|_|
|
||||||
|
# |_|
|
||||||
|
|
||||||
|
/unauth/finalize:
|
||||||
|
$ref: "./unauthApi.yaml#/paths/~1unauth~1finalize"
|
||||||
|
/unauth/request-join/{projectId}:
|
||||||
|
$ref: "./unauthApi.yaml#/paths/~1unauth~1request-join~1{projectId}"
|
||||||
|
|
||||||
|
# _ ____ __ __ ___ _ _ _ ____ ___
|
||||||
# / \ | _ \| \/ |_ _| \ | | / \ | _ \_ _|
|
# / \ | _ \| \/ |_ _| \ | | / \ | _ \_ _|
|
||||||
# / _ \ | | | | |\/| || || \| | / _ \ | |_) | |
|
# / _ \ | | | | |\/| || || \| | / _ \ | |_) | |
|
||||||
# / ___ \| |_| | | | || || |\ | / ___ \| __/| |
|
# / ___ \| |_| | | | || || |\ | / ___ \| __/| |
|
||||||
# /_/ \_\____/|_| |_|___|_| \_| /_/ \_\_| |___|
|
# /_/ \_\____/|_| |_|___|_| \_| /_/ \_\_| |___|
|
||||||
#
|
#
|
||||||
|
/admin/pending-accounts:
|
||||||
|
$ref: "./adminApi.yaml#/paths/~1admin~1pending-accounts"
|
||||||
|
/admin/accounts/validate/{userId}:
|
||||||
|
$ref: "./adminApi.yaml#/paths/~1admin~1accounts~1validate~1{userId}"
|
||||||
|
/admin/request-join:
|
||||||
|
$ref: "./adminApi.yaml#/paths/~1admin~1request-join"
|
||||||
|
/admin/request-join/decision/{joinRequestId}:
|
||||||
|
$ref: "./adminApi.yaml#/paths/~1admin~1request-join~1decision~1{joinRequestId}"
|
||||||
/admin/projects:
|
/admin/projects:
|
||||||
$ref: "./adminApi.yaml#/paths/~1admin~1projects"
|
$ref: "./adminApi.yaml#/paths/~1admin~1projects"
|
||||||
/admin/projects/pending/decision:
|
|
||||||
$ref: "./adminApi.yaml#/paths/~1admin~1projects~1pending~1decision"
|
|
||||||
/admin/projects/add:
|
|
||||||
$ref: "./adminApi.yaml#/paths/~1admin~1projects~1add"
|
|
||||||
/admin/appointments/report/{appointmentId}:
|
|
||||||
$ref: "./adminApi.yaml#/paths/~1admin~1appointments~1report~1{appointmentId}"
|
|
||||||
/admin/projects/remove/{projectId}:
|
|
||||||
$ref: "./adminApi.yaml#/paths/~1admin~1projects~1remove~1{projectId}"
|
|
||||||
/admin/projects/pending:
|
/admin/projects/pending:
|
||||||
$ref: "./adminApi.yaml#/paths/~1admin~1projects~1pending"
|
$ref: "./adminApi.yaml#/paths/~1admin~1projects~1pending"
|
||||||
|
/admin/projects/pending/decision:
|
||||||
|
$ref: "./adminApi.yaml#/paths/~1admin~1projects~1pending~1decision"
|
||||||
|
/admin/appointments/report/{appointmentId}:
|
||||||
|
$ref: "./adminApi.yaml#/paths/~1admin~1appointments~1report~1{appointmentId}"
|
||||||
|
/admin/appointments/upcoming:
|
||||||
|
$ref: "./adminApi.yaml#/paths/~1admin~1appointments~1upcoming"
|
||||||
|
/admin/projects/{projectId}:
|
||||||
|
$ref: "./adminApi.yaml#/paths/~1admin~1projects~1{projectId}"
|
||||||
|
/admin/make-admin/{userId}:
|
||||||
|
$ref: "./adminApi.yaml#/paths/~1admin~1make-admin~1{userId}"
|
||||||
|
|
||||||
# ____ _ _ _ ____ ___
|
# ____ _ _ _ ____ ___
|
||||||
# / ___|| |__ __ _ _ __ ___ __| | / \ | _ \_ _|
|
# / ___|| |__ __ _ _ __ ___ __| | / \ | _ \_ _|
|
||||||
# \___ \| '_ \ / _` | '__/ _ \/ _` | / _ \ | |_) | |
|
# \___ \| '_ \ / _` | '__/ _ \/ _` | / _ \ | |_) | |
|
||||||
# ___) | | | | (_| | | | __/ (_| | / ___ \| __/| |
|
# ___) | | | | (_| | | | __/ (_| | / ___ \| __/| |
|
||||||
# |____/|_| |_|\__,_|_| \___|\__,_| /_/ \_\_| |___|
|
# |____/|_| |_|\__,_|_| \___|\__,_| /_/ \_\_| |___|
|
||||||
#
|
#
|
||||||
/shared/appointments/upcoming:
|
/shared/projects/sectionCells/{projectId}/{sectionId}/{date}:
|
||||||
$ref: "./sharedApi.yaml#/paths/~1shared~1appointments~1upcoming"
|
$ref: "./sharedApi.yaml#/paths/~1shared~1projects~1sectionCells~1{projectId}~1{sectionId}~1{date}"
|
||||||
/shared/projects/sectionCell/{projectId}/{sectionId}/{date}:
|
|
||||||
$ref: "./sharedApi.yaml#/paths/~1shared~1projects~1sectionCell~1{projectId}~1{sectionId}~1{date}"
|
|
||||||
/shared/projects/entrepreneurs/{projectId}:
|
/shared/projects/entrepreneurs/{projectId}:
|
||||||
$ref: "./sharedApi.yaml#/paths/~1shared~1projects~1entrepreneurs~1{projectId}"
|
$ref: "./sharedApi.yaml#/paths/~1shared~1projects~1entrepreneurs~1{projectId}"
|
||||||
/shared/projects/admin/{projectId}:
|
/shared/projects/admin/{projectId}:
|
||||||
$ref: "./sharedApi.yaml#/paths/~1shared~1projects~1admin~1{projectId}"
|
$ref: "./sharedApi.yaml#/paths/~1shared~1projects~1admin~1{projectId}"
|
||||||
/shared/projects/appointments/{projectId}:
|
/shared/projects/appointments/{projectId}:
|
||||||
$ref: "./sharedApi.yaml#/paths/~1shared~1projects~1appointments~1{projectId}"
|
$ref: "./sharedApi.yaml#/paths/~1shared~1projects~1appointments~1{projectId}"
|
||||||
/shared/projects/appointments/report/{appointmentId}:
|
/shared/appointments/report/{appointmentId}:
|
||||||
$ref: "./sharedApi.yaml#/paths/~1shared~1projects~1appointments~1report~1{appointmentId}"
|
$ref: "./sharedApi.yaml#/paths/~1shared~1appointments~1report~1{appointmentId}"
|
||||||
|
|
||||||
/shared/appointments/request:
|
/shared/appointments/request:
|
||||||
$ref: "./sharedApi.yaml#/paths/~1shared~1appointments~1request"
|
$ref: "./sharedApi.yaml#/paths/~1shared~1appointments~1request"
|
||||||
|
|
||||||
# _____ _ _ _____ ____ _____ ____ ____ _____ _ _ _____ _ _ ____
|
# _____ _ _ _____ ____ _____ ____ ____ _____ _ _ _____ _ _ ____
|
||||||
# | ____| \ | |_ _| _ \| ____| _ \| _ \| ____| \ | | ____| | | | _ \
|
# | ____| \ | |_ _| _ \| ____| _ \| _ \| ____| \ | | ____| | | | _ \
|
||||||
# | _| | \| | | | | |_) | _| | |_) | |_) | _| | \| | _| | | | | |_) |
|
# | _| | \| | | | | |_) | _| | |_) | |_) | _| | \| | _| | | | | |_) |
|
||||||
# | |___| |\ | | | | _ <| |___| __/| _ <| |___| |\ | |___| |_| | _ <
|
# | |___| |\ | | | | _ <| |___| __/| _ <| |___| |\ | |___| |_| | _ <
|
||||||
# |_____|_|_\_| |_| |_| \_\_____|_| |_| \_\_____|_| \_|_____|\___/|_| \_\
|
# |_____|_|_\_| |_| |_| \_\_____|_| |_| \_\_____|_| \_|_____|\___/|_| \_\
|
||||||
# / \ | _ \_ _|
|
# / \ | _ \_ _|
|
||||||
# / _ \ | |_) | |
|
# / _ \ | |_) | |
|
||||||
# / ___ \| __/| |
|
# / ___ \| __/| |
|
||||||
# /_/ \_\_| |___|
|
# /_/ \_\_| |___|
|
||||||
#
|
#
|
||||||
/entrepreneur/projects/request:
|
/entrepreneur/projects/request:
|
||||||
$ref: "./entrepreneurApi.yaml#/paths/~1entrepreneur~1projects~1request"
|
$ref: "./entrepreneurApi.yaml#/paths/~1entrepreneur~1projects~1request"
|
||||||
/entrepreneur/sectionCell/add:
|
/entrepreneur/sectionCells:
|
||||||
$ref: "./entrepreneurApi.yaml#/paths/~1entrepreneur~1sectionCell~1add"
|
$ref: "./entrepreneurApi.yaml#/paths/~1entrepreneur~1sectionCells"
|
||||||
/entrepreneur/sectionCell/modify:
|
/entrepreneur/sectionCells/{sectionCellId}:
|
||||||
$ref: "./entrepreneurApi.yaml#/paths/~1entrepreneur~1sectionCell~1modify"
|
$ref: "./entrepreneurApi.yaml#/paths/~1entrepreneur~1sectionCells~1{sectionCellId}"
|
||||||
/entrepreneur/sectionCell/remove/{sectionCellId}:
|
|
||||||
$ref: "./entrepreneurApi.yaml#/paths/~1entrepreneur~1sectionCell~1remove~1{sectionCellId}"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,92 +1,210 @@
|
|||||||
# models.yaml
|
# models.yaml
|
||||||
|
|
||||||
user:
|
user:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
idUser:
|
idUser:
|
||||||
type: integer
|
type: integer
|
||||||
userSurname:
|
description: Unique identifier for the user.
|
||||||
type: string
|
#readOnly: true # Typically generated by the server
|
||||||
userName:
|
example: 101
|
||||||
type: string
|
userSurname:
|
||||||
primaryMail:
|
type: string
|
||||||
type: string
|
description: User's surname (last name).
|
||||||
example: "example@exmaple.com"
|
example: "Doe"
|
||||||
secondaryMail:
|
userName:
|
||||||
type: string
|
type: string
|
||||||
example: "example@exmaple.com"
|
description: User's given name (first name).
|
||||||
phoneNumber:
|
example: "John"
|
||||||
type: string
|
primaryMail:
|
||||||
example: "0612345678"
|
type: string
|
||||||
|
format: email
|
||||||
|
description: User's primary email address.
|
||||||
|
example: "john.doe@example.com"
|
||||||
|
secondaryMail:
|
||||||
|
type: string
|
||||||
|
format: email
|
||||||
|
description: User's secondary email address (optional).
|
||||||
|
example: "j.doe@personal.com"
|
||||||
|
phoneNumber:
|
||||||
|
type: string
|
||||||
|
description: User's phone number.
|
||||||
|
example: "+33612345678" # Example using international format
|
||||||
|
|
||||||
user-entrepreneur:
|
user-entrepreneur:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/user"
|
- $ref: "#/user"
|
||||||
- type: object
|
- type: object
|
||||||
properties:
|
properties:
|
||||||
school:
|
school:
|
||||||
type: string
|
type: string
|
||||||
example: "enseirb"
|
description: The school the entrepreneur attends/attended.
|
||||||
|
example: "ENSEIRB-MATMECA"
|
||||||
course:
|
course:
|
||||||
type: string
|
type: string
|
||||||
example: "info"
|
description: The specific course or program of study.
|
||||||
|
example: "Electronics"
|
||||||
sneeStatus:
|
sneeStatus:
|
||||||
type: boolean
|
type: boolean
|
||||||
example: false
|
description: Indicates if the user has SNEE status (Statut National d'Étudiant-Entrepreneur).
|
||||||
|
example: true
|
||||||
|
example: # Added full object example
|
||||||
|
idUser: 101
|
||||||
|
userSurname: "Doe"
|
||||||
|
userName: "John"
|
||||||
|
primaryMail: "john.doe@example.com"
|
||||||
|
secondaryMail: "j.doe@personal.com"
|
||||||
|
phoneNumber: "+33612345678"
|
||||||
|
school: "ENSEIRB-MATMECA"
|
||||||
|
course: "Electronics"
|
||||||
|
sneeStatus: true
|
||||||
|
|
||||||
user-admin:
|
user-admin:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/user"
|
- $ref: "#/user"
|
||||||
|
# No additional properties needed for this example
|
||||||
|
example: # Added full object example
|
||||||
|
idUser: 55
|
||||||
|
userSurname: "Admin"
|
||||||
|
userName: "Super"
|
||||||
|
primaryMail: "admin@myinpulse.com"
|
||||||
|
phoneNumber: "+33512345678"
|
||||||
|
|
||||||
sectionCell:
|
sectionCell:
|
||||||
type: object
|
type: object
|
||||||
|
description: Represents a cell (like a sticky note) within a specific section of a project's Lean Canvas.
|
||||||
properties:
|
properties:
|
||||||
idSectionCell:
|
idSectionCell:
|
||||||
type: integer
|
type: integer
|
||||||
example: this the cell (postit id)
|
description: Unique identifier for the section cell.
|
||||||
|
#readOnly: true # Generated by server
|
||||||
|
example: 508
|
||||||
sectionId:
|
sectionId:
|
||||||
type: integer
|
type: integer
|
||||||
|
description: Identifier of the Lean Canvas section this cell belongs to (e.g., 1 for Problem, 2 for Solution).
|
||||||
|
example: 1
|
||||||
contentSectionCell:
|
contentSectionCell:
|
||||||
type: string
|
type: string
|
||||||
|
description: The text content of the section cell.
|
||||||
|
example: "Users find it hard to track project progress."
|
||||||
modificationDate:
|
modificationDate:
|
||||||
type: string
|
type: string
|
||||||
example: "02-05-2025"
|
format: date # Using Java LocalDate -> YYYY-MM-DD
|
||||||
|
description: The date when this cell was last modified.
|
||||||
|
#readOnly: true # Typically updated by the server on modification
|
||||||
|
example: "yyyy-MM-dd HH:mm"
|
||||||
|
|
||||||
project:
|
project:
|
||||||
type: object
|
type: object
|
||||||
|
description: Represents a project being managed or developed.
|
||||||
properties:
|
properties:
|
||||||
idProject:
|
idProject:
|
||||||
type: integer
|
type: integer
|
||||||
|
description: Unique identifier for the project.
|
||||||
|
#readOnly: true # Generated by server
|
||||||
|
example: 12
|
||||||
projectName:
|
projectName:
|
||||||
type: string
|
type: string
|
||||||
|
description: The name of the project.
|
||||||
|
example: "MyInpulse Mobile App"
|
||||||
creationDate:
|
creationDate:
|
||||||
type: string
|
type: string
|
||||||
example: "02-05-2025"
|
format: date # Using Java LocalDate -> YYYY-MM-DD
|
||||||
|
description: The date when the project was created in the system.
|
||||||
|
#readOnly: true # Set by server
|
||||||
|
example: "yyyy-MM-dd HH:mm"
|
||||||
logo:
|
logo:
|
||||||
example: to be discussed not yet fixed
|
|
||||||
type: string
|
type: string
|
||||||
format: binary
|
format: byte
|
||||||
|
description: Base64 encoded string representing the project logo image.
|
||||||
|
example: "/*Base64 encoded string representing the project logo image*/"
|
||||||
|
status:
|
||||||
|
type: string
|
||||||
|
enum: [PENDING, ACTIVE, ENDED, ABORTED, REJECTED]
|
||||||
|
description: Corresponds to a status enum internal to the backend, it's value in in requests
|
||||||
|
incoming to the server should be ignored as the client shouldn't be specifying them.
|
||||||
|
example: "NaN"
|
||||||
|
|
||||||
|
joinRequest:
|
||||||
|
type: object
|
||||||
|
description: Represents a request from an entrepreneur to join an already existing project.
|
||||||
|
properties:
|
||||||
|
idProject:
|
||||||
|
type: integer
|
||||||
|
description: the ID of the project the entrepreneur wants to join.
|
||||||
|
example: 42
|
||||||
|
entrepreneur:
|
||||||
|
$ref: "#/user-entrepreneur"
|
||||||
|
|
||||||
|
|
||||||
report:
|
report:
|
||||||
type: object
|
type: object
|
||||||
|
description: Represents a report associated with an appointment.
|
||||||
properties:
|
properties:
|
||||||
idReport:
|
idReport:
|
||||||
type: integer
|
type: integer
|
||||||
|
description: Unique identifier for the report.
|
||||||
|
#readOnly: true # Generated by server
|
||||||
|
example: 987
|
||||||
reportContent:
|
reportContent:
|
||||||
type: string
|
type: string
|
||||||
|
description: The textual content of the report. Could be plain text or Markdown (specify if known).
|
||||||
appointement:
|
example: "Discussed roadmap milestones for Q3. Agreed on preliminary UI mockups."
|
||||||
|
|
||||||
|
appointment: # Corrected typo
|
||||||
type: object
|
type: object
|
||||||
|
description: Represents a scheduled meeting or appointment.
|
||||||
properties:
|
properties:
|
||||||
|
idAppointment: # Assuming there's an ID
|
||||||
|
type: integer
|
||||||
|
description: Unique identifier for the appointment.
|
||||||
|
#readOnly: true
|
||||||
|
example: 303
|
||||||
appointmentDate:
|
appointmentDate:
|
||||||
type: string
|
type: string
|
||||||
example: "02-05-2025"
|
format: date # Using Java LocalDate -> YYYY-MM-DD
|
||||||
|
description: The date of the appointment.
|
||||||
|
example: "2025-05-10"
|
||||||
appointmentTime:
|
appointmentTime:
|
||||||
type: string
|
type: string
|
||||||
example: "10:15:30"
|
format: time # Using Java LocalTime -> HH:mm:ss
|
||||||
|
description: The time of the appointment (local time).
|
||||||
|
example: "14:30:00"
|
||||||
appointmentDuration:
|
appointmentDuration:
|
||||||
type: string
|
type: string
|
||||||
|
description: Duration of the appointment in ISO 8601 duration format (e.g., PT1H30M for 1 hour 30 minutes).
|
||||||
|
example: "PT1H" # Example for 1 hour
|
||||||
appointmentPlace:
|
appointmentPlace:
|
||||||
type: string
|
type: string
|
||||||
|
description: Location or meeting link for the appointment.
|
||||||
|
example: "Meeting Room 3 / https://meet.example.com/abc-def-ghi"
|
||||||
appointmentSubject:
|
appointmentSubject:
|
||||||
type: string
|
type: string
|
||||||
|
description: The main topic or subject of the appointment.
|
||||||
|
example: "Q3 Roadmap Planning"
|
||||||
|
# Consider adding project ID or user IDs if relevant association exists
|
||||||
|
|
||||||
|
projectDecision:
|
||||||
|
type: object
|
||||||
|
description: Represents a decision from an admin to accept a pending project.
|
||||||
|
properties:
|
||||||
|
projectId:
|
||||||
|
type: integer
|
||||||
|
description: The ID of the project the entrepreneur wants to join.
|
||||||
|
example: 12
|
||||||
|
adminId:
|
||||||
|
type: integer
|
||||||
|
description: The ID of the project the admin who will supervise the project in case of admission.
|
||||||
|
example: 2
|
||||||
|
isAccepted:
|
||||||
|
type: boolean
|
||||||
|
description: The boolean value of the decision.
|
||||||
|
example: "true"
|
||||||
|
|
||||||
|
joinRequestDecision:
|
||||||
|
type: object
|
||||||
|
description: Represents a decision from an admin to accept a pending project join request.
|
||||||
|
properties:
|
||||||
|
isAccepted:
|
||||||
|
type: boolean
|
||||||
|
description: The boolean value of the decision.
|
||||||
|
example: "true"
|
@ -1,254 +1,197 @@
|
|||||||
# ____ _ _ _ ____ ___
|
# Shared API Endpoints
|
||||||
# / ___|| |__ __ _ _ __ ___ __| | / \ | _ \_ _|
|
paths:
|
||||||
# \___ \| '_ \ / _` | '__/ _ \/ _` | / _ \ | |_) | |
|
|
||||||
# ___) | | | | (_| | | | __/ (_| | / ___ \| __/| |
|
|
||||||
# |____/|_| |_|\__,_|_| \___|\__,_| /_/ \_\_| |___|
|
|
||||||
#
|
|
||||||
paths:
|
|
||||||
/shared/appointments/upcoming:
|
|
||||||
get:
|
|
||||||
summary: Retourne la list des prochains rendez-vous de l'utilisateur
|
|
||||||
tags:
|
|
||||||
- Shared API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-admin
|
|
||||||
- MyINPulse-entrepreneur
|
|
||||||
description:
|
|
||||||
JSON array of upcoming appointment data (name, date, time etc..) for a user.
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: "main.yaml#/components/schemas/appointement"
|
|
||||||
"400":
|
|
||||||
description: Bad request
|
|
||||||
"401":
|
|
||||||
description: Authorization information is missing or invalid
|
|
||||||
|
|
||||||
/shared/projects/sectionCell/{projectId}/{sectionId}/{date}:
|
/shared/projects/sectionCells/{projectId}/{sectionId}/{date}:
|
||||||
get:
|
|
||||||
summary: Retourne la liste de sections de LC avec un titre donné
|
|
||||||
tags:
|
|
||||||
- Shared API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-admin
|
|
||||||
- MyINPulse-entrepreneur
|
|
||||||
description:
|
|
||||||
JSON array containing Lean Canvas
|
|
||||||
section data with a title for the
|
|
||||||
current date (or given date if the
|
|
||||||
date parameter is passed)
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
required: true
|
|
||||||
name: projectId
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
- in: path
|
|
||||||
required: true
|
|
||||||
description: this number can be 1, 2,...,8. It is associated with the title of the sectionCell
|
|
||||||
name: sectionId
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
enum: [1, 2, 3, 4, 5, 6, 7, 8]
|
|
||||||
- in: path
|
|
||||||
required: true
|
|
||||||
name: date
|
|
||||||
description: the date corresponding to the wanted version of lc section. "Nan" for the latest version
|
|
||||||
example: "NaN"
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: "main.yaml#/components/schemas/sectionCell"
|
|
||||||
"400":
|
|
||||||
description: Bad request
|
|
||||||
"401":
|
|
||||||
description: Authorization information is missing or invalid
|
|
||||||
|
|
||||||
/shared/projects/entrepreneurs/{projectId}:
|
|
||||||
get:
|
get:
|
||||||
summary: Retourne la liste d'entrepreneurs associée à un projet donné
|
operationId: getSectionCellsByDate
|
||||||
tags:
|
summary: Get project section cells modified on a specific date
|
||||||
- Shared API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-admin
|
|
||||||
- MyINPulse-entrepreneur
|
|
||||||
description:
|
|
||||||
JSON array of entrepreneur
|
|
||||||
names associated with a project
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: projectId
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
required: true
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: "main.yaml#/components/schemas/user-entrepreneur"
|
|
||||||
"400":
|
|
||||||
description: Bad request
|
|
||||||
"401":
|
|
||||||
description: Authorization information is missing or invalid
|
|
||||||
|
|
||||||
/shared/projects/admin/{projectId}:
|
|
||||||
get:
|
|
||||||
summary: Retourne les informations de l'admin qui accompagne le projet
|
|
||||||
tags:
|
|
||||||
- Shared API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-admin
|
|
||||||
- MyINPulse-entrepreneur
|
|
||||||
description:
|
|
||||||
JSON object containing information (name, gmail, tel, etc..)
|
|
||||||
the admin supervising the project with id projectID.
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: projectId
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
required: true
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: "main.yaml#/components/schemas/user-admin"
|
|
||||||
"400":
|
|
||||||
description: Bad request
|
|
||||||
"401":
|
|
||||||
description: Authorization information is
|
|
||||||
missing or invalid
|
|
||||||
|
|
||||||
/shared/projects/appointments/{projectId}:
|
|
||||||
get:
|
|
||||||
summary: Retourne les rendez-vous du projet
|
|
||||||
tags:
|
|
||||||
- Shared API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-admin
|
|
||||||
- MyINPulse-entrepreneur
|
|
||||||
description:
|
|
||||||
JSON array of upcoming and past appointment
|
|
||||||
data for the project with id projectID.
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: projectId
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
required: true
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: "main.yaml#/components/schemas/appointement"
|
|
||||||
"400":
|
|
||||||
description: Bad request
|
|
||||||
"401":
|
|
||||||
description: Authorization information is
|
|
||||||
missing or invalid
|
|
||||||
/shared/projects/appointments/report/{appointmentId}:
|
|
||||||
get:
|
|
||||||
summary: Retourne le rapport pdf du rendez-vous
|
|
||||||
tags:
|
|
||||||
- Shared API
|
|
||||||
security:
|
|
||||||
- MyINPulse:
|
|
||||||
- MyINPulse-admin
|
|
||||||
- MyINPulse-entrepreneur
|
|
||||||
description:
|
|
||||||
PDF file containing the ap-
|
|
||||||
pointment report
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: apointementId
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
required: true
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/pdf:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: binary
|
|
||||||
"400":
|
|
||||||
description: Bad request
|
|
||||||
"401":
|
|
||||||
description: Authorization information is
|
|
||||||
missing or invalid
|
|
||||||
|
|
||||||
/shared/appointments/request:
|
|
||||||
post:
|
|
||||||
summary: demander un rendez-vous
|
|
||||||
description:
|
|
||||||
will add an appointement request request by the applicant
|
|
||||||
to have an appointment to be confirmed or denied by the
|
|
||||||
specified participants of the appointement.
|
|
||||||
tags:
|
tags:
|
||||||
- Shared API
|
- Shared API
|
||||||
security:
|
security:
|
||||||
- MyINPulse:
|
- MyINPulse: [MyINPulse-entrepreneur, MyINPulse-admin]
|
||||||
- MyINPulse-entrepreneur
|
description: Retrieves section cells belonging to a specific section of a project, filtered by the last modification date. Requires user to have access to the project.
|
||||||
- MyINPulse-admin
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: projectId
|
||||||
|
required: true
|
||||||
|
schema: { type: integer }
|
||||||
|
description: ID of the project.
|
||||||
|
- in: path
|
||||||
|
name: sectionId
|
||||||
|
required: true
|
||||||
|
schema: { type: integer }
|
||||||
|
description: ID of the Lean Canvas section.
|
||||||
|
- in: path
|
||||||
|
name: date
|
||||||
|
required: true
|
||||||
|
schema: { type: string, format: date } # Expect YYYY-MM-DD
|
||||||
|
description: The modification date to filter by (YYYY-MM-DD HH:mm).
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK - List of section cells matching the criteria.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "./main.yaml#/components/schemas/sectionCell"
|
||||||
|
"400":
|
||||||
|
description: Bad Request - Invalid parameter format.
|
||||||
|
"401":
|
||||||
|
description: Unauthorized.
|
||||||
|
|
||||||
|
|
||||||
|
/shared/projects/entrepreneurs/{projectId}:
|
||||||
|
get:
|
||||||
|
operationId: getProjectEntrepreneurs
|
||||||
|
summary: Get entrepreneurs associated with a project
|
||||||
|
tags:
|
||||||
|
- Shared API
|
||||||
|
security:
|
||||||
|
- MyINPulse: [MyINPulse-entrepreneur, MyINPulse-admin]
|
||||||
|
description: Retrieves a list of entrepreneur users associated with the specified project. Requires access to the project.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: projectId
|
||||||
|
required: true
|
||||||
|
schema: { type: integer }
|
||||||
|
description: ID of the project.
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK - List of entrepreneurs.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "./main.yaml#/components/schemas/user-entrepreneur"
|
||||||
|
"401":
|
||||||
|
description: Unauthorized.
|
||||||
|
"403":
|
||||||
|
description: Forbidden - User does not have access to this project.
|
||||||
|
"404":
|
||||||
|
description: Not Found - Project not found.
|
||||||
|
|
||||||
|
/shared/projects/admin/{projectId}: # Path updated
|
||||||
|
get:
|
||||||
|
operationId: getProjectAdmin
|
||||||
|
summary: Get admin associated with a project
|
||||||
|
tags:
|
||||||
|
- Shared API
|
||||||
|
security:
|
||||||
|
- MyINPulse: [MyINPulse-entrepreneur, MyINPulse-admin]
|
||||||
|
description: Retrieves a list of admin users associated with the specified project. Requires access to the project.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: projectId
|
||||||
|
required: true
|
||||||
|
schema: { type: integer }
|
||||||
|
description: ID of the project.
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK - admin.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "./main.yaml#/components/schemas/user-admin"
|
||||||
|
"401":
|
||||||
|
description: Unauthorized.
|
||||||
|
"403":
|
||||||
|
description: Forbidden - User does not have access to this project.
|
||||||
|
"404":
|
||||||
|
description: Not Found - Project not found.
|
||||||
|
|
||||||
|
|
||||||
|
/shared/projects/appointments/{projectId}:
|
||||||
|
get:
|
||||||
|
operationId: getProjectAppointments
|
||||||
|
summary: Get appointments related to a project
|
||||||
|
tags:
|
||||||
|
- Shared API
|
||||||
|
security:
|
||||||
|
- MyINPulse: [MyINPulse-entrepreneur, MyINPulse-admin]
|
||||||
|
description: Retrieves a list of appointments associated with the specified project. Requires access to the project.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: projectId
|
||||||
|
required: true
|
||||||
|
schema: { type: integer }
|
||||||
|
description: ID of the project.
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK - List of appointments.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "./main.yaml#/components/schemas/appointment"
|
||||||
|
"401":
|
||||||
|
description: Unauthorized.
|
||||||
|
|
||||||
|
|
||||||
|
/shared/appointments/report/{appointmentId}: # Path updated
|
||||||
|
get:
|
||||||
|
operationId: getAppointmentReport # Shared endpoint implies read-only access might be possible
|
||||||
|
summary: Get the report for an appointment
|
||||||
|
tags:
|
||||||
|
- Shared API
|
||||||
|
security:
|
||||||
|
- MyINPulse: [MyINPulse-entrepreneur, MyINPulse-admin]
|
||||||
|
description: Retrieves the report associated with a specific appointment. Requires user to have access to the appointment/project.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: appointmentId
|
||||||
|
required: true
|
||||||
|
schema: { type: integer }
|
||||||
|
description: ID of the appointment.
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK - Report PDF returned.
|
||||||
|
content:
|
||||||
|
application/pdf:
|
||||||
|
schema:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: binary
|
||||||
|
"401":
|
||||||
|
description: Unauthorized.
|
||||||
|
|
||||||
|
|
||||||
|
/shared/appointments/request:
|
||||||
|
post:
|
||||||
|
operationId: requestAppointment
|
||||||
|
summary: Request a new appointment
|
||||||
|
tags:
|
||||||
|
- Shared API
|
||||||
|
security:
|
||||||
|
- MyINPulse: [MyINPulse-entrepreneur, MyINPulse-admin]
|
||||||
|
description: Allows a user (entrepreneur or admin) to request a new appointment, potentially with another user or regarding a project. Details in the body. The request might need confirmation or create a pending appointment.
|
||||||
requestBody:
|
requestBody:
|
||||||
description: \"participants\" property is an array containing userids of the participants in the appointement
|
|
||||||
required: true
|
required: true
|
||||||
|
description: Details of the appointment request.
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: "./main.yaml#/components/schemas/appointment" # Assuming request uses same model structure
|
||||||
properties:
|
example:
|
||||||
title:
|
value:
|
||||||
type: string
|
appointmentDate: "2025-06-01"
|
||||||
start_time:
|
appointmentTime: "10:00:00"
|
||||||
type: string
|
appointmentDuration: "PT1H"
|
||||||
end_time:
|
appointmentPlace: "Online"
|
||||||
type: string
|
appointmentSubject: "Follow-up on prototype"
|
||||||
place:
|
# Potentially add projectId or targetUserId here
|
||||||
type: string
|
|
||||||
applicantId:
|
|
||||||
type: integer
|
|
||||||
participants:
|
|
||||||
#/* */
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: integer
|
|
||||||
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"202": # Accepted seems appropriate for a request
|
||||||
description: OK
|
description: Accepted - Appointment request submitted.
|
||||||
|
content:
|
||||||
|
application/json: # Optionally return the pending appointment data
|
||||||
|
schema:
|
||||||
|
$ref: "./main.yaml#/components/schemas/appointment"
|
||||||
"400":
|
"400":
|
||||||
description: Bad request
|
description: Bad Request - Invalid appointment details.
|
||||||
|
|
||||||
"401":
|
"401":
|
||||||
description: Authorization information is
|
description: Unauthorized.
|
||||||
missing or invalid
|
|
||||||
|
|
62
documentation/openapi/src/unauthApi.yaml
Normal file
62
documentation/openapi/src/unauthApi.yaml
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
|
||||||
|
# _ _ _ _ _ _
|
||||||
|
# | | | |_ __ __ _ _ _| |_| |__ / \ _ __ (_)
|
||||||
|
# | | | | '_ \ / _` | | | | __| '_ \ / _ \ | '_ \| |
|
||||||
|
# | |_| | | | | (_| | |_| | |_| | | |/ ___ \| |_) | |
|
||||||
|
# \___/|_| |_|\__,_|\__,_|\__|_| |_/_/ \_\ .__/|_|
|
||||||
|
# |_|
|
||||||
|
|
||||||
|
paths:
|
||||||
|
/unauth/finalize:
|
||||||
|
post:
|
||||||
|
summary: Finalize account setup using authentication token
|
||||||
|
description: |-
|
||||||
|
Completes the user account creation/setup process in the MyInpulse system.
|
||||||
|
This endpoint requires the user to be authenticated via Keycloak (e.g., after initial login).
|
||||||
|
User details (name, email, etc.) are extracted from the authenticated user's token (e.g., Keycloak JWT).
|
||||||
|
No request body is needed. The account is marked as pending admin validation upon successful finalization.
|
||||||
|
tags:
|
||||||
|
- Unauth API
|
||||||
|
responses:
|
||||||
|
"201":
|
||||||
|
description: Created - Account finalized and pending admin validation. Returns the user profile.
|
||||||
|
"400":
|
||||||
|
description: Bad Request - Problem processing the token or user data derived from it.
|
||||||
|
"401":
|
||||||
|
description: Unauthorized - Valid authentication token required.
|
||||||
|
/unauth/request-join/{projectId}:
|
||||||
|
post:
|
||||||
|
summary: Request to join an existing project
|
||||||
|
description: Submits a request for the authenticated user (keycloack authenticated) to join the project specified by projectId. Their role is then changed to entrepreneur in server and Keycloak. This requires approval from a project admin.
|
||||||
|
tags:
|
||||||
|
- Unauth API
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: projectId
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
description: The ID of the project to request joining.
|
||||||
|
example: 15
|
||||||
|
responses: # Moved responses block to correct level
|
||||||
|
"202":
|
||||||
|
description: Accepted - Join request submitted and pending approval.
|
||||||
|
"400":
|
||||||
|
description: Bad Request - Invalid project ID format
|
||||||
|
"409":
|
||||||
|
description: Already member/request pending.
|
||||||
|
"401":
|
||||||
|
description: Unauthorized.
|
||||||
|
/unauth/request-admin-role:
|
||||||
|
post:
|
||||||
|
summary: Request to join an existing project
|
||||||
|
description: Submits a request for the authenticated user (keycloack authenticated) to become an admin. Their role is then changed to admin in server and Keycloak. This requires approval from a project admin.
|
||||||
|
tags:
|
||||||
|
- Unauth API
|
||||||
|
responses:
|
||||||
|
"202":
|
||||||
|
description: Accepted - Become admin request submitted and pending approval.
|
||||||
|
"400":
|
||||||
|
description: Bad Request - Invalid project ID format or already member/request pending.
|
||||||
|
"401":
|
||||||
|
description: Unauthorized.
|
Loading…
x
Reference in New Issue
Block a user