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

feat(openapi3filter): add ExludeRequestQuery #886

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

zekth
Copy link
Contributor

@zekth zekth commented Dec 8, 2023

Proposal of remediation of #855

Until we support the deepObject validation; here's a proposal of adding the skip of query like it's done for body.

This would offload the validation to the application layer

If this is ok for you @fenollp i'll add a test suite to validate the behavior

@@ -7,6 +7,9 @@ type Options struct {
// Set ExcludeRequestBody so ValidateRequest skips request body validation
ExcludeRequestBody bool

// Set ExcludeRequestQuery so ValidateRequest skips request query params validation
ExcludeRequestQuery bool
Copy link
Collaborator

Choose a reason for hiding this comment

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

LGTM. yup add a test that makes sure the flag works
I'd also prefer a more precise name such as ExcludeRequestQueryParams

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok cool, i'll update the PR then

@zekth
Copy link
Contributor Author

zekth commented Dec 8, 2023

@fenollp updated and ready to review

@fenollp fenollp merged commit c00d180 into getkin:master Dec 8, 2023
7 checks passed
@zekth zekth deleted the skip-parameters branch December 8, 2023 23:40
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