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

More consistent namespacing for shared types #1073

Merged
merged 2 commits into from
Nov 19, 2020

Conversation

richardm-stripe
Copy link
Contributor

@richardm-stripe richardm-stripe commented Nov 18, 2020

r? @ctrudeau-stripe
cc @stripe/api-libraries

Summary

Some types that represent common structures that appear in many places throughout the Stripe API, such as Address or Metadata are defined in types/shared.d.ts, so that their definitions aren't repeated everywhere. However when these types are referenced from other types, currently they are not namespaced with Stripe, e.g. Account has metadata: Metadata, not metadata: Stripe.Metadata. This is inconsistent with how the other types in the library are referenced, e.g. Account has individual: Stripe.Person, not just individual: Person.

This PR corrects that, and makes the referenced to shared types consistent with all the other references. This should have no affect. The references all refer to the same types, they are just more specific (and I have added some lines to typescript-test specifically to exercise the shared types).

@richardm-stripe richardm-stripe changed the title [codegen] Update API Resources More consistent namespacing for shared types Nov 18, 2020
Copy link
Contributor

@ctrudeau-stripe ctrudeau-stripe left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the pairing demo!

@richardm-stripe richardm-stripe merged commit 8a9c2d4 into master Nov 19, 2020
@remi-stripe remi-stripe deleted the richardm/codegen-bb9e55d branch April 21, 2021 21:26
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.

2 participants