News for hackers. Stuff that matters.
Re:Show HN: I gave my API a JSON homepage by Dementor430 on Wednesday February 26, 2025 @05:30AM (#43182487)
Whats the point of doing this? I am curious now
Re:Show HN: I gave my API a JSON homepage by nathan_f77 on Wednesday February 26, 2025 @03:39PM (#43187954)
It's just an easter egg in case someone accidentally clicks on api.docspring.com or sends an API request without a path. I thought it would be more fun than a generic 404 error like this:

    {
      "status": "error",
      "error": "Unrecognized request URL (GET: /)
    }
Re:Show HN: I gave my API a JSON homepage by eszed on Saturday March 01, 2025 @01:50AM (#43216649)
That's pretty darn cool. I can see all of your services and endpoints without having to click through a bunch of menus in a gui, and discover some I might not have thought to ask for on my own - like "There's a PostMan collection? Great!". Nice idea.