Jonas Platte
f818b53ca1
Make conversions from Ruma types to http types generic
...
So users can select the Body type that makes the most sense for them.
2021-04-23 13:26:10 +02:00
Jonas Platte
c1693569f1
api: Replace bytes::Buf by AsRef<u8> for reading
...
This allows us to switch back to serde_json::from_slice instead of
serde_json::from_reader, because the latter is significantly slower.
See https://github.com/serde-rs/json/issues/160
2021-04-13 22:12:16 +02:00
Jonas Platte
b122dcc135
api: Introduce OutgoingResponse trait
2021-04-12 20:38:22 +02:00
Jonas Platte
2ac020173b
api: Introduce IncomingResponse trait
2021-04-12 20:38:22 +02:00
Jonas Platte
345d0cf990
api-macros: Allow ruma_api! invocation without request / response
2021-04-05 14:49:40 +02:00
Jonas Platte
5562a23aaa
Move Raw, Outgoing and all macro code from ruma-common to ruma-serde
2020-11-28 03:45:39 +01:00
Jonas Platte
8ccf0f128b
Normalize formatting of empty curly braces
2020-11-27 23:07:32 +01:00
Vincent Lee
d36d005b97
Change requires_authentication: bool
to authentication: AuthScheme
2020-09-18 16:28:51 +02:00
Devin Ragotzy
a6c1b8f0bd
Parse and emit attributes connected to the request/response defs in ruma_api macro
2020-08-14 00:01:19 +02:00
Devin Ragotzy
71e537d123
Move move-value test decl into logical mods for each
2020-07-29 08:50:08 -04:00
Devin Ragotzy
47b6adb524
Add tests for ruma_api! macro ensuring request/response generation ok
2020-07-28 18:55:02 -04:00
Devin Ragotzy
f00bad3895
Add try_build test testing new type body fields are declared last
2020-07-28 17:13:33 -04:00
skim
b260a13d4b
move and rename ruma_events::json::EventJson to ruma_common::raw::Raw
2020-07-16 07:31:36 -07:00
Ragotzy.devin
214c1b681f
Add guard in ruma_api! macro for invalid characters in path
...
Returns a compiler error if any non ASCII characters are found. Add
trybuild test for invalid path characters.
2020-07-02 16:27:49 +02:00
Devin R
ff2cbc282b
Add trybuild tests for the ruma_api! macro
2020-07-01 21:27:47 +02:00