{ "info": { "description": "Documentation for the Easy Fixer API", "title": "API Documentation", "version": "1.0.0" }, "openapi": "3.1.1", "servers": [ { "description": "Local Server", "url": "http://localhost:4000/api/v1" }, { "description": "Production Server", "url": "" } ], "paths": { "/health/check": { "get": { "tags": ["API Health"], "summary": "Check if the server and database are running", "responses": { "200": { "description": "Both server and database are operational", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HealthCheckResponse" } } } }, "500": { "description": "Server or database is not operational" } } } }, "/health/write-delete": { "post": { "tags": ["API Health"], "summary": "Check database write and delete operations", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HealthWriteDeleteRequest" } } } }, "responses": { "200": { "description": "Database write and delete operations are working correctly", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HealthWriteDeleteResponse" } } } }, "500": { "description": "Database operations failed" } } } } }, "components": { "schemas": { "HealthCheckResponse": { "type": ["object"], "properties": { "data": { "type": ["object"], "properties": { "db": { "type": ["string"], "enum": ["up", "down"] } }, "required": ["db"] }, "message": { "type": ["string"] }, "success": { "default": true, "type": ["boolean"] } }, "required": ["data"], "description": "Health check status", "example": { "data": { "db": "up" }, "message": "OK", "success": true } }, "HealthWriteDeleteRequest": { "type": ["object"], "properties": { "email": { "type": ["string"], "format": "email" } }, "description": "Data required for health write-delete test", "example": { "email": "test@example.com" } }, "HealthWriteDeleteResponse": { "type": ["object"], "properties": { "data": { "type": ["object"], "properties": { "email": { "type": ["string"], "format": "email" }, "id": { "type": ["number"] }, "timeStamp": { "type": ["string"] } }, "required": ["id", "timeStamp"] }, "message": { "type": ["string"] }, "success": { "default": true, "type": ["boolean"] } }, "required": ["data"], "description": "Database write/delete operation status", "example": { "data": { "email": "test@example.com", "id": 1, "timeStamp": "2023-12-01T12:00:00.000Z" }, "message": "OK", "success": true } } } }, "tags": [] }