-
Notifications
You must be signed in to change notification settings - Fork 164
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
Conversation
generators/java/sdk/src/main/java/com/fern/java/client/Cli.java
Outdated
Show resolved
Hide resolved
generators/java/sdk/src/main/java/com/fern/java/client/generators/ClientOptionsGenerator.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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 { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
This PR enables users to define API versions in their
api.yml
file and have them be part of the request options object.