Enhance API services with validation and error handling improvements
- Integrated Zod validation schemas across various API routes to ensure input integrity and improve error handling. - Updated `mapping-service`, `orchestrator`, `packet-service`, and `webhook-service` to utilize validation middleware for request parameters and bodies. - Improved error handling in webhook management, packet generation, and compliance routes to provide clearer feedback on request failures. - Added new validation schemas for various endpoints, enhancing overall API robustness and maintainability. - Updated dependencies in `package.json` to include the new validation library.
This commit is contained in:
@@ -2,11 +2,12 @@
|
||||
"name": "@emoney/validation",
|
||||
"version": "1.0.0",
|
||||
"description": "Schema validation utilities for eMoney API",
|
||||
"main": "schema-validator.js",
|
||||
"types": "schema-validator.d.ts",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"dependencies": {
|
||||
"ajv": "^8.12.0",
|
||||
"ajv-formats": "^2.1.1"
|
||||
"ajv-formats": "^2.1.1",
|
||||
"zod": "^3.22.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.10.0",
|
||||
|
||||
Reference in New Issue
Block a user