tududi/backend/docs/swagger/auth.js
Chris 6fb87ac80a
Feat refactor tasks pt1 (#536)
* Refactor swagger docs

* Scaffold refactor

* Refactor crud tasks

* fixup! Refactor crud tasks

* Break down task layout

* fixup! Break down task layout

* fixup! fixup! Break down task layout

* Cleanup comments

* fixup! Cleanup comments

* Cleanup obsolete code

* Remove helpers
2025-11-15 14:02:06 +02:00

139 lines
3.6 KiB
JavaScript

/**
* @swagger
* /api/version:
* get:
* summary: Get API version
* tags: [Authentication]
* responses:
* 200:
* description: API version
* content:
* application/json:
* schema:
* type: object
* properties:
* version:
* type: string
* example: "1.0.0"
*/
/**
* @swagger
* /api/current_user:
* get:
* summary: Get current authenticated user
* tags: [Authentication]
* security:
* - cookieAuth: []
* - BearerAuth: []
* responses:
* 200:
* description: Current user information
* content:
* application/json:
* schema:
* type: object
* properties:
* user:
* type: object
* properties:
* uid:
* type: string
* email:
* type: string
* name:
* type: string
* surname:
* type: string
* language:
* type: string
* appearance:
* type: string
* timezone:
* type: string
* is_admin:
* type: boolean
*/
/**
* @swagger
* /api/login:
* post:
* summary: Login to the application
* tags: [Authentication]
* requestBody:
* required: true
* content:
* application/json:
* schema:
* type: object
* required:
* - email
* - password
* properties:
* email:
* type: string
* format: email
* example: "user@example.com"
* password:
* type: string
* format: password
* example: "password123"
* responses:
* 200:
* description: Successfully logged in
* content:
* application/json:
* schema:
* type: object
* properties:
* user:
* type: object
* properties:
* uid:
* type: string
* email:
* type: string
* name:
* type: string
* surname:
* type: string
* language:
* type: string
* appearance:
* type: string
* timezone:
* type: string
* is_admin:
* type: boolean
* 400:
* description: Invalid parameters
* 401:
* description: Invalid credentials
* 500:
* description: Internal server error
*/
/**
* @swagger
* /api/logout:
* get:
* summary: Logout from the application
* tags: [Authentication]
* security:
* - cookieAuth: []
* - BearerAuth: []
* responses:
* 200:
* description: Successfully logged out
* content:
* application/json:
* schema:
* type: object
* properties:
* message:
* type: string
* example: "Logged out successfully"
* 500:
* description: Could not log out
*/