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

divide parameter #316

Closed
2 tasks done
ota42y opened this issue May 4, 2021 · 4 comments
Closed
2 tasks done

divide parameter #316

ota42y opened this issue May 4, 2021 · 4 comments
Milestone

Comments

@ota42y
Copy link
Member

ota42y commented May 4, 2021

Plan

Now we override path parameter and query parameter so we can't get same name parameter like this
curl -X POST --header 'Content-Type: application/json' -d '{"id": 82}' "localhost:3000/posts/21?id=42"

So I want to divide path, query, request body parameter.
These parameter store env by individual key like this.

env['committee.params']['id'], 84 # use path parameter for merged params (like rails)
env['committee.path_hash']['id'], 21
env['committee.query_hash']['id'], 42
env['committee.request_body_hash']['id'], 84

And we can get merged parameter by specific key.
Because backward compatibility and when we want to use commitee in rails, we need set action_dispatch.request.request_parameters
https://github.com/interagent/committee#use-ruby-on-rails-with-coerce-option

Tasks

  • support path item's only validation in openapi_parser
  • add 'commitee.request_body_hash` option

Other

related issue #106
add failed tests https://github.com/interagent/committee/tree/feature/parameter_merge

@ota42y ota42y added this to the 5.0.0 milestone May 4, 2021
@ota42y ota42y mentioned this issue May 8, 2021
4 tasks
@ota42y
Copy link
Member Author

ota42y commented May 15, 2021

implemented path_hash_key option
#318

@hlascelles
Copy link

Can we proceed with this issue now that #322 is done? Happy to help if given a kick start.

@ota42y
Copy link
Member Author

ota42y commented Nov 22, 2021

Yes, this change is now workable, please see this issue

@ota42y
Copy link
Member Author

ota42y commented Jan 28, 2023

support by 5.0.0 #349

@ota42y ota42y closed this as completed Jan 28, 2023
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

No branches or pull requests

2 participants