fix: aadded changes, doc is ssomewhat coherent still need to change some endpoint names in controller and some minor changes
All checks were successful
Format / formatting (push) Successful in 6s
Build / build (push) Successful in 38s
CI / build (push) Successful in 10s

This commit is contained in:
2025-04-16 12:30:21 +02:00
parent f96872fb6b
commit dfea20b9c4
7 changed files with 109 additions and 230 deletions

View File

@ -7,9 +7,8 @@
# |_|
paths:
/accounts/finalize: # Path renamed from /unauth/create_account
/unauth/finalize:
post:
operationId: finalizeAccountSetup # Renamed operationId
summary: Finalize account setup using authentication token
description: |-
Completes the user account creation/setup process in the MyInpulse system.
@ -17,18 +16,45 @@ paths:
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:
- Account Management API # Changed tag
security:
- MyINPulse: [MyINPulse-entrepreneur] # Security requirement remains as per clarification
# No requestBody needed as per clarification
- Unauth API
responses:
"201": # Use 201 Created or 200 OK if it returns the user profile
"201":
description: Created - Account finalized and pending admin validation. Returns the user profile.
content:
application/json:
schema:
$ref: './main.yaml#/components/schemas/user-entrepreneur' # Return the created user profile
"400":
description: Bad Request - Problem processing the token or user data derived from it.
"401":
description: Unauthorized - Valid authentication token required.
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 or 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.