Skip to main content
Scans your codebase for API calls and adds any undocumented endpoints to the contract.

Usage

Options

boolean
Also infer request payload schemas.
string
Use a pre-configured extraction pattern. One of py, php, go, rb, js, ax.
regex
Custom regex for URL extraction.
string[]
File extensions to scan (for example, .py .rb).
string[]
Glob patterns to ignore (for example, venv dist).
string[]
Custom API wrapper function names.

Examples

Provenance and inference metadata

Every extraction records provenance (the file, line, and column of each call site) and field-level metadata (inferred vs confirmed, source value, and confidence) on the endpoint entry:
bazable.config.json
Use bazable review to render this as a human-readable audit report with flags for fields that need confirmation.

Accuracy notes

  • HTML script blocks: line numbers in provenance are computed against the whole HTML file, not the inner <script> block, so they point straight to the call site in your editor.
  • Cross-block variables: payloads declared as a variable in one <script> block and used in another are resolved. Bazable collects variable definitions across all blocks in a file before matching them to API calls.
  • New endpoints are seeded with schema_status: "unverified" so they show up in bazable inspect until you confirm the schema.
Run bazable inspect after extraction to validate that your code still matches the contract, and bazable review to audit which inferred fields are low confidence.