{"openapi":"3.0.0","servers":[{"description":"API Marketplace api - mocking example api","url":"https://virtserver.swaggerhub.com/HMCTS-DTS/api-cp-crime-echo/0.0.2"}],"info":{"title":"API Marketplace - echo api","description":"API Marketplace api - simple example","version":"0.0.2","contact":{"email":"no-reply@hmcts.com"},"license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"}},"paths":{"/":{"get":{"description":"Root endpoint","operationId":"getRoot","tags":["root"],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"string","example":"Hello"}}}}}}},"/echo":{"get":{"description":"Echo query parameters back as a JSON object","operationId":"getEcho","tags":["echo"],"parameters":[{"in":"query","name":"echo_data","description":"Query parameters to echo back","required":false,"schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"form","explode":true,"example":{"greeting":"hello"}}],"responses":{"200":{"description":"Echo of the supplied query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EchoResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"description":"Echo the JSON request body back in the response","operationId":"createEcho","tags":["echo"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EchoRequest"}}}},"responses":{"200":{"description":"Echo of the request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EchoResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"description":"Echo the JSON request body back in the response","operationId":"updateEcho","tags":["echo"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EchoRequest"}}}},"responses":{"200":{"description":"Echo of the request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EchoResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"description":"Delete echo resource","operationId":"deleteEcho","tags":["echo"],"responses":{"200":{"description":"Resource deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EchoDeleteResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/today":{"get":{"description":"Returns the current server date and time as an ISO 8601 date-time string.","operationId":"getToday","tags":["today"],"responses":{"200":{"description":"Current server date and time","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TodayResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"EchoRequest":{"type":"object","description":"Free-form JSON payload to echo back","additionalProperties":true,"example":{"greeting":"hello"}},"EchoResponse":{"type":"object","description":"Echoed content of the request (query parameters or body)","additionalProperties":true,"example":{"greeting":"hello"}},"EchoDeleteResponse":{"type":"object","required":["message"],"properties":{"message":{"type":"string","example":"deleted"}},"example":{"message":"deleted"}},"TodayResponse":{"type":"object","required":["dateTime"],"properties":{"dateTime":{"type":"string","format":"date-time","description":"Current server date and time in ISO 8601 (yyyy-MM-ddTHH:mm:ssZ)","example":"2026-05-18T16:15:00Z"}},"example":{"dateTime":"2026-05-18T16:15:00Z"}},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"details":{"type":"object","additionalProperties":true,"description":"Additional error context"},"timestamp":{"type":"string","format":"date-time"},"traceId":{"type":"string","description":"Unique identifier for error tracing"}},"example":{"error":"INTERNAL_SERVER_ERROR","message":"An unexpected error occurred","details":{},"timestamp":"2026-01-01T00:00:00Z","traceId":"abc-123-def-456"}}}}}