diff options
| author | tv <tv@krebsco.de> | 2026-10-30 20:34:47 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-30 20:34:47 +0100 |
| commit | cd58210790188aecce672864020c33f997b76525 (patch) | |
| tree | 74240d407b8e85ab0fc48888b94cbc9d03418f78 /docs/openapi.yaml | |
| parent | bf460a528b70f46ecd39f9311d85629d6b392b82 (diff) | |
add support to insert values at list index
Diffstat (limited to 'docs/openapi.yaml')
| -rw-r--r-- | docs/openapi.yaml | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/docs/openapi.yaml b/docs/openapi.yaml index 5ccafb8..09d0bc6 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -129,6 +129,54 @@ paths: description: Writing failed. '503': description: Node is not ready. + post: + tags: [Store] + summary: Insert into a list + description: | + Inserts the value (as `PUT` takes it) into the list at the path: at `index`, + the items from there on moving up one, or at the end without one (or with + `-1`). One request is one Automerge change. To add a key to a map, `PUT` it. + parameters: + - name: index + in: query + required: false + description: Where, from 0 to the list's length (that's the end); `-1` is the end too. + schema: + type: integer + minimum: -1 + requestBody: + required: true + content: + application/json: + schema: {} + text/plain: + schema: + type: string + responses: + '201': + description: Inserted, and where. + content: + application/json: + schema: + type: object + required: [index] + properties: + index: + type: integer + '400': + description: Invalid path, index, malformed JSON or invalid UTF-8. + '401': + $ref: '#/components/responses/Unauthorized' + '403': + description: As for `PUT`. + '404': + description: Nothing at this path. + '409': + description: Not a list there, or the index is past its end (the message says which, and the length). + '415': + description: Content-Type is neither `application/json` nor `text/plain` (absent means JSON). + '503': + description: Node is not ready. delete: tags: [Store] summary: Delete a value |
