mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-22 19:43:16 +00:00
Work towards fixing openapi spec
This commit is contained in:
14 files changed
+72
-48
No files matched your search
+9
-7
@@ -85,13 +85,15 @@ function apiRoutes() {
|
||||
.map((x) => ({ name: x }));
|
||||
|
||||
specification.components = specification.components || {};
|
||||
specification.components.securitySchemes = {
|
||||
bearer: {
|
||||
type: "http",
|
||||
scheme: "bearer",
|
||||
description: "Bearer/Bot prefixes are not required.",
|
||||
specification.components.securitySchemes = [
|
||||
{
|
||||
bearer: {
|
||||
type: "http",
|
||||
scheme: "bearer",
|
||||
description: "Bearer/Bot prefixes are not required.",
|
||||
},
|
||||
},
|
||||
};
|
||||
];
|
||||
|
||||
routes.forEach((route, pathAndMethod) => {
|
||||
const [p, method] = pathAndMethod.split("|");
|
||||
@@ -109,7 +111,7 @@ function apiRoutes() {
|
||||
return x.test(path);
|
||||
})
|
||||
) {
|
||||
obj.security = [{ bearer: true }];
|
||||
obj.security = [{ bearer: [] }];
|
||||
}
|
||||
|
||||
if (route.body) {
|
||||
|
||||
Reference in new issue
Block a user