From c404b71f378a6cd6b88c9621c994c18bd47e9a90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Tue, 14 May 2024 14:53:04 +0200 Subject: [PATCH] Add Matrix Content URI format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kévin Commaille --- data/api/client-server/content-repo.yaml | 6 ++++-- data/custom-formats.yaml | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/data/api/client-server/content-repo.yaml b/data/api/client-server/content-repo.yaml index 382b7c9f..e6d55b51 100644 --- a/data/api/client-server/content-repo.yaml +++ b/data/api/client-server/content-repo.yaml @@ -42,7 +42,8 @@ paths: properties: content_uri: type: string - format: uri + format: mx-mxc-uri + pattern: "^mxc:\\/\\/" description: The [`mxc://` URI](/client-server-api/#matrix-content-mxc-uris) to the uploaded content. examples: @@ -185,7 +186,8 @@ paths: properties: content_uri: type: string - format: uri + format: mx-mxc-uri + pattern: "^mxc:\\/\\/" description: |- The [`mxc://` URI](/client-server-api/#matrix-content-mxc-uris) at which the content will be available, once it is uploaded. diff --git a/data/custom-formats.yaml b/data/custom-formats.yaml index 53432232..7d52861f 100644 --- a/data/custom-formats.yaml +++ b/data/custom-formats.yaml @@ -42,6 +42,11 @@ mx-server-name: url: /appendices#server-name # no regex +mx-mxc-uri: + title: Matrix Content URI + url: /client-server-api#matrix-content-mxc-uris + # regex: "^mxc:\\/\\/" + uri: title: URI url: http://tools.ietf.org/html/rfc3986