A tool for automatically converting mitmproxy captures to OpenAPI 3.0 specifications. This means that you can automatically reverse-engineer REST APIs

GitHub - alufers/mitmproxy2swagger

submited by
Style Pass
2022-05-12 14:00:09

A tool for automatically converting mitmproxy captures to OpenAPI 3.0 specifications. This means that you can automatically reverse-engineer REST APIs by just running the apps and capturing the traffic.

Capture the traffic by using the mitmproxy tool. I personally recommend using mitmweb, which is a web interface built-in to mitmproxy.

To configure your client to use the proxy exposed by mitm proxy, please consult the mitmproxy documentation for more information.

Please note that you can use an existing schema, in which case the existing schema will be extended with the new data. You can also run it a few times with different flow captures, the captured data will be safely merged.

<api_prefix> is the base url of the API you wish to reverse-engineer. You will need to obtain it by observing the requests being made in mimtproxy.

You should edit the schema file with a text editor and remove the ignore: prefix from the paths you wish to be generated. You can also adjust the parameters appearing in the paths.

Leave a Comment