feat: added doc for upcoming endpoints to finish up entrepreneur join, response codes remaining to update
All checks were successful
Format / formatting (push) Successful in 6s
Build / build (push) Successful in 39s
CI / build (push) Successful in 10s

This commit is contained in:
2025-04-21 10:54:50 +02:00
parent dfea20b9c4
commit 832539f43b
6 changed files with 179 additions and 47 deletions

View File

@ -8,7 +8,7 @@ paths:
- Admin API
security:
- MyINPulse: [MyINPulse-admin]
description: Retrieves a list of projects managed by the requesting admin, including key details for overview.
description: Retrieves a list of projects managed by the requesting admin, including details for overview.
responses:
"200":
description: OK - List of projects returned successfully.
@ -26,7 +26,7 @@ paths:
post:
operationId: addProjectManually
summary: Manually add a new project
description: Creates a new project with the provided details.
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:
@ -72,6 +72,58 @@ paths:
"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/{pendingProjectId}:
post:
operationId: decidePendingProject
@ -80,8 +132,8 @@ paths:
- Admin API
description: |-
Allows an admin to make a decision on a project awaiting validation.
If approved (decision=true), the project status changes, and it's linked to the involved users.
If rejected (decision=false), the pending project data might be archived or deleted based on business logic.
If approved (isAccepted=true), the project status changes, and it's linked to the involved users.
If rejected (isAccepted=false), the pending project data might be archived or deleted based on business logic.
security:
- MyINPulse: [MyINPulse-admin]
parameters: