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

Fix conditional sub-selections in raw response type #4774

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tobias-tengler
Copy link
Contributor

@tobias-tengler tobias-tengler commented Aug 20, 2024

Previously conditional selections were always generated as required properties, which is inconvenient if your component code checks for the presence of a field and you can't model the skipped state in a test using @raw_response_type without partially disabling type checking.

This PR makes all conditional selections optional in the raw response type.

@tobias-tengler tobias-tengler force-pushed the fix-raw-response-type-conditional-sub-selections branch 2 times, most recently from 3424c75 to a2f2295 Compare August 20, 2024 16:03
@tobias-tengler
Copy link
Contributor Author

tobias-tengler commented Aug 20, 2024

The test failure in the ubuntu job seems to be unrelated / transient, but I can't trigger another run.

EDIT: This also happens on main, so it's not the fault of my changes.

@tobias-tengler tobias-tengler force-pushed the fix-raw-response-type-conditional-sub-selections branch from a2f2295 to cde4f43 Compare August 20, 2024 16:39
@facebook-github-bot
Copy link
Contributor

@captbaritone has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@tobias-tengler tobias-tengler force-pushed the fix-raw-response-type-conditional-sub-selections branch from cde4f43 to dcd36ad Compare September 17, 2024 19:13
@tobias-tengler
Copy link
Contributor Author

@captbaritone Fixed the merge conflicts on this one.

@tobias-tengler tobias-tengler force-pushed the fix-raw-response-type-conditional-sub-selections branch from dcd36ad to ef5d660 Compare September 17, 2024 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants