-
Notifications
You must be signed in to change notification settings - Fork 368
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
Multiple API changes #918
Multiple API changes #918
Conversation
* Adds `livemode` and `metadata` to Terminal `Reader` and `Location` * Adds `ms` as a valid locale on Checkout `Session`
@@ -3392,7 +3389,7 @@ public Builder setType(Type type) { | |||
} | |||
|
|||
/** Packaging options. */ | |||
public Builder setType(EmptyParam type) { | |||
public Builder setType(String type) { |
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.
What's this about?
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.
That one I'm not sure, I think it's because they changed the way string/enums work in their API. cc @ob-stripe
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.
Internally, the type
parameter was changed from a StringParam
with a set of values
to our more modern APIEnumParam
abstraction with allow_all_strings_in_schema
set to true
to avoid a breaking change.
In the OpenAPI spec, this caused type
to be updated from a string
with two possible enum
values to a polymorphic anyOf
type: either a string
with two possible enum
values (i.e. the previous definition), or a simple string
(due to allow_all_strings_in_schema: true
).
So it's expected that we now have two overloads for type
(one with the Type
enum type and one with String
). I can't figure out why we had an overload with EmptyParam
before though, since that was not a valid value for this parameter.
This is technically a breaking change, but I think it's fine to release this as a minor since I'm fairly sure using EmptyParam
would have caused the API request to fail anyway.
Just a couple questions. The advertised changes seemed all in order |
Codegen for openapi 4ec3068
livemode
andmetadata
to TerminalReader
andLocation
ms
as a valid locale on CheckoutSession
r? @richardm-stripe
cc @stripe/api-libraries