Changed specification to rise an error when inserting with a negative index. Added new scenario to check this condition
This commit is contained in:
+3
-2
@@ -209,7 +209,7 @@ field must be a json scaped string.
|
||||
]
|
||||
```
|
||||
* **Sample Call**: `$ curl $KAPOW_URL/routes`
|
||||
* **Notes**: Currently all routes are returned; in the future, a filter may be
|
||||
* **Notes**: Currently all routes are returned; in the future, a filter may be
|
||||
accepted.
|
||||
|
||||
|
||||
@@ -314,10 +314,11 @@ A new id is created for the appended route so it can be referenced later.
|
||||
```
|
||||
* **Notes**:
|
||||
* Route numbering starts at zero.
|
||||
* When `index` is not provided or is less than `0` the route will be inserted
|
||||
* When `index` is not provided or is `0` the route will be inserted
|
||||
first, effectively making it index `0`.
|
||||
* Conversely, when `index` is greater than the number of entries on the route
|
||||
table, it will be inserted last.
|
||||
* Finally, when `index` is less than `0` a 422 error is raised.
|
||||
* A successful request will yield a response containing all the effective
|
||||
parameters that were applied.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user