mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-06-29 20:20:53 +00:00
Fix spelling mistake in validations (#21287)
This commit is contained in:
parent
6c0e7274ea
commit
cfe0b6fae3
@ -88,7 +88,7 @@ function Initialize-{{{apiNamePrefix}}}{{{classname}}} {
|
||||
{{/maxLength}}
|
||||
{{#minLength}}
|
||||
if ({{^required}}!${{{name}}} -and {{/required}}${{{name}}}.length -lt {{{minLength}}}) {
|
||||
throw "invalid value for '{{{name}}}', the character length must be great than or equal to {{{minLength}}}."
|
||||
throw "invalid value for '{{{name}}}', the character length must be greater than or equal to {{{minLength}}}."
|
||||
}
|
||||
|
||||
{{/minLength}}
|
||||
@ -148,7 +148,7 @@ function Initialize-{{{apiNamePrefix}}}{{{classname}}} {
|
||||
{{/maxLength}}
|
||||
{{#minLength}}
|
||||
if ({{^required}}!${{{name}}} -and {{/required}}${{{name}}}.length -lt {{{minLength}}}) {
|
||||
throw "invalid value for '{{{name}}}', the character length must be great than or equal to {{{minLength}}}."
|
||||
throw "invalid value for '{{{name}}}', the character length must be greater than or equal to {{{minLength}}}."
|
||||
}
|
||||
|
||||
{{/minLength}}
|
||||
|
@ -131,7 +131,7 @@ module {{moduleName}}
|
||||
{{/maxLength}}
|
||||
{{#minLength}}
|
||||
if @api_client.config.client_side_validation && {{^required}}!opts[:'{{{paramName}}}'].nil? && {{/required}}{{#required}}{{{paramName}}}{{/required}}{{^required}}opts[:'{{{paramName}}}']{{/required}}.to_s.length < {{{minLength}}}
|
||||
fail ArgumentError, 'invalid value for "{{#required}}{{{paramName}}}{{/required}}{{^required}}opts[:"{{{paramName}}}"]{{/required}}" when calling {{classname}}.{{operationId}}, the character length must be great than or equal to {{{minLength}}}.'
|
||||
fail ArgumentError, 'invalid value for "{{#required}}{{{paramName}}}{{/required}}{{^required}}opts[:"{{{paramName}}}"]{{/required}}" when calling {{classname}}.{{operationId}}, the character length must be greater than or equal to {{{minLength}}}.'
|
||||
end
|
||||
|
||||
{{/minLength}}
|
||||
|
@ -185,7 +185,7 @@
|
||||
{{/maxLength}}
|
||||
{{#minLength}}
|
||||
if {{^required}}!@{{{name}}}.nil? && {{/required}}@{{{name}}}.to_s.length < {{{minLength}}}
|
||||
invalid_properties.push('invalid value for "{{{name}}}", the character length must be great than or equal to {{{minLength}}}.')
|
||||
invalid_properties.push('invalid value for "{{{name}}}", the character length must be greater than or equal to {{{minLength}}}.')
|
||||
end
|
||||
|
||||
{{/minLength}}
|
||||
@ -318,7 +318,7 @@
|
||||
{{/maxLength}}
|
||||
{{#minLength}}
|
||||
if {{#isNullable}}!{{{name}}}.nil? && {{/isNullable}}{{{name}}}.to_s.length < {{{minLength}}}
|
||||
fail ArgumentError, 'invalid value for "{{{name}}}", the character length must be great than or equal to {{{minLength}}}.'
|
||||
fail ArgumentError, 'invalid value for "{{{name}}}", the character length must be greater than or equal to {{{minLength}}}.'
|
||||
end
|
||||
|
||||
{{/minLength}}
|
||||
|
@ -172,7 +172,7 @@ function Initialize-PSFormatTest {
|
||||
}
|
||||
|
||||
if ($Password.length -lt 10) {
|
||||
throw "invalid value for 'Password', the character length must be great than or equal to 10."
|
||||
throw "invalid value for 'Password', the character length must be greater than or equal to 10."
|
||||
}
|
||||
|
||||
|
||||
|
@ -952,7 +952,7 @@ module Petstore
|
||||
end
|
||||
|
||||
if @api_client.config.client_side_validation && !opts[:'password'].nil? && opts[:'password'].to_s.length < 10
|
||||
fail ArgumentError, 'invalid value for "opts[:"password"]" when calling FakeApi.test_endpoint_parameters, the character length must be great than or equal to 10.'
|
||||
fail ArgumentError, 'invalid value for "opts[:"password"]" when calling FakeApi.test_endpoint_parameters, the character length must be greater than or equal to 10.'
|
||||
end
|
||||
|
||||
# resource path
|
||||
|
@ -269,7 +269,7 @@ module Petstore
|
||||
end
|
||||
|
||||
if @password.to_s.length < 10
|
||||
invalid_properties.push('invalid value for "password", the character length must be great than or equal to 10.')
|
||||
invalid_properties.push('invalid value for "password", the character length must be greater than or equal to 10.')
|
||||
end
|
||||
|
||||
pattern = Regexp.new(/^\d{10}$/)
|
||||
@ -448,7 +448,7 @@ module Petstore
|
||||
end
|
||||
|
||||
if password.to_s.length < 10
|
||||
fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 10.'
|
||||
fail ArgumentError, 'invalid value for "password", the character length must be greater than or equal to 10.'
|
||||
end
|
||||
|
||||
@password = password
|
||||
|
@ -952,7 +952,7 @@ module Petstore
|
||||
end
|
||||
|
||||
if @api_client.config.client_side_validation && !opts[:'password'].nil? && opts[:'password'].to_s.length < 10
|
||||
fail ArgumentError, 'invalid value for "opts[:"password"]" when calling FakeApi.test_endpoint_parameters, the character length must be great than or equal to 10.'
|
||||
fail ArgumentError, 'invalid value for "opts[:"password"]" when calling FakeApi.test_endpoint_parameters, the character length must be greater than or equal to 10.'
|
||||
end
|
||||
|
||||
# resource path
|
||||
|
@ -269,7 +269,7 @@ module Petstore
|
||||
end
|
||||
|
||||
if @password.to_s.length < 10
|
||||
invalid_properties.push('invalid value for "password", the character length must be great than or equal to 10.')
|
||||
invalid_properties.push('invalid value for "password", the character length must be greater than or equal to 10.')
|
||||
end
|
||||
|
||||
pattern = Regexp.new(/^\d{10}$/)
|
||||
@ -448,7 +448,7 @@ module Petstore
|
||||
end
|
||||
|
||||
if password.to_s.length < 10
|
||||
fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 10.'
|
||||
fail ArgumentError, 'invalid value for "password", the character length must be greater than or equal to 10.'
|
||||
end
|
||||
|
||||
@password = password
|
||||
|
@ -1033,7 +1033,7 @@ module Petstore
|
||||
end
|
||||
|
||||
if @api_client.config.client_side_validation && !opts[:'password'].nil? && opts[:'password'].to_s.length < 10
|
||||
fail ArgumentError, 'invalid value for "opts[:"password"]" when calling FakeApi.test_endpoint_parameters, the character length must be great than or equal to 10.'
|
||||
fail ArgumentError, 'invalid value for "opts[:"password"]" when calling FakeApi.test_endpoint_parameters, the character length must be greater than or equal to 10.'
|
||||
end
|
||||
|
||||
# resource path
|
||||
|
@ -269,7 +269,7 @@ module Petstore
|
||||
end
|
||||
|
||||
if @password.to_s.length < 10
|
||||
invalid_properties.push('invalid value for "password", the character length must be great than or equal to 10.')
|
||||
invalid_properties.push('invalid value for "password", the character length must be greater than or equal to 10.')
|
||||
end
|
||||
|
||||
pattern = Regexp.new(/^\d{10}$/)
|
||||
@ -448,7 +448,7 @@ module Petstore
|
||||
end
|
||||
|
||||
if password.to_s.length < 10
|
||||
fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 10.'
|
||||
fail ArgumentError, 'invalid value for "password", the character length must be greater than or equal to 10.'
|
||||
end
|
||||
|
||||
@password = password
|
||||
|
@ -251,7 +251,7 @@ module Petstore
|
||||
end
|
||||
|
||||
if !@password.nil? && @password.to_s.length < 10
|
||||
invalid_properties.push('invalid value for "password", the character length must be great than or equal to 10.')
|
||||
invalid_properties.push('invalid value for "password", the character length must be greater than or equal to 10.')
|
||||
end
|
||||
|
||||
invalid_properties
|
||||
@ -388,7 +388,7 @@ module Petstore
|
||||
end
|
||||
|
||||
if !password.nil? && password.to_s.length < 10
|
||||
fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 10.'
|
||||
fail ArgumentError, 'invalid value for "password", the character length must be greater than or equal to 10.'
|
||||
end
|
||||
|
||||
@password = password
|
||||
|
@ -1033,7 +1033,7 @@ module Petstore
|
||||
end
|
||||
|
||||
if @api_client.config.client_side_validation && !opts[:'password'].nil? && opts[:'password'].to_s.length < 10
|
||||
fail ArgumentError, 'invalid value for "opts[:"password"]" when calling FakeApi.test_endpoint_parameters, the character length must be great than or equal to 10.'
|
||||
fail ArgumentError, 'invalid value for "opts[:"password"]" when calling FakeApi.test_endpoint_parameters, the character length must be greater than or equal to 10.'
|
||||
end
|
||||
|
||||
# resource path
|
||||
|
@ -269,7 +269,7 @@ module Petstore
|
||||
end
|
||||
|
||||
if @password.to_s.length < 10
|
||||
invalid_properties.push('invalid value for "password", the character length must be great than or equal to 10.')
|
||||
invalid_properties.push('invalid value for "password", the character length must be greater than or equal to 10.')
|
||||
end
|
||||
|
||||
pattern = Regexp.new(/^\d{10}$/)
|
||||
@ -448,7 +448,7 @@ module Petstore
|
||||
end
|
||||
|
||||
if password.to_s.length < 10
|
||||
fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 10.'
|
||||
fail ArgumentError, 'invalid value for "password", the character length must be greater than or equal to 10.'
|
||||
end
|
||||
|
||||
@password = password
|
||||
|
@ -251,7 +251,7 @@ module Petstore
|
||||
end
|
||||
|
||||
if !@password.nil? && @password.to_s.length < 10
|
||||
invalid_properties.push('invalid value for "password", the character length must be great than or equal to 10.')
|
||||
invalid_properties.push('invalid value for "password", the character length must be greater than or equal to 10.')
|
||||
end
|
||||
|
||||
invalid_properties
|
||||
@ -388,7 +388,7 @@ module Petstore
|
||||
end
|
||||
|
||||
if !password.nil? && password.to_s.length < 10
|
||||
fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 10.'
|
||||
fail ArgumentError, 'invalid value for "password", the character length must be greater than or equal to 10.'
|
||||
end
|
||||
|
||||
@password = password
|
||||
|
Loading…
x
Reference in New Issue
Block a user