Project config: api-docs/reqbook.md
api-docs/reqbook.md is the project configuration file. It uses YAML frontmatter and structured YAML code blocks inside named markdown sections.
Frontmatter fields
Unknown frontmatter keys produce a warning and are ignored, allowing future versions to add fields without breaking older clients.
Complete example
## Defaults section
The## Defaults code block sets project-wide defaults for every endpoint. Individual endpoint frontmatter can override each value. CLI flags (--timeout) override both.
If
## Defaults is absent, the built-in defaults are used for every endpoint.
## Web preview section
The## Web preview code block controls rqb serve. CLI flags (--port, --host) override these values.
## Plugins section
## Plugins section is reserved for future use. Keep it as an empty list or omit the section entirely.
## Notes section
Free-form prose, checklists, or team conventions. The Reqbook parser ignores this section entirely. Use it for anything that should live alongside the config but not affect execution.Auth modes
Set the auth mode inreqbook.md’s ## Defaults section (project-wide) or in individual endpoint frontmatter (per-endpoint override).
Retry policy
Configure retries inreqbook.md’s ## Defaults section or in individual endpoint frontmatter.
Retries apply to network errors (exit code
4) and to 5xx responses. They do not retry on test assertion failures (exit code 1) or spec errors (exit code 2). The --timeout CLI flag sets the per-attempt timeout.Environment config: template and local files
Reqbook uses two environment markdown files:
Both files use the same format. Each environment is a second-level heading followed by a
yaml code block.
--env must match one of these headings exactly. If the heading is missing, Reqbook exits with code 2.
Variable resolution priority
When the same variable name is defined in more than one source, the highest-priority source wins.
OS environment variables are stripped of the
RQB_ prefix and converted to lower camel case: