Skip to content

Service response values are not unwrapped #64

Open
@boukeversteegh

Description

@boukeversteegh

As betterproto is aiming to support automatic (un)wrapping of well known types (google wrapper values), the service responses should also return the underlying values, instead of the wrapper objects.

syntax = "proto3";

import "google/protobuf/wrappers.proto";

// Tests that wrapped values can be used directly as return values

service Test {
    rpc GetDouble (Input) returns (google.protobuf.DoubleValue);
}

message Input {

}
response = TestStub(channel).get_double()

assert type(response) == float # fails!

Metadata

Metadata

Labels

bugSomething isn't workinghas testHas a (xfail) test that verifies the bugfix or featurelow prioritymediumMedium effort issue, can fit in a single PR

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions