News for hackers. Stuff that matters.
Re:MitmProxy2Swagger: Automagically reverse-engineer REST APIs by asabla on Thursday January 02, 2025 @05:19AM (#42573253)
Why would you tho?

If you're working against an GraphQL based API, you should be able to pull a schema file. And use that to implement your own API.

All you would get from an Mitmproxy is example queries and mutations. With the additional complexity of extra tooling to stich together the schema file

Re:MitmProxy2Swagger: Automagically reverse-engineer REST APIs by jampekka on Thursday January 02, 2025 @05:31AM (#42573317)
Pulling the schema file can, and often is, disabled server side. And GraphQL APIs can, and often do, decline to serve other than persisted queries, and those can't be really inferred even with known schema.
Re:MitmProxy2Swagger: Automagically reverse-engineer REST APIs by notcrazylol on Friday January 03, 2025 @01:26AM (#42583094)
So I am working with a new company that has a ton of graphql queries. What I wanted to do was write an integration test for them in the fastest and easiest way possible.

I don't want to sit and read each query to identity where it is in the user flow. So I was thinking if I run this in the background and go through a happy flow, I can get the APIs in order and write an integration test.