2023-08-24 04:15:07 +02:00
|
|
|
const { useSwagger } = require("../../swagger/utils");
|
|
|
|
const { apiAdminEndpoints } = require("./admin");
|
|
|
|
const { apiAuthEndpoints } = require("./auth");
|
|
|
|
const { apiDocumentEndpoints } = require("./document");
|
|
|
|
const { apiSystemEndpoints } = require("./system");
|
|
|
|
const { apiWorkspaceEndpoints } = require("./workspace");
|
2024-06-18 01:24:41 +02:00
|
|
|
const { apiUserManagementEndpoints } = require("./userManagement");
|
2023-08-24 04:15:07 +02:00
|
|
|
|
|
|
|
// All endpoints must be documented and pass through the validApiKey Middleware.
|
|
|
|
// How to JSDoc an endpoint
|
|
|
|
// https://www.npmjs.com/package/swagger-autogen#openapi-3x
|
|
|
|
function developerEndpoints(app, router) {
|
|
|
|
if (!router) return;
|
|
|
|
useSwagger(app);
|
|
|
|
apiAuthEndpoints(router);
|
|
|
|
apiAdminEndpoints(router);
|
|
|
|
apiSystemEndpoints(router);
|
|
|
|
apiWorkspaceEndpoints(router);
|
|
|
|
apiDocumentEndpoints(router);
|
2024-06-18 01:24:41 +02:00
|
|
|
apiUserManagementEndpoints(router);
|
2023-08-24 04:15:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = { developerEndpoints };
|