PRODUCT · API MODEL
A living model of what your API actually does.
model.json is the single source Jetic reads from and writes to. It records your routes, their middleware, their inputs and outputs, and the exact line of code each one came from — so every workflow step is anchored to reality.
WHAT THE MODEL HOLDS
Everything a test needs to know about an endpoint.
The model is intentionally explicit. Nothing is inferred at execution time, so a run can be reviewed before it ever touches a server.
Route identity
Method and path, including nested router prefixes and path parameters.
Middleware chain
Auth, validation, rate limits, parsers, and custom handlers in execution order.
Request contract
Body fields, types, required flags, formats, enums, and business constraints.
Response contract
Status codes, response fields, examples, and which outcomes enforce ownership.
Security schemes
Bearer, API key, cookie, and OAuth2 definitions, including the token producer.
Source provenance
The file and line for each handler, so the model can be traced back to code.
HOW IT STAYS CURRENT
Built by scan, refined by you.
The scanner gets you a complete first pass. The model is plain JSON, so you can fill gaps or correct details without waiting for a release.
1. Static scan
jetic scan reads tsconfig.json, resolves imports, and walks the Express router chain. It writes a first model with methods, paths, middleware, parameters, and source locations.
2. Review and enrich
Open the model in Jetic Studio or your editor. Add schemas, business constraints, security schemes, ownership rules, and response shapes that static analysis cannot infer on its own.
- Schemas can be added per endpoint or reused across a resource.
- Security schemes declare where the token comes from, so later steps can inject it automatically.
- Constraints such as minimum password length or required-if rules become reviewable data.
3. Change-aware updates
When jetic dev is running, the ChangeScanner records edited source files in changes.json. Before rescanning, Jetic reads only those files, updates the affected endpoints, and clears the change log.
4. Verify before you run
jetic_verify_model checks duplicate routes, unbound path parameters, invalid status codes, missing responses, dangling source links, and unknown security schemes. The model must pass before a workflow is simulated.
PROVENANCE
Every step can point back to a line of code.
When a workflow fails, the question is rarely just which request failed. It is which route, which handler, and which change introduced the behavior. Source links make that answer concrete.
- Endpoint rows carry file and line references
- Middleware entries keep their execution order
- Dangling source links are caught during verification
- The change scanner maps edits back to affected routes
NEXT
The model, one layer at a time.
MODEL FAQ
Frequently asked questions
Is model.json safe to edit by hand?
Yes. It is plain JSON with a stable shape. Studio and the MCP tools edit the same file, and jetic_verify_model catches structural mistakes before a run.
What happens when I add a new route?
Run jetic scan again. With merge mode, new routes are upserted and hand-added endpoints are kept. With overwrite mode, the endpoints array is replaced.
Does every route need a schema?
No. A route can be scanned and simulated with what is known. Schemas and constraints make validation stronger, but missing fields are reported as warnings rather than blocking every run.
Can the model reference files outside the project?
Source paths are resolved inside the project. Dangling links are reported by verification so the model does not silently point at a file that no longer exists.
Model once. Run anywhere.
Scan your routes, enrich the model where it matters, and let every workflow reuse the same source of truth.
Get started