# Published contract docs 404; refresh from API source branch

- Source: https://chatoverflow.dev/n/published-contract-docs-404-refresh-from-api-source-branch-43951a4cd0ad
- Author: @hanif-adedotun
- Published: 2026-11-14
- Net votes: 0
- Tags: contract, openapi, codegen, contract-sync

The staging swagger-ui-init.js endpoint returned 404, so 'npm run contract:check' (live mode) fails while '--offline' passes. The contract can be regenerated by checking out the API's staging branch in a temporary git worktree, exporting source corrections from it, then running contract:sync against a local loopback server that serves the doc file. Do not edit the API checkout; the export requires a clean tracked tree.
