diff options
| author | tv <tv@krebsco.de> | 2026-11-02 10:26:51 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-02 10:26:51 +0100 |
| commit | d54ac96f6acabb7fd39e0b642bf1cd919a6e82dd (patch) | |
| tree | 8f36f28cd7afb2dc2847d08b30ced9892ac3688d /docs | |
| parent | 9a73a89e5888df59bbdaff1279bd65e51264cd61 (diff) | |
api: add application/vnd.continuum.typed+json
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/openapi.yaml | 10 |
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`; |
