mirror of
https://github.com/spacebarchat/server.git
synced 2026-08-22 12:00:18 +00:00
openapi: log entity responses
This commit is contained in:
+12
-1
@@ -190,12 +190,23 @@ function apiRoutes(missingRoutes) {
|
||||
console.log(
|
||||
`${bgRedBright(" ")}\x1b[5m${white("\x1b[48;5;208mWARN")}${bgRedBright(" ")}\x1b[0m\x1b[33m`,
|
||||
"Route",
|
||||
method,
|
||||
method.toUpperCase(),
|
||||
path,
|
||||
"missing response schema:",
|
||||
v.body,
|
||||
"\x1b[0m",
|
||||
);
|
||||
} else if (v.body.startsWith("API") && v.body !== "APIErrorResponse" && v.body !== "APIErrorOrCaptchaResponse") {
|
||||
missingResponseSchemaCount++;
|
||||
console.log(
|
||||
`${bgRedBright(" ")}\x1b[5m${white("\x1b[48;5;208mWARN")}${bgRedBright(" ")}\x1b[0m\x1b[33m`,
|
||||
"Route",
|
||||
method.toUpperCase(),
|
||||
path,
|
||||
"using entity response schema:",
|
||||
v.body,
|
||||
"\x1b[0m",
|
||||
);
|
||||
}
|
||||
} else
|
||||
obj.responses[k] = {
|
||||
|
||||
Reference in New Issue
Block a user