Fitgap mock API
Every response here is derived from the OpenAPI definition, not hand-written fixtures.
curl https://api.fitgap.org/v1/targets \ -H "Authorization: Bearer anything"
Docs: docs.fitgap.org · Source: github.com/jloor/fitgap
Two behaviours are simulated: a target id beginning tgt_fail makes POST /targets/{id}/analyses return 409 gate_failed unless the body sets overrideGate: true; and POST /gaps/{id}/excavations always resolves the gap.
Failing on purpose
Most integration time is spent on the bad days, so they are reproducible here. Send X-Fitgap-Simulate with 500, 502, 429, 401, slow or timeout — or use an id ending _500, _429, _slow, _timeout when you cannot set headers.
- Requests need
Authorization: Bearer <any-token>; a missing or malformed header returns401. - Bodies are validated against the schema. A
422lists every offending field by JSON Pointer, e.g./sourceUrl. - Unknown ids return
404rather than someone else’s example. - Collections take
?limit=and?cursor=, and return apagination.nextcursor plus aLinkheader. - Reads carry an
ETag; send it back asIf-None-Matchfor a304. - Every response carries
X-Request-Id, echoed into error bodies. Send your own and it is preserved.