Wanted to show off my little project which helps whith reverse engneering APIs used by various apps. It takes HTTP traffic capturewd by mitmproxy and generates an OpenAPI specification for a given REST API. I have used it already on two apps and the results are good enough to write an alternative client or quickly automate some stuff.
Show HN: Mitmproxy2swagger – Automagically reverse-engineer REST APIs
21–30 of 87 posts
Re: Show HN: Mitmproxy2swagger – Automagically reverse-engineer REST APIs
#22Re: Show HN: Mitmproxy2swagger – Automagically reverse-engineer REST APIs
#23Almost exactly a fit against my idea[1] to generate OpenAPI from HAR files. Going to read through to see if I can add HAR support. [1]: https://github.com/captn3m0/ideas#openapi-specification-gene...
I was able to translate HAR to OpenAPI with this web site's free preview: https://www.apimatic.io/transformer/
I also see others are working on the same thing: https://github.com/dcarr178/har2openapi
Re: Show HN: Mitmproxy2swagger – Automagically reverse-engineer REST APIs
#24little bit off-topic, but do anybody know of something similar for soap/wsdl? I'm aware of soapui mock service.
Doesn't wsdl just expose the schema on the server?
Roughly speaking: WSDL is to XML web services as OpenAPI is to REST
They both model the API and message structure of an API. AFAICT WSDL goes a little farther in that you can declare message sequences (I might be giving short shrift to OpenAPI here).
Re: Show HN: Mitmproxy2swagger – Automagically reverse-engineer REST APIs
#25Almost exactly a fit against my idea[1] to generate OpenAPI from HAR files. Going to read through to see if I can add HAR support. [1]: https://github.com/captn3m0/ideas#openapi-specification-gene...
OpenAPI is just the latest version of swagger. Should not be hard to change. I was able to translate HAR to OpenAPI with this web site's free preview: https://www.apimatic.io/transformer/ I also see others are working on the same thing: https://github.com/dcarr178/har2openapi
Re: Show HN: Mitmproxy2swagger – Automagically reverse-engineer REST APIs
#26Re: Show HN: Mitmproxy2swagger – Automagically reverse-engineer REST APIs
#27Wanted to show off my little project which helps whith reverse engneering APIs used by various apps. It takes HTTP traffic capturewd by mitmproxy and generates an OpenAPI specification for a given REST API. I have used it already on two apps and the results are good enough to write an alternative client or quickly automate some stuff.
mitmproxy dev here, very awesome! :) This seems to be particularly useful to quickly generate clients for reverse-engineered APIs.
Re: Show HN: Mitmproxy2swagger – Automagically reverse-engineer REST APIs
#28Earlier quoted context omitted.
Totally, but you would need to do some manual cleanup and naming afterwards to make it more useful than just reading the source code. You could also for example use your integration tests if you have some to capture as much routes as possible.
of course the generated doc should be refined (e.g. filling missing types, error codes) but your lib would save us a lot of work and make the world a better place.
Re: Show HN: Mitmproxy2swagger – Automagically reverse-engineer REST APIs
#29Earlier quoted context omitted.
Doesn't wsdl just expose the schema on the server?
WSDL and OpenAPI/Swagger solve similar problems. Roughly speaking: WSDL is to XML web services as OpenAPI is to REST They both model the API and message structure of an API. AFAICT WSDL goes a little farther in that you can declare message sequences (I might be giving short shrift to OpenAPI here).