Live data from Hacker News

Show HN: Mitmproxy2swagger – Automagically reverse-engineer REST APIs

github.com

21–30 of 87 posts

Re: Show HN: Mitmproxy2swagger – Automagically reverse-engineer REST APIs

#21
post #2

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.

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

#23
post #7

Almost 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

#24
post #18

little 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?

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).

Re: Show HN: Mitmproxy2swagger – Automagically reverse-engineer REST APIs

#25
post #23
post #7

Almost 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

Also https://github.com/anbuksv/avantation

Re: Show HN: Mitmproxy2swagger – Automagically reverse-engineer REST APIs

#27
post #21
post #2

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.

mitmproxy dev here, very awesome! :) This seems to be particularly useful to quickly generate clients for reverse-engineered APIs.

Swagger Editor dev which now works at Airbnb here. This is hilarious!

Re: Show HN: Mitmproxy2swagger – Automagically reverse-engineer REST APIs

#28
post #14

Earlier 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.

"...and we expect it to be free and open source as our budget for this is zero."

Re: Show HN: Mitmproxy2swagger – Automagically reverse-engineer REST APIs

#29
post #24
post #18

Earlier 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).

Short of “this requires oauth” I think you are right about openapi
Post reply on HN