44 lines
901 B
TypeScript
44 lines
901 B
TypeScript
import type { OpenAPIV3_1 } from "openapi-types";
|
|
|
|
export const statusSpec: OpenAPIV3_1.PathsObject = {
|
|
"/api/stats": {
|
|
get: {
|
|
summary: "Server Status",
|
|
description: "Checks the status of the server.",
|
|
tags: ["System"],
|
|
responses: {
|
|
"200": {
|
|
description: "Stats from the server",
|
|
content: {
|
|
"application/json": {
|
|
schema: {
|
|
type: "object",
|
|
properties: {
|
|
status: {
|
|
type: "string",
|
|
format: "ok",
|
|
example: "ok",
|
|
},
|
|
uptime: {
|
|
type: "number",
|
|
format: "3454.34",
|
|
example: 3454.34,
|
|
},
|
|
memoryUsage: {
|
|
type: "string",
|
|
format: "Heap: 11.62 MB / RSS: 86.31 MB",
|
|
},
|
|
sqlServerStats: {
|
|
type: "number",
|
|
format: "442127",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|