api-simulator
Generate stateful mock APIs from OpenAPI specifications
All Skills in This Repository (11)
Pure Emerald Level Indicatorscounterfact-cli-runtime
Update Counterfact CLI runtime option handling, config resolution, and startup diagnostics.
counterfact-runtime-architecture
Evolve Counterfact runtime internals while preserving module boundaries and hot reload semantics.
counterfact-maintenance
Validates contributor PRs against repository conventions for tests, docs, and changesets.
counterfact-repo-basics
Orient teams in Counterfact repositories with standard install, build, test, and lint workflows.
counterfact-generator-internals
Modify TypeScript generator internals and OpenAPI parsing while preserving regeneration guarantees.
build-simulation
Generate a stateful API simulation scaffold from an OpenAPI spec.
context
Define and evolve stateful context logic in _.context.ts files with enforced unit tests.
route
Update route handlers to delegate business logic to context classes.
counterfact-repl
Interact with a Counterfact mock server Admin API to manipulate context state and proxy settings.
scenario
Seed and mutate Counterfact mock runtime context via reusable scenario modules.
counterfact
Modify routes, contexts, and scenarios in Counterfact API simulations.
Frequently Asked Questions
FAQPage SchemaHow to install api-simulator?โผ
Run `npx skills add counterfact/api-simulator --all -g -y` in your terminal to install all skills in this suite globally.
How to create a mock API from an OpenAPI spec?โผ
Counterfact turns any OpenAPI or Swagger document into a live local server with one command, generating route handlers and types automatically. Every endpoint works immediately with schema-valid responses.
Can I build a frontend before the backend is ready?โผ
Yes. Counterfact serves realistic, stateful mock endpoints from your API contract, so frontend work never has to wait for backend development to finish.
How to simulate API errors and edge cases?โผ
You can toggle failure flags like rate limiting or downtime through the REPL or scenario scripts, letting you test error handling without touching the real API.
Does Counterfact support hot reload and proxying?โผ
Yes. Route changes apply instantly without restarting, and you can selectively proxy specific paths to the real API while mocking everything else.
Related Repositories in Software Engineering
View All in Software Engineeringโopenclaw
Run a personal AI assistant across your devices and chat apps
superpowers
Gives coding agents a disciplined workflow from idea to merged code
react
AI agent skills for building, testing, and porting React core