-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Hi,
When I'm trying to use https://github.com/mwitkow/go-proto-validators, I got a bug.
put simply, look at following protofile.
syntax = "proto3";
package pkgname;
message A{
B b = 1;
message B {
string c = 2;
}
}
And try compile using protoc
with retool,
$ retool do protoc --proto_path=${GOPATH}/src:. --twirp_out=. --twirp_dart_out=package_name=pkgname:./dart_client --go_out=. ./rpc/protobuf/service.proto
I got this code,
import 'dart:convert';
class A {
A(
this.b,);
B b;
factory A.fromJson(Map<String,dynamic> json) {
return new A(
new B.fromJson(json),
);
}
Map<String,dynamic>toJson() {
var map = new Map<String, dynamic>();
map['b'] = b.toJson();
return map;
}
@override
String toString() {
return json.encode(toJson());
}
}
It seems, not define message B
in message A
.
Thanks.
Metadata
Metadata
Assignees
Labels
No labels