Restful routes for file and manual configuration #11574
Replies: 2 comments 1 reply
-
How would you distinguish which route to render on the client? That will be an initial I feel like you entirely left out the UI part for this proposal 😅 |
Beta Was this translation helpful? Give feedback.
-
@HerrBertling Yeah you're right, but this was not a intended as well thought-out proposal in any imagination of the phrase. Any edge cases should be discussed below naturally, but point taken. What are you imaging? I'm assuming the default would be a "GET" request and map to a corresponding route with a |
Beta Was this translation helpful? Give feedback.
-
As a method of organization or separation, I'd like to propose or discuss a request for a "restful routes and or restful file naming convention".
For example. One current option might look like this:
However, I'm proposing the following...
Scenario: GET all tasks
Given the tasks route is available
When I send a GET request to the "/tasks" endpoint
Then ...
Scenario: GET a specific task
Given the tasks route is available
When I send a GET request to the "/tasks/{id}" endpoint with a valid task id
Then ...
Scenario: POST a new task
Given the tasks route is available
When I send a POST request to the "/tasks" endpoint with the task data
Then ...
Scenario: PUT an existing task
Given the tasks route is available
And a task with id "{id}" exists
When I send a PUT request to the "/tasks/{id}" endpoint with updated task data
Then ...
Scenario: DELETE a task
Given the tasks route is available
And a task with id "{id}" exists
When I send a DELETE request to the "/tasks/{id}" endpoint
Then ...
I present this without any knowledge about how react-router actually works. However, extending what is possible with the routes table would be useful immediately useful.
Beta Was this translation helpful? Give feedback.
All reactions