Friday, March 17, 2023

Visual Studio 2022: Web API Endpoint Explorer

In this post, let's have a look at this nice feature that is available in Visual Studio 2022 and that is Web API Endpoint Explorer. I am on Visual Studio 2022 version 17.6.0 Preview 2.0 and I am not really sure when this was introduced, but if you have the latest Visual Studio 2022 Preview, you should be able to try this out.

This feature is wrapped inside a feature flag which you need to enable by going to Tools -> Options -> Environment -> Preview Features and selecting Web API Endpoint Explorer.
Enable Web API Endpoint Explorer
Now you can find this window in View -> Other Windows -> Endpoints Explorer. And you can find this only while you are in a compatible project (API Project).
Endpoints Explorer
I have clicked on Endpoints Explorer on a simple Minimal API project.
Endpoints Explorer
And look at that. My endpoints are displayed nicely. From the window, I can directly open an endpoint in the code editor and I can even generate a request (using .http Files, read more: Visual Studio 2022: Sending HTTP Requests with .http Files)

That's pretty neat, isn't it.

Hope this helps.

Happy Coding.

Regards,
Jaliya

No comments:

Post a Comment