Skip to contents

Group selected read operations by behavior and propose one cassette scenario per group, plus docs example stubs for inputs no example supplies. Nothing is declared, and nothing is written into the project unless file names a new review file.

Usage

propose_testing(
  root,
  config = "specmill.yml",
  callbacks = new.env(parent = emptyenv()),
  file = NULL
)

Arguments

root

Explicit existing client root directory.

config

Project YAML path relative to root.

callbacks

Explicit environment containing named development callbacks.

file

Optional new path, relative to root and outside tests/, apis/, R/, man/ and inst/, where the proposal YAML is written for review. Existing files are never overwritten.

Value

Invisibly, a list with services (per service: proposed scenarios, operations holding docs.examples stubs, writes not proposed, and blocked routes with reasons) and yaml, the same proposal as reviewable text.

Details

Operations are grouped by source schema file, success response media and schema, request body media, pagination, batching, post-response scope, result formatter and hook chains. Routes already covered by a declared scenario, or declared unrecorded, are skipped. Each group's scenario uses the first member whose inputs resolve from an existing docs example or the schema; it lists the whole group as represents. When no member resolves, the proposal adds one docs example entry with null for each missing input after the operation's effective examples, and points the scenario at it. A scenario using an unfilled entry stays blocked. State-changing operations are listed but never proposed, because recording them needs record_write. Proposals are checked like declarations but are not declarations: they never count as coverage until reviewed and copied into the service testing file and docs.examples.