mirror of
https://github.com/plankanban/planka.git
synced 2025-12-20 09:15:39 +03:00
docs: Add full Swagger JSDoc coverage
This commit is contained in:
@@ -3,6 +3,57 @@
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/users/{id}/avatar:
|
||||
* patch:
|
||||
* summary: Update user avatar
|
||||
* description: Updates a user's avatar image. Users can update their own avatar, admins can update any user's avatar.
|
||||
* tags:
|
||||
* - Users
|
||||
* parameters:
|
||||
* - name: id
|
||||
* in: path
|
||||
* required: true
|
||||
* description: ID of the user whose avatar to update
|
||||
* schema:
|
||||
* type: string
|
||||
* example: 1357158568008091264
|
||||
* requestBody:
|
||||
* required: true
|
||||
* content:
|
||||
* multipart/form-data:
|
||||
* schema:
|
||||
* type: object
|
||||
* required:
|
||||
* - file
|
||||
* properties:
|
||||
* file:
|
||||
* type: string
|
||||
* format: binary
|
||||
* description: Avatar image file (must be an image format)
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Avatar updated successfully
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* type: object
|
||||
* required:
|
||||
* - item
|
||||
* properties:
|
||||
* item:
|
||||
* $ref: '#/components/schemas/User'
|
||||
* 400:
|
||||
* $ref: '#/components/responses/ValidationError'
|
||||
* 401:
|
||||
* $ref: '#/components/responses/Unauthorized'
|
||||
* 404:
|
||||
* $ref: '#/components/responses/NotFound'
|
||||
* 422:
|
||||
* $ref: '#/components/responses/UnprocessableEntity'
|
||||
*/
|
||||
|
||||
const { idInput } = require('../../../utils/inputs');
|
||||
|
||||
const Errors = {
|
||||
|
||||
Reference in New Issue
Block a user