diff --git a/client/src/api/activities.js b/client/src/api/activities.js index 7db3ef1d..51143ee9 100755 --- a/client/src/api/activities.js +++ b/client/src/api/activities.js @@ -16,13 +16,13 @@ export const transformActivity = (activity) => ({ /* Actions */ -const getActivitiesInBoard = (boardId, data, headers) => +const getBoardActivities = (boardId, data, headers) => socket.get(`/boards/${boardId}/actions`, data, headers).then((body) => ({ ...body, items: body.items.map(transformActivity), })); -const getActivitiesInCard = (cardId, data, headers) => +const getCardActivities = (cardId, data, headers) => socket.get(`/cards/${cardId}/actions`, data, headers).then((body) => ({ ...body, items: body.items.map(transformActivity), @@ -38,7 +38,7 @@ const makeHandleActivityCreate = (next) => (body) => { }; export default { - getActivitiesInBoard, - getActivitiesInCard, + getBoardActivities, + getCardActivities, makeHandleActivityCreate, }; diff --git a/client/src/api/custom-field-groups.js b/client/src/api/custom-field-groups.js index 1d58d078..c912c972 100755 --- a/client/src/api/custom-field-groups.js +++ b/client/src/api/custom-field-groups.js @@ -7,10 +7,10 @@ import socket from './socket'; /* Actions */ -const createCustomFieldGroupInBoard = (cardId, data, headers) => +const createBoardCustomFieldGroup = (cardId, data, headers) => socket.post(`/boards/${cardId}/custom-field-groups`, data, headers); -const createCustomFieldGroupInCard = (cardId, data, headers) => +const createCardCustomFieldGroup = (cardId, data, headers) => socket.post(`/cards/${cardId}/custom-field-groups`, data, headers); const getCustomFieldGroup = (id, headers) => @@ -23,8 +23,8 @@ const deleteCustomFieldGroup = (id, headers) => socket.delete(`/custom-field-groups/${id}`, undefined, headers); export default { - createCustomFieldGroupInBoard, - createCustomFieldGroupInCard, + createBoardCustomFieldGroup, + createCardCustomFieldGroup, getCustomFieldGroup, updateCustomFieldGroup, deleteCustomFieldGroup, diff --git a/client/src/api/notification-services.js b/client/src/api/notification-services.js index f7b4e7bb..5b2e8613 100755 --- a/client/src/api/notification-services.js +++ b/client/src/api/notification-services.js @@ -7,10 +7,10 @@ import socket from './socket'; /* Actions */ -const createNotificationServiceInUser = (userId, data, headers) => +const createUserNotificationService = (userId, data, headers) => socket.post(`/users/${userId}/notification-services`, data, headers); -const createNotificationServiceInBoard = (boardId, data, headers) => +const createBoardNotificationService = (boardId, data, headers) => socket.post(`/boards/${boardId}/notification-services`, data, headers); const updateNotificationService = (id, data, headers) => @@ -23,8 +23,8 @@ const deleteNotificationService = (id, headers) => socket.delete(`/notification-services/${id}`, undefined, headers); export default { - createNotificationServiceInUser, - createNotificationServiceInBoard, + createUserNotificationService, + createBoardNotificationService, updateNotificationService, testNotificationService, deleteNotificationService, diff --git a/client/src/sagas/core/services/activities.js b/client/src/sagas/core/services/activities.js index c319c1a4..043b3daf 100644 --- a/client/src/sagas/core/services/activities.js +++ b/client/src/sagas/core/services/activities.js @@ -22,7 +22,7 @@ export function* fetchActivitiesInBoard(boardId) { ({ items: activities, included: { users }, - } = yield call(request, api.getActivitiesInBoard, boardId, { + } = yield call(request, api.getBoardActivities, boardId, { beforeId: lastActivityId || undefined, })); } catch (error) { @@ -51,7 +51,7 @@ export function* fetchActivitiesInCard(cardId) { ({ items: activities, included: { users }, - } = yield call(request, api.getActivitiesInCard, cardId, { + } = yield call(request, api.getCardActivities, cardId, { beforeId: lastActivityId || undefined, })); } catch (error) { diff --git a/client/src/sagas/core/services/custom-field-groups.js b/client/src/sagas/core/services/custom-field-groups.js index 695cc40b..49101492 100644 --- a/client/src/sagas/core/services/custom-field-groups.js +++ b/client/src/sagas/core/services/custom-field-groups.js @@ -31,7 +31,7 @@ export function* createCustomFieldGroupInBoard(boardId, data) { try { ({ item: customFieldGroup } = yield call( request, - api.createCustomFieldGroupInBoard, + api.createBoardCustomFieldGroup, boardId, nextData, )); @@ -69,7 +69,7 @@ export function* createCustomFieldGroupInCard(cardId, data) { try { ({ item: customFieldGroup } = yield call( request, - api.createCustomFieldGroupInCard, + api.createCardCustomFieldGroup, cardId, nextData, )); diff --git a/client/src/sagas/core/services/notification-services.js b/client/src/sagas/core/services/notification-services.js index ccca07e6..8ef28cf5 100644 --- a/client/src/sagas/core/services/notification-services.js +++ b/client/src/sagas/core/services/notification-services.js @@ -27,7 +27,7 @@ export function* createNotificationServiceInCurrentUser(data) { try { ({ item: notificationService } = yield call( request, - api.createNotificationServiceInUser, + api.createUserNotificationService, currentUserId, data, )); @@ -54,7 +54,7 @@ export function* createNotificationServiceInBoard(boardId, data) { try { ({ item: notificationService } = yield call( request, - api.createNotificationServiceInBoard, + api.createBoardNotificationService, boardId, data, )); diff --git a/server/api/controllers/access-tokens/accept-terms.js b/server/api/controllers/access-tokens/accept-terms.js index dee5b976..51bfcc4f 100644 --- a/server/api/controllers/access-tokens/accept-terms.js +++ b/server/api/controllers/access-tokens/accept-terms.js @@ -11,6 +11,7 @@ * description: Accept terms during the authentication flow. Converts the pending token to an access token. * tags: * - Access Tokens + * operationId: acceptTerms * requestBody: * required: true * content: @@ -87,6 +88,7 @@ * - Admin login required to initialize instance * description: Specific error message * example: Invalid signature + * security: [] */ const { getRemoteAddress } = require('../../../utils/remote-address'); diff --git a/server/api/controllers/access-tokens/create.js b/server/api/controllers/access-tokens/create.js index d1057ec5..e438cf01 100755 --- a/server/api/controllers/access-tokens/create.js +++ b/server/api/controllers/access-tokens/create.js @@ -11,6 +11,7 @@ * description: Authenticates a user using email/username and password. Returns an access token for API authentication. * tags: * - Access Tokens + * operationId: createAccessToken * requestBody: * required: true * content: @@ -101,6 +102,7 @@ * - Admin login required to initialize instance * description: Specific error message * example: Use single sign-on + * security: [] */ const bcrypt = require('bcrypt'); diff --git a/server/api/controllers/access-tokens/delete.js b/server/api/controllers/access-tokens/delete.js index 6f294213..17f9b4a4 100644 --- a/server/api/controllers/access-tokens/delete.js +++ b/server/api/controllers/access-tokens/delete.js @@ -11,6 +11,7 @@ * description: Logs out the current user by deleting the session and access token. Clears HTTP-only cookies if present. * tags: * - Access Tokens + * operationId: deleteAccessToken * responses: * 200: * description: Logout successful diff --git a/server/api/controllers/access-tokens/exchange-with-oidc.js b/server/api/controllers/access-tokens/exchange-with-oidc.js index 47fe6698..cdd232c6 100644 --- a/server/api/controllers/access-tokens/exchange-with-oidc.js +++ b/server/api/controllers/access-tokens/exchange-with-oidc.js @@ -11,6 +11,7 @@ * description: Exchanges an OIDC authorization code for an access token. Creates a user if they do not exist. * tags: * - Access Tokens + * operationId: exchangeForAccessTokenWithOidc * requestBody: * required: true * content: @@ -49,6 +50,12 @@ * type: string * description: Access token for API authentication * example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ4... + * headers: + * Set-Cookie: + * description: HTTP-only authentication cookie (if withHttpOnlyToken is true) + * schema: + * type: string + * example: httpOnlyToken=29aa3e38-8d24-4029-9743-9cbcf0a0dd5c; HttpOnly; Secure; SameSite=Strict * 400: * $ref: '#/components/responses/ValidationError' * 401: @@ -151,6 +158,7 @@ * type: string * description: Error message * example: Invalid OIDC configuration + * security: [] */ const { getRemoteAddress } = require('../../../utils/remote-address'); diff --git a/server/api/controllers/access-tokens/revoke-pending-token.js b/server/api/controllers/access-tokens/revoke-pending-token.js index 47933d7a..8bc9f5b7 100644 --- a/server/api/controllers/access-tokens/revoke-pending-token.js +++ b/server/api/controllers/access-tokens/revoke-pending-token.js @@ -11,6 +11,7 @@ * description: Revokes a pending authentication token and cancels the authentication flow. * tags: * - Access Tokens + * operationId: revokePendingToken * requestBody: * required: true * content: @@ -42,6 +43,7 @@ * $ref: '#/components/responses/ValidationError' * 404: * $ref: '#/components/responses/NotFound' + * security: [] */ const Errors = { diff --git a/server/api/controllers/actions/index-in-board.js b/server/api/controllers/actions/index-in-board.js index fbdba3e0..4d64f2c1 100755 --- a/server/api/controllers/actions/index-in-board.js +++ b/server/api/controllers/actions/index-in-board.js @@ -11,6 +11,7 @@ * description: Retrieves a list of actions (activity history) for a specific board, with pagination support. * tags: * - Actions + * operationId: getBoardActions * parameters: * - name: boardId * in: path diff --git a/server/api/controllers/actions/index-in-card.js b/server/api/controllers/actions/index-in-card.js index b36ae29e..62371a51 100755 --- a/server/api/controllers/actions/index-in-card.js +++ b/server/api/controllers/actions/index-in-card.js @@ -11,6 +11,7 @@ * description: Retrieves a list of actions (activity history) for a specific card, with pagination support. * tags: * - Actions + * operationId: getCardActions * parameters: * - name: cardId * in: path diff --git a/server/api/controllers/attachments/create.js b/server/api/controllers/attachments/create.js index d9ff1388..9cb2e28c 100644 --- a/server/api/controllers/attachments/create.js +++ b/server/api/controllers/attachments/create.js @@ -11,6 +11,7 @@ * description: Creates an attachment on a card. Requires board editor permissions. * tags: * - Attachments + * operationId: createAttachment * parameters: * - name: cardId * in: path @@ -22,21 +23,25 @@ * requestBody: * required: true * content: - * application/json: + * multipart/form-data: * schema: * type: object * required: * - type - * - url * - name * properties: * type: * type: string - * enum: [link] + * enum: [file, link] * description: Type of the attachment * example: link + * file: + * type: string + * format: binary + * description: File to upload * url: * type: string + * format: url * maxLength: 2048 * description: URL for the link attachment * example: https://google.com/search?q=planka @@ -44,29 +49,7 @@ * type: string * maxLength: 128 * description: Name/title of the attachment - * example: Google Link - * multipart/form-data: - * schema: - * type: object - * required: - * - type - * - file - * - name - * properties: - * type: - * type: string - * enum: [file] - * description: Type of the attachment - * example: file - * file: - * type: string - * format: binary - * description: File to upload - * name: - * type: string - * maxLength: 128 - * description: Name/title of the attachment - * example: Important Document + * example: Important Attachment * requestId: * type: string * maxLength: 128 diff --git a/server/api/controllers/attachments/delete.js b/server/api/controllers/attachments/delete.js index f50491ea..65392270 100755 --- a/server/api/controllers/attachments/delete.js +++ b/server/api/controllers/attachments/delete.js @@ -11,6 +11,7 @@ * description: Deletes an attachment. Requires board editor permissions. * tags: * - Attachments + * operationId: deleteAttachment * parameters: * - name: id * in: path diff --git a/server/api/controllers/attachments/update.js b/server/api/controllers/attachments/update.js index 3116d7de..dfcdd7d9 100755 --- a/server/api/controllers/attachments/update.js +++ b/server/api/controllers/attachments/update.js @@ -11,6 +11,7 @@ * description: Updates an attachment. Requires board editor permissions. * tags: * - Attachments + * operationId: updateAttachment * parameters: * - name: id * in: path @@ -30,7 +31,7 @@ * type: string * maxLength: 128 * description: Name/title of the attachment - * example: Google Link + * example: Important Attachment * responses: * 200: * description: Attachment updated successfully diff --git a/server/api/controllers/background-images/create.js b/server/api/controllers/background-images/create.js index 52abc0ae..6af051d6 100644 --- a/server/api/controllers/background-images/create.js +++ b/server/api/controllers/background-images/create.js @@ -11,6 +11,7 @@ * description: Uploads a background image for a project. Requires project manager permissions. * tags: * - Background Images + * operationId: createBackgroundImage * parameters: * - name: projectId * in: path diff --git a/server/api/controllers/background-images/delete.js b/server/api/controllers/background-images/delete.js index 9ee58bbe..6d762e97 100755 --- a/server/api/controllers/background-images/delete.js +++ b/server/api/controllers/background-images/delete.js @@ -11,6 +11,7 @@ * description: Deletes a background image. Requires project manager permissions. * tags: * - Background Images + * operationId: deleteBackgroundImage * parameters: * - name: id * in: path diff --git a/server/api/controllers/base-custom-field-groups/create.js b/server/api/controllers/base-custom-field-groups/create.js index 66f1c315..26a7ba9d 100644 --- a/server/api/controllers/base-custom-field-groups/create.js +++ b/server/api/controllers/base-custom-field-groups/create.js @@ -11,6 +11,7 @@ * description: Creates a base custom field group within a project. Requires project manager permissions. * tags: * - Base Custom Field Groups + * operationId: createBaseCustomFieldGroup * parameters: * - name: projectId * in: path diff --git a/server/api/controllers/base-custom-field-groups/delete.js b/server/api/controllers/base-custom-field-groups/delete.js index 9998cf21..7ba6f316 100644 --- a/server/api/controllers/base-custom-field-groups/delete.js +++ b/server/api/controllers/base-custom-field-groups/delete.js @@ -11,6 +11,7 @@ * description: Deletes a base custom field group. Requires project manager permissions. * tags: * - Base Custom Field Groups + * operationId: deleteBaseCustomFieldGroup * parameters: * - name: id * in: path diff --git a/server/api/controllers/base-custom-field-groups/update.js b/server/api/controllers/base-custom-field-groups/update.js index 31e44e1c..5ca531fa 100644 --- a/server/api/controllers/base-custom-field-groups/update.js +++ b/server/api/controllers/base-custom-field-groups/update.js @@ -11,6 +11,7 @@ * description: Updates a base custom field group. Requires project manager permissions. * tags: * - Base Custom Field Groups + * operationId: updateBaseCustomFieldGroup * parameters: * - name: id * in: path diff --git a/server/api/controllers/board-memberships/create.js b/server/api/controllers/board-memberships/create.js index f393cb9b..0db2569b 100755 --- a/server/api/controllers/board-memberships/create.js +++ b/server/api/controllers/board-memberships/create.js @@ -7,15 +7,16 @@ * @swagger * /boards/{boardId}/memberships: * post: - * summary: Add user to board - * description: Adds a user to a board. Requires project manager permissions. + * summary: Create board membership + * description: Creates a board membership within a board. Requires project manager permissions. * tags: * - Board Memberships + * operationId: createBoardMembership * parameters: * - name: boardId * in: path * required: true - * description: ID of the board to add the user to + * description: ID of the board to create the board membership in * schema: * type: string * example: "1357158568008091264" @@ -31,7 +32,7 @@ * properties: * userId: * type: string - * description: ID of the user to add to the board + * description: ID of the user who is a member of the board * example: "1357158568008091265" * role: * type: string @@ -45,7 +46,7 @@ * example: true * responses: * 200: - * description: User added to board successfully + * description: Board membership created successfully * content: * application/json: * schema: diff --git a/server/api/controllers/board-memberships/delete.js b/server/api/controllers/board-memberships/delete.js index bb4f410b..65fdbb64 100755 --- a/server/api/controllers/board-memberships/delete.js +++ b/server/api/controllers/board-memberships/delete.js @@ -7,21 +7,22 @@ * @swagger * /board-memberships/{id}: * delete: - * summary: Remove user from board - * description: Removes a user from a board. Users can remove themselves, or project managers can remove any user. + * summary: Delete board membership + * description: Deletes a board membership. Users can remove their own membership, project managers can remove any membership. * tags: * - Board Memberships + * operationId: deleteBoardMembership * parameters: * - name: id * in: path * required: true - * description: ID of the board membership to remove + * description: ID of the board membership to delete * schema: * type: string * example: "1357158568008091264" * responses: * 200: - * description: User removed from board successfully + * description: Board membership deleted successfully * content: * application/json: * schema: diff --git a/server/api/controllers/board-memberships/update.js b/server/api/controllers/board-memberships/update.js index 49c1b773..0c4b71c3 100644 --- a/server/api/controllers/board-memberships/update.js +++ b/server/api/controllers/board-memberships/update.js @@ -11,6 +11,7 @@ * description: Updates a board membership. Requires project manager permissions. * tags: * - Board Memberships + * operationId: updateBoardMembership * parameters: * - name: id * in: path diff --git a/server/api/controllers/boards/create.js b/server/api/controllers/boards/create.js index ba921de6..049fbdc1 100755 --- a/server/api/controllers/boards/create.js +++ b/server/api/controllers/boards/create.js @@ -11,6 +11,7 @@ * description: Creates a board within a project. Supports importing from Trello. Requires project manager permissions. * tags: * - Boards + * operationId: createBoard * parameters: * - name: projectId * in: path @@ -22,50 +23,6 @@ * requestBody: * required: true * content: - * application/json: - * schema: - * type: object - * required: - * - position - * - name - * properties: - * position: - * type: number - * minimum: 0 - * description: Position of the board within the project - * example: 65536 - * name: - * type: string - * maxLength: 128 - * description: Name/title of the board - * example: Development Board - * defaultView: - * type: string - * enum: [kanban, grid, list] - * default: kanban - * description: Default view for the board - * example: kanban - * defaultCardType: - * type: string - * enum: [project, story] - * default: project - * description: Default card type for new cards - * example: project - * limitCardTypesToDefaultOne: - * type: boolean - * default: false - * description: Whether to limit card types to default one - * example: false - * alwaysDisplayCardCreator: - * type: boolean - * default: false - * description: Whether to always display the card creator - * example: false - * expandTaskListsByDefault: - * type: boolean - * default: false - * description: Whether to expand task lists by default - * example: false * multipart/form-data: * schema: * type: object @@ -83,33 +40,6 @@ * maxLength: 128 * description: Name/title of the board * example: Development Board - * defaultView: - * type: string - * enum: [kanban, grid, list] - * default: kanban - * description: Default view for the board - * example: kanban - * defaultCardType: - * type: string - * enum: [project, story] - * default: project - * description: Default card type for new cards - * example: project - * limitCardTypesToDefaultOne: - * type: boolean - * default: false - * description: Whether to limit card types to default one - * example: false - * alwaysDisplayCardCreator: - * type: boolean - * default: false - * description: Whether to always display the card creator - * example: false - * expandTaskListsByDefault: - * type: boolean - * default: false - * description: Whether to expand task lists by default - * example: false * importType: * type: string * enum: [trello] diff --git a/server/api/controllers/boards/delete.js b/server/api/controllers/boards/delete.js index 11d17102..8195113a 100755 --- a/server/api/controllers/boards/delete.js +++ b/server/api/controllers/boards/delete.js @@ -11,6 +11,7 @@ * description: Deletes a board and all its contents (lists, cards, etc.). Requires project manager permissions. * tags: * - Boards + * operationId: deleteBoard * parameters: * - name: id * in: path diff --git a/server/api/controllers/boards/show.js b/server/api/controllers/boards/show.js index faded6a2..9a519128 100755 --- a/server/api/controllers/boards/show.js +++ b/server/api/controllers/boards/show.js @@ -11,6 +11,7 @@ * description: Retrieves comprehensive board information, including lists, cards, and other related data. * tags: * - Boards + * operationId: getBoard * parameters: * - name: id * in: path diff --git a/server/api/controllers/boards/update.js b/server/api/controllers/boards/update.js index af6a7816..f551332e 100755 --- a/server/api/controllers/boards/update.js +++ b/server/api/controllers/boards/update.js @@ -11,6 +11,7 @@ * description: Updates a board. Project managers can update all fields, board members can only subscribe/unsubscribe. * tags: * - Boards + * operationId: updateBoard * parameters: * - name: id * in: path @@ -49,6 +50,7 @@ * limitCardTypesToDefaultOne: * type: boolean * description: Whether to limit card types to default one + * example: false * alwaysDisplayCardCreator: * type: boolean * description: Whether to limit card types to default one diff --git a/server/api/controllers/card-labels/create.js b/server/api/controllers/card-labels/create.js index 235ba073..9956eb46 100755 --- a/server/api/controllers/card-labels/create.js +++ b/server/api/controllers/card-labels/create.js @@ -11,6 +11,7 @@ * description: Adds a label to a card. Requires board editor permissions. * tags: * - Card Labels + * operationId: createCardLabel * parameters: * - name: cardId * in: path diff --git a/server/api/controllers/card-labels/delete.js b/server/api/controllers/card-labels/delete.js index 8049a635..d0392bc7 100755 --- a/server/api/controllers/card-labels/delete.js +++ b/server/api/controllers/card-labels/delete.js @@ -11,6 +11,7 @@ * description: Removes a label from a card. Requires board editor permissions. * tags: * - Card Labels + * operationId: deleteCardLabel * parameters: * - name: cardId * in: path diff --git a/server/api/controllers/card-memberships/create.js b/server/api/controllers/card-memberships/create.js index fddc9748..362752b9 100755 --- a/server/api/controllers/card-memberships/create.js +++ b/server/api/controllers/card-memberships/create.js @@ -11,6 +11,7 @@ * description: Adds a user to a card. Requires board editor permissions. * tags: * - Card Memberships + * operationId: createCardMembership * parameters: * - name: cardId * in: path diff --git a/server/api/controllers/card-memberships/delete.js b/server/api/controllers/card-memberships/delete.js index 022c1024..e36b5f73 100755 --- a/server/api/controllers/card-memberships/delete.js +++ b/server/api/controllers/card-memberships/delete.js @@ -11,6 +11,7 @@ * description: Removes a user from a card. Requires board editor permissions. * tags: * - Card Memberships + * operationId: deleteCardMembership * parameters: * - name: cardId * in: path diff --git a/server/api/controllers/cards/create.js b/server/api/controllers/cards/create.js index f51b9953..50cea6bf 100755 --- a/server/api/controllers/cards/create.js +++ b/server/api/controllers/cards/create.js @@ -11,6 +11,7 @@ * description: Creates a card within a list. Requires board editor permissions. * tags: * - Cards + * operationId: createCard * parameters: * - name: listId * in: path diff --git a/server/api/controllers/cards/delete.js b/server/api/controllers/cards/delete.js index 527b2cd9..43bbb73c 100755 --- a/server/api/controllers/cards/delete.js +++ b/server/api/controllers/cards/delete.js @@ -11,6 +11,7 @@ * description: Deletes a card and all its contents (tasks, attachments, etc.). Requires board editor permissions. * tags: * - Cards + * operationId: deleteCard * parameters: * - name: id * in: path diff --git a/server/api/controllers/cards/duplicate.js b/server/api/controllers/cards/duplicate.js index 5176692c..9de23702 100644 --- a/server/api/controllers/cards/duplicate.js +++ b/server/api/controllers/cards/duplicate.js @@ -11,6 +11,7 @@ * description: Creates a duplicate of a card with all its contents (tasks, attachments, etc.). Requires board editor permissions. * tags: * - Cards + * operationId: duplicateCard * parameters: * - name: id * in: path diff --git a/server/api/controllers/cards/index.js b/server/api/controllers/cards/index.js index 74451456..ed46e7a4 100644 --- a/server/api/controllers/cards/index.js +++ b/server/api/controllers/cards/index.js @@ -11,6 +11,7 @@ * description: Retrieves cards from an endless list with filtering, search, and pagination support. * tags: * - Cards + * operationId: getCards * parameters: * - name: listId * in: path diff --git a/server/api/controllers/cards/read-notifications.js b/server/api/controllers/cards/read-notifications.js index 61fca2c8..3943cf08 100644 --- a/server/api/controllers/cards/read-notifications.js +++ b/server/api/controllers/cards/read-notifications.js @@ -11,6 +11,7 @@ * description: Marks all notifications for a specific card as read for the current user. Requires access to the card. * tags: * - Cards + * operationId: readCardNotifications * parameters: * - name: id * in: path diff --git a/server/api/controllers/cards/show.js b/server/api/controllers/cards/show.js index 3d5837d3..298ba730 100755 --- a/server/api/controllers/cards/show.js +++ b/server/api/controllers/cards/show.js @@ -11,6 +11,7 @@ * description: Retrieves comprehensive card information, including tasks, attachments, and other related data. * tags: * - Cards + * operationId: getCard * parameters: * - name: id * in: path diff --git a/server/api/controllers/cards/update.js b/server/api/controllers/cards/update.js index f6c947bc..5235f1a7 100755 --- a/server/api/controllers/cards/update.js +++ b/server/api/controllers/cards/update.js @@ -11,6 +11,7 @@ * description: Updates a card. Board editors can update all fields, viewers can only subscribe/unsubscribe. * tags: * - Cards + * operationId: updateCard * parameters: * - name: id * in: path diff --git a/server/api/controllers/comments/create.js b/server/api/controllers/comments/create.js index 735c630e..b2b9462c 100755 --- a/server/api/controllers/comments/create.js +++ b/server/api/controllers/comments/create.js @@ -11,6 +11,7 @@ * description: Creates a new comment on a card. Requires board editor permissions or comment permissions. * tags: * - Comments + * operationId: createComment * parameters: * - name: cardId * in: path diff --git a/server/api/controllers/comments/delete.js b/server/api/controllers/comments/delete.js index 8dc085a5..56bbbe4d 100755 --- a/server/api/controllers/comments/delete.js +++ b/server/api/controllers/comments/delete.js @@ -11,6 +11,7 @@ * description: Deletes a comment. Can be deleted by the comment author (with comment permissions) or project manager. * tags: * - Comments + * operationId: deleteComment * parameters: * - name: id * in: path diff --git a/server/api/controllers/comments/index.js b/server/api/controllers/comments/index.js index 0a9cf388..c2782366 100644 --- a/server/api/controllers/comments/index.js +++ b/server/api/controllers/comments/index.js @@ -11,6 +11,7 @@ * description: Retrieves comments for a card with pagination support. Requires access to the card. * tags: * - Comments + * operationId: getComments * parameters: * - name: cardId * in: path diff --git a/server/api/controllers/comments/update.js b/server/api/controllers/comments/update.js index 3b0395f7..e7aa792d 100755 --- a/server/api/controllers/comments/update.js +++ b/server/api/controllers/comments/update.js @@ -11,6 +11,7 @@ * description: Updates a comment. Only the author of the comment can update it. * tags: * - Comments + * operationId: updateComments * parameters: * - name: id * in: path diff --git a/server/api/controllers/config/show.js b/server/api/controllers/config/show.js index dede7cc7..93a02939 100644 --- a/server/api/controllers/config/show.js +++ b/server/api/controllers/config/show.js @@ -11,6 +11,7 @@ * description: Retrieves the application configuration. * tags: * - Config + * operationId: getConfig * responses: * 200: * description: Configuration retrieved successfully @@ -23,6 +24,7 @@ * properties: * item: * $ref: '#/components/schemas/Config' + * security: [] */ module.exports = { diff --git a/server/api/controllers/custom-field-groups/create-in-board.js b/server/api/controllers/custom-field-groups/create-in-board.js index e517d6df..b3a0cc96 100644 --- a/server/api/controllers/custom-field-groups/create-in-board.js +++ b/server/api/controllers/custom-field-groups/create-in-board.js @@ -7,10 +7,11 @@ * @swagger * /boards/{boardId}/custom-field-groups: * post: - * summary: Create custom field group in board + * summary: Create board custom field group * description: Creates a custom field group within a board. Either `baseCustomFieldGroupId` or `name` must be provided. Requires board editor permissions. * tags: * - Custom Field Groups + * operationId: createBoardCustomFieldGroup * parameters: * - name: boardId * in: path diff --git a/server/api/controllers/custom-field-groups/create-in-card.js b/server/api/controllers/custom-field-groups/create-in-card.js index 54a29f2d..51536eb8 100644 --- a/server/api/controllers/custom-field-groups/create-in-card.js +++ b/server/api/controllers/custom-field-groups/create-in-card.js @@ -7,10 +7,11 @@ * @swagger * /cards/{cardId}/custom-field-groups: * post: - * summary: Create custom field group in card + * summary: Create card custom field group * description: Creates a custom field group within a card. Either `baseCustomFieldGroupId` or `name` must be provided. Requires board editor permissions. * tags: * - Custom Field Groups + * operationId: createCardCustomFieldGroup * parameters: * - name: cardId * in: path diff --git a/server/api/controllers/custom-field-groups/delete.js b/server/api/controllers/custom-field-groups/delete.js index bddce9db..0410346c 100755 --- a/server/api/controllers/custom-field-groups/delete.js +++ b/server/api/controllers/custom-field-groups/delete.js @@ -11,6 +11,7 @@ * description: Deletes a custom field group. Requires board editor permissions. * tags: * - Custom Field Groups + * operationId: deleteCustomFieldGroup * parameters: * - name: id * in: path diff --git a/server/api/controllers/custom-field-groups/show.js b/server/api/controllers/custom-field-groups/show.js index cb46145d..b5a4ec5e 100644 --- a/server/api/controllers/custom-field-groups/show.js +++ b/server/api/controllers/custom-field-groups/show.js @@ -11,6 +11,7 @@ * description: Retrieves comprehensive custom field group information, including fields and values. Requires access to the board/card. * tags: * - Custom Field Groups + * operationId: getCustomFieldGroup * parameters: * - name: id * in: path @@ -40,14 +41,14 @@ * properties: * customFields: * type: array + * description: Related custom fields * items: * $ref: '#/components/schemas/CustomField' - * description: Related custom fields * customFieldValues: * type: array + * description: Related custom field values (for card-specific groups) * items: * $ref: '#/components/schemas/CustomFieldValue' - * description: Related custom field values (for card-specific groups) * 400: * $ref: '#/components/responses/ValidationError' * 401: diff --git a/server/api/controllers/custom-field-groups/update.js b/server/api/controllers/custom-field-groups/update.js index f41df72a..3d396d1c 100755 --- a/server/api/controllers/custom-field-groups/update.js +++ b/server/api/controllers/custom-field-groups/update.js @@ -11,6 +11,7 @@ * description: Updates a custom field group. Supports both board-wide and card-specific groups. Requires board editor permissions. * tags: * - Custom Field Groups + * operationId: updateCustomFieldGroup * parameters: * - name: id * in: path diff --git a/server/api/controllers/custom-field-values/create-or-update.js b/server/api/controllers/custom-field-values/create-or-update.js index f5b5f4e0..d9b44754 100644 --- a/server/api/controllers/custom-field-values/create-or-update.js +++ b/server/api/controllers/custom-field-values/create-or-update.js @@ -11,6 +11,7 @@ * description: Creates or updates a custom field value for a card. Requires board editor permissions. * tags: * - Custom Field Values + * operationId: updateCustomFieldValue * parameters: * - name: cardId * in: path diff --git a/server/api/controllers/custom-field-values/delete.js b/server/api/controllers/custom-field-values/delete.js index 88ec2971..a3794019 100644 --- a/server/api/controllers/custom-field-values/delete.js +++ b/server/api/controllers/custom-field-values/delete.js @@ -11,6 +11,7 @@ * description: Deletes a custom field value for a specific card. Requires board editor permissions. * tags: * - Custom Field Values + * operationId: deleteCustomFieldValue * parameters: * - name: cardId * in: path diff --git a/server/api/controllers/custom-fields/create-in-base-custom-field-group.js b/server/api/controllers/custom-fields/create-in-base-custom-field-group.js index 4c80021b..7cd54b2f 100644 --- a/server/api/controllers/custom-fields/create-in-base-custom-field-group.js +++ b/server/api/controllers/custom-fields/create-in-base-custom-field-group.js @@ -11,6 +11,7 @@ * description: Creates a custom field within a base custom field group. Requires project manager permissions. * tags: * - Custom Fields + * operationId: createCustomFieldInBaseGroup * parameters: * - name: baseCustomFieldGroupId * in: path diff --git a/server/api/controllers/custom-fields/create-in-custom-field-group.js b/server/api/controllers/custom-fields/create-in-custom-field-group.js index cedc3297..c1d7cd65 100644 --- a/server/api/controllers/custom-fields/create-in-custom-field-group.js +++ b/server/api/controllers/custom-fields/create-in-custom-field-group.js @@ -11,6 +11,7 @@ * description: Creates a custom field within a custom field group. Requires board editor permissions. * tags: * - Custom Fields + * operationId: createCustomFieldInGroup * parameters: * - name: customFieldGroupId * in: path diff --git a/server/api/controllers/custom-fields/delete.js b/server/api/controllers/custom-fields/delete.js index 2eef19f4..f1804e0b 100755 --- a/server/api/controllers/custom-fields/delete.js +++ b/server/api/controllers/custom-fields/delete.js @@ -11,6 +11,7 @@ * description: Deletes a custom field. Can delete the in base custom field group (requires project manager permissions) or the custom field group (requires board editor permissions). * tags: * - Custom Fields + * operationId: deleteCustomField * parameters: * - name: id * in: path diff --git a/server/api/controllers/custom-fields/update.js b/server/api/controllers/custom-fields/update.js index 31064347..b2059fd1 100755 --- a/server/api/controllers/custom-fields/update.js +++ b/server/api/controllers/custom-fields/update.js @@ -11,6 +11,7 @@ * description: Updates a custom field. Can update in the base custom field group (requires project manager permissions) or the custom field group (requires board editor permissions). * tags: * - Custom Fields + * operationId: updateCustomField * parameters: * - name: id * in: path diff --git a/server/api/controllers/file-attachments/download-thumbnail.js b/server/api/controllers/file-attachments/download-thumbnail.js index 36263102..077bb873 100644 --- a/server/api/controllers/file-attachments/download-thumbnail.js +++ b/server/api/controllers/file-attachments/download-thumbnail.js @@ -3,62 +3,6 @@ * Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md */ -/** - * @swagger - * /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 = { diff --git a/server/api/controllers/file-attachments/download.js b/server/api/controllers/file-attachments/download.js index 1f2b589c..8419bceb 100644 --- a/server/api/controllers/file-attachments/download.js +++ b/server/api/controllers/file-attachments/download.js @@ -3,51 +3,6 @@ * Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md */ -/** - * @swagger - * /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 = { diff --git a/server/api/controllers/labels/create.js b/server/api/controllers/labels/create.js index 84bbbea3..9aa14273 100755 --- a/server/api/controllers/labels/create.js +++ b/server/api/controllers/labels/create.js @@ -11,6 +11,7 @@ * description: Creates a label within a board. Requires board editor permissions. * tags: * - Labels + * operationId: createLabel * parameters: * - name: boardId * in: path diff --git a/server/api/controllers/labels/delete.js b/server/api/controllers/labels/delete.js index 0acd575a..89fb048e 100755 --- a/server/api/controllers/labels/delete.js +++ b/server/api/controllers/labels/delete.js @@ -11,6 +11,7 @@ * description: Deletes a label. Requires board editor permissions. * tags: * - Labels + * operationId: deleteLabel * parameters: * - name: id * in: path diff --git a/server/api/controllers/labels/update.js b/server/api/controllers/labels/update.js index dda678bc..7565ee29 100755 --- a/server/api/controllers/labels/update.js +++ b/server/api/controllers/labels/update.js @@ -11,6 +11,7 @@ * description: Updates a label. Requires board editor permissions. * tags: * - Labels + * operationId: updateLabel * parameters: * - name: id * in: path diff --git a/server/api/controllers/lists/clear.js b/server/api/controllers/lists/clear.js index a79f3f7f..6413cc20 100644 --- a/server/api/controllers/lists/clear.js +++ b/server/api/controllers/lists/clear.js @@ -11,6 +11,7 @@ * description: Deletes all cards from a list. Only works with trash-type lists. Requires project manager or board editor permissions. * tags: * - Lists + * operationId: clearList * parameters: * - name: id * in: path diff --git a/server/api/controllers/lists/create.js b/server/api/controllers/lists/create.js index c71d7eb9..63f656d4 100755 --- a/server/api/controllers/lists/create.js +++ b/server/api/controllers/lists/create.js @@ -11,6 +11,7 @@ * description: Creates a list within a board. Requires board editor permissions. * tags: * - Lists + * operationId: createList * parameters: * - name: boardId * in: path diff --git a/server/api/controllers/lists/delete.js b/server/api/controllers/lists/delete.js index de0ebb10..e0e0f98a 100755 --- a/server/api/controllers/lists/delete.js +++ b/server/api/controllers/lists/delete.js @@ -11,6 +11,7 @@ * description: Deletes a list and moves its cards to a trash list. Can only delete finite lists. Requires board editor permissions. * tags: * - Lists + * operationId: deleteList * parameters: * - name: id * in: path diff --git a/server/api/controllers/lists/move-cards.js b/server/api/controllers/lists/move-cards.js index 299db985..762cf20c 100644 --- a/server/api/controllers/lists/move-cards.js +++ b/server/api/controllers/lists/move-cards.js @@ -11,6 +11,7 @@ * description: Moves all cards from a closed list to an archive list. Requires board editor permissions. * tags: * - Lists + * operationId: moveListCards * parameters: * - name: id * in: path diff --git a/server/api/controllers/lists/show.js b/server/api/controllers/lists/show.js index 31d1b301..135b9f07 100644 --- a/server/api/controllers/lists/show.js +++ b/server/api/controllers/lists/show.js @@ -11,6 +11,7 @@ * description: Retrieves comprehensive list information, including cards, attachments, and other related data. Requires access to the board. * tags: * - Lists + * operationId: getList * parameters: * - name: id * in: path diff --git a/server/api/controllers/lists/sort.js b/server/api/controllers/lists/sort.js index cad97bd4..93fed341 100644 --- a/server/api/controllers/lists/sort.js +++ b/server/api/controllers/lists/sort.js @@ -11,6 +11,7 @@ * description: Sorts all cards within a list. Requires board editor permissions. * tags: * - Lists + * operationId: sortList * parameters: * - name: id * in: path diff --git a/server/api/controllers/lists/update.js b/server/api/controllers/lists/update.js index 85851997..c4dd7c37 100755 --- a/server/api/controllers/lists/update.js +++ b/server/api/controllers/lists/update.js @@ -11,6 +11,7 @@ * description: Updates a list. Can move lists between boards. Requires board editor permissions. * tags: * - Lists + * operationId: updateList * parameters: * - name: id * in: path diff --git a/server/api/controllers/notification-services/create-in-board.js b/server/api/controllers/notification-services/create-in-board.js index 1c9f0227..61e16e0e 100644 --- a/server/api/controllers/notification-services/create-in-board.js +++ b/server/api/controllers/notification-services/create-in-board.js @@ -11,6 +11,7 @@ * description: Creates a new notification service for a board. Requires project manager permissions. * tags: * - Notification Services + * operationId: createBoardNotificationService * parameters: * - name: boardId * in: path diff --git a/server/api/controllers/notification-services/create-in-user.js b/server/api/controllers/notification-services/create-in-user.js index d8165ecf..2d627018 100644 --- a/server/api/controllers/notification-services/create-in-user.js +++ b/server/api/controllers/notification-services/create-in-user.js @@ -11,6 +11,7 @@ * description: Creates a new notification service for a user. Users can only create services for themselves. * tags: * - Notification Services + * operationId: createUserNotificationService * parameters: * - name: userId * in: path diff --git a/server/api/controllers/notification-services/delete.js b/server/api/controllers/notification-services/delete.js index 7dee2d07..a7f2acd7 100644 --- a/server/api/controllers/notification-services/delete.js +++ b/server/api/controllers/notification-services/delete.js @@ -11,6 +11,7 @@ * description: Deletes a notification service. Users can delete their own services, project managers can delete board services. * tags: * - Notification Services + * operationId: deleteNotificationService * parameters: * - name: id * in: path diff --git a/server/api/controllers/notification-services/test.js b/server/api/controllers/notification-services/test.js index b9770d4a..2361e73e 100644 --- a/server/api/controllers/notification-services/test.js +++ b/server/api/controllers/notification-services/test.js @@ -11,6 +11,7 @@ * description: Sends a test notification to verify the notification service is working. Users can test their own services, project managers can test board services. * tags: * - Notification Services + * operationId: testNotificationService * parameters: * - name: id * in: path diff --git a/server/api/controllers/notification-services/update.js b/server/api/controllers/notification-services/update.js index 1f0f5849..9a0aaba2 100644 --- a/server/api/controllers/notification-services/update.js +++ b/server/api/controllers/notification-services/update.js @@ -11,6 +11,7 @@ * description: Updates a notification service. Users can update their own services, project managers can update board services. * tags: * - Notification Services + * operationId: updateNotificationService * parameters: * - name: id * in: path diff --git a/server/api/controllers/notifications/index.js b/server/api/controllers/notifications/index.js index f71562fe..bb9f3a9c 100755 --- a/server/api/controllers/notifications/index.js +++ b/server/api/controllers/notifications/index.js @@ -11,6 +11,7 @@ * description: Retrieves all unread notifications for the current user, including creator users. * tags: * - Notifications + * operationId: getNotifications * responses: * 200: * description: Notifications retrieved successfully diff --git a/server/api/controllers/notifications/read-all.js b/server/api/controllers/notifications/read-all.js index 5645476d..478b1ae5 100755 --- a/server/api/controllers/notifications/read-all.js +++ b/server/api/controllers/notifications/read-all.js @@ -11,6 +11,7 @@ * description: Marks all notifications for the current user as read. * tags: * - Notifications + * operationId: readAllNotifications * responses: * 200: * description: Notifications marked as read successfully diff --git a/server/api/controllers/notifications/show.js b/server/api/controllers/notifications/show.js index 436f83a2..f6c2b16f 100644 --- a/server/api/controllers/notifications/show.js +++ b/server/api/controllers/notifications/show.js @@ -11,6 +11,7 @@ * description: Retrieves notification, including creator users. Users can only access their own notifications. * tags: * - Notifications + * operationId: getNotification * parameters: * - name: id * in: path diff --git a/server/api/controllers/notifications/update.js b/server/api/controllers/notifications/update.js index 7ea4e498..6d411610 100644 --- a/server/api/controllers/notifications/update.js +++ b/server/api/controllers/notifications/update.js @@ -11,6 +11,7 @@ * description: Updates a notification. Users can only update their own notifications. * tags: * - Notifications + * operationId: updateNotification * parameters: * - name: id * in: path diff --git a/server/api/controllers/project-managers/create.js b/server/api/controllers/project-managers/create.js index 30b1e0e9..1bbc9b3a 100755 --- a/server/api/controllers/project-managers/create.js +++ b/server/api/controllers/project-managers/create.js @@ -7,15 +7,16 @@ * @swagger * /projects/{projectId}/managers: * post: - * summary: Add project manager - * description: Adds a user as a project manager. Requires admin privileges for shared projects or existing project manager permissions. The user must be an admin or project owner. + * summary: Create project manager + * description: Creates a project manager within a project. Requires admin privileges for shared projects or existing project manager permissions. The user must be an admin or project owner. * tags: * - Project Managers + * operationId: createProjectManager * parameters: * - name: projectId * in: path * required: true - * description: ID of the project to add the manager to + * description: ID of the project to create the project manager in * schema: * type: string * example: "1357158568008091264" @@ -34,7 +35,7 @@ * example: "1357158568008091265" * responses: * 200: - * description: Project manager added successfully + * description: Project manager created successfully * content: * application/json: * schema: diff --git a/server/api/controllers/project-managers/delete.js b/server/api/controllers/project-managers/delete.js index 3a3d8353..b83c855e 100755 --- a/server/api/controllers/project-managers/delete.js +++ b/server/api/controllers/project-managers/delete.js @@ -7,21 +7,22 @@ * @swagger * /project-managers/{id}: * delete: - * summary: Remove project manager - * description: Removes a user from project managers. Requires admin privileges for shared projects or existing project manager permissions. Cannot remove the last project manager. + * summary: Delete project manager + * description: Deletes a project manager. Requires admin privileges for shared projects or existing project manager permissions. Cannot remove the last project manager. * tags: * - Project Managers + * operationId: deleteProjectManager * parameters: * - name: id * in: path * required: true - * description: ID of the project manager to remove + * description: ID of the project manager to delete * schema: * type: string * example: "1357158568008091264" * responses: * 200: - * description: Project manager removed successfully + * description: Project manager deleted successfully * content: * application/json: * schema: diff --git a/server/api/controllers/projects/create.js b/server/api/controllers/projects/create.js index 3c0863a0..9e7d59ca 100755 --- a/server/api/controllers/projects/create.js +++ b/server/api/controllers/projects/create.js @@ -11,6 +11,7 @@ * description: Creates a project. The current user automatically becomes a project manager. * tags: * - Projects + * operationId: createProject * requestBody: * required: true * content: diff --git a/server/api/controllers/projects/delete.js b/server/api/controllers/projects/delete.js index 777ba382..de858737 100755 --- a/server/api/controllers/projects/delete.js +++ b/server/api/controllers/projects/delete.js @@ -11,6 +11,7 @@ * description: Deletes a project. The project must not have any boards. Requires project manager permissions. * tags: * - Projects + * operationId: deleteProject * parameters: * - name: id * in: path diff --git a/server/api/controllers/projects/index.js b/server/api/controllers/projects/index.js index 2df366bc..140fbea6 100755 --- a/server/api/controllers/projects/index.js +++ b/server/api/controllers/projects/index.js @@ -11,6 +11,7 @@ * description: Retrieves all projects the current user has access to, including managed projects, membership projects, and shared projects (for admins). * tags: * - Projects + * operationId: getProjects * responses: * 200: * description: Projects retrieved successfully diff --git a/server/api/controllers/projects/show.js b/server/api/controllers/projects/show.js index cecc524d..a085d9ef 100644 --- a/server/api/controllers/projects/show.js +++ b/server/api/controllers/projects/show.js @@ -11,6 +11,7 @@ * description: Retrieves comprehensive project information, including boards, board memberships, and other related data. * tags: * - Projects + * operationId: getProject * parameters: * - name: id * in: path diff --git a/server/api/controllers/projects/update.js b/server/api/controllers/projects/update.js index 1b3d31fd..f8463512 100755 --- a/server/api/controllers/projects/update.js +++ b/server/api/controllers/projects/update.js @@ -11,6 +11,7 @@ * description: Updates a project. Accessible fields depend on user permissions. * tags: * - Projects + * operationId: updateProject * parameters: * - name: id * in: path diff --git a/server/api/controllers/task-lists/create.js b/server/api/controllers/task-lists/create.js index 8a7a9dd2..4cb1c143 100755 --- a/server/api/controllers/task-lists/create.js +++ b/server/api/controllers/task-lists/create.js @@ -11,6 +11,7 @@ * description: Creates a task list within a card. Requires board editor permissions. * tags: * - Task Lists + * operationId: createTaskList * parameters: * - name: cardId * in: path diff --git a/server/api/controllers/task-lists/delete.js b/server/api/controllers/task-lists/delete.js index cdc1b90e..c251b7ef 100755 --- a/server/api/controllers/task-lists/delete.js +++ b/server/api/controllers/task-lists/delete.js @@ -11,6 +11,7 @@ * description: Deletes a task list and all its tasks. Requires board editor permissions. * tags: * - Task Lists + * operationId: deleteTaskList * parameters: * - name: id * in: path diff --git a/server/api/controllers/task-lists/show.js b/server/api/controllers/task-lists/show.js index 3bfcc13c..6193d3f5 100644 --- a/server/api/controllers/task-lists/show.js +++ b/server/api/controllers/task-lists/show.js @@ -11,6 +11,7 @@ * description: Retrieves task list information, including tasks. Requires access to the card. * tags: * - Task Lists + * operationId: getTaskList * parameters: * - name: id * in: path diff --git a/server/api/controllers/task-lists/update.js b/server/api/controllers/task-lists/update.js index e49187a2..7b82b777 100755 --- a/server/api/controllers/task-lists/update.js +++ b/server/api/controllers/task-lists/update.js @@ -11,6 +11,7 @@ * description: Updates a task list. Requires board editor permissions. * tags: * - Task Lists + * operationId: updateTaskList * parameters: * - name: id * in: path diff --git a/server/api/controllers/tasks/create.js b/server/api/controllers/tasks/create.js index 677f56c5..00acba65 100755 --- a/server/api/controllers/tasks/create.js +++ b/server/api/controllers/tasks/create.js @@ -11,6 +11,7 @@ * description: Creates a task within a task list. Either `linkedCardId` or `name` must be provided. Requires board editor permissions. * tags: * - Tasks + * operationId: createTask * parameters: * - name: taskListId * in: path diff --git a/server/api/controllers/tasks/delete.js b/server/api/controllers/tasks/delete.js index 6e49890f..cec5b147 100755 --- a/server/api/controllers/tasks/delete.js +++ b/server/api/controllers/tasks/delete.js @@ -11,6 +11,7 @@ * description: Deletes a task. Requires board editor permissions. * tags: * - Tasks + * operationId: deleteTask * parameters: * - name: id * in: path diff --git a/server/api/controllers/tasks/update.js b/server/api/controllers/tasks/update.js index 7b5bfe4a..c9f4736e 100755 --- a/server/api/controllers/tasks/update.js +++ b/server/api/controllers/tasks/update.js @@ -11,6 +11,7 @@ * description: Updates a task. Linked card tasks have limited update options. Requires board editor permissions. * tags: * - Tasks + * operationId: updateTask * parameters: * - name: id * in: path diff --git a/server/api/controllers/terms/show.js b/server/api/controllers/terms/show.js index 2d896220..812fe7d9 100644 --- a/server/api/controllers/terms/show.js +++ b/server/api/controllers/terms/show.js @@ -11,6 +11,7 @@ * description: Retrieves terms and conditions in the specified language. * tags: * - Terms + * operationId: getTerms * parameters: * - name: type * in: query @@ -70,6 +71,7 @@ * $ref: '#/components/responses/Unauthorized' * 404: * $ref: '#/components/responses/NotFound' + * security: [] */ module.exports = { diff --git a/server/api/controllers/users/create.js b/server/api/controllers/users/create.js index c3c6f415..fbe1d4f8 100755 --- a/server/api/controllers/users/create.js +++ b/server/api/controllers/users/create.js @@ -11,6 +11,7 @@ * description: Creates a user account. Requires admin privileges. * tags: * - Users + * operationId: createUser * requestBody: * required: true * content: diff --git a/server/api/controllers/users/delete.js b/server/api/controllers/users/delete.js index dcf36b85..78d09895 100755 --- a/server/api/controllers/users/delete.js +++ b/server/api/controllers/users/delete.js @@ -11,6 +11,7 @@ * description: Deletes a user account. Cannot delete the default admin user. Requires admin privileges. * tags: * - Users + * operationId: deleteUser * parameters: * - name: id * in: path diff --git a/server/api/controllers/users/index.js b/server/api/controllers/users/index.js index 4a9489e1..dff38c51 100755 --- a/server/api/controllers/users/index.js +++ b/server/api/controllers/users/index.js @@ -11,6 +11,7 @@ * description: Retrieves a list of all users. Requires admin or project owner privileges. * tags: * - Users + * operationId: getUsers * responses: * 200: * description: List of users retrieved successfully diff --git a/server/api/controllers/users/show.js b/server/api/controllers/users/show.js index b8f8baab..adb8293d 100755 --- a/server/api/controllers/users/show.js +++ b/server/api/controllers/users/show.js @@ -11,6 +11,7 @@ * description: Retrieves a user. Use 'me' as ID to get the current user. * tags: * - Users + * operationId: getUser * parameters: * - name: id * in: path diff --git a/server/api/controllers/users/update-avatar.js b/server/api/controllers/users/update-avatar.js index 93b96211..e2460f29 100755 --- a/server/api/controllers/users/update-avatar.js +++ b/server/api/controllers/users/update-avatar.js @@ -11,6 +11,7 @@ * description: Updates a user's avatar image. Users can update their own avatar, admins can update any user's avatar. * tags: * - Users + * operationId: updateUserAvatar * parameters: * - name: id * in: path diff --git a/server/api/controllers/users/update-email.js b/server/api/controllers/users/update-email.js index b713930e..87f586fa 100644 --- a/server/api/controllers/users/update-email.js +++ b/server/api/controllers/users/update-email.js @@ -11,6 +11,7 @@ * description: Updates a user's email address. Users must provide current password when updating their own email. Admins can update any user's email without a password. * tags: * - Users + * operationId: updateUserEmail * parameters: * - in: path * name: id diff --git a/server/api/controllers/users/update-password.js b/server/api/controllers/users/update-password.js index 4bd7dae9..e84b6715 100644 --- a/server/api/controllers/users/update-password.js +++ b/server/api/controllers/users/update-password.js @@ -11,6 +11,7 @@ * description: Updates a user's password. Users must provide a current password when updating their own password. Admins can update any user's password without the current password. Returns a new access token when updating own password. * tags: * - Users + * operationId: updateUserPassword * parameters: * - in: path * name: id @@ -60,7 +61,7 @@ * description: New acces tokens (when updating own password) * items: * type: string - * example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ4... + * example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ4... * 400: * $ref: '#/components/responses/ValidationError' * 401: diff --git a/server/api/controllers/users/update-username.js b/server/api/controllers/users/update-username.js index 5a8d8f00..e51ea22a 100644 --- a/server/api/controllers/users/update-username.js +++ b/server/api/controllers/users/update-username.js @@ -11,6 +11,7 @@ * description: Updates a user's username. Users must provide a current password when updating their own username (unless they are SSO users with `oidcIgnoreUsername` enabled). Admins can update any user's username without the current password. * tags: * - Users + * operationId: updateUserUsername * parameters: * - in: path * name: id diff --git a/server/api/controllers/users/update.js b/server/api/controllers/users/update.js index 538f5160..f26cc43a 100755 --- a/server/api/controllers/users/update.js +++ b/server/api/controllers/users/update.js @@ -11,6 +11,7 @@ * description: Updates a user. Users can update their own profile, admins can update any user. * tags: * - Users + * operationId: updateUser * parameters: * - name: id * in: path @@ -40,6 +41,7 @@ * type: object * nullable: true * description: Avatar of the user (only null value to remove avatar) + * example: null * phone: * type: string * maxLength: 128 diff --git a/server/api/controllers/webhooks/create.js b/server/api/controllers/webhooks/create.js index 18476754..dc6ede26 100644 --- a/server/api/controllers/webhooks/create.js +++ b/server/api/controllers/webhooks/create.js @@ -11,6 +11,7 @@ * description: Creates a webhook. Requires admin privileges. * tags: * - Webhooks + * operationId: createWebhook * requestBody: * required: true * content: diff --git a/server/api/controllers/webhooks/delete.js b/server/api/controllers/webhooks/delete.js index edc5e5f0..121bf08b 100644 --- a/server/api/controllers/webhooks/delete.js +++ b/server/api/controllers/webhooks/delete.js @@ -11,6 +11,7 @@ * description: Deletes a webhook. Requires admin privileges. * tags: * - Webhooks + * operationId: deleteWebhook * parameters: * - name: id * in: path diff --git a/server/api/controllers/webhooks/index.js b/server/api/controllers/webhooks/index.js index b6998f61..6f360cc9 100644 --- a/server/api/controllers/webhooks/index.js +++ b/server/api/controllers/webhooks/index.js @@ -11,6 +11,7 @@ * description: Retrieves a list of all configured webhooks. Requires admin privileges. * tags: * - Webhooks + * operationId: getWebhooks * responses: * 200: * description: List of webhooks retrieved successfully diff --git a/server/api/controllers/webhooks/update.js b/server/api/controllers/webhooks/update.js index 81be8b0b..ecee20b2 100644 --- a/server/api/controllers/webhooks/update.js +++ b/server/api/controllers/webhooks/update.js @@ -11,6 +11,7 @@ * description: Updates a webhook. Requires admin privileges. * tags: * - Webhooks + * operationId: updateWebhook * parameters: * - name: id * in: path diff --git a/server/api/models/Action.js b/server/api/models/Action.js index aa1450ba..3623c49e 100755 --- a/server/api/models/Action.js +++ b/server/api/models/Action.js @@ -18,9 +18,13 @@ * type: object * required: * - id + * - boardId * - cardId + * - userId * - type * - data + * - createdAt + * - updatedAt * properties: * id: * type: string diff --git a/server/api/models/Attachment.js b/server/api/models/Attachment.js index c0512c63..f8417e23 100644 --- a/server/api/models/Attachment.js +++ b/server/api/models/Attachment.js @@ -19,9 +19,12 @@ * required: * - id * - cardId + * - creatorUserId * - type * - data * - name + * - createdAt + * - updatedAt * properties: * id: * type: string @@ -48,7 +51,7 @@ * name: * type: string * description: Name/title of the attachment - * example: Google Link + * example: Important Attachment * createdAt: * type: string * format: date-time diff --git a/server/api/models/BackgroundImage.js b/server/api/models/BackgroundImage.js index 84a51d2c..b6a07b4e 100644 --- a/server/api/models/BackgroundImage.js +++ b/server/api/models/BackgroundImage.js @@ -22,6 +22,8 @@ * - size * - url * - thumbnailUrls + * - createdAt + * - updatedAt * properties: * id: * type: string diff --git a/server/api/models/BaseCustomFieldGroup.js b/server/api/models/BaseCustomFieldGroup.js index c75c248d..40bd0f55 100755 --- a/server/api/models/BaseCustomFieldGroup.js +++ b/server/api/models/BaseCustomFieldGroup.js @@ -20,6 +20,8 @@ * - id * - projectId * - name + * - createdAt + * - updatedAt * properties: * id: * type: string diff --git a/server/api/models/Board.js b/server/api/models/Board.js index ed1502de..3ff9ca4b 100755 --- a/server/api/models/Board.js +++ b/server/api/models/Board.js @@ -21,6 +21,13 @@ * - projectId * - position * - name + * - defaultView + * - defaultCardType + * - limitCardTypesToDefaultOne + * - alwaysDisplayCardCreator + * - expandTaskListsByDefault + * - createdAt + * - updatedAt * properties: * id: * type: string @@ -41,23 +48,28 @@ * defaultView: * type: string * enum: [kanban, grid, list] + * default: kanban * description: Default view for the board * example: kanban * defaultCardType: * type: string * enum: [project, story] + * default: project * description: Default card type for new cards * example: project * limitCardTypesToDefaultOne: * type: boolean + * default: false * description: Whether to limit card types to default one * example: false * alwaysDisplayCardCreator: * type: boolean + * default: false * description: Whether to always display the card creator * example: false * expandTaskListsByDefault: * type: boolean + * default: false * description: Whether to expand task lists by default * example: false * createdAt: diff --git a/server/api/models/BoardMembership.js b/server/api/models/BoardMembership.js index 7c029fe3..cbc70075 100644 --- a/server/api/models/BoardMembership.js +++ b/server/api/models/BoardMembership.js @@ -22,6 +22,9 @@ * - boardId * - userId * - role + * - canComment + * - createdAt + * - updatedAt * properties: * id: * type: string diff --git a/server/api/models/Card.js b/server/api/models/Card.js index 5ef0fee9..e8a20615 100755 --- a/server/api/models/Card.js +++ b/server/api/models/Card.js @@ -20,8 +20,21 @@ * - id * - boardId * - listId + * - creatorUserId + * - prevListId + * - coverAttachmentId * - type + * - position * - name + * - description + * - dueDate + * - isDueCompleted + * - stopwatch + * - commentsTotal + * - isClosed + * - listChangedAt + * - createdAt + * - updatedAt * properties: * id: * type: string @@ -99,10 +112,12 @@ * example: 3600 * commentsTotal: * type: number + * default: 0 * description: Total number of comments on the card * example: 100 * isClosed: * type: boolean + * default: false * description: Whether the card is closed * example: false * listChangedAt: diff --git a/server/api/models/CardLabel.js b/server/api/models/CardLabel.js index 52162794..8cf41b58 100755 --- a/server/api/models/CardLabel.js +++ b/server/api/models/CardLabel.js @@ -20,6 +20,8 @@ * - id * - cardId * - labelId + * - createdAt + * - updatedAt * properties: * id: * type: string diff --git a/server/api/models/CardMembership.js b/server/api/models/CardMembership.js index bd9bb54e..f78dea9b 100755 --- a/server/api/models/CardMembership.js +++ b/server/api/models/CardMembership.js @@ -20,6 +20,8 @@ * - id * - cardId * - userId + * - createdAt + * - updatedAt * properties: * id: * type: string diff --git a/server/api/models/Comment.js b/server/api/models/Comment.js index c9ea7bf8..a2a8e7bd 100644 --- a/server/api/models/Comment.js +++ b/server/api/models/Comment.js @@ -19,7 +19,10 @@ * required: * - id * - cardId + * - userId * - text + * - createdAt + * - updatedAt * properties: * id: * type: string diff --git a/server/api/models/Config.js b/server/api/models/Config.js index 669fd4b4..131779ee 100644 --- a/server/api/models/Config.js +++ b/server/api/models/Config.js @@ -18,6 +18,7 @@ * type: object * required: * - version + * - oidc * properties: * version: * type: string diff --git a/server/api/models/CustomField.js b/server/api/models/CustomField.js index 56f3c910..ea34b980 100755 --- a/server/api/models/CustomField.js +++ b/server/api/models/CustomField.js @@ -18,9 +18,13 @@ * type: object * required: * - id + * - baseCustomFieldGroupId + * - customFieldGroupId * - position * - name * - showOnFrontOfCard + * - createdAt + * - updatedAt * properties: * id: * type: string diff --git a/server/api/models/CustomFieldGroup.js b/server/api/models/CustomFieldGroup.js index 491ba46e..1be84264 100755 --- a/server/api/models/CustomFieldGroup.js +++ b/server/api/models/CustomFieldGroup.js @@ -18,7 +18,13 @@ * type: object * required: * - id + * - boardId + * - cardId + * - baseCustomFieldGroupId * - position + * - name + * - createdAt + * - updatedAt * properties: * id: * type: string diff --git a/server/api/models/CustomFieldValue.js b/server/api/models/CustomFieldValue.js index f190b91c..8a65732c 100644 --- a/server/api/models/CustomFieldValue.js +++ b/server/api/models/CustomFieldValue.js @@ -22,6 +22,8 @@ * - customFieldGroupId * - customFieldId * - content + * - createdAt + * - updatedAt * properties: * id: * type: string diff --git a/server/api/models/Label.js b/server/api/models/Label.js index 13e89106..f2ad9ac5 100755 --- a/server/api/models/Label.js +++ b/server/api/models/Label.js @@ -20,7 +20,10 @@ * - id * - boardId * - position + * - name * - color + * - createdAt + * - updatedAt * properties: * id: * type: string diff --git a/server/api/models/List.js b/server/api/models/List.js index 32225324..ca103dd7 100755 --- a/server/api/models/List.js +++ b/server/api/models/List.js @@ -20,6 +20,11 @@ * - id * - boardId * - type + * - position + * - name + * - color + * - createdAt + * - updatedAt * properties: * id: * type: string diff --git a/server/api/models/Notification.js b/server/api/models/Notification.js index b8a288f6..2db4367b 100755 --- a/server/api/models/Notification.js +++ b/server/api/models/Notification.js @@ -19,11 +19,16 @@ * required: * - id * - userId + * - creatorUserId * - boardId * - cardId + * - commentId + * - actionId * - type * - data * - isRead + * - createdAt + * - updatedAt * properties: * id: * type: string @@ -63,10 +68,11 @@ * example: commentCard * data: * type: object - * description: Notification payload specific to the type + * description: Notification specific data (varies by type) * example: {"card": {"name": "Implement user authentication"}, "text": "This task is almost complete..."} * isRead: * type: boolean + * default: false * description: Whether the notification has been read * example: false * createdAt: diff --git a/server/api/models/NotificationService.js b/server/api/models/NotificationService.js index 1313364b..4a1999d6 100644 --- a/server/api/models/NotificationService.js +++ b/server/api/models/NotificationService.js @@ -18,8 +18,12 @@ * type: object * required: * - id + * - userId + * - boardId * - url * - format + * - createdAt + * - updatedAt * properties: * id: * type: string diff --git a/server/api/models/Project.js b/server/api/models/Project.js index a3345017..79342a4e 100755 --- a/server/api/models/Project.js +++ b/server/api/models/Project.js @@ -18,7 +18,15 @@ * type: object * required: * - id + * - ownerProjectManagerId + * - backgroundImageId * - name + * - description + * - backgroundType + * - backgroundGradient + * - isHidden + * - createdAt + * - updatedAt * properties: * id: * type: string diff --git a/server/api/models/ProjectManager.js b/server/api/models/ProjectManager.js index 5151f667..35a72e23 100644 --- a/server/api/models/ProjectManager.js +++ b/server/api/models/ProjectManager.js @@ -20,6 +20,8 @@ * - id * - projectId * - userId + * - createdAt + * - updatedAt * properties: * id: * type: string diff --git a/server/api/models/Task.js b/server/api/models/Task.js index 4d171ec5..fd47c306 100755 --- a/server/api/models/Task.js +++ b/server/api/models/Task.js @@ -19,8 +19,13 @@ * required: * - id * - taskListId + * - linkedCardId + * - assigneeUserId * - position * - name + * - isCompleted + * - createdAt + * - updatedAt * properties: * id: * type: string diff --git a/server/api/models/TaskList.js b/server/api/models/TaskList.js index 5d27f92b..8909400d 100644 --- a/server/api/models/TaskList.js +++ b/server/api/models/TaskList.js @@ -21,6 +21,10 @@ * - cardId * - position * - name + * - showOnFrontOfCard + * - hideCompletedTasks + * - createdAt + * - updatedAt * properties: * id: * type: string diff --git a/server/api/models/User.js b/server/api/models/User.js index 4cdedad3..68fbffee 100755 --- a/server/api/models/User.js +++ b/server/api/models/User.js @@ -18,10 +18,16 @@ * type: object * required: * - id - * - email * - role * - name + * - username + * - avatar + * - phone + * - organization * - termsType + * - isDeactivated + * - createdAt + * - updatedAt * properties: * id: * type: string @@ -76,7 +82,6 @@ * gravatarUrl: * type: string * format: uri - * nullable: true * description: Gravatar URL for the user (conditionally added if configured) * example: https://www.gravatar.com/avatar/abc123 * phone: @@ -149,24 +154,24 @@ * example: false * isDefaultAdmin: * type: boolean - * nullable: true * description: Whether the user is the default admin (visible only to current user or admin) * example: false * lockedFieldNames: * type: array + * description: List of fields locked from editing (visible only to current user or admin) * items: * type: string - * nullable: true - * description: List of fields locked from editing (visible only to current user or admin) * example: [email, password, name] * createdAt: * type: string * format: date-time + * nullable: true * description: When the user was created * example: 2024-01-01T00:00:00.000Z * updatedAt: * type: string * format: date-time + * nullable: true * description: When the user was last updated * example: 2024-01-01T00:00:00.000Z */ diff --git a/server/api/models/Webhook.js b/server/api/models/Webhook.js index 023f15a6..860da9d8 100644 --- a/server/api/models/Webhook.js +++ b/server/api/models/Webhook.js @@ -20,6 +20,11 @@ * - id * - name * - url + * - accessToken + * - events + * - excludedEvents + * - createdAt + * - updatedAt * properties: * id: * type: string @@ -40,24 +45,28 @@ * example: secret_token_123 * events: * type: array + * nullable: true + * description: List of events that trigger the webhook * items: * type: string - * description: List of events that trigger the webhook * example: [cardCreate, cardUpdate, cardDelete] * excludedEvents: * type: array + * nullable: true + * description: List of events excluded from the webhook * items: * type: string - * description: List of events excluded from the webhook * example: [userCreate, userUpdate, userDelete] * createdAt: * type: string * format: date-time + * nullable: true * description: When the webhook was created * example: 2024-01-01T00:00:00.000Z * updatedAt: * type: string * format: date-time + * nullable: true * description: When the webhook was last updated * example: 2024-01-01T00:00:00.000Z */ diff --git a/server/config/swagger.js b/server/config/swagger.js index f50a42ad..3717f3d3 100644 --- a/server/config/swagger.js +++ b/server/config/swagger.js @@ -24,6 +24,20 @@ module.exports = { description: 'Base path for API endpoints', }, ], + components: { + securitySchemes: { + bearerAuth: { + type: 'http', + scheme: 'bearer', + bearerFormat: 'JWT', + }, + }, + }, + security: [ + { + bearerAuth: [], + }, + ], }, apis: ['./api/controllers/**/*.js', './api/models/*.js', './api/responses/*.js'], };