Defining endpoints in the Todo API
It’s advisable to start as simple as possible in creating a minimal API. After all, the name minimal API connotes simplicity. This isn’t just simplicity for simplicity’s sake though. For now, our API only needs to cover one area: todo items. Sure, the scope might expand further in the future, and minimal APIs can still be crafted in such a way that they are expandable and therefore somewhat future-proofed, but until more requirements become apparent (for example, assigning to-do items to users, adding to-do items to specific projects, etc.), the aim is minimalism. With this in mind, we will, for now, keep our endpoints in Program.cs.
We should now ask ourselves a simple question: What do I want to do in this API?
By this, I mean the actions that the API will need to facilitate. For example, fetching todo items, updating todo items, deleting todo items, and so on.
In understanding the verbs that are part of the actions...