-
Notifications
You must be signed in to change notification settings - Fork 850
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
[codegen] Add PHPDoc types for expandable fields #860
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
* @property int $balance | ||
* @property int $created | ||
* @property string|null $currency | ||
* @property string|null $default_source | ||
* @property string|\Stripe\StripeObject|null $default_source | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as the other, should we try to be complete? Asking because we will need this for dotnet codegen anyway There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. .NET uses interfaces for polymorphic types, so it'll be more similar to what we're already doing for Typescript. |
||
* @property bool|null $delinquent | ||
* @property string|null $description | ||
* @property \Stripe\Discount|null $discount | ||
|
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.
did you special case that one? Should we try to be fully complete with all the possible types?
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.
Right, expandable polymorphic fields are not very well handled at the moment and are typed as
StripeObject
instead of the actual list of possible types.We have a workaround/hack to handle this in
@return
type annotations, but it wasn't easy to reuse in this case. I'll try and fix later.