Skip to content

feat(generator): handle Any fields with Value or Struct - #16377

Open
colinmoy wants to merge 1 commit into
googleapis:mainfrom
colinmoy:feat-generator-any-struct-value
Open

feat(generator): handle Any fields with Value or Struct#16377
colinmoy wants to merge 1 commit into
googleapis:mainfrom
colinmoy:feat-generator-any-struct-value

Conversation

@colinmoy

Copy link
Copy Markdown
Contributor

No description provided.

@colinmoy
colinmoy requested a review from a team as a code owner August 24, 2026 20:53

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@colinmoy
colinmoy force-pushed the feat-generator-any-struct-value branch from 17cf135 to 48c4379 Compare August 24, 2026 22:39
package google.cloud.cpp.compute.v1;

import "google/protobuf/any.proto";
import "google/protobuf/struct.proto";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@colinmoy
colinmoy force-pushed the feat-generator-any-struct-value branch from 2cc2895 to a451c1a Compare August 25, 2026 20:38
@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.29%. Comparing base (e014d65) to head (2509790).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@colinmoy
colinmoy force-pushed the feat-generator-any-struct-value branch from a451c1a to 2509790 Compare August 25, 2026 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants