Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to specify the payload type ? #499

Open
patrickelectric opened this issue Mar 29, 2023 · 1 comment
Open

How to specify the payload type ? #499

patrickelectric opened this issue Mar 29, 2023 · 1 comment

Comments

@patrickelectric
Copy link
Contributor

patrickelectric commented Mar 29, 2023

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
Copy link
Collaborator

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants