[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

@ -50,6 +50,7 @@ abstract public class AbstractRubyCodegen extends DefaultCodegen implements Code
languageSpecificPrimitives.clear();
languageSpecificPrimitives.add("String");
languageSpecificPrimitives.add("Boolean");
languageSpecificPrimitives.add("Integer");
languageSpecificPrimitives.add("Float");
languageSpecificPrimitives.add("Date");
@ -61,6 +62,7 @@ abstract public class AbstractRubyCodegen extends DefaultCodegen implements Code
typeMapping.clear();
typeMapping.put("string", "String");
typeMapping.put("boolean", "Boolean");
typeMapping.put("char", "String");
typeMapping.put("int", "Integer");
typeMapping.put("integer", "Integer");

View File

@ -102,9 +102,6 @@ public class RubyClientCodegen extends AbstractRubyCodegen {
languageSpecificPrimitives.add("array");
languageSpecificPrimitives.add("map");
languageSpecificPrimitives.add("string");
// primitives in the typeMapping
languageSpecificPrimitives.add("BOOLEAN");
typeMapping.put("boolean", "BOOLEAN");
// remove modelPackage and apiPackage added by default
Iterator<CliOption> itr = cliOptions.iterator();

View File

@ -181,7 +181,7 @@ module {{moduleName}}
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

@ -44,7 +44,7 @@
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

@ -24,8 +24,8 @@ class ArrayMapObject < Petstore::Category
:pet_map => :'Hash<String, Pet>',
:int_arr_map => :'Hash<String, Array<Integer>>',
:pet_arr_map => :'Hash<String, Array<Pet>>',
:boolean_true_arr => :'Array<BOOLEAN>',
:boolean_false_arr => :'Array<BOOLEAN>',
:boolean_true_arr => :'Array<Boolean>',
:boolean_false_arr => :'Array<Boolean>',
}
end
end

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

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

@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**declawed** | **BOOLEAN** | | [optional]
**declawed** | **Boolean** | | [optional]
## Code Sample

View File

@ -64,7 +64,7 @@ No authorization required
# **fake_outer_boolean_serialize**
> BOOLEAN fake_outer_boolean_serialize(opts)
> Boolean fake_outer_boolean_serialize(opts)
@ -77,7 +77,7 @@ require 'petstore'
api_instance = Petstore::FakeApi.new
opts = {
body: true # BOOLEAN | Input boolean as post body
body: nil # Boolean | Input boolean as post body
}
begin
@ -92,11 +92,11 @@ end
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | **BOOLEAN**| Input boolean as post body | [optional]
**body** | **Boolean**| Input boolean as post body | [optional]
### Return type
**BOOLEAN**
**Boolean**
### Authorization
@ -530,11 +530,11 @@ require 'petstore'
api_instance = Petstore::FakeApi.new
required_string_group = 56 # Integer | Required String in group parameters
required_boolean_group = true # BOOLEAN | Required Boolean in group parameters
required_boolean_group = nil # Boolean | Required Boolean in group parameters
required_int64_group = 56 # Integer | Required Integer in group parameters
opts = {
string_group: 56, # Integer | String in group parameters
boolean_group: true, # BOOLEAN | Boolean in group parameters
boolean_group: nil, # Boolean | Boolean in group parameters
int64_group: 56 # Integer | Integer in group parameters
}
@ -551,10 +551,10 @@ end
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**required_string_group** | **Integer**| Required String in group parameters |
**required_boolean_group** | **BOOLEAN**| Required Boolean in group parameters |
**required_boolean_group** | **Boolean**| Required Boolean in group parameters |
**required_int64_group** | **Integer**| Required Integer in group parameters |
**string_group** | **Integer**| String in group parameters | [optional]
**boolean_group** | **BOOLEAN**| Boolean in group parameters | [optional]
**boolean_group** | **Boolean**| Boolean in group parameters | [optional]
**int64_group** | **Integer**| Integer in group parameters | [optional]
### Return type

View File

@ -5,8 +5,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**map_map_of_string** | **Hash&lt;String, Hash&lt;String, String&gt;&gt;** | | [optional]
**map_of_enum_string** | **Hash&lt;String, String&gt;** | | [optional]
**direct_map** | **Hash&lt;String, BOOLEAN&gt;** | | [optional]
**indirect_map** | **Hash&lt;String, BOOLEAN&gt;** | | [optional]
**direct_map** | **Hash&lt;String, Boolean&gt;** | | [optional]
**indirect_map** | **Hash&lt;String, Boolean&gt;** | | [optional]
## Code Sample

View File

@ -8,7 +8,7 @@ Name | Type | Description | Notes
**quantity** | **Integer** | | [optional]
**ship_date** | **DateTime** | | [optional]
**status** | **String** | Order Status | [optional]
**complete** | **BOOLEAN** | | [optional] [default to false]
**complete** | **Boolean** | | [optional] [default to false]
## Code Sample

View File

@ -5,7 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**my_number** | **Float** | | [optional]
**my_string** | **String** | | [optional]
**my_boolean** | **BOOLEAN** | | [optional]
**my_boolean** | **Boolean** | | [optional]
## Code Sample

View File

@ -6,7 +6,7 @@ Name | Type | Description | Notes
**string_item** | **String** | | [default to &#39;what&#39;]
**number_item** | **Float** | |
**integer_item** | **Integer** | |
**bool_item** | **BOOLEAN** | | [default to true]
**bool_item** | **Boolean** | | [default to true]
**array_item** | **Array&lt;Integer&gt;** | |
## Code Sample

View File

@ -6,7 +6,7 @@ Name | Type | Description | Notes
**string_item** | **String** | |
**number_item** | **Float** | |
**integer_item** | **Integer** | |
**bool_item** | **BOOLEAN** | |
**bool_item** | **Boolean** | |
**array_item** | **Array&lt;Integer&gt;** | |
## Code Sample

View File

@ -6,30 +6,30 @@ Name | Type | Description | Notes
**attribute_string** | **String** | | [optional]
**attribute_number** | **Float** | | [optional]
**attribute_integer** | **Integer** | | [optional]
**attribute_boolean** | **BOOLEAN** | | [optional]
**attribute_boolean** | **Boolean** | | [optional]
**wrapped_array** | **Array&lt;Integer&gt;** | | [optional]
**name_string** | **String** | | [optional]
**name_number** | **Float** | | [optional]
**name_integer** | **Integer** | | [optional]
**name_boolean** | **BOOLEAN** | | [optional]
**name_boolean** | **Boolean** | | [optional]
**name_array** | **Array&lt;Integer&gt;** | | [optional]
**name_wrapped_array** | **Array&lt;Integer&gt;** | | [optional]
**prefix_string** | **String** | | [optional]
**prefix_number** | **Float** | | [optional]
**prefix_integer** | **Integer** | | [optional]
**prefix_boolean** | **BOOLEAN** | | [optional]
**prefix_boolean** | **Boolean** | | [optional]
**prefix_array** | **Array&lt;Integer&gt;** | | [optional]
**prefix_wrapped_array** | **Array&lt;Integer&gt;** | | [optional]
**namespace_string** | **String** | | [optional]
**namespace_number** | **Float** | | [optional]
**namespace_integer** | **Integer** | | [optional]
**namespace_boolean** | **BOOLEAN** | | [optional]
**namespace_boolean** | **Boolean** | | [optional]
**namespace_array** | **Array&lt;Integer&gt;** | | [optional]
**namespace_wrapped_array** | **Array&lt;Integer&gt;** | | [optional]
**prefix_ns_string** | **String** | | [optional]
**prefix_ns_number** | **Float** | | [optional]
**prefix_ns_integer** | **Integer** | | [optional]
**prefix_ns_boolean** | **BOOLEAN** | | [optional]
**prefix_ns_boolean** | **Boolean** | | [optional]
**prefix_ns_array** | **Array&lt;Integer&gt;** | | [optional]
**prefix_ns_wrapped_array** | **Array&lt;Integer&gt;** | | [optional]

View File

@ -73,8 +73,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
@ -82,8 +82,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 ...'
@ -111,7 +111,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
@ -682,11 +682,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 = {})
@ -697,11 +697,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

@ -237,7 +237,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

@ -444,7 +444,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

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

@ -41,7 +41,7 @@ module Petstore
:'string_item' => :'String',
:'number_item' => :'Float',
:'integer_item' => :'Integer',
:'bool_item' => :'BOOLEAN',
:'bool_item' => :'Boolean',
:'array_item' => :'Array<Integer>'
}
end
@ -193,7 +193,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

@ -41,7 +41,7 @@ module Petstore
:'string_item' => :'String',
:'number_item' => :'Float',
:'integer_item' => :'Integer',
:'bool_item' => :'BOOLEAN',
:'bool_item' => :'Boolean',
:'array_item' => :'Array<Integer>'
}
end
@ -189,7 +189,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

View File

@ -113,30 +113,30 @@ module Petstore
:'attribute_string' => :'String',
:'attribute_number' => :'Float',
:'attribute_integer' => :'Integer',
:'attribute_boolean' => :'BOOLEAN',
:'attribute_boolean' => :'Boolean',
:'wrapped_array' => :'Array<Integer>',
:'name_string' => :'String',
:'name_number' => :'Float',
:'name_integer' => :'Integer',
:'name_boolean' => :'BOOLEAN',
:'name_boolean' => :'Boolean',
:'name_array' => :'Array<Integer>',
:'name_wrapped_array' => :'Array<Integer>',
:'prefix_string' => :'String',
:'prefix_number' => :'Float',
:'prefix_integer' => :'Integer',
:'prefix_boolean' => :'BOOLEAN',
:'prefix_boolean' => :'Boolean',
:'prefix_array' => :'Array<Integer>',
:'prefix_wrapped_array' => :'Array<Integer>',
:'namespace_string' => :'String',
:'namespace_number' => :'Float',
:'namespace_integer' => :'Integer',
:'namespace_boolean' => :'BOOLEAN',
:'namespace_boolean' => :'Boolean',
:'namespace_array' => :'Array<Integer>',
:'namespace_wrapped_array' => :'Array<Integer>',
:'prefix_ns_string' => :'String',
:'prefix_ns_number' => :'Float',
:'prefix_ns_integer' => :'Integer',
:'prefix_ns_boolean' => :'BOOLEAN',
:'prefix_ns_boolean' => :'Boolean',
:'prefix_ns_array' => :'Array<Integer>',
:'prefix_ns_wrapped_array' => :'Array<Integer>'
}
@ -396,7 +396,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

@ -47,8 +47,8 @@ describe 'FakeApi' do
# unit tests for fake_outer_boolean_serialize
# 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]
describe 'fake_outer_boolean_serialize test' do
it 'should work' do
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@ -174,7 +174,7 @@ describe 'FakeApi' do
# @param required_int64_group 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]
describe 'test_group_parameters test' do

View File

@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**declawed** | **BOOLEAN** | | [optional]
**declawed** | **Boolean** | | [optional]
## Code Sample

View File

@ -59,7 +59,7 @@ No authorization required
# **fake_outer_boolean_serialize**
> BOOLEAN fake_outer_boolean_serialize(opts)
> Boolean fake_outer_boolean_serialize(opts)
@ -72,7 +72,7 @@ require 'petstore'
api_instance = Petstore::FakeApi.new
opts = {
body: true # BOOLEAN | Input boolean as post body
body: nil # Boolean | Input boolean as post body
}
begin
@ -87,11 +87,11 @@ end
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | **BOOLEAN**| Input boolean as post body | [optional]
**body** | **Boolean**| Input boolean as post body | [optional]
### Return type
**BOOLEAN**
**Boolean**
### Authorization
@ -531,11 +531,11 @@ end
api_instance = Petstore::FakeApi.new
required_string_group = 56 # Integer | Required String in group parameters
required_boolean_group = true # BOOLEAN | Required Boolean in group parameters
required_boolean_group = nil # Boolean | Required Boolean in group parameters
required_int64_group = 56 # Integer | Required Integer in group parameters
opts = {
string_group: 56, # Integer | String in group parameters
boolean_group: true, # BOOLEAN | Boolean in group parameters
boolean_group: nil, # Boolean | Boolean in group parameters
int64_group: 56 # Integer | Integer in group parameters
}
@ -552,10 +552,10 @@ end
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**required_string_group** | **Integer**| Required String in group parameters |
**required_boolean_group** | **BOOLEAN**| Required Boolean in group parameters |
**required_boolean_group** | **Boolean**| Required Boolean in group parameters |
**required_int64_group** | **Integer**| Required Integer in group parameters |
**string_group** | **Integer**| String in group parameters | [optional]
**boolean_group** | **BOOLEAN**| Boolean in group parameters | [optional]
**boolean_group** | **Boolean**| Boolean in group parameters | [optional]
**int64_group** | **Integer**| Integer in group parameters | [optional]
### Return type

View File

@ -5,8 +5,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**map_map_of_string** | **Hash&lt;String, Hash&lt;String, String&gt;&gt;** | | [optional]
**map_of_enum_string** | **Hash&lt;String, String&gt;** | | [optional]
**direct_map** | **Hash&lt;String, BOOLEAN&gt;** | | [optional]
**indirect_map** | **Hash&lt;String, BOOLEAN&gt;** | | [optional]
**direct_map** | **Hash&lt;String, Boolean&gt;** | | [optional]
**indirect_map** | **Hash&lt;String, Boolean&gt;** | | [optional]
## Code Sample

View File

@ -8,7 +8,7 @@ Name | Type | Description | Notes
**quantity** | **Integer** | | [optional]
**ship_date** | **DateTime** | | [optional]
**status** | **String** | Order Status | [optional]
**complete** | **BOOLEAN** | | [optional] [default to false]
**complete** | **Boolean** | | [optional] [default to false]
## Code Sample

View File

@ -5,7 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**my_number** | **Float** | | [optional]
**my_string** | **String** | | [optional]
**my_boolean** | **BOOLEAN** | | [optional]
**my_boolean** | **Boolean** | | [optional]
## Code Sample

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

View File

@ -45,8 +45,8 @@ describe 'FakeApi' do
# unit tests for fake_outer_boolean_serialize
# 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]
describe 'fake_outer_boolean_serialize test' do
it 'should work' do
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@ -172,7 +172,7 @@ describe 'FakeApi' do
# @param required_int64_group 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]
describe 'test_group_parameters test' do

View File

@ -24,8 +24,8 @@ class ArrayMapObject < Petstore::Category
:pet_map => :'Hash<String, Pet>',
:int_arr_map => :'Hash<String, Array<Integer>>',
:pet_arr_map => :'Hash<String, Array<Pet>>',
:boolean_true_arr => :'Array<BOOLEAN>',
:boolean_false_arr => :'Array<BOOLEAN>',
:boolean_true_arr => :'Array<Boolean>',
:boolean_false_arr => :'Array<Boolean>',
}
end
end