AnWeber / vscode-httpyac

Quickly and easily send REST, Soap, GraphQL, GRPC, MQTT and WebSocket requests directly within Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=anweber.vscode-httpyac
MIT License
222 stars 20 forks source link

Best Practice #282

Closed davidsoles closed 1 month ago

davidsoles commented 1 month ago

I love this vscode extension, thanks. I was wondering, what is the best practice in terms of number of rest endpoints that can be added to a single http file? Is it better to have one http file per feature? 🤔

I'm just trying to keep things organized.

AnWeber commented 1 month ago

I can't give you a general recommendation. Depending on the service, a different structure may make sense. I have sometimes structured the files like CRUD (PUT => GET => PATCH, => DELETE) and executed them one after the other. In some cases, however, a create a test http file containing only one endpoint with several tests. I'm a fan of small files, so I avoid packing lots of requests into one file.

My current setup can be described as follows: