A Fiddler extension that exports captured HTTP sessions to OpenAPI 3.0 YAML specification (Swagger format). This tool analyzes HTTP traffic captured by Fiddler and automatically generates comprehensive API documentation.
- Path Parameter Detection: Automatically identifies numeric IDs, UUIDs, MongoDB ObjectIds, and other dynamic path segments
- Parameter Type Inference: Determines parameter types (string, integer, boolean, etc.) from actual values
- Content Type Detection: Analyzes request bodies to determine content types
- JSON Schema Generation: Creates OpenAPI schemas from request/response JSON bodies
- Schema Merging: Combines multiple examples to create comprehensive schemas
- Format Detection: Identifies common formats (date-time, email, URI, etc.)
- Enum Detection: Recognizes limited value sets as enums
- Bearer Token Authentication: Detects Authorization: Bearer headers
- API Key Authentication: Identifies X-API-Key and custom API key headers
- Header Sanitization: Removes sensitive values while preserving structure
- Path Normalization: Groups similar endpoints (e.g.,
/users/123and/users/456β/users/{id}) - Method Consolidation: Combines multiple sessions of the same endpoint
- Response Code Aggregation: Documents all observed response codes
- Fiddler Classic (tested with Fiddler 4+)
- .NET Framework 4.7.2 or higher
- Download the latest release from the Releases page
- Extract the files to
%USERPROFILE%\Documents\Fiddler2\ImportExport\ - Restart Fiddler
- Clone this repository
- Build the project (see Building section)
- Copy the following files to
%USERPROFILE%\Documents\Fiddler2\ImportExport\:FiddlerToSwagger.dllNewtonsoft.Json.dllYamlDotNet.dll
- Restart Fiddler
- Capture Sessions: Use Fiddler to capture HTTP traffic from your API
- Select Sessions: Choose the sessions you want to export (tip: use filters to select API calls only)
- Export:
- Go to File β Export Sessions
- Select "Swagger YAML" from the format dropdown
- Choose your output filename (
.yamlor.openapi.yaml)
- Import: Use the generated YAML file with:
- Swagger Editor
- Postman (Import β OpenAPI)
- API documentation tools
- Code generation tools
The extension generates full OpenAPI 3.0 specifications including:
openapi: 3.0.3
info:
title: "Your API"
version: "1.0.0"
description: "Generated from Fiddler sessions"
servers:
- url: "https://api.example.com"
paths:
/users/{id}:
get:
summary: "Get user"
parameters:
- name: id
in: path
required: true
schema:
type: integer
responses:
200:
description: "Successful response"
content:
application/json:
schema:
type: object
properties:
# ... generated from actual responses- Visual Studio 2017 or later
- .NET Framework 4.7.2 SDK
- Fiddler Classic installed (for reference assemblies)
-
Clone the repository:
git clone https://github.com/Mancy/FiddlerToSwagger.git cd FiddlerToSwagger -
Restore NuGet packages:
cd workspace nuget restore -
Update Fiddler reference:
- Copy
Fiddler.exefrom your Fiddler installation to the project root - Or update the reference path in
FiddlerToSwagger.csproj
- Copy
-
Build the solution:
msbuild FiddlerToSwagger.sln /p:Configuration=Release
- Fiddler.exe: Reference assembly (not redistributed)
- Newtonsoft.Json 12.0.1: JSON processing and schema generation
- YamlDotNet 11.2.1: YAML serialization
- System.Web: For HTTP utility functions
- Filter Sessions: Export only API-related sessions for cleaner output
- Include Variety: Capture different response scenarios (success, error cases)
- Authentication: Include authenticated requests to capture security schemes
- Full CRUD: Capture GET, POST, PUT, DELETE operations for complete documentation
- Error Responses: Include 4xx and 5xx responses for comprehensive error documentation
- Check that all DLL files are in the ImportExport folder
- Restart Fiddler completely
- Check the Log tab for error messages
- Ensure .NET Framework 4.7.2+ is installed
- Ensure selected sessions contain valid HTTP traffic
- Check that sessions have response bodies for schema generation
- Try with a smaller subset of sessions first
- Check Fiddler's Log tab for detailed error messages
- Verify selected sessions contain API traffic (not web pages)
- Ensure sessions have JSON request/response bodies
- Check that the sessions completed successfully (not interrupted)
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests if applicable
- Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by the original FiddlerExportToPostman project
- Built with YamlDotNet for YAML serialization
- Uses Newtonsoft.Json for JSON processing
- Thanks to the Fiddler team for the extensible architecture
- Fiddler Classic - The HTTP debugging proxy
- OpenAPI Specification - API documentation standard
- Swagger Editor - Online OpenAPI editor
- Postman - API development platform