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 validation of parameters requiring a body #467

Merged
merged 4 commits into from
Dec 29, 2024
Merged

Conversation

devkral
Copy link
Contributor

@devkral devkral commented Dec 28, 2024

Checklist

  • The code has 100% test coverage.
  • The documentation was properly created or updated (if applicable) following the correct guidelines and appropriate language.
  • I branched out from the latest main or is a sub-branch.

Summary or description

  • Fix data and payload special keyword arguments so they are allowed when another method than one without a body (HEAD, GET) is available,
  • Fix validation of parameters requiring a body including Form
  • Fix some warnings

@tarsil
Copy link
Collaborator

tarsil commented Dec 28, 2024

@devkral CI failing

@devkral
Copy link
Contributor Author

devkral commented Dec 29, 2024

yes, we need a rework. We should check that the params are optional in case of GET, HEAD and OPTIONS in methods. and apply this for Form parameters too.

- fix `data` and `payload` special keyword arguments so they are allowed
  when another method than one without a body (HEAD, GET) is available,
- validate that if body-less methods are handled, form-like params are optional
- validate that if only body-less methods are handled, form-like params
  are forbidden
@devkral devkral changed the title Fix special arguments data and payload Fix validation of parameters requiring a body Dec 29, 2024
@devkral devkral force-pushed the devkral/fixes/route branch from 07c7690 to c06012e Compare December 29, 2024 08:12
Note: the tests are failing
@tarsil
Copy link
Collaborator

tarsil commented Dec 29, 2024

I will look at this when I have time. I can see some over complications already

- fix missing call of the new validation method
- fix pytest warnings
@tarsil tarsil merged commit 3367fa2 into main Dec 29, 2024
9 checks passed
@tarsil tarsil deleted the devkral/fixes/route branch December 29, 2024 14:27
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