Bug Report Checklist
Description
The interpolation in the error message of Ruby's client dose not work.
Swagger-codegen version
$ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar version
4.0.0-SNAPSHOT
$ git log --oneline -n 1
0b66fa5c82 (HEAD -> master, origin/master, origin/HEAD) add servers to path, operation (#2048)
Swagger declaration file content or url
https://gist.github.com/autopp/5a7375cd9b521b5e5580ba3b1df40c75
The point to notice in this example contains enum in the model.
Command line used for generation
$ java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i 'https://gist.githubusercontent.com/autopp/5a7375cd9b521b5e5580ba3b1df40c75/raw/ca1d5eccce457c7337922b4a6a74f002848e4b4c/swagger.yml' -l ruby -o /tmp/gem
Steps to reproduce
- Run the above command to generate client code for Ruby.
- Generated
/tmp/gem/lib/openapi_client/models/x.rb contains string interpolation notation in single-quote string. (It dose not work!)
def y=(y)
validator = EnumAttributeValidator.new('String', ['a'])
unless validator.valid?(y)
fail ArgumentError, 'invalid value for "y", must be one of #{validator.allowable_values}.' # <= HERE!
end
@y = y
end
Related issues/PRs
Suggest a fix/enhancement
The corresponding template is this.
I think that it should be a double-quote string.
Bug Report Checklist
Description
The interpolation in the error message of Ruby's client dose not work.
Swagger-codegen version
Swagger declaration file content or url
https://gist.github.com/autopp/5a7375cd9b521b5e5580ba3b1df40c75
The point to notice in this example contains
enumin the model.Command line used for generation
Steps to reproduce
/tmp/gem/lib/openapi_client/models/x.rbcontains string interpolation notation in single-quote string. (It dose not work!)Related issues/PRs
Suggest a fix/enhancement
The corresponding template is this.
I think that it should be a double-quote string.