8000 Expand T::Struct docs with various examples of rules by bdewater · Pull Request #6462 · sorbet/sorbet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Expand T::Struct docs with various examples of rules #6462

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

Closed
wants to merge 1 commit into from

Conversation

bdewater
Copy link
Contributor
@bdewater bdewater commented Oct 7, 2022

After discussion on the Sorbet Slack I found out T::Struct can do a lot more than this page initially let me to believe.

The changes cover most (if not all) prop rules other than:

  • deprecated ones (eg :ifunset)
  • things that look like Stripe internals (:foreign, :redaction and :sensitivity)

Also fix the 'serialize' example return value to show string keys.

@bdewater bdewater requested a review from a team as a code owner October 7, 2022 19:29
@bdewater bdewater requested review from froydnj and removed request for a team October 7, 2022 19:29
@bdewater
Copy link
Contributor Author
bdewater commented Oct 7, 2022

Seeing the order on the enum docs is inverted compared to what I have here:

I'll tweak this PR.

@bdewater bdewater force-pushed the struct-readme-update branch from 79d7c44 to a0e41be Compare October 7, 2022 20:31
This covers most (if not all) rules other than:
- deprecated ones (eg :ifunset)
- things that look like Stripe internals (:foreign, :redaction and :sensitivity)

Also fix the 'serialize' example return value to show string keys
@bdewater bdewater force-pushed the struct-readme-update branch from a0e41be to 7557336 Compare October 8, 2022 16:31
@jez
Copy link
Collaborator
jez commented Oct 10, 2022

Thanks for tackling this! We have been limping along with only Stripe-internal docs for a lot of these options for a long time.

froydnj is out this week, so I'm going to take this off his plate. I'm a little busy for the rest of the day, but I should be able to take this on either tomorrow or wednesday. I'll also go over and try to merge some of the Stripe-internal docs that we have into this doc in places where it makes sense.

@jez jez requested review from jez and removed request for froydnj October 10, 2022 23:00
@jez jez mentioned this pull request Oct 23, 2022
@jez
Copy link
Collaborator
jez commented Oct 23, 2022

I started out leaving feedback on this PR, but as I was going, I realized that I think it would be better for me to just open a separate PR to update these docs.

#6502

Feel free to leave your feedback on that PR, but I believe it should at least incorporate as much as this PR adds to the doc, with some other expanded content.

@jez jez removed their request for review October 23, 2022 03:43
@jez jez closed this in #6502 Oct 25, 2022
@bdewater bdewater deleted the struct-readme-update branch October 25, 2022 19:52
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
0