chore: generate
This commit is contained in:
@@ -31,8 +31,7 @@ export const ControlPaths = {
|
||||
log: "/log",
|
||||
} as const
|
||||
|
||||
export const ControlApi = HttpApi.make("control")
|
||||
.add(
|
||||
export const ControlApi = HttpApi.make("control").add(
|
||||
HttpApiGroup.make("control")
|
||||
.add(
|
||||
HttpApiEndpoint.put("authSet", ControlPaths.auth, {
|
||||
|
||||
@@ -11,8 +11,7 @@ export const EventPaths = {
|
||||
event: "/event",
|
||||
} as const
|
||||
|
||||
export const EventApi = HttpApi.make("event")
|
||||
.add(
|
||||
export const EventApi = HttpApi.make("event").add(
|
||||
HttpApiGroup.make("event")
|
||||
.add(
|
||||
HttpApiEndpoint.get("subscribe", EventPaths.event, {
|
||||
|
||||
@@ -37,8 +37,7 @@ export const GlobalPaths = {
|
||||
upgrade: "/global/upgrade",
|
||||
} as const
|
||||
|
||||
export const GlobalApi = HttpApi.make("global")
|
||||
.add(
|
||||
export const GlobalApi = HttpApi.make("global").add(
|
||||
HttpApiGroup.make("global")
|
||||
.add(
|
||||
HttpApiEndpoint.get("health", GlobalPaths.health, {
|
||||
|
||||
@@ -113,8 +113,7 @@ export const PtyApi = HttpApi.make("pty")
|
||||
}),
|
||||
)
|
||||
|
||||
export const PtyConnectApi = HttpApi.make("pty-connect")
|
||||
.add(
|
||||
export const PtyConnectApi = HttpApi.make("pty-connect").add(
|
||||
HttpApiGroup.make("pty-connect")
|
||||
.add(
|
||||
HttpApiEndpoint.get("connect", PtyPaths.connect, {
|
||||
@@ -125,7 +124,8 @@ export const PtyConnectApi = HttpApi.make("pty-connect")
|
||||
OpenApi.annotations({
|
||||
identifier: "pty.connect",
|
||||
summary: "Connect to PTY session",
|
||||
description: "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
|
||||
description:
|
||||
"Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
|
||||
}),
|
||||
),
|
||||
)
|
||||
|
||||
@@ -80,7 +80,9 @@ function reflectedHttpApiRoutes() {
|
||||
|
||||
function openApiRouteKeys(spec: { paths: Record<string, Partial<Record<(typeof methods)[number], unknown>>> }) {
|
||||
return Object.entries(spec.paths)
|
||||
.flatMap(([path, item]) => methods.filter((method) => item[method]).map((method) => `${method.toUpperCase()} ${path}`))
|
||||
.flatMap(([path, item]) =>
|
||||
methods.filter((method) => item[method]).map((method) => `${method.toUpperCase()} ${path}`),
|
||||
)
|
||||
.sort()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user