How can I quickly map all API endpoints in a legacy project with no documentation?

0
13
Asked By CleverPineapple23 On

I've just taken over a 5-year-old legacy project, and there's absolutely no API documentation available. There's no Swagger or OpenAPI, no Postman collections, and the frontend has a bunch of hardcoded URLs. While I could trace every endpoint manually, that would take way too long.

I'm looking for some fast and reliable methods to generate API documentation from what I have. I've heard from some developers that using packet-capture tools like mitmproxy, Fiddler, and Proxyman can help you record all HTTP traffic and then import that data into platforms like Apidog or Postman to create organized API documentation.

Has anyone had experience with this on an older service? Did it work out, or was it more trouble than it's worth? I'm curious about how DevOps or infrastructure teams tackle undocumented backend systems in practice.

5 Answers

Answered By NerdyKnight75 On

Check out Autoswagger! It can automatically generate Swagger documentation from your existing code. It might be a quick win for you!

Answered By TechyTurtle92 On

You might want to give GitHub Copilot a try! It can help you navigate through the code and suggest documentation.

Answered By CuriousCoder88 On

Have you tried using LLMs like ChatGPT? They can assist in creating documentation based on existing code.

CodeWhisperer11 -

Just be cautious with the output. Expect around 80% accuracy. You might find that static analysis tools give you deeper insights.

Answered By LegacyHunter41 On

If you have any monitoring tools in place, look for server requests categorized by endpoint. It could give you a clear view of the API structure.

Answered By DocumentationDude33 On

Consider adding Swagger directly to your project. It helps auto-generate a list of endpoints and their inputs. A solid way to kickstart your docs!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.