aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-02 10:26:51 +0100
committertv <tv@krebsco.de>2026-11-02 10:26:51 +0100
commit58d574166fef1246f367009546358703e16d7f7e (patch)
treea307cd78560058c45e32f18631191e0fd15c9ae1 /docs
parent74ced20c6013b7ced9ae14a41033f60239790f6a (diff)
api: add application/vnd.continuum.typed+json
Diffstat (limited to 'docs')
-rw-r--r--docs/openapi.yaml10
1 files changed, 7 insertions, 3 deletions
diff --git a/docs/openapi.yaml b/docs/openapi.yaml
index 5402389..36c3ddc 100644
--- a/docs/openapi.yaml
+++ b/docs/openapi.yaml
@@ -79,8 +79,9 @@ paths:
description: |
The value at the path, as JSON, or as `Accept` asks (`api.md`, Types): its
type's own media type for a scalar (`application/octet-stream` for bytes,
- `application/vnd.continuum.<type>`), or `text/plain` (strings unquoted,
- anything else as JSON). `Accept` is taken in its order; `406` if it names
+ `application/vnd.continuum.<type>`), typed JSON
+ (`application/vnd.continuum.typed+json`, which tags what plain JSON would show
+ as another type), or `text/plain` (strings unquoted, anything else as JSON). `Accept` is taken in its order; `406` if it names
nothing the value can be shown as. `application/json; timestamp-format=…` shows
timestamps as `rfc3339` (the default), `unix`, `unix-ms` or `http-date`.
Concurrent writes resolve as follows: concurrent maps merge, anything else
@@ -117,7 +118,10 @@ paths:
JSON maps and arrays become Automerge maps and lists; numbers become integers
when they fit, floats otherwise; strings are plain strings (not text objects).
- A scalar of another type is written as its media type (`api.md`, Types):
+ Typed JSON (`application/vnd.continuum.typed+json`) writes values of every
+ type, tagged (`{"$timestamp": …}`, `{"$bytes": …}`, `{"$uint": …}`,
+ `{"$counter": …}`, `{"$float": …}`, `{"$text": …}`, `{"$map": …}`).
+ A scalar of another type is also written as its media type (`api.md`, Types):
`application/octet-stream` (bytes), `application/vnd.continuum.int`, `.uint`,
`.float`, `.boolean`, `.counter` (decimal or `true`/`false`), or
`application/vnd.continuum.timestamp; format=rfc3339|unix|unix-ms|http-date`;