Add a query_map field to ruma_api! lifetime test

This commit is contained in:
Devin Ragotzy 2020-08-06 09:48:39 -04:00 committed by Jonas Platte
parent c980644d77
commit 2beaf450a3

View File

@ -70,7 +70,7 @@ mod full_request_response {
ruma_api::ruma_api! { ruma_api::ruma_api! {
metadata: { metadata: {
description: "Does something.", description: "Does something.",
method: GET, method: POST,
name: "no_fields", name: "no_fields",
path: "/_matrix/my/endpoint/:thing", path: "/_matrix/my/endpoint/:thing",
rate_limited: false, rate_limited: false,
@ -84,6 +84,7 @@ mod full_request_response {
pub thing: &'a str, pub thing: &'a str,
#[ruma_api(header = CONTENT_TYPE)] #[ruma_api(header = CONTENT_TYPE)]
pub stuff: &'a str, pub stuff: &'a str,
pub more: OtherThing<'t>,
} }
response: { response: {
@ -121,8 +122,8 @@ mod full_request_response_with_query_map {
request: { request: {
#[ruma_api(query_map)] #[ruma_api(query_map)]
// pub abc: &'a [(&'a str, &'a str)], // pub abc: &'a [(&'a str, &'a str)], // TODO This does not impl Deserialize
pub abc: &'a [(String, String)], pub abc: Vec<(String, String)>,
#[ruma_api(path)] #[ruma_api(path)]
pub thing: &'a str, pub thing: &'a str,
#[ruma_api(header = CONTENT_TYPE)] #[ruma_api(header = CONTENT_TYPE)]