Thank you for your interest in contributing to this project! This document provides guidelines and information for contributors.
- Visual Studio 2017 or later (Community edition is fine)
- .NET Framework 4.7.2 SDK
- Fiddler Classic installed on your system
- Git for version control
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/Mancy/FiddlerToSwagger.git cd FiddlerToSwagger -
Set up Fiddler reference:
- Copy
Fiddler.exefrom your Fiddler installation to the project root - Or update the reference path in
workspace/FiddlerToSwagger/FiddlerToSwagger.csproj
- Copy
-
Restore NuGet packages:
cd workspace nuget restore -
Build the project:
# Using batch script (Windows) ..\build.bat # Or using PowerShell ..\build.ps1 # Or manually msbuild FiddlerToSwagger.sln /p:Configuration=Debug
- Follow standard C# naming conventions
- Use meaningful variable and method names
- Add XML documentation comments for public methods and classes
- Keep methods focused and reasonably sized
- Use proper exception handling with specific exception types
- SessionAnalyzer.cs: Session parsing and endpoint analysis logic
- SchemaGenerator.cs: JSON schema generation from request/response bodies
- SwaggerSessionExporter.cs: Main export logic and Fiddler integration
- OpenApiModels.cs: OpenAPI specification model classes
- Always use try-catch blocks for operations that might fail
- Log errors using
System.Diagnostics.Debug.WriteLine()for debugging - Show user-friendly error messages via
MessageBox.Show()for critical errors - Allow partial failures when possible (e.g., skip invalid sessions, continue with others)
- Build the extension and ensure it loads in Fiddler
- Capture HTTP traffic from a real API or use test data
- Export sessions and verify the generated YAML is valid
- Import the YAML into Swagger Editor or Postman to verify correctness
- Various HTTP methods: GET, POST, PUT, DELETE, PATCH
- Different response codes: 200, 201, 400, 404, 500, etc.
- Authentication: Bearer tokens, API keys, no auth
- Path parameters: Numeric IDs, UUIDs, string identifiers
- Query parameters: Various types and combinations
- Request bodies: JSON objects, arrays, nested structures
- Response bodies: Different schemas for same endpoint
- Error conditions: Invalid JSON, network errors, large datasets
- Empty or null request/response bodies
- Very large JSON payloads
- Malformed JSON
- Special characters in URLs or headers
- Sessions with missing data
- Mixed content types
-
Create a feature branch from main:
git checkout -b feature/your-feature-name
-
Make your changes following the coding standards
-
Test thoroughly using various scenarios
-
Update documentation if needed (README, CHANGELOG, code comments)
-
Commit your changes with clear, descriptive messages:
git commit -m "Add support for OAuth2 authentication detection" -
Push to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request on GitHub with:
- Clear description of changes
- Screenshots/examples if applicable
- Test scenarios you've verified
- Any breaking changes or migration notes
Use clear, descriptive commit messages:
Add support for OAuth2 authentication detection
- Detect Authorization: Bearer tokens in request headers
- Generate appropriate security schemes in OpenAPI output
- Add sanitization for sensitive token values
- Update tests for authentication scenarios
- Fix export failures or crashes
- Improve error handling and user experience
- Correct schema generation issues
- Address compatibility problems
- New authentication schemes (OAuth2, custom headers)
- Additional parameter detection patterns
- Enhanced schema generation capabilities
- New export formats or options
- Performance improvements
- Improve README or other documentation
- Add code comments and examples
- Create tutorials or guides
- Update troubleshooting information
- Add test cases for edge scenarios
- Improve testing procedures
- Create automated tests (if feasible)
- Keep pull requests focused and reasonably sized
- Write clear descriptions of changes
- Respond promptly to review feedback
- Be open to suggestions and improvements
- Focus on functionality, security, and maintainability
- Check for proper error handling
- Verify that changes don't break existing functionality
- Ensure code follows project standards
- GitHub Issues: For bugs, feature requests, and general questions
- Discussions: For broader topics and community support
- Email: For sensitive security issues
- OpenAPI Specification
- Fiddler Extension Documentation
- YamlDotNet Documentation
- Newtonsoft.Json Documentation
By contributing to this project, you agree that your contributions will be licensed under the MIT License.