feat: updated doc to reflect details of server, still not done editing it
This commit is contained in:
@ -1,121 +1,143 @@
|
||||
# _____ _ _ _____ ____ _____ ____ ____ _____ _ _ _____ _ _ ____
|
||||
# | ____| \ | |_ _| _ \| ____| _ \| _ \| ____| \ | | ____| | | | _ \
|
||||
# | _| | \| | | | | |_) | _| | |_) | |_) | _| | \| | _| | | | | |_) |
|
||||
# | |___| |\ | | | | _ <| |___| __/| _ <| |___| |\ | |___| |_| | _ <
|
||||
# |_____|_|_\_| |_| |_| \_\_____|_| |_| \_\_____|_| \_|_____|\___/|_| \_\
|
||||
# / \ | _ \_ _|
|
||||
# / _ \ | |_) | |
|
||||
# / ___ \| __/| |
|
||||
# /_/ \_\_| |___|
|
||||
#
|
||||
|
||||
# Entrepreneur API Endpoints
|
||||
paths:
|
||||
/entrepreneur/projects/request:
|
||||
post:
|
||||
summary: demander la création et validation d'un projet
|
||||
operationId: requestProjectCreation
|
||||
summary: Request creation and validation of a new project
|
||||
tags:
|
||||
- Entrepreneurs API
|
||||
description:
|
||||
Adds project to pending projects
|
||||
to then be accepted or rejected by
|
||||
an admin
|
||||
description: |-
|
||||
Submits a request for a new project. The project details are provided in the request body.
|
||||
The requesting entrepreneur (identified by the token) will be associated to it.
|
||||
The project is created with a 'pending' status, awaiting admin approval.
|
||||
security:
|
||||
- MyINPulse:
|
||||
- MyINPulse-entrepreneur
|
||||
- MyINPulse: [MyINPulse-entrepreneur]
|
||||
requestBody:
|
||||
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:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
founder:
|
||||
$ref: "main.yaml#/components/schemas/user-entrepreneur"
|
||||
$ref: "./main.yaml#/components/schemas/project"
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
"202":
|
||||
description: Accepted - Project creation request received and is pending validation.
|
||||
"400":
|
||||
description: Bad request
|
||||
description: Bad Request - Invalid input (e.g., missing name).
|
||||
"401":
|
||||
description: Authorization information is
|
||||
missing or invalid
|
||||
|
||||
|
||||
/entrepreneur/sectionCell/add:
|
||||
description: Unauthorized.
|
||||
"403":
|
||||
description: Forbidden - User does not have entrepreneur privileges.
|
||||
content:
|
||||
application/json: { schema: { $ref: "./main.yaml#/components/schemas/ApiError" } }
|
||||
"500":
|
||||
description: Internal Server Error.
|
||||
content:
|
||||
application/json: { schema: { $ref: "./main.yaml#/components/schemas/ApiError" } }
|
||||
|
||||
/entrepreneur/projects/request-join/{projectId}:
|
||||
post:
|
||||
summary: ajouter une sections au LC
|
||||
description:
|
||||
Adds input data to the user's LC
|
||||
with a specified title.
|
||||
operationId: requestToJoinProject
|
||||
summary: Request to join an existing project
|
||||
description: Submits a request for the authenticated entrepreneur to join the project specified by projectId. This requires approval from a project admin.
|
||||
tags:
|
||||
- Entrepreneurs API
|
||||
security:
|
||||
- MyINPulse:
|
||||
- MyINPulse-entrepreneur
|
||||
- MyINPulse: [MyINPulse-entrepreneur]
|
||||
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 or already member/request pending.
|
||||
"401":
|
||||
description: Unauthorized.
|
||||
|
||||
/entrepreneur/sectionCells: # Base path
|
||||
post:
|
||||
operationId: addSectionCell
|
||||
summary: Add a cell to a Lean Canvas section
|
||||
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.
|
||||
`idSectionCell` and `modificationDate` are server-generated so they're values in the request are ignored by the server.
|
||||
tags:
|
||||
- Entrepreneurs API
|
||||
security:
|
||||
- MyINPulse: [MyINPulse-entrepreneur]
|
||||
requestBody:
|
||||
required: true
|
||||
description: Section cell details. `idSectionCell` and `modificationDate` will be ignored if sent.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "main.yaml#/components/schemas/sectionCell"
|
||||
$ref: "./main.yaml#/components/schemas/sectionCell"
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
"201":
|
||||
description: Created - Section cell added successfully. Returns the created cell.
|
||||
"400":
|
||||
description: Bad request
|
||||
description: Bad Request - Invalid input (e.g., missing content or sectionId).
|
||||
"401":
|
||||
description: Authorization information is
|
||||
missing or invalid
|
||||
/entrepreneur/sectionCell/modify:
|
||||
description: Unauthorized.
|
||||
|
||||
/entrepreneur/sectionCells/{sectionCellId}:
|
||||
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.
|
||||
operationId: modifySectionCell
|
||||
summary: Modify data in a Lean Canvas section cell
|
||||
description: Updates the content of an existing Lean Canvas section cell specified by `sectionCellId`. The server updates the `modificationDate`.
|
||||
tags:
|
||||
- Entrepreneurs API
|
||||
security:
|
||||
- MyINPulse:
|
||||
- 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
|
||||
- MyINPulse: [MyINPulse-entrepreneur]
|
||||
parameters:
|
||||
- in: path
|
||||
name: sectionCellId
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
required: true
|
||||
description: The ID of the section cell to modify.
|
||||
example: 508
|
||||
requestBody:
|
||||
required: true
|
||||
description: Updated section cell details. `idSectionCell` should match the path parameter. `modificationDate` will be updated by the server.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "./main.yaml#/components/schemas/sectionCell"
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
"200":
|
||||
description: OK - Section cell updated successfully. Returns the updated cell.
|
||||
"400":
|
||||
description: Bad request
|
||||
description: Bad Request - Invalid input or ID mismatch.
|
||||
"401":
|
||||
description: Authorization information is
|
||||
missing or invalid
|
||||
description: Unauthorized.
|
||||
|
||||
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.
|
||||
"401":
|
||||
description: Unauthorized.
|
Reference in New Issue
Block a user