chore: update oapi codegen lib to fix generated output#232
Conversation
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Summary of ChangesHello, 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 Highlights
Changelog
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
This PR
This pull request updates the generated OpenAPI client code and its dependencies, primarily to align with a newer version of the
oapi-codegenlibrary 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:
github.com/oapi-codegen/runtimefrom version 1.1.2 to 1.2.0 ingo.mod, and regenerated the client code usingoapi-codegenv2.6.0 [1] [2].Generated client improvements:
Enum handling:
Valid()methods to theManifestFlagType,PostOpenfeatureV0ManifestFlagsJSONBodyType, andPutOpenfeatureV0ManifestFlagsKeyJSONBodyTypeenums to check if a value is a recognized enum member [1] [2] [3].JSON serialization:
descriptionfield in several request/response types (ManifestFlag,PostOpenfeatureV0ManifestFlagsJSONBody,PutOpenfeatureV0ManifestFlagsKeyJSONBody) to use theomitemptytag, so it is omitted from JSON when not set [1] [2] [3].Request parameter encoding:
NewDeleteOpenfeatureV0ManifestFlagsKeyRequestandNewPutOpenfeatureV0ManifestFlagsKeyRequestWithBodyto useruntime.StyleParamWithOptionswith explicit type and format, improving correctness and future compatibility [1] [2].