feat: added doc for endpoint make-admin
This commit is contained in:
@ -39,7 +39,7 @@ paths:
|
||||
schema:
|
||||
$ref: "./main.yaml#/components/schemas/project"
|
||||
responses:
|
||||
"201": # Use 201 Created for successful creation
|
||||
"200": # Use 200 Created for successful creation
|
||||
description: Created - Project added successfully. Returns the created project.
|
||||
content:
|
||||
application/json:
|
||||
@ -144,7 +144,7 @@ paths:
|
||||
schema:
|
||||
$ref: './main.yaml#/components/schemas/projectDecision'
|
||||
responses:
|
||||
"204": # Use 204 No Content for successful action with no body
|
||||
"200": # Use 200 No Content for successful action with no body
|
||||
description: No Content - Decision processed successfully.
|
||||
"400":
|
||||
description: Bad Request - Invalid input (e.g., missing decision).
|
||||
@ -191,7 +191,7 @@ paths:
|
||||
description: The ID of the user account to validate.
|
||||
example: 102
|
||||
responses:
|
||||
"204":
|
||||
"200":
|
||||
description: No Content - Account validated successfully.
|
||||
"400":
|
||||
description: Bad Request - Invalid user ID format.
|
||||
@ -247,7 +247,7 @@ paths:
|
||||
schema:
|
||||
$ref: "./main.yaml#/components/schemas/report"
|
||||
responses:
|
||||
"201":
|
||||
"200":
|
||||
description: Created - Report created and linked successfully. Returns the created report.
|
||||
content:
|
||||
application/json:
|
||||
@ -310,7 +310,7 @@ paths:
|
||||
description: The ID of the project to remove.
|
||||
example: 12
|
||||
responses:
|
||||
"204":
|
||||
"200":
|
||||
description: No Content - Project removed successfully.
|
||||
"400":
|
||||
description: Bad Request - Invalid project ID format.
|
||||
@ -337,9 +337,24 @@ paths:
|
||||
description: The ID of the user to grant admin rights.
|
||||
example: 103
|
||||
responses:
|
||||
"204": # Use 204 No Content
|
||||
"200": # Use 200 No Content
|
||||
description: No Content - Admin rights granted successfully.
|
||||
"400":
|
||||
description: Bad Request - Invalid user ID format or user is already an admin.
|
||||
"401":
|
||||
description: Unauthorized.
|
||||
description: Unauthorized.
|
||||
|
||||
/admin/create-account:
|
||||
post:
|
||||
summary: Creates Admin out Jwt Token
|
||||
tags:
|
||||
- Admin API
|
||||
security:
|
||||
- MyINPulse: [MyINPulse-admin]
|
||||
description: Create an admin instance in the MyINPulse DB of the information provided from the authenticated user's keycloack token.
|
||||
The information required in the token are `userSurname`, `username`, `primaryMail`, `secondaryMail`, `phoneNumber`.
|
||||
responses:
|
||||
"200":
|
||||
description: No Content - Admin user created successfully.
|
||||
"401":
|
||||
description: Unauthorized.
|
Reference in New Issue
Block a user