Menu
Terms of ServicePrivacy PolicyContact

Mitmproxy To Swagger

A tool for automatically converting mitmproxy captures to OpenAPI 3.0 specifications.

Key Features

  • Reverse-engineer REST APIs by capturing network traffic
  • Supports mitmproxy flow files and browser HAR exports
  • Generates OpenAPI 3.0 specification documents
  • Provides options for adding examples and headers to API documentation

Two-Pass Process

Pass 1: Generate Path Templates

Run the tool with your traffic file and API base URL. This generates an x-path-templates section with all discovered paths prefixed by ignore:.

Edit Schema

Remove ignore: from paths you want to include:

x-path-templates:
  - /users/{id}        # ✓ Include
  - ignore:/internal   # ✗ Skip

Pass 2: Generate Endpoints

Run the tool again with the same inputs but specify your edited file as the Existing OpenAPI Schema. It will generate full endpoint descriptions for paths without ignore:.

Notes:

  • Use Include Examples and Include Headers options with caution (may expose sensitive data)
Loading...
File upload