Skip to content

Conversation

b-long
Copy link
Contributor

@b-long b-long commented Aug 14, 2025

Fixes a bug where policy endpoints are missing from OpenAPI clients.

Also, fixes a bug where preprocessOpenApiSpecs was run at "import-time" of preprocessing.ts leading to unexpected state.

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.

Summary of Changes

Hello @b-long, 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 refactors the location of internal scripts responsible for managing vendored OpenAPI YAML files. Specifically, the "check-vendored-yaml.ts" and "update-vendored-yaml.ts" scripts have been relocated to a more appropriate directory within the source tree. This change includes updating the script commands in "package.json" and adjusting relative import paths within the moved files to ensure continued functionality.

Highlights

  • Script Relocation: The "check-vendored-yaml.ts" and "update-vendored-yaml.ts" scripts have been moved from the top-level "scripts/" directory into "src/openapi/" for better organization.
  • Path Updates: package.json scripts have been updated to reflect the new locations of the vendored YAML management scripts.
  • Relative Import Adjustments: Internal import paths within the moved TypeScript files ("check-vendored-yaml.ts" and "update-vendored-yaml.ts") have been adjusted to correctly resolve modules from their new "src/openapi/" location.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 refactors the project structure by moving the check-vendored-yaml.ts and update-vendored-yaml.ts scripts from the scripts directory to src/openapi. The path references in package.json and within the scripts themselves have been updated accordingly. The changes are correct and achieve the goal of reorganizing the scripts.

While reviewing, I noticed that both check-vendored-yaml.ts and update-vendored-yaml.ts contain a nearly identical downloadFile function. To improve maintainability and reduce code duplication, I recommend extracting this function into a shared utility file. This would make the code cleaner and easier to manage in the future.

@b-long b-long force-pushed the chore/dspx-1576--add-policy-to-openapi branch 5 times, most recently from 1ff64ea to 09d8fde Compare August 14, 2025 18:30
@b-long
Copy link
Contributor Author

b-long commented Aug 14, 2025

/gemini review

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 introduces a significant amount of OpenAPI documentation for various policy services, which is a great addition for API consumers. It also fixes a critical bug related to the execution of the OpenAPI preprocessing script, moving it from an import-time side effect to an explicit call in the Docusaurus configuration. The refactoring of the preprocessing scripts to use absolute paths and improve logging is also a welcome improvement. I have one suggestion to enhance the consistency of the generated documentation structure.

@b-long b-long force-pushed the chore/dspx-1576--add-policy-to-openapi branch from be72ba4 to e250305 Compare August 15, 2025 13:34
@b-long b-long force-pushed the chore/dspx-1576--add-policy-to-openapi branch from e250305 to 0ffd264 Compare August 15, 2025 19:30
@b-long b-long marked this pull request as ready for review August 15, 2025 19:36
@b-long b-long requested review from a team as code owners August 15, 2025 19:36
cody-lettau
cody-lettau previously approved these changes Aug 15, 2025
Copy link

@cody-lettau cody-lettau left a comment

Choose a reason for hiding this comment

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

Main question around adding recommendation regarding deprecated stuff. If not relevant, ignore :)

@b-long b-long marked this pull request as draft August 15, 2025 20:48
@b-long b-long marked this pull request as ready for review August 25, 2025 17:14
pflynn-virtru
pflynn-virtru previously approved these changes Aug 25, 2025
@b-long b-long dismissed stale reviews from pflynn-virtru and cody-lettau via 4490223 August 25, 2025 17:46
@b-long b-long force-pushed the chore/dspx-1576--add-policy-to-openapi branch from 4490223 to 5ff3ce3 Compare August 25, 2025 17:58
@b-long b-long enabled auto-merge (squash) August 25, 2025 18:02
Copy link
Member

@elizabethhealy elizabethhealy left a comment

Choose a reason for hiding this comment

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

is there documentation for how these were generated? for future docs updates

@b-long b-long merged commit 82609c3 into main Aug 25, 2025
3 checks passed
@b-long b-long deleted the chore/dspx-1576--add-policy-to-openapi branch August 25, 2025 19: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.

4 participants