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(java): Include version headers in request options #5460

Merged
merged 22 commits into from
Jan 7, 2025

Conversation

ajgateno
Copy link
Member

This PR enables users to define API versions in their api.yml file and have them be part of the request options object.

@ajgateno ajgateno marked this pull request as ready for review January 7, 2025 14:38
@ajgateno ajgateno requested a review from dsinghvi as a code owner January 7, 2025 14:38
Copy link
Member

@dsinghvi dsinghvi left a comment

Choose a reason for hiding this comment

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

Generated code looks great to me! I think you'll need an entry in versions.yml to actually release this as part of the java generator though


import com.fasterxml.jackson.annotation.JsonValue;

public enum ApiVersion {
Copy link
Member

Choose a reason for hiding this comment

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

nit: it might be worth adding some java doc here that explains that this version is typically sent as x-version-header

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's enough to put it in options because that's the one that handles the headers vs. other types of schemes (even though right now there's no other type of version scheme--it seems like it's better to have it be the options' responsibility) and those methods already have that javadoc after your other comment

@ajgateno ajgateno merged commit d7d370a into main Jan 7, 2025
15 of 16 checks passed
@ajgateno ajgateno deleted the alberto/java-request-options-with-versions branch January 7, 2025 17:23
Copy link

github-actions bot commented Jan 7, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants