- Added @elysiajs/swagger dependency to package.json for API documentation. - Removed the old bed router and replaced it with a new history router. - Created a new state router to manage WebSocket connections and state updates. - Implemented a comprehensive state management system with the StateManager service. - Introduced AlarmManagement and BedService services for handling alarms and sensor readings. - Established a new MQTT service for managing MQTT connections and subscriptions. - Created an AlarmStateStore to manage volatile alerts and their states. - Defined FrontendState types for structured state management and WebSocket messaging.
19 lines
No EOL
434 B
TypeScript
19 lines
No EOL
434 B
TypeScript
import swagger from "@elysiajs/swagger";
|
|
import Elysia from "elysia";
|
|
|
|
const swaggerElysia = new Elysia()
|
|
swaggerElysia.use(swagger({
|
|
path: '/api/docs',
|
|
documentation: {
|
|
info: {
|
|
title: "Siwat System API Template",
|
|
description: "API documentation",
|
|
version: "1.0.0",
|
|
},
|
|
tags: [
|
|
// Define your tags here
|
|
],
|
|
},
|
|
}))
|
|
|
|
export default swaggerElysia; |