From 4910600e6c176cdf2078e5a245dbf043375fc3e4 Mon Sep 17 00:00:00 2001 From: Maksim Eltyshev Date: Mon, 8 Sep 2025 17:41:43 +0200 Subject: [PATCH] chore: Add Swagger config --- server/api/models/Webhook.js | 4 ++-- server/config/swagger.js | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 server/config/swagger.js diff --git a/server/api/models/Webhook.js b/server/api/models/Webhook.js index e03407c9..5241716e 100644 --- a/server/api/models/Webhook.js +++ b/server/api/models/Webhook.js @@ -53,12 +53,12 @@ * type: string * format: date-time * description: When the webhook was created - * example: 2024-03-01T12:00:00.000Z + * example: 2024-01-01T00:00:00.000Z * updatedAt: * type: string * format: date-time * description: When the webhook was last updated - * example: 2024-03-02T15:30:00.000Z + * example: 2024-01-01T00:00:00.000Z */ const Events = { diff --git a/server/config/swagger.js b/server/config/swagger.js new file mode 100644 index 00000000..d3ecce84 --- /dev/null +++ b/server/config/swagger.js @@ -0,0 +1,23 @@ +/*! + * Copyright (c) 2024 PLANKA Software GmbH + * Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md + */ + +const version = require('../version'); + +module.exports = { + definition: { + openapi: '3.0.0', + info: { + version, + title: 'PLANKA API', + description: + 'API documentation for PLANKA - Real-time Collaborative Kanban Board Application', + license: { + name: 'Fair Use License', + url: 'https://github.com/plankanban/planka/blob/master/LICENSE.md', + }, + }, + }, + apis: ['./api/controllers/**/*.js', './api/models/*.js', './api/responses/*.js'], +};