A standalone Express mock server for Supplier API integration testing, allowing suppliers to validate their integrations without AWS access.
- The server starts from
index.js/expressServer.jsand loadsapi/openapi.yaml. - Incoming requests are validated against the OpenAPI contract before reaching handlers.
- Valid requests are routed to controller/service handlers that return canned responses from
data/examples/. - The sandbox runs on port 9000 by default (configurable in
config.js).
- OpenAPI spec: the sandbox uses
api/openapi.yamlto enforce request/response contract validation. - Swagger UI: available at
/api-docs/for interactive endpoint exploration. - Canned responses: JSON files in
data/examples/provide mock API data. - Docker:
Dockerfileenables containerised deployment for CI or supplier testing environments.
LetterService.listLettersrespects thelimitquery parameter by truncating the canned response array to simulate pagination.- This is an OpenAPI Generator-scaffolded project (CommonJS, not TypeScript). It does not share code with the Lambda implementations.
- No authentication is enforced; the authorization behaviour is not simulated.
- The OpenAPI spec in
sandbox/api/may diverge fromspecification/api/if not kept in sync during spec updates.
cd sandbox && npm install && npm startOr via Docker:
docker build -t supplier-api-sandbox sandbox/
docker run -p 9000:9000 supplier-api-sandbox