mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 02:55:19 +00:00
* fix maxLength and Regexp issue * more fix * revert some changes
This commit is contained in:
parent
97855baf83
commit
dfe4944552
@ -130,12 +130,12 @@
|
||||
{{/isContainer}}
|
||||
{{/isEnum}}
|
||||
{{#hasValidation}}
|
||||
{{#minLength}}
|
||||
return false if @{{{name}}}.to_s.length > {{{maxLength}}}
|
||||
{{/minLength}}
|
||||
{{#maxLength}}
|
||||
return false if @{{{name}}}.to_s.length < {{{minLength}}}
|
||||
return false if @{{{name}}}.to_s.length > {{{maxLength}}}
|
||||
{{/maxLength}}
|
||||
{{#minLength}}
|
||||
return false if @{{{name}}}.to_s.length < {{{minLength}}}
|
||||
{{/minLength}}
|
||||
{{#maximum}}
|
||||
return false if @{{{name}}} > {{{maximum}}}
|
||||
{{/maximum}}
|
||||
@ -174,18 +174,18 @@
|
||||
fail ArgumentError, "{{{name}}} cannot be nil"
|
||||
end
|
||||
|
||||
{{#minLength}}
|
||||
{{#maxLength}}
|
||||
if {{{name}}}.to_s.length > {{{maxLength}}}
|
||||
fail ArgumentError, "invalid value for '{{{name}}}', the character length must be smaller than or equal to {{{maxLength}}}."
|
||||
end
|
||||
|
||||
{{/minLength}}
|
||||
{{#maxLength}}
|
||||
{{/maxLength}}
|
||||
{{#minLength}}
|
||||
if {{{name}}}.to_s.length < {{{minLength}}}
|
||||
fail ArgumentError, "invalid value for '{{{name}}}', the character length must be great than or equal to {{{minLength}}}."
|
||||
end
|
||||
|
||||
{{/maxLength}}
|
||||
{{/minLength}}
|
||||
{{#maximum}}
|
||||
if {{{name}}} > {{{maximum}}}
|
||||
fail ArgumentError, "invalid value for '{{{name}}}', must be smaller than or equal to {{{maximum}}}."
|
||||
|
@ -8,7 +8,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/
|
||||
|
||||
- API version: 1.0.0
|
||||
- Package version: 1.0.0
|
||||
- Build date: 2016-07-19T15:06:57.795+08:00
|
||||
- Build date: 2016-07-19T11:36:39.517-07:00
|
||||
- Build package: class io.swagger.codegen.languages.RubyClientCodegen
|
||||
|
||||
## Installation
|
||||
|
Loading…
Reference in New Issue
Block a user