Skip to content

feat(sidekick/api): add APIBuilder for parsers - #7970

Open
coryan wants to merge 1 commit into
googleapis:mainfrom
coryan:feat/api-builder
Open

coryan wants to merge 1 commit into
googleapis:mainfrom
coryan:feat/api-builder

Conversation

@coryan

@coryan coryan commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Add APIBuilder and NewAnnotatedAPI so parsers and codec synthetic model construction do not mutate api.API structs directly before unexporting API fields.

Part of #7837

@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 introduces a new APIBuilder utility in the api package to facilitate constructing and modifying API models using a fluent builder pattern. It refactors the parsers (Discovery, OpenAPI, Protobuf) and generator modules (Dart, Rust, Swift) to utilize APIBuilder instead of directly manipulating API struct fields, improving code readability, safety, and encapsulation. I have no additional feedback to provide as there are no review comments and the changes are well-implemented.

@coryan
coryan marked this pull request as ready for review November 22, 2026 15:50
@coryan
coryan requested review from a team as code owners November 22, 2026 15:50
Add APIBuilder and NewAnnotatedAPI so parsers and codec synthetic
model construction do not mutate api.API structs directly before
unexporting API fields.

Part of googleapis#7837
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.

1 participant