You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+50-12Lines changed: 50 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,11 @@ This repository contains only the server wrapper functionality:
35
35
36
36
1.**Server** (`src/server.rs`) - Main server implementation that wraps DrasiLib
37
37
2.**API** (`src/api/`) - REST API implementation with OpenAPI documentation
38
+
-`v1/` - API version 1 handlers, routes, and OpenAPI spec
39
+
-`shared/` - Common handlers, error types, and response types shared across versions
40
+
-`version.rs` - API version constants and utilities
41
+
-`models/` - Data Transfer Objects (DTOs)
42
+
-`mappings/` - DTO to domain model conversions
38
43
3.**Builder** (`src/builder.rs`) - Builder pattern for server construction
39
44
4.**Main** (`src/main.rs`) - CLI entry point for standalone server
40
45
@@ -146,7 +151,7 @@ instances:
146
151
reactions: []
147
152
```
148
153
149
-
The REST API is exposed under `/instances/{instanceId}/...` for multi-instance access; the first configured instance also remains available on the legacy root routes for backward compatibility.
154
+
The REST API is exposed under `/api/v1/instances/{instanceId}/...` for multi-instance access; the first configured instance is also accessible via convenience routes at `/api/v1/sources`, `/api/v1/queries`, and `/api/v1/reactions`.
150
155
151
156
**Important**: Sources and reactions are plugins that must be provided programmatically or via the configuration file's tagged enum format. Queries can also be defined via configuration files.
152
157
@@ -238,19 +243,52 @@ server.run().await?;
238
243
239
244
## API Endpoints
240
245
241
-
The server exposes a REST API on port 8080 by default:
246
+
The server exposes a versioned REST API on port 8080 by default. All API endpoints use URL-based versioning with the `/api/v1/` prefix.
242
247
243
-
- `GET /health`- Health check
244
-
- `GET /openapi.json`- OpenAPI specification
245
-
- `GET /swagger-ui/`- Interactive API documentation
0 commit comments