We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Now schema validator doesn't support yet so we use merged parameter. https://github.com/interagent/committee/blob/master/lib/committee/schema_validator/open_api_3.rb#L59
This problem caused this issue #328 So we should validation by individual key.
validate_by_merged_param
To avoid breaking backward compatibility, we should add this option and do old validation.
Now we save query hash to merged key
committee/lib/committee/schema_validator/open_api_3.rb
Lines 81 to 84 in 20de9ad
The last step in validation, we copy query hash to individual key
Lines 89 to 99 in 20de9ad
But this is bad code. We should copy to individual key in request_unpack method.
request.env[validator_option.params_key]= unpacker.unpack_query_params(request)
Now we check parameter by method name. This method expect only one and merged parameter
committee/lib/committee/schema_validator/open_api_3/operation_wrapper.rb
Lines 42 to 58 in 1d9b924
So we need to fix this method to get individual parameter and merge it like this.
def validate_request_params(query_param, path_hash, request_body_hash, headers, validator_option) request_operation.validate_request_parameter(query_param, headers, build_openapi_parser_get_option(validator_option)) request_operation.validate_request_body(content_type, params, schema_validator_options) end
The text was updated successfully, but these errors were encountered:
this change resolve #339
Sorry, something went wrong.
Terrific 🚀. Let me know if we can help with this.
That's very nice of you to say !!! If you are interested, you can try to implement this feature.
any plan to release this guys?
Successfully merging a pull request may close this issue.
Now schema validator doesn't support yet so we use merged parameter.
https://github.com/interagent/committee/blob/master/lib/committee/schema_validator/open_api_3.rb#L59
This problem caused this issue #328
So we should validation by individual key.
Add
validate_by_merged_param
optionTo avoid breaking backward compatibility, we should add this option and do old validation.
save query hash to key
Now we save query hash to merged key
committee/lib/committee/schema_validator/open_api_3.rb
Lines 81 to 84 in 20de9ad
The last step in validation, we copy query hash to individual key
committee/lib/committee/schema_validator/open_api_3.rb
Lines 89 to 99 in 20de9ad
But this is bad code.
We should copy to individual key in request_unpack method.
validate query parameter and request parameter
Now we check parameter by method name.
This method expect only one and merged parameter
committee/lib/committee/schema_validator/open_api_3/operation_wrapper.rb
Lines 42 to 58 in 1d9b924
So we need to fix this method to get individual parameter and merge it like this.
The text was updated successfully, but these errors were encountered: