Skip to content

refactor(sidekick/parser): emit api.Map for maps - #7864

Open
coryan wants to merge 1 commit into
googleapis:mainfrom
coryan:refactor-sidekick-map
Open

coryan wants to merge 1 commit into
googleapis:mainfrom
coryan:refactor-sidekick-map

Conversation

@coryan

@coryan coryan commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Update the Protobuf, OpenAPI, and Discovery parsers to emit first-class api.Map entities and TypezMap fields, and remove Message.IsMap and legacy map-message helpers.

Fixes #6344

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

Copy link
Copy Markdown
Contributor

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 refactors the representation of map fields across the codebase. Instead of representing maps as api.TypezMessage with an IsMap boolean flag, maps are now explicitly represented using a dedicated api.TypezMap type and api.Map entity. This simplifies the codebase by removing redundant checks (e.g., field.Map || field.Typez == api.TypezMap) and helper functions (e.g., FieldIsMap), and updates the parser, generators (Rust, Dart, Swift), and tests to align with this new representation. I have no feedback to provide as there are no review comments.

@coryan
coryan marked this pull request as ready for review October 28, 2026 22:51
@coryan
coryan requested review from a team as code owners October 28, 2026 22:51
Update the Protobuf, OpenAPI, and Discovery parsers to emit first-class api.Map entities and TypezMap fields, and remove Message.IsMap and legacy map-message helpers.

Fixes googleapis#6344
@coryan
coryan force-pushed the refactor-sidekick-map branch from e32925b to bad1e1d Compare October 29, 2026 11:55
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.

sidekick: a better representation for Map<K, V>

1 participant