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

Operation default options, addresses #1267 #1268

Merged
merged 7 commits into from
Aug 20, 2024

Conversation

Ksauder
Copy link
Contributor

@Ksauder Ksauder commented Aug 18, 2024

Fairly simple change to the Router to allow a set of operation options to be set for every operation on the router.
#1267

  • implement basic Router Ops defaults
  • test to ensure the default options are used
  • test to ensure settings on Operations override the Router defaults

I picked 4 options: by_alias, exclude_unset, exclude_defaults, and exclude_none since they seemed ripe for this, but this could be expanded.

I did not tackle any sort of inheritance in this PR. Adding a Router to a Router that has defaults won't cause the default options to percolate.

@Ksauder Ksauder marked this pull request as ready for review August 18, 2024 15:49
@Ksauder Ksauder changed the title Operation default options #1267 Operation default options, addresses #1267 Aug 18, 2024
@Ksauder Ksauder marked this pull request as draft August 18, 2024 19:05
@Ksauder Ksauder marked this pull request as ready for review August 20, 2024 01:42
@vitalik vitalik merged commit b655532 into vitalik:master Aug 20, 2024
33 checks passed
@Ksauder Ksauder deleted the operation-default-options branch September 21, 2024 03:11
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