mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-16 03:10:31 +01:00
defe6054b3
* Autodocument Swagger API with JSDocs on /v1/ endpoints for API access implement single-player API keys WIP Admin API Keys * Create new api keys as both single and multi-user * Add boot and telem * Complete Admin API * Complete endpoints dark mode swagger * update docs * undo debug * update docs and readme
22 lines
770 B
JavaScript
22 lines
770 B
JavaScript
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");
|
|
|
|
// 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);
|
|
}
|
|
|
|
module.exports = { developerEndpoints };
|