docs: every write example states its status; security explains sensitive columns and how to serve one

This commit is contained in:
2026-11-03 06:33:10 +01:00
parent a649a5c1ef
commit 540351a3c6
3 changed files with 61 additions and 1 deletions
+20
View File
@@ -56,6 +56,8 @@ POST /tags
[{ "id": 7, "name": "a" }, { "name": "b" }]
```
Answer: 400
```json
{ "error": "mixed_columns" }
```
@@ -68,6 +70,8 @@ POST /todos
{ "name": "book dentist", "status": "open", "pinned": false }
```
Answer: 400
```json
{ "error": "not_writable", "message": "pinned" }
```
@@ -101,6 +105,8 @@ A row still referenced by another is not deleted:
DELETE /tags/3
```
Answer: 409
```json
{ "error": "still_referenced" }
```
@@ -109,6 +115,8 @@ DELETE /tags/3
DELETE /todos/1
```
Answer: 405
```json
{ "error": "method_not_allowed" }
```
@@ -130,6 +138,8 @@ Answer: 200
DELETE /steps
```
Answer: 400
```json
{ "error": "filter_required" }
```
@@ -144,6 +154,8 @@ POST /tags
{ "id": 1, "name": "duplicate key" }
```
Answer: 409
```json
{ "error": "duplicate" }
```
@@ -154,6 +166,8 @@ POST /steps
{ "id": 9, "title": "Call the clinic", "todo_id": 99, "priority": 1, "due_on": "2026-04-01" }
```
Answer: 409
```json
{ "error": "reference_missing" }
```
@@ -170,6 +184,8 @@ POST /todos/3/complete
{ "note": "bought a new one" }
```
Answer: 200
```json
3
```
@@ -180,6 +196,8 @@ A function returning a set answers an array of its rows. File taxes belongs to A
POST /tags/home/todos
```
Answer: 200
```json
[
{ "id": 2, "name": "file taxes", "status": "open", "owner_id": 1, "estimate": 1, "pinned": true, "created_at": "2026-01-05T09:30:00+00:00" },
@@ -193,6 +211,8 @@ POST /todos/3/complete
{ "why": "too busy" }
```
Answer: 400
```json
{ "error": "unknown_argument", "message": "why" }
```