LEVEL 2 · BUILDER

API Tutorial Runner

Help a documentation author verify a sequence of HTTP examples. Parse explicit request blocks, substitute only declared variables from prior responses, and run against a local fixture or an opted-in test endpoint. Produce a source-linked report that exposes stale examples and lets an assistant propose a reviewed correction.

4 stages~8 hoursTypeScriptcore
YOU END UP WITH

Replayable request manifest, JUnit results and annotated tutorial HTML

WHY THESE LANGUAGES
  • TypeScript Typed local transformations and portable browser interfaces run with Node standard libraries.
PROJECT OUTLINE

API Tutorial Runner in 4 stages

Check that an API tutorial still works from its first request to its final result.

  1. Extract explicit requests from an authored tutorial

    extractRequests(markdown:string):RequestStep[]

    starter · ~2 hours · TypeScript

    Extract explicit requests from an authored tutorial
  2. Resolve typed variables across steps

    resolveValue(value:unknown,variables:Record<string,string|number|boolean>):unknown; captureVariables(body,declarations,previous?):Record<string,string|number|boolean>

    core · ~2 hours · TypeScript

    Resolve typed variables across steps
  3. Run bounded requests against a test service

    runTutorial(steps:RequestStep[],baseURL:string,options?):Promise<Receipt[]>

    core · ~2 hours · TypeScript

    Run bounded requests against a test service
  4. Export source-linked failures and correction proposals

    exportResults(steps,receipts):{junit,html,corrections}; acceptedCorrections(receipts,value):{id,line,proposal}[]

    stretch · ~2 hours · TypeScript

    Export source-linked failures and correction proposals

Build these projects first

All projects · Course catalog · Source on GitHub