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

TASK: Handle non null default values correctly #20

Merged
merged 3 commits into from
Jun 17, 2024

Conversation

mficzel
Copy link
Member

@mficzel mficzel commented Jun 17, 2024

Internally the resolveParameterFromRequest method in the RequestBody and the ParameterLocation got an additional return type NoSuchParameter indicating that no values was passed.

If the NoSuchParameter value is detected parameter decoding is skipped and no named parameter is added to the method call allowing either defaults to take effect or raise proper missing argument Exceptions.

Fixes: #19

@mficzel mficzel marked this pull request as ready for review June 17, 2024 11:49
@mficzel mficzel requested a review from nezaniel June 17, 2024 11:49
@mficzel mficzel changed the title Handle non null default values TASK: Handle non null default values correctly Jun 17, 2024
…on->resolveParameterFromRequest method that indicates that no value was passed and thus no parameter will be decoded or passed to the action
Copy link
Member

@nezaniel nezaniel left a comment

Choose a reason for hiding this comment

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

Nice!

@mficzel mficzel merged commit 68df7c8 into main Jun 17, 2024
2 checks passed
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.

Support parameters with non null default values
2 participants