{"openapi":"3.0.3","info":{"title":"SlowDown API","version":"1.0.0","description":"Configurable delay endpoints: `/{unit}/{value}`. The server waits for the requested duration, then responds.\n\n**Production (canonical):** `https://www.delayasaservice.com` — the apex host redirects to `www` when Nginx is set up that way.\n\n**Limits:** `ms` ≤ 300,000 (5 min), `s` ≤ 300 (5 min), `m` ≤ 5 (5 min). Values above the max are clamped.\n\n**Query:** `body` — plain-text response instead of JSON; `status` — override HTTP status.\n\n**Headers** (on success): `X-Delay-Ms`, `X-Delay-Unit`, `X-Delay-Value`, `X-Delay-Clamped`, `X-Method`."},"servers":[{"url":"/","description":"This server"}],"tags":[{"name":"Delay","description":"Delay-then-respond endpoints"}],"paths":{"/{unit}/{value}":{"parameters":[{"name":"unit","in":"path","required":true,"description":"Time unit for the delay.","schema":{"type":"string","enum":["ms","s","m"]}},{"name":"value","in":"path","required":true,"description":"Duration in the chosen unit (clamped to server max per unit).","schema":{"type":"integer","minimum":1}},{"name":"body","in":"query","required":false,"description":"If set, the response body is this plain text (any status you set still applies).","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"Override HTTP status code (e.g. 418).","schema":{"type":"integer"}}],"get":{"tags":["Delay"],"summary":"Delay (GET)","description":"Default response status **200** unless `?status=` is set.","responses":{"200":{"$ref":"#/components/responses/DelayJsonOrText"},"400":{"$ref":"#/components/responses/BadRequest"}}},"post":{"tags":["Delay"],"summary":"Delay (POST)","description":"Default response status **201** unless `?status=` is set. JSON or text body may be echoed in `received_body` when using JSON responses.","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}},"text/plain":{"schema":{"type":"string"}}}},"responses":{"200":{"$ref":"#/components/responses/DelayJsonOrText"},"201":{"$ref":"#/components/responses/DelayJsonOrText"},"400":{"$ref":"#/components/responses/BadRequest"}}},"put":{"tags":["Delay"],"summary":"Delay (PUT)","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}},"text/plain":{"schema":{"type":"string"}}}},"responses":{"200":{"$ref":"#/components/responses/DelayJsonOrText"},"400":{"$ref":"#/components/responses/BadRequest"}}},"patch":{"tags":["Delay"],"summary":"Delay (PATCH)","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}},"text/plain":{"schema":{"type":"string"}}}},"responses":{"200":{"$ref":"#/components/responses/DelayJsonOrText"},"400":{"$ref":"#/components/responses/BadRequest"}}},"delete":{"tags":["Delay"],"summary":"Delay (DELETE)","description":"Default **204** with no body unless `?body=` is set (then body and content type follow `body` / `status` rules).","responses":{"200":{"$ref":"#/components/responses/DelayJsonOrText"},"204":{"description":"No content (default when `body` query is omitted)"},"400":{"$ref":"#/components/responses/BadRequest"}}},"head":{"tags":["Delay"],"summary":"Delay (HEAD)","description":"No response body; delay headers still apply.","responses":{"200":{"description":"Headers only"},"400":{"$ref":"#/components/responses/BadRequest"}}}}},"components":{"schemas":{"DelaySuccess":{"type":"object","required":["ok","method","requested","resolved","delay_ms","clamped"],"properties":{"ok":{"type":"boolean","example":true},"method":{"type":"string","example":"GET"},"requested":{"type":"object","properties":{"unit":{"type":"string"},"value":{"type":"integer"}}},"resolved":{"type":"object","properties":{"unit":{"type":"string"},"value":{"type":"integer"}}},"delay_ms":{"type":"integer","example":500},"clamped":{"type":"boolean"},"received_body":{}}},"ErrorBody":{"type":"object","properties":{"error":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}}},"responses":{"DelayJsonOrText":{"description":"JSON success payload, or plain text when `?body=` is used","headers":{"X-Delay-Ms":{"schema":{"type":"string"}},"X-Delay-Unit":{"schema":{"type":"string"}},"X-Delay-Value":{"schema":{"type":"string"}},"X-Delay-Clamped":{"schema":{"type":"string"}},"X-Method":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DelaySuccess"}},"text/plain":{"schema":{"type":"string"}}}},"BadRequest":{"description":"Invalid unit or value","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}}