feat(control-api): add GET /__aimock/fixtures introspection endpoint - #407
Open
Ayush7614 wants to merge 1 commit into
Open
feat(control-api): add GET /__aimock/fixtures introspection endpoint#407Ayush7614 wants to merge 1 commit into
Ayush7614 wants to merge 1 commit into
Conversation
Returns the current number of loaded fixtures as { count }. Useful
for CI debugging, health checks, and verifying fixture loads after
dynamic POST /__aimock/fixtures adds or DELETE clears. The endpoint
is read-only, CORS-enabled, and respects inbound API-key auth like
the other control routes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Returns the current number of loaded fixtures as
{ count }.Why: The control API already allows dynamic fixture management via
POST /__aimock/fixtures(add) andDELETE /__aimock/fixtures(clear) and full resets, but had no read-only introspection. CI jobs, integration tests, and debugging sessions had no way to verify fixtures were loaded short of making a probe chat request.What:
GET /__aimock/fixtures→200 { count: number }AIMOCK_API_KEYSauth (same path as other/__aimock/*routes)Verified:
pnpm build && pnpm test src/__tests__/control-api.test.ts— 19 passedpnpm run format:check/pnpm run lint/pnpm run typecheckclean