rspec_api_documentation
rspec_api_documentation copied to clipboard
Fix #407 Open API: Wrong parse in query params
Before the fix, the urls is wrong parsed. After the fix, the url are parsed as correctly
-
url:
/path/:param1/path?param2=:param2¶m3=:param3
-
before:
/path/{param1}/path?param2={param2¶m3=:param3}
-
after:
/path/{param1}/path?param2={param2}¶m3={param3}
.
@SrMouraSilva mind describing what you're fix does?
@bf4, it fixes https://github.com/zipmark/rspec_api_documentation/issues/407 In query parameters, the current regex parse wrong. For it, all the query is an unique parameter (see example in issue)
Is mind synonymous with lying?
@bf4, I think there was some misunderstanding. Are you implying that I'm lying? Maybe my request has some side effect that I do not know. So, I apologize. However, I urge you to point out my mistake so I do not do it anymore.
@SrMouraSilva
Is mind synonymous with lying?
nope. I was asking if you could describe what behavior is fixed the the diff in the PR, since my imagination was failing me and there's no test for me to look at, and I didn't noticed you had referenced this from #407
I was hoping you'd have something like
before the fix, the url is parsed as '...' after the fix, the url is parsed as '...' the parsing rule is per json schema or open api link description or some 'link here'
@bf4 Ah, ok! I updated the description.
Oh, that looks straightforward enough. Any reason you didn't add a test?
Hello @bf4, I add a test and fix other the case:
-
url:
/path/:param1/:param2?param3=:param3¶m4=:param4
-
before:
/path/{param1}/{param2?param3=:param3}¶m4={param4}
. -
after:
/path/{param1}/{param2}?param3={param3}¶m4={param4}
.
Oh, that looks straightforward enough. Any reason you didn't add a test?
The reason was I have forgotten. At the last commit I added a test! :D
cc @oestrich