Refactor API contracts to Zod, zod-to-openapi, and Scalar.

Replace hand-written OpenAPI and Swagger UI with schema-driven docs at /api-docs and Zod validation on request bodies.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Mauricio Barragan
2026-06-11 00:04:12 -06:00
co-authored by Cursor
parent b5ff33d716
commit f4def0c214
13 changed files with 788 additions and 812 deletions
+13 -5
View File
@@ -27,18 +27,26 @@
"name": "arb-pulse",
"version": "1.0.0",
"dependencies": {
"@asteasolutions/zod-to-openapi": "^8.5.0",
"@scalar/express-api-reference": "^0.8.48",
"express": "^4.21.2",
"swagger-ui-express": "^5.0.1",
"tsx": "^4.19.2",
"ws": "^8.18.0"
"ws": "^8.18.0",
"zod": "^4.4.3"
},
"devDependencies": {
"@eslint/js": "^9.18.0",
"@types/express": "^4.17.21",
"@types/node": "^22.10.5",
"@types/swagger-ui-express": "^4.1.8",
"@types/ws": "^8.5.13",
"openapi-types": "^12.1.3",
"typescript": "^5.7.3"
"eslint": "^9.18.0",
"eslint-plugin-react-hooks": "^5.1.0",
"globals": "^15.14.0",
"husky": "^9.1.7",
"lint-staged": "^16.4.0",
"prettier": "^3.8.3",
"typescript": "^5.7.3",
"typescript-eslint": "^8.26.0"
},
"engines": {
"node": ">=20"