docs: Add full Swagger JSDoc coverage

This commit is contained in:
Maksim Eltyshev
2025-09-08 16:20:27 +02:00
parent e6b4c33542
commit 5ad3134519
128 changed files with 7610 additions and 0 deletions

View File

@@ -3,6 +3,62 @@
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
*/
/**
* @swagger
* /api/attachments/{id}/download/thumbnails/{fileName}.{fileExtension}:
* get:
* summary: Download file attachment thumbnail
* description: Downloads a thumbnail for a file attachment. Only available for image attachments that have thumbnails generated. Requires access to the card.
* tags:
* - File Attachments
* parameters:
* - name: id
* in: path
* required: true
* description: ID of the file attachment to download the thumbnail for
* schema:
* type: string
* example: 1357158568008091264
* - name: fileName
* in: path
* required: true
* description: Thumbnail size identifier
* schema:
* type: string
* enum: [outside-360, outside-720]
* example: outside-360
* - name: fileExtension
* in: path
* required: true
* description: File extension of the thumbnail
* schema:
* type: string
* example: jpg
* responses:
* 200:
* description: Thumbnail image returned successfully
* content:
* image/*:
* schema:
* type: string
* format: binary
* headers:
* Content-Type:
* schema:
* type: string
* description: MIME type of the thumbnail image
* Cache-Control:
* schema:
* type: string
* description: Cache control header
* 400:
* $ref: '#/components/responses/ValidationError'
* 401:
* $ref: '#/components/responses/Unauthorized'
* 404:
* $ref: '#/components/responses/NotFound'
*/
const { idInput } = require('../../../utils/inputs');
const Errors = {

View File

@@ -3,6 +3,51 @@
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
*/
/**
* @swagger
* /api/attachments/{id}/download:
* get:
* summary: Download file attachment
* description: Downloads a file attachment. Requires access to the card.
* tags:
* - File Attachments
* parameters:
* - name: id
* in: path
* required: true
* description: ID of the file attachment to download
* schema:
* type: string
* example: 1357158568008091264
* responses:
* 200:
* description: File attachment content returned successfully
* content:
* application/octet-stream:
* schema:
* type: string
* format: binary
* image/*:
* schema:
* type: string
* format: binary
* headers:
* Content-Disposition:
* schema:
* type: string
* description: Attachment disposition with filename
* Content-Type:
* schema:
* type: string
* description: MIME type of the file
* 400:
* $ref: '#/components/responses/ValidationError'
* 401:
* $ref: '#/components/responses/Unauthorized'
* 404:
* $ref: '#/components/responses/NotFound'
*/
const { idInput } = require('../../../utils/inputs');
const Errors = {