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

Codegen 10 more files #1264

Merged
merged 13 commits into from
Mar 16, 2021
Merged

Codegen 10 more files #1264

merged 13 commits into from
Mar 16, 2021

Conversation

richardm-stripe
Copy link
Contributor

@richardm-stripe richardm-stripe commented Mar 12, 2021

r? @remi-stripe - removed the potential breaking change, this is ready for a real review

applepaydomain.go Show resolved Hide resolved
@@ -22,8 +30,8 @@ const (
// For more details see https://stripe.com/docs/api/customers/create_customer_balance_transaction
type CustomerBalanceTransactionParams struct {
Params `form:"*"`
Customer *string `form:"-"` // Included in URL
Copy link
Contributor

Choose a reason for hiding this comment

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

That isn't in alphabetical anymore. Not the end of the world but is it something we can easily tweak?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The convention now is embeds, path params, then normal params, and alphabetical within those categories. A saw the hoisting of path params in a couple files and thought it made sense even though we don't follow it consistently, but yes I can easily alphabetize the whole thing if we think that is better.

Maybe a newline between the path params and the remainder?

Copy link
Contributor

Choose a reason for hiding this comment

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

I personally prefer everyone alphabetical. What's URL param and whats POST param shouldn't really matter to developers and it's easier for people's brain (and ours) to parse alphabetically. Not a blocker though.

Livemode bool `json:"livemode"`
Metadata map[string]string `json:"metadata"`
Object string `json:"object"`
Address *AccountAddress `json:"address"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Is that one a breaking change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's either a breaking change or a bugfix.

AccountAddressParams right now only has form annotatations and not json annotations, so I think right now it's pretty broken and these will not ever deserialize into anything but zero values.

@@ -22,8 +30,8 @@ const (
// For more details see https://stripe.com/docs/api/customers/create_customer_balance_transaction
type CustomerBalanceTransactionParams struct {
Params `form:"*"`
Customer *string `form:"-"` // Included in URL
Copy link
Contributor

Choose a reason for hiding this comment

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

I personally prefer everyone alphabetical. What's URL param and whats POST param shouldn't really matter to developers and it's easier for people's brain (and ours) to parse alphabetically. Not a blocker though.

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

Successfully merging this pull request may close these issues.

None yet

2 participants