use mime-type application/jsonl to align with openapi 3.2

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Nicolas De Loof
2025-12-05 09:48:43 +01:00
committed by Sebastiaan van Stijn
parent b8093b76fb
commit aef5d996ce
10 changed files with 17 additions and 5 deletions

View File

@@ -17,6 +17,8 @@ keywords: "API, Docker, rcli, REST, documentation"
* `GET /info` now includes an `NRI` field. If the Node Resource Interface (NRI)
is enabled, this field contains information describing it.
* `GET /events` now also supports [`application/jsonl`](https://jsonlines.org/)
when negotiating content-type.
* Deprecated: The `POST /grpc` and `POST /session` endpoints are deprecated and
will be removed in a future version.

View File

@@ -10463,6 +10463,7 @@ paths:
operationId: "SystemEvents"
produces:
- "application/jsonl"
- "application/x-ndjson"
- "application/json-seq"
responses:

View File

@@ -10,9 +10,12 @@ const (
// MediaTypeJSON is the MIME-Type for JSON objects.
MediaTypeJSON = "application/json"
// MediaTypeNDJSON is the MIME-Type for Newline Delimited JSON objects streams.
// MediaTypeNDJSON is the MIME-Type for Newline Delimited JSON objects streams (https://github.com/ndjson/ndjson-spec).
MediaTypeNDJSON = "application/x-ndjson"
// MediaTypeJSONLines is the MIME-Type for JSONLines objects streams (https://jsonlines.org/).
MediaTypeJSONLines = "application/jsonl"
// MediaTypeJSONSequence is the MIME-Type for JSON Text Sequences (RFC7464).
MediaTypeJSONSequence = "application/json-seq"
)