-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Currently, mock data is regenerated on every request (array pools always, single objects unless config.cache is enabled), making it hard to test filtering/sorting/pagination consistently.
Changes needed:
- Data store: Cache both single object mocks and array pools on first request (always-on, independent of config.cache). Data stays stable across requests.
- POST /mock-reset: Clears the data store so everything regenerates fresh on the next requests. Returns a summary of what was cleared.
- Swagger UI "Rebuild Data" button: Inject custom JS into the Swagger UI that adds a button calling POST /mock-reset and reloading the page — useful when interfaces change or fresh data is needed.
- Swagger spec: Document the /mock-reset endpoint.
Affected files: src/core/cache.ts, src/core/router.ts, src/server.ts, src/core/swagger.ts
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels