Add basic support for maps
This commit is contained in:
@@ -48,7 +48,7 @@ if __name__ == "__main__":
|
||||
json_files = get_files(".json")
|
||||
|
||||
for filename in proto_files:
|
||||
print(f"Generatinng code for {os.path.basename(filename)}")
|
||||
print(f"Generating code for {os.path.basename(filename)}")
|
||||
subprocess.run(
|
||||
f"protoc --python_out=. {os.path.basename(filename)}", shell=True
|
||||
)
|
||||
|
||||
7
betterproto/tests/map.json
Normal file
7
betterproto/tests/map.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"counts": {
|
||||
"item1": 1,
|
||||
"item2": 2,
|
||||
"item3": 3
|
||||
}
|
||||
}
|
||||
5
betterproto/tests/map.proto
Normal file
5
betterproto/tests/map.proto
Normal file
@@ -0,0 +1,5 @@
|
||||
syntax = "proto3";
|
||||
|
||||
message Test {
|
||||
map<string, int32> counts = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user