feat(generator): handle Any fields with Value or Struct - #16377
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the discovery-to-proto generator to map the JSON schema 'any' type to google.protobuf.Value (and google.protobuf.Struct for additional properties) instead of google.protobuf.Any. This includes updating the type resolution logic, adding the necessary protobuf imports, and updating the corresponding unit tests. There are no review comments, and I have no feedback to provide.
17cf135 to
48c4379
Compare
| package google.cloud.cpp.compute.v1; | ||
|
|
||
| import "google/protobuf/any.proto"; | ||
| import "google/protobuf/struct.proto"; |
There was a problem hiding this comment.
This import is unnecessary and is the cause for the changes in the generated C++ compute code. Let's update the generator to only add this import when needed.
2cc2895 to
a451c1a
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #16377 +/- ##
=======================================
Coverage 92.29% 92.29%
=======================================
Files 2244 2244
Lines 211631 211700 +69
=======================================
+ Hits 195332 195398 +66
- Misses 16299 16302 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
a451c1a to
2509790
Compare
No description provided.