paperclip-rs / paperclip

WIP OpenAPI tooling for Rust.
Apache License 2.0
873 stars 115 forks source link

How to specify the payload type ? #499

Open patrickelectric opened 1 year ago

patrickelectric commented 1 year ago

From my code:

#[api_v2_operation]
/// Send a MAVLink message for the desired vehicle
pub fn mavlink_post(
    data: web::Data<MAVLinkVehicleArcMutex>,
    _req: HttpRequest,
    bytes: web::Bytes,
) -> HttpResponse {

The bytes field does not show on the swagger api.

tiagolobocastro commented 1 year ago

Seems that there's an "empty" implementation of the traits for web::Bytes:

core/src/v2/actix.rs
251:impl_empty!(HttpRequest, HttpResponse, Bytes, Payload);