diff --git a/modules/openapi-generator/src/main/resources/ruby-client/partial_anyof_module.mustache b/modules/openapi-generator/src/main/resources/ruby-client/partial_anyof_module.mustache index 778568c2c31c..f979fdd3100e 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/partial_anyof_module.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/partial_anyof_module.mustache @@ -56,7 +56,7 @@ when 'Time' return Time.parse(data) when 'Date' - return Date.parse(data) + return Date.iso8601(data) when 'String' return data if data.instance_of?(String) when 'Object' # "type: object" diff --git a/modules/openapi-generator/src/main/resources/ruby-client/partial_oneof_module.mustache b/modules/openapi-generator/src/main/resources/ruby-client/partial_oneof_module.mustache index d3a25f69ed5e..8dd7b381d2bd 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/partial_oneof_module.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/partial_oneof_module.mustache @@ -98,7 +98,7 @@ when 'Time' return Time.parse(data) when 'Date' - return Date.parse(data) + return Date.iso8601(data) when 'String' return data if data.instance_of?(String) when 'Object' # "type: object" diff --git a/samples/client/petstore/ruby-httpx/lib/petstore/models/mammal_anyof.rb b/samples/client/petstore/ruby-httpx/lib/petstore/models/mammal_anyof.rb index e15e001c7ccd..c5ef0a052ce6 100644 --- a/samples/client/petstore/ruby-httpx/lib/petstore/models/mammal_anyof.rb +++ b/samples/client/petstore/ruby-httpx/lib/petstore/models/mammal_anyof.rb @@ -64,7 +64,7 @@ def find_and_cast_into_type(klass, data) when 'Time' return Time.parse(data) when 'Date' - return Date.parse(data) + return Date.iso8601(data) when 'String' return data if data.instance_of?(String) when 'Object' # "type: object" diff --git a/samples/client/petstore/ruby-httpx/lib/petstore/models/mammal_without_discriminator.rb b/samples/client/petstore/ruby-httpx/lib/petstore/models/mammal_without_discriminator.rb index 7c37e6492dd6..9042380114e5 100644 --- a/samples/client/petstore/ruby-httpx/lib/petstore/models/mammal_without_discriminator.rb +++ b/samples/client/petstore/ruby-httpx/lib/petstore/models/mammal_without_discriminator.rb @@ -65,7 +65,7 @@ def find_and_cast_into_type(klass, data) when 'Time' return Time.parse(data) when 'Date' - return Date.parse(data) + return Date.iso8601(data) when 'String' return data if data.instance_of?(String) when 'Object' # "type: object" diff --git a/samples/client/petstore/ruby/lib/petstore/models/mammal_anyof.rb b/samples/client/petstore/ruby/lib/petstore/models/mammal_anyof.rb index e15e001c7ccd..c5ef0a052ce6 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/mammal_anyof.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/mammal_anyof.rb @@ -64,7 +64,7 @@ def find_and_cast_into_type(klass, data) when 'Time' return Time.parse(data) when 'Date' - return Date.parse(data) + return Date.iso8601(data) when 'String' return data if data.instance_of?(String) when 'Object' # "type: object" diff --git a/samples/client/petstore/ruby/lib/petstore/models/mammal_without_discriminator.rb b/samples/client/petstore/ruby/lib/petstore/models/mammal_without_discriminator.rb index 7c37e6492dd6..9042380114e5 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/mammal_without_discriminator.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/mammal_without_discriminator.rb @@ -65,7 +65,7 @@ def find_and_cast_into_type(klass, data) when 'Time' return Time.parse(data) when 'Date' - return Date.parse(data) + return Date.iso8601(data) when 'String' return data if data.instance_of?(String) when 'Object' # "type: object"