-
Notifications
You must be signed in to change notification settings - Fork 135
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
Allow path param and request body to be passed at the same time #256
base: master
Are you sure you want to change the base?
Allow path param and request body to be passed at the same time #256
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem you pointed out is correct and this needs to be fixed.
However, this change greatly disrupts backward compatibility.
Currently, we are use 4 data (path, query, form and request body).
The problem occurs because we combine all of this into a one variable specified by params_key
.
I think you can avoid them by using different keys
So we need add path_params_key
, query_params_key
, form_params_key
, and request_params_key
to set values.
@ota42y can you be more specific? Why would that break older versions? I have an interest in this PR and would like to help move it forward. |
The committee support convert datetime string to datetime object. If we don't use committee with this code (Ruby on Rails), class UsersController < ApplicationController
skip_before_action :verify_authenticity_token
def create
binding.pry
registered_at = params[:registered_at]
raise "error" unless registered_at < Time.now
user = ["debug user1"] # do something
head :ok
end
end When we use this feature on rails, we need this config to set converted value to
But this change break this code because this code pass nested hast to
https://gist.github.com/ota42y/0870100c03444d39d78107a23de9f171 |
Any update on this issue? |
Warning: DEPRECATION WARNING: Rails 7.1 will return Content-Type header without modification. If you want just the MIME type, please use #media_type instead. (called from request_media_type at /home/circleci/repo/vendor/bundle/ruby/3.0.0/bundler/gems/committee-2a1e9e507867/lib/committee/schema_validator.rb:7)) Since we don't need to strip any encoding etc from the string, we can just use this value unchanged.
Fix OpenAPIParser deprecation warning
@ota42y I believe with 5.0 released, this issue is "fixable" in the sense that backward compatibility is less of an issue for the hash keys. Could you confirm? This is a pretty big issue for Open API Spec compatibility IMO. I'd even be happy to jump in and help on the PR if necessary. |
Right now it is not possible in open api 3 to set a path param and a request body.
Not sure though if this is the right way but it worked for the spec we are using.