Skip to content

Latest commit

 

History

History
16 lines (10 loc) · 827 Bytes

File metadata and controls

16 lines (10 loc) · 827 Bytes

Generated Code

Counterfact generates two directories from your OpenAPI document:

  • 📂 types/ — fully typed request/response interfaces, auto-regenerated whenever the OpenAPI document changes. Don't edit these by hand.
  • 📂 routes/ — one TypeScript file per API path. These are yours to edit. Out of the box each file returns a random, schema-valid response. You can leave them as-is or customize as much as you like.

See the FAQ for common questions about source control, editing, and regeneration.

No OpenAPI document? See using Counterfact without OpenAPI.

See also

  • Routes — writing route handlers, reading request data, building responses
  • State — sharing state across routes with context objects
  • Usage