[Ruby] Fix type mapping for Ruby (#2385) (#2386)

* maps 'boolean' to 'Boolean' in Ruby (#2385)

* update Ruby client samples (#2385)
This commit is contained in:
Akira Tanimura
2019-03-17 12:07:00 +09:00
committed by William Cheng
parent 94466d54b3
commit 40253a5b82
97 changed files with 156 additions and 157 deletions

View File

@@ -66,8 +66,8 @@ module Petstore
# Test serialization of outer boolean types
# @param [Hash] opts the optional parameters
# @option opts [BOOLEAN] :body Input boolean as post body
# @return [BOOLEAN]
# @option opts [Boolean] :body Input boolean as post body
# @return [Boolean]
def fake_outer_boolean_serialize(opts = {})
data, _status_code, _headers = fake_outer_boolean_serialize_with_http_info(opts)
data
@@ -75,8 +75,8 @@ module Petstore
# Test serialization of outer boolean types
# @param [Hash] opts the optional parameters
# @option opts [BOOLEAN] :body Input boolean as post body
# @return [Array<(BOOLEAN, Fixnum, Hash)>] BOOLEAN data, response status code and response headers
# @option opts [Boolean] :body Input boolean as post body
# @return [Array<(Boolean, Fixnum, Hash)>] Boolean data, response status code and response headers
def fake_outer_boolean_serialize_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: FakeApi.fake_outer_boolean_serialize ...'
@@ -106,7 +106,7 @@ module Petstore
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => 'BOOLEAN')
:return_type => 'Boolean')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: FakeApi#fake_outer_boolean_serialize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
@@ -683,11 +683,11 @@ module Petstore
# Fake endpoint to test group parameters (optional)
# Fake endpoint to test group parameters (optional)
# @param required_string_group [Integer] Required String in group parameters
# @param required_boolean_group [BOOLEAN] Required Boolean in group parameters
# @param required_boolean_group [Boolean] Required Boolean in group parameters
# @param required_int64_group [Integer] Required Integer in group parameters
# @param [Hash] opts the optional parameters
# @option opts [Integer] :string_group String in group parameters
# @option opts [BOOLEAN] :boolean_group Boolean in group parameters
# @option opts [Boolean] :boolean_group Boolean in group parameters
# @option opts [Integer] :int64_group Integer in group parameters
# @return [nil]
def test_group_parameters(required_string_group, required_boolean_group, required_int64_group, opts = {})
@@ -698,11 +698,11 @@ module Petstore
# Fake endpoint to test group parameters (optional)
# Fake endpoint to test group parameters (optional)
# @param required_string_group [Integer] Required String in group parameters
# @param required_boolean_group [BOOLEAN] Required Boolean in group parameters
# @param required_boolean_group [Boolean] Required Boolean in group parameters
# @param required_int64_group [Integer] Required Integer in group parameters
# @param [Hash] opts the optional parameters
# @option opts [Integer] :string_group String in group parameters
# @option opts [BOOLEAN] :boolean_group Boolean in group parameters
# @option opts [Boolean] :boolean_group Boolean in group parameters
# @option opts [Integer] :int64_group Integer in group parameters
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
def test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, opts = {})

View File

@@ -187,7 +187,7 @@ module Petstore
data.to_i
when 'Float'
data.to_f
when 'BOOLEAN'
when 'Boolean'
data == true
when 'DateTime'
# parse date time (expecting ISO 8601 format)

View File

@@ -139,7 +139,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -147,7 +147,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -144,7 +144,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -128,7 +128,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -128,7 +128,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -150,7 +150,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -172,7 +172,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -26,7 +26,7 @@ module Petstore
# Attribute type mapping.
def self.openapi_types
{
:'declawed' => :'BOOLEAN'
:'declawed' => :'Boolean'
}
end
@@ -137,7 +137,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -142,7 +142,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -127,7 +127,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -126,7 +126,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -137,7 +137,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -171,7 +171,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -264,7 +264,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -128,7 +128,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -137,7 +137,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -128,7 +128,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -477,7 +477,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -135,7 +135,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -127,7 +127,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -126,7 +126,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -126,7 +126,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -59,8 +59,8 @@ module Petstore
{
:'map_map_of_string' => :'Hash<String, Hash<String, String>>',
:'map_of_enum_string' => :'Hash<String, String>',
:'direct_map' => :'Hash<String, BOOLEAN>',
:'indirect_map' => :'Hash<String, BOOLEAN>'
:'direct_map' => :'Hash<String, Boolean>',
:'indirect_map' => :'Hash<String, Boolean>'
}
end
@@ -183,7 +183,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -146,7 +146,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -136,7 +136,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -127,7 +127,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -159,7 +159,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -126,7 +126,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -69,7 +69,7 @@ module Petstore
:'quantity' => :'Integer',
:'ship_date' => :'DateTime',
:'status' => :'String',
:'complete' => :'BOOLEAN'
:'complete' => :'Boolean'
}
end
@@ -208,7 +208,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -34,7 +34,7 @@ module Petstore
{
:'my_number' => :'Float',
:'my_string' => :'String',
:'my_boolean' => :'BOOLEAN'
:'my_boolean' => :'Boolean'
}
end
@@ -144,7 +144,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -220,7 +220,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -135,7 +135,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -126,7 +126,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -135,7 +135,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else

View File

@@ -190,7 +190,7 @@ module Petstore
value.to_i
when :Float
value.to_f
when :BOOLEAN
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else