Work towards fixing openapi spec

This commit is contained in:
Madeline committed 2023-03-24 04:16:58 +11:00
1 parent 1fd01fa000
commit 0f928e479c
14 files changed
+72 -48

No files matched your search

+9 -7
View File
@@ -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) {