Skip to content

chore: update oapi codegen lib to fix generated output#232

Merged
beeme1mr merged 1 commit intomainfrom
update-api-gen
Mar 9, 2026
Merged

chore: update oapi codegen lib to fix generated output#232
beeme1mr merged 1 commit intomainfrom
update-api-gen

Conversation

@beeme1mr
Copy link
Member

@beeme1mr beeme1mr commented Mar 9, 2026

This PR

This pull request updates the generated OpenAPI client code and its dependencies, primarily to align with a newer version of the oapi-codegen library and its runtime. The changes introduce helper methods for enum validation, improve the handling of optional fields in JSON serialization, and update how path parameters are encoded in requests.

Dependency and code generation updates:

  • Upgraded github.com/oapi-codegen/runtime from version 1.1.2 to 1.2.0 in go.mod, and regenerated the client code using oapi-codegen v2.6.0 [1] [2].

Generated client improvements:

Enum handling:

  • Added Valid() methods to the ManifestFlagType, PostOpenfeatureV0ManifestFlagsJSONBodyType, and PutOpenfeatureV0ManifestFlagsKeyJSONBodyType enums to check if a value is a recognized enum member [1] [2] [3].

JSON serialization:

  • Changed the description field in several request/response types (ManifestFlag, PostOpenfeatureV0ManifestFlagsJSONBody, PutOpenfeatureV0ManifestFlagsKeyJSONBody) to use the omitempty tag, so it is omitted from JSON when not set [1] [2] [3].

Request parameter encoding:

  • Updated the way path parameters are encoded in NewDeleteOpenfeatureV0ManifestFlagsKeyRequest and NewPutOpenfeatureV0ManifestFlagsKeyRequestWithBody to use runtime.StyleParamWithOptions with explicit type and format, improving correctness and future compatibility [1] [2].

Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on a routine maintenance update for the OpenAPI client code. By upgrading the oapi-codegen runtime and regenerating the client, the system benefits from enhanced enum validation, more efficient JSON serialization by omitting empty optional fields, and more robust handling of path parameters in API requests. These changes ensure the client remains aligned with the latest library improvements and best practices.

Highlights

  • Dependency Update: Upgraded the github.com/oapi-codegen/runtime library from version 1.1.2 to 1.2.0, and consequently regenerated the client code using oapi-codegen v2.6.0.
  • Enum Validation: Added Valid() methods to ManifestFlagType, PostOpenfeatureV0ManifestFlagsJSONBodyType, and PutOpenfeatureV0ManifestFlagsKeyJSONBodyType enums to ensure values are recognized members.
  • JSON Serialization: Modified the description field in ManifestFlag, PostOpenfeatureV0ManifestFlagsJSONBody, and PutOpenfeatureV0ManifestFlagsKeyJSONBody to use the omitempty JSON tag, preventing its serialization when empty.
  • Request Parameter Encoding: Updated path parameter encoding in NewDeleteOpenfeatureV0ManifestFlagsKeyRequest and NewPutOpenfeatureV0ManifestFlagsKeyRequestWithBody to utilize runtime.StyleParamWithOptions for improved correctness.
Changelog
  • go.mod
    • Updated github.com/oapi-codegen/runtime to v1.2.0.
  • go.sum
    • Updated module checksums to reflect dependency upgrades, including oapi-codegen/runtime and OpenTelemetry related packages.
  • internal/api/client/sync_client.gen.go
    • Regenerated client code using oapi-codegen v2.6.0.
    • Added Valid() methods for ManifestFlagType, PostOpenfeatureV0ManifestFlagsJSONBodyType, and PutOpenfeatureV0ManifestFlagsKeyJSONBodyType enums.
    • Modified description fields in ManifestFlag, PostOpenfeatureV0ManifestFlagsJSONBody, and PutOpenfeatureV0ManifestFlagsKeyJSONBody to include the omitempty JSON tag.
    • Updated path parameter encoding in NewDeleteOpenfeatureV0ManifestFlagsKeyRequest and NewPutOpenfeatureV0ManifestFlagsKeyRequestWithBody to use runtime.StyleParamWithOptions.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

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

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 oapi-codegen library and regenerates the OpenAPI client code. The changes include updating github.com/oapi-codegen/runtime to v1.2.0 and reflecting the new generated code, which adds enum validation methods and improves JSON serialization for optional fields. The changes are consistent with the goal of updating the dependency and appear correct. I have no specific feedback as the modifications are primarily in auto-generated code and dependency files.

@beeme1mr beeme1mr merged commit 4eb87c9 into main Mar 9, 2026
7 checks passed
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