Tool

har-to-openapi

TypeScript library and CLI that infers OpenAPI 3.0 or 3.1 documents from HAR captures of HTTP traffic, loosely based on har2openapi. Requests are grouped into one document per domain, with options to turn IDs in paths into parameters, infer query, form and JSON body schemas from observed values, and merge several captures into the same operations. Optional settings extract reusable component schemas, keep multiple redacted examples, mark fields required only when every sample contains them, attach per-field observation counts as evidence and apply an OpenAPI Overlay so hand-written names and corrections survive regeneration.

Requirements & limits

  • Reviewed at main commit 432e096 from 2026-09-07, tagged v3.0.1 and published to npm the same day; v3.0.0, released a day earlier, added capture merging, reusable schemas, overlays, redaction, reports and requiredness evidence. Node.js 22.19.0+ is required; it installs from npm as a library or runs as the har-to-openapi command. CI tests Node 24 and the latest Node on Linux, macOS and Windows.
  • Input is one or more HAR files the user records, plus optional JSON or YAML configuration and overlay files. Without --multi-spec the CLI returns only the first domain's document. --validate and --strict check the result locally, and a conversion report lists counts and diagnostics for filtered entries, parse failures and schema fallbacks.
  • The README states that observations describe finite captures and that a field present in every capture does not establish an API contract, so requirements should be confirmed with the API owner and recorded in an overlay. Endpoints, parameters and responses absent from the captures do not appear, and the default requiredness setting keeps the earlier legacy behavior.
  • Generated documents copy captured values as examples unless examples are turned off or a redact list masks them; the README presents redaction as a step before sharing, and the reviewed commit closed further redaction gaps. Convert only traffic you are authorized to capture and analyze.
  • MIT. Nothing was installed and no captures were converted.

About this entry

Type
Tool
Category
Website analysis tools
Relationship
Foundation tool
Targets
Website

Sources reviewed

The description was reviewed against primary sources. This does not establish runtime testing, security auditing or verified compatibility.

Report an outdated entry Suggest a translation fix

Primary sources

  1. README.md GitHub · jonluca/har-to-openapi · Revision 432e096
  2. package.json GitHub · jonluca/har-to-openapi · Revision 432e096
  3. src/config.ts GitHub · jonluca/har-to-openapi · Revision 432e096
  4. .github/workflows/test.yml GitHub · jonluca/har-to-openapi · Revision 432e096
  5. LICENSE GitHub · jonluca/har-to-openapi · Revision 432e096
  6. https://github.com/jonluca/har-to-openapi/releases/tag/v3.0.1
  7. https://github.com/jonluca/har-to-openapi/releases/tag/v3.0.0
  8. https://www.npmjs.com/package/har-to-openapi/v/3.0.1

More in Websites

All 37 entries in Websites