Skip to content

Commit cfe0b6f

Browse files
authored
Fix spelling mistake in validations (#21287)
1 parent 6c0e727 commit cfe0b6f

File tree

14 files changed

+22
-22
lines changed

14 files changed

+22
-22
lines changed

modules/openapi-generator/src/main/resources/powershell/model_simple.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function Initialize-{{{apiNamePrefix}}}{{{classname}}} {
8888
{{/maxLength}}
8989
{{#minLength}}
9090
if ({{^required}}!${{{name}}} -and {{/required}}${{{name}}}.length -lt {{{minLength}}}) {
91-
throw "invalid value for '{{{name}}}', the character length must be great than or equal to {{{minLength}}}."
91+
throw "invalid value for '{{{name}}}', the character length must be greater than or equal to {{{minLength}}}."
9292
}
9393

9494
{{/minLength}}
@@ -148,7 +148,7 @@ function Initialize-{{{apiNamePrefix}}}{{{classname}}} {
148148
{{/maxLength}}
149149
{{#minLength}}
150150
if ({{^required}}!${{{name}}} -and {{/required}}${{{name}}}.length -lt {{{minLength}}}) {
151-
throw "invalid value for '{{{name}}}', the character length must be great than or equal to {{{minLength}}}."
151+
throw "invalid value for '{{{name}}}', the character length must be greater than or equal to {{{minLength}}}."
152152
}
153153

154154
{{/minLength}}

modules/openapi-generator/src/main/resources/ruby-client/api.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ module {{moduleName}}
131131
{{/maxLength}}
132132
{{#minLength}}
133133
if @api_client.config.client_side_validation && {{^required}}!opts[:'{{{paramName}}}'].nil? && {{/required}}{{#required}}{{{paramName}}}{{/required}}{{^required}}opts[:'{{{paramName}}}']{{/required}}.to_s.length < {{{minLength}}}
134-
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}}}.'
134+
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}}}.'
135135
end
136136

137137
{{/minLength}}

modules/openapi-generator/src/main/resources/ruby-client/partial_model_generic.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
{{/maxLength}}
186186
{{#minLength}}
187187
if {{^required}}!@{{{name}}}.nil? && {{/required}}@{{{name}}}.to_s.length < {{{minLength}}}
188-
invalid_properties.push('invalid value for "{{{name}}}", the character length must be great than or equal to {{{minLength}}}.')
188+
invalid_properties.push('invalid value for "{{{name}}}", the character length must be greater than or equal to {{{minLength}}}.')
189189
end
190190

191191
{{/minLength}}
@@ -318,7 +318,7 @@
318318
{{/maxLength}}
319319
{{#minLength}}
320320
if {{#isNullable}}!{{{name}}}.nil? && {{/isNullable}}{{{name}}}.to_s.length < {{{minLength}}}
321-
fail ArgumentError, 'invalid value for "{{{name}}}", the character length must be great than or equal to {{{minLength}}}.'
321+
fail ArgumentError, 'invalid value for "{{{name}}}", the character length must be greater than or equal to {{{minLength}}}.'
322322
end
323323

324324
{{/minLength}}

samples/client/petstore/powershell/src/PSPetstore/Model/FormatTest.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function Initialize-PSFormatTest {
172172
}
173173

174174
if ($Password.length -lt 10) {
175-
throw "invalid value for 'Password', the character length must be great than or equal to 10."
175+
throw "invalid value for 'Password', the character length must be greater than or equal to 10."
176176
}
177177

178178

samples/client/petstore/ruby-autoload/lib/petstore/api/fake_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ def test_endpoint_parameters_with_http_info(number, double, pattern_without_deli
952952
end
953953

954954
if @api_client.config.client_side_validation && !opts[:'password'].nil? && opts[:'password'].to_s.length < 10
955-
fail ArgumentError, 'invalid value for "opts[:"password"]" when calling FakeApi.test_endpoint_parameters, the character length must be great than or equal to 10.'
955+
fail ArgumentError, 'invalid value for "opts[:"password"]" when calling FakeApi.test_endpoint_parameters, the character length must be greater than or equal to 10.'
956956
end
957957

958958
# resource path

samples/client/petstore/ruby-autoload/lib/petstore/models/format_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def list_invalid_properties
269269
end
270270

271271
if @password.to_s.length < 10
272-
invalid_properties.push('invalid value for "password", the character length must be great than or equal to 10.')
272+
invalid_properties.push('invalid value for "password", the character length must be greater than or equal to 10.')
273273
end
274274

275275
pattern = Regexp.new(/^\d{10}$/)
@@ -448,7 +448,7 @@ def password=(password)
448448
end
449449

450450
if password.to_s.length < 10
451-
fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 10.'
451+
fail ArgumentError, 'invalid value for "password", the character length must be greater than or equal to 10.'
452452
end
453453

454454
@password = password

samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ def test_endpoint_parameters_with_http_info(number, double, pattern_without_deli
952952
end
953953

954954
if @api_client.config.client_side_validation && !opts[:'password'].nil? && opts[:'password'].to_s.length < 10
955-
fail ArgumentError, 'invalid value for "opts[:"password"]" when calling FakeApi.test_endpoint_parameters, the character length must be great than or equal to 10.'
955+
fail ArgumentError, 'invalid value for "opts[:"password"]" when calling FakeApi.test_endpoint_parameters, the character length must be greater than or equal to 10.'
956956
end
957957

958958
# resource path

samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def list_invalid_properties
269269
end
270270

271271
if @password.to_s.length < 10
272-
invalid_properties.push('invalid value for "password", the character length must be great than or equal to 10.')
272+
invalid_properties.push('invalid value for "password", the character length must be greater than or equal to 10.')
273273
end
274274

275275
pattern = Regexp.new(/^\d{10}$/)
@@ -448,7 +448,7 @@ def password=(password)
448448
end
449449

450450
if password.to_s.length < 10
451-
fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 10.'
451+
fail ArgumentError, 'invalid value for "password", the character length must be greater than or equal to 10.'
452452
end
453453

454454
@password = password

samples/client/petstore/ruby-httpx/lib/petstore/api/fake_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ def test_endpoint_parameters_with_http_info(number, double, pattern_without_deli
10331033
end
10341034

10351035
if @api_client.config.client_side_validation && !opts[:'password'].nil? && opts[:'password'].to_s.length < 10
1036-
fail ArgumentError, 'invalid value for "opts[:"password"]" when calling FakeApi.test_endpoint_parameters, the character length must be great than or equal to 10.'
1036+
fail ArgumentError, 'invalid value for "opts[:"password"]" when calling FakeApi.test_endpoint_parameters, the character length must be greater than or equal to 10.'
10371037
end
10381038

10391039
# resource path

samples/client/petstore/ruby-httpx/lib/petstore/models/format_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def list_invalid_properties
269269
end
270270

271271
if @password.to_s.length < 10
272-
invalid_properties.push('invalid value for "password", the character length must be great than or equal to 10.')
272+
invalid_properties.push('invalid value for "password", the character length must be greater than or equal to 10.')
273273
end
274274

275275
pattern = Regexp.new(/^\d{10}$/)
@@ -448,7 +448,7 @@ def password=(password)
448448
end
449449

450450
if password.to_s.length < 10
451-
fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 10.'
451+
fail ArgumentError, 'invalid value for "password", the character length must be greater than or equal to 10.'
452452
end
453453

454454
@password = password

0 commit comments

Comments
 (0)