Fix spelling mistake in validations (#21287)

This commit is contained in:
Jens Balvig 2025-05-16 14:55:18 +09:00 committed by GitHub
parent 6c0e7274ea
commit cfe0b6fae3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 22 additions and 22 deletions

View File

@ -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}}

View File

@ -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}}

View File

@ -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}}

View File

@ -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."
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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