Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add the apiVersion protected property to the generated resources when applicable #4966

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Hectorhammett
Copy link

Add the protected apiVersion property to the generated resource classes when the discovery document contains the apiVersion field inside the resource fields.

Copy link

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

Copy link
Contributor

@bshaffer bshaffer left a comment

Choose a reason for hiding this comment

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

Same thing with this PR, we need to either manually update the goldens to include an API with apiversion (recommended), or we need to add a different specific test for it.

@Hectorhammett
Copy link
Author

Same thing with this PR, we need to either manually update the goldens to include an API with apiversion (recommended), or we need to add a different specific test for it.

Correct me if I'm wrong, but we are using the discovery-artifact-manager repo as our golden, that's how I tested the generated code. Do we want to make a PR against that repo?

@bshaffer
Copy link
Contributor

Correct me if I'm wrong, but we are using the discovery-artifact-manager repo as our golden

No, we use the JSON here: https://github.com/googleapis/google-api-php-client-services/tree/main/generator/tests/testdata/golden_discovery

@Hectorhammett
Copy link
Author


# Support for the new API versioning on the discovery document
# the design states that all the methods should have the same version
# hence why we take it the first time and set it once
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for the comment, I think this is clear

@bshaffer
Copy link
Contributor

+@parthea for visibility. Would love you to take a glance at this to make sure it looks good!

@bshaffer bshaffer requested a review from parthea April 30, 2024 00:37
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.

None yet

2 participants