From 3e5cea289c7b6e6edde0c6435edc290b3dc64096 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sun, 11 Oct 2020 13:22:57 +0200 Subject: [PATCH] Improve consistency in declared field order of media endpoints --- ruma-client-api/src/r0/media/create_content.rs | 8 ++++---- ruma-client-api/src/r0/media/get_content_thumbnail.rs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ruma-client-api/src/r0/media/create_content.rs b/ruma-client-api/src/r0/media/create_content.rs index 9916b49f..416eaf18 100644 --- a/ruma-client-api/src/r0/media/create_content.rs +++ b/ruma-client-api/src/r0/media/create_content.rs @@ -13,6 +13,10 @@ ruma_api! { } request: { + /// The file contents to upload. + #[ruma_api(raw_body)] + pub file: Vec, + /// The name of the file being uploaded. #[ruma_api(query)] #[serde(skip_serializing_if = "Option::is_none")] @@ -21,10 +25,6 @@ ruma_api! { /// The content type of the file being uploaded. #[ruma_api(header = CONTENT_TYPE)] pub content_type: Option<&'a str>, - - /// The file contents to upload. - #[ruma_api(raw_body)] - pub file: Vec, } response: { diff --git a/ruma-client-api/src/r0/media/get_content_thumbnail.rs b/ruma-client-api/src/r0/media/get_content_thumbnail.rs index 7a654911..06cd305f 100644 --- a/ruma-client-api/src/r0/media/get_content_thumbnail.rs +++ b/ruma-client-api/src/r0/media/get_content_thumbnail.rs @@ -59,13 +59,13 @@ ruma_api! { } response: { - /// The content type of the thumbnail. - #[ruma_api(header = CONTENT_TYPE)] - pub content_type: Option, - /// A thumbnail of the requested content. #[ruma_api(raw_body)] pub file: Vec, + + /// The content type of the thumbnail. + #[ruma_api(header = CONTENT_TYPE)] + pub content_type: Option, } error: crate::Error