The latest Visual Studio 2022 preview got a cool feature, "Endpoints Explorer" - You can see all the web endpoints in the solution and generate requests (new .http file) as well.
Since it is still in preview, you need to enable it first. Here is a quick screencast on how to enable and use it:
Read the official announcement blog