/
Alex_Ural
/
opencode
Обзор
Документация
Войти
/
Alex_Ural
/
opencode
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
packages/protocol/src/groups/health.ts
14 строк
511 B
Kit Langton
refactor(protocol): extract server contracts (#33708)
25 июн 2026, 05:15
Не верифицирован
25 июн 2026, 05:15
56a37c3
Код
Авторство
О чём код?
import { Schema } from "effect" import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi" export const HealthGroup = HttpApiGroup.make("server.health").add( HttpApiEndpoint.get("health.get", "/api/health", { success: Schema.Struct({ healthy: Schema.Literal(true) }), }).annotateMerge( OpenApi.annotations({ identifier: "v2.health.get", summary: "Check server health", description: "Check whether the API server is ready to accept requests.", }), ), )