Ralph Bisschops
Ralph Bisschops
> I'm pretty sure #[get] is defining a type which implements something like Into and the warning is generated by that impl. Yeah the macro is using it internally somewhere....
I'm not sure what you mean. But I think you mean something like this: https://github.com/GREsau/okapi/blob/5cb59b3fddcf24294b4c6110882d89a68eaf01c1/examples/special-types/src/main.rs#L26 This way you can directly change the HTTP status. If you instead want to use...
You get that error because there should be an argument `body` in the handler/function. See: https://rocket.rs/v0.4/guide/requests/#body-data > To indicate that a handler expects body data, annotate it with `data =...
I would have to look into this more closely. Maybe soon, don't know yet. But maybe using `r#async` will work for you in this case. ```rust #[derive(FromForm, JsonSchema, Debug)] struct...
So the problem is that the `extensions` field does not preserve the order correctly?
If you use rocket you can catch general errors using: https://api.rocket.rs/v0.4/rocket/struct.Catcher.html Note that the code below will NOT use this as it already handles the error case. ```rust #[derive(Serialize, Deserialize)]...
If you just need 1 for all `get` and 1 for all `post`, just create 2 error types. (`GetBackendError` and `PostBackendError`) If you need true custom responses I would consider...
> @ralpha also, thanks for the reference to your code, lots for me to learn there! The ApiObject trait / ApiPage idea looks very interesting/convenient. Have you considered turning that...
You are already on the right track. You can just add the paths to the custom spec: ```rust fn custom_openapi_spec() -> OpenApi { use indexmap::indexmap; use rocket_okapi::okapi::openapi3::*; use rocket_okapi::okapi::schemars::schema::*; OpenApi...
Also found some false negatives while looking at some creates. For example (from `png` p.o.v.): ``` Functions Expressions Impls Traits Methods Dependency 0/0 0/0 0/0 0/0 0/0 :) png 0.16.7...