-
Notifications
You must be signed in to change notification settings - Fork 447
build SDK w/ new spec #1518
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
base: master
Are you sure you want to change the base?
build SDK w/ new spec #1518
Conversation
@@ -201,6 +201,7 @@ def request( | |||
params=params, | |||
requestor=requestor, | |||
api_mode=api_mode, | |||
v2_deleted_object=method == "delete" and api_mode == "V2", |
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.
this is the runtime code that ensures we turn delete responses into V2DeletedObject
instead of EventDestination
We're not merging this second, but it's what we'll do when we are ready to merge.
@@ -198,6 +198,12 @@ def get_thin_event_classes(): | |||
return THIN_EVENT_CLASSES | |||
|
|||
|
|||
def get_deleted_object(): |
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.
busting a circular import
from stripe._stripe_object import StripeObject | ||
|
||
|
||
class DeletedObject(StripeObject): |
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.
manually written class, references to which will get spit out by codegen
if path == self.v1_path: | ||
assert isinstance(resp, Customer) | ||
else: | ||
assert isinstance(resp, DeletedObject) |
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.
actual tests to ensure that delete responses work as expected. Tests are green!
DON'T MERGE. This is just to see the output of snapshots built w/ openapi v2.
CI may fail because of changes to
DeletedObject
, which is expected