mirror of
https://github.com/nicotsx/zerobyte.git
synced 2025-12-10 12:10:51 +01:00
feat: system optional capabilities
This commit is contained in:
28
apps/server/src/modules/system/system.dto.ts
Normal file
28
apps/server/src/modules/system/system.dto.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { type } from "arktype";
|
||||
import { describeRoute, resolver } from "hono-openapi";
|
||||
|
||||
export const capabilitiesSchema = type({
|
||||
docker: "boolean",
|
||||
});
|
||||
|
||||
export const systemInfoResponse = type({
|
||||
capabilities: capabilitiesSchema,
|
||||
});
|
||||
|
||||
export type SystemInfoDto = typeof systemInfoResponse.infer;
|
||||
|
||||
export const systemInfoDto = describeRoute({
|
||||
description: "Get system information including available capabilities",
|
||||
tags: ["System"],
|
||||
operationId: "getSystemInfo",
|
||||
responses: {
|
||||
200: {
|
||||
description: "System information with enabled capabilities",
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: resolver(systemInfoResponse),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user