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

actix-prost: Support nested messages in query #25

Open
bragov4ik opened this issue Mar 29, 2024 · 0 comments
Open

actix-prost: Support nested messages in query #25

bragov4ik opened this issue Mar 29, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@bragov4ik
Copy link

It might be useful to have nested/complex messages, parts of which are specified in query.

prost-build seems to work with them well (the rust code is generated accordingly). However, actix-prost fails with

thread 'main' panicked at actix-prost-build/src/request.rs:75:13:
  some path fields were not found: [<field names>]

Example

Let's say we have the following protobuf:

...
message Foo {
  // some_scary_inner_details
  string inner = 1;
}

message Bar {
  // some_scary_inner_details
  string inner = 1;
}

message CreateSometingRequest {
  Foo foo = 1;
  Bar bar = 2;
}

service SomeService {
    rpc CreateSomething(CreateSometingRequest) returns (Something);
}

so the request message has 2 non-primitive fields.

The .yaml config:

...
http:
  rules:
  - selector: "foo.SomeService.CreateSomething"
    post: /service/{foo.inner}/{bar.inner}

Possible fix directions

seems relevant; not sure

@bragov4ik bragov4ik added the enhancement New feature or request label Mar 29, 2024
@bragov4ik bragov4ik changed the title Support nested messages in query actix-prost: Support nested messages in query Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant