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 | a29a38db0ad7fc8d42a533145c8a489d97702fb5 (patch) | |
| tree | ae1689804484d2aceabf106bb82cd4f0fcf97b36 /docs/openapi.yaml | |
| parent | caf212f916ce8fb31d7dba8bbe6d537092d324d5 (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 |
