-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Fix regex generated in Ruby client #1393
Fix regex generated in Ruby client #1393
Conversation
…recognizing \d correctly in Ruby client.
@@ -13,7 +13,7 @@ GEM | |||
public_suffix (>= 2.0.2, < 4.0) | |||
autotest (4.4.6) | |||
ZenTest (>= 4.4.1) | |||
autotest-fsevent (0.2.13) | |||
autotest-fsevent (0.2.14) |
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.
updated from 0.2.13 to 0.2.14 because doing a bundle install
with 0.2.13 was getting:
Darwin 18 is not (yet) supported (RuntimeError)
upgrading to 0.2.14 fixed issue.
@ggershoni the fix looks good to me and it's perfectly fine to update the dependencies. Thanks for your contribution. |
@ggershoni thanks for the PR, which has been included in the v3.3.3 release: https://twitter.com/oas_generator/status/1062929948191510528 |
Woohoo! Thanks heaps @wing328 :-) |
…in Ruby client. (OpenAPITools#1393) * Added tests and fix for issue OpenAPITools#1392. Param validation with regex not recognizing \d correctly in Ruby client. * Added generated files to pass ./bin/utils/ensure-up-to-date which is run by circleci
Please see #1392 for details
Note: I needed to update
autotest-fsevent (0.2.13)
toautotest-fsevent (0.2.14)
inGemfile.lock
to make rspec work on macOS.Would love your thoughts/advice @cliffano @zlx.
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.master
,3.4.x
,4.0.x
. Default:master
.Description of the PR
(details of the change, additional tests that have been done, reference to the issue for tracking, etc)
In
AbstractRubyCodegen
overloadedpublic String toRegularExpression(String pattern)
fromDefaultCodegen
. Am not escaping the pattern (so no extra \ added) since the regex pattern is run inside regex delimiters already.Added tests in both Java and Ruby client code.