Skip to content

Commit

Permalink
[Ruby] Use Integer instead of Fixnum in Ruby client (#2475) (#2481)
Browse files Browse the repository at this point in the history
* use Integer instead of Fixnum in Ruby client (#2475)

* update samples (#2475)
  • Loading branch information
autopp authored and wing328 committed Mar 23, 2019
1 parent 1adc962 commit 033ab8a
Show file tree
Hide file tree
Showing 96 changed files with 156 additions and 156 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module {{moduleName}}
{{#allParams}}{{#required}} # @param {{paramName}} [{{{dataType}}}] {{description}}
{{/required}}{{/allParams}} # @param [Hash] opts the optional parameters
{{#allParams}}{{^required}} # @option opts [{{{dataType}}}] :{{paramName}} {{description}}
{{/required}}{{/allParams}} # @return [Array<({{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}nil{{/returnType}}, Fixnum, Hash)>] {{#returnType}}{{{returnType}}} data{{/returnType}}{{^returnType}}nil{{/returnType}}, response status code and response headers
{{/required}}{{/allParams}} # @return [Array<({{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}nil{{/returnType}}, Integer, Hash)>] {{#returnType}}{{{returnType}}} data{{/returnType}}{{^returnType}}nil{{/returnType}}, response status code and response headers
def {{operationId}}_with_http_info({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: {{classname}}.{{operationId}} ...'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module {{moduleName}}

# Call an API with given options.
#
# @return [Array<(Object, Fixnum, Hash)>] an array of 3 elements:
# @return [Array<(Object, Integer, Hash)>] an array of 3 elements:
# the data deserialized from response body (could be nil), response status code and response headers.
def call_api(http_method, path, opts = {})
request = build_request(http_method, path, opts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@
end

# Calculates hash code according to all attributes.
# @return [Fixnum] Hash code
# @return [Integer] Hash code
def hash
[{{#vars}}{{name}}{{#hasMore}}, {{/hasMore}}{{/vars}}].hash
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def call_123_test_special_tags(body, opts = {})
# To test special tags and operation ID starting with number
# @param body [Client] client model
# @param [Hash] opts the optional parameters
# @return [Array<(Client, Fixnum, Hash)>] Client data, response status code and response headers
# @return [Array<(Client, Integer, Hash)>] Client data, response status code and response headers
def call_123_test_special_tags_with_http_info(body, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: AnotherFakeApi.call_123_test_special_tags ...'
Expand Down
26 changes: 13 additions & 13 deletions samples/client/petstore/ruby/lib/petstore/api/fake_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def create_xml_item(xml_item, opts = {})
# this route creates an XmlItem
# @param xml_item [XmlItem] XmlItem Body
# @param [Hash] opts the optional parameters
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
def create_xml_item_with_http_info(xml_item, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: FakeApi.create_xml_item ...'
Expand Down Expand Up @@ -83,7 +83,7 @@ def fake_outer_boolean_serialize(opts = {})
# 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
# @return [Array<(Boolean, Integer, 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 ...'
Expand Down Expand Up @@ -130,7 +130,7 @@ def fake_outer_composite_serialize(opts = {})
# Test serialization of object with outer number type
# @param [Hash] opts the optional parameters
# @option opts [OuterComposite] :body Input composite as post body
# @return [Array<(OuterComposite, Fixnum, Hash)>] OuterComposite data, response status code and response headers
# @return [Array<(OuterComposite, Integer, Hash)>] OuterComposite data, response status code and response headers
def fake_outer_composite_serialize_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: FakeApi.fake_outer_composite_serialize ...'
Expand Down Expand Up @@ -177,7 +177,7 @@ def fake_outer_number_serialize(opts = {})
# Test serialization of outer number types
# @param [Hash] opts the optional parameters
# @option opts [Float] :body Input number as post body
# @return [Array<(Float, Fixnum, Hash)>] Float data, response status code and response headers
# @return [Array<(Float, Integer, Hash)>] Float data, response status code and response headers
def fake_outer_number_serialize_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: FakeApi.fake_outer_number_serialize ...'
Expand Down Expand Up @@ -224,7 +224,7 @@ def fake_outer_string_serialize(opts = {})
# Test serialization of outer string types
# @param [Hash] opts the optional parameters
# @option opts [String] :body Input string as post body
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
def fake_outer_string_serialize_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: FakeApi.fake_outer_string_serialize ...'
Expand Down Expand Up @@ -271,7 +271,7 @@ def test_body_with_file_schema(body, opts = {})
# For this test, the body for this request much reference a schema named &#x60;File&#x60;.
# @param body [FileSchemaTestClass]
# @param [Hash] opts the optional parameters
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
def test_body_with_file_schema_with_http_info(body, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: FakeApi.test_body_with_file_schema ...'
Expand Down Expand Up @@ -321,7 +321,7 @@ def test_body_with_query_params(query, body, opts = {})
# @param query [String]
# @param body [User]
# @param [Hash] opts the optional parameters
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
def test_body_with_query_params_with_http_info(query, body, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: FakeApi.test_body_with_query_params ...'
Expand Down Expand Up @@ -378,7 +378,7 @@ def test_client_model(body, opts = {})
# To test \&quot;client\&quot; model
# @param body [Client] client model
# @param [Hash] opts the optional parameters
# @return [Array<(Client, Fixnum, Hash)>] Client data, response status code and response headers
# @return [Array<(Client, Integer, Hash)>] Client data, response status code and response headers
def test_client_model_with_http_info(body, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: FakeApi.test_client_model ...'
Expand Down Expand Up @@ -459,7 +459,7 @@ def test_endpoint_parameters(number, double, pattern_without_delimiter, byte, op
# @option opts [DateTime] :date_time None
# @option opts [String] :password None
# @option opts [String] :callback None
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
def test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: FakeApi.test_endpoint_parameters ...'
Expand Down Expand Up @@ -605,7 +605,7 @@ def test_enum_parameters(opts = {})
# @option opts [Float] :enum_query_double Query parameter enum test (double)
# @option opts [Array<String>] :enum_form_string_array Form parameter enum test (string array)
# @option opts [String] :enum_form_string Form parameter enum test (string)
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
def test_enum_parameters_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: FakeApi.test_enum_parameters ...'
Expand Down Expand Up @@ -703,7 +703,7 @@ def test_group_parameters(required_string_group, required_boolean_group, require
# @option opts [Integer] :string_group String 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
# @return [Array<(nil, Integer, 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 = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: FakeApi.test_group_parameters ...'
Expand Down Expand Up @@ -765,7 +765,7 @@ def test_inline_additional_properties(param, opts = {})
# test inline additionalProperties
# @param param [Hash<String, String>] request body
# @param [Hash] opts the optional parameters
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
def test_inline_additional_properties_with_http_info(param, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: FakeApi.test_inline_additional_properties ...'
Expand Down Expand Up @@ -817,7 +817,7 @@ def test_json_form_data(param, param2, opts = {})
# @param param [String] field1
# @param param2 [String] field2
# @param [Hash] opts the optional parameters
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
def test_json_form_data_with_http_info(param, param2, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: FakeApi.test_json_form_data ...'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_classname(body, opts = {})
# To test class name in snake case
# @param body [Client] client model
# @param [Hash] opts the optional parameters
# @return [Array<(Client, Fixnum, Hash)>] Client data, response status code and response headers
# @return [Array<(Client, Integer, Hash)>] Client data, response status code and response headers
def test_classname_with_http_info(body, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: FakeClassnameTags123Api.test_classname ...'
Expand Down
18 changes: 9 additions & 9 deletions samples/client/petstore/ruby/lib/petstore/api/pet_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def add_pet(body, opts = {})
# Add a new pet to the store
# @param body [Pet] Pet object that needs to be added to the store
# @param [Hash] opts the optional parameters
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
def add_pet_with_http_info(body, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: PetApi.add_pet ...'
Expand Down Expand Up @@ -83,7 +83,7 @@ def delete_pet(pet_id, opts = {})
# @param pet_id [Integer] Pet id to delete
# @param [Hash] opts the optional parameters
# @option opts [String] :api_key
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
def delete_pet_with_http_info(pet_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: PetApi.delete_pet ...'
Expand Down Expand Up @@ -134,7 +134,7 @@ def find_pets_by_status(status, opts = {})
# Multiple status values can be provided with comma separated strings
# @param status [Array<String>] Status values that need to be considered for filter
# @param [Hash] opts the optional parameters
# @return [Array<(Array<Pet>, Fixnum, Hash)>] Array<Pet> data, response status code and response headers
# @return [Array<(Array<Pet>, Integer, Hash)>] Array<Pet> data, response status code and response headers
def find_pets_by_status_with_http_info(status, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: PetApi.find_pets_by_status ...'
Expand Down Expand Up @@ -188,7 +188,7 @@ def find_pets_by_tags(tags, opts = {})
# Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
# @param tags [Array<String>] Tags to filter by
# @param [Hash] opts the optional parameters
# @return [Array<(Array<Pet>, Fixnum, Hash)>] Array<Pet> data, response status code and response headers
# @return [Array<(Array<Pet>, Integer, Hash)>] Array<Pet> data, response status code and response headers
def find_pets_by_tags_with_http_info(tags, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: PetApi.find_pets_by_tags ...'
Expand Down Expand Up @@ -242,7 +242,7 @@ def get_pet_by_id(pet_id, opts = {})
# Returns a single pet
# @param pet_id [Integer] ID of pet to return
# @param [Hash] opts the optional parameters
# @return [Array<(Pet, Fixnum, Hash)>] Pet data, response status code and response headers
# @return [Array<(Pet, Integer, Hash)>] Pet data, response status code and response headers
def get_pet_by_id_with_http_info(pet_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: PetApi.get_pet_by_id ...'
Expand Down Expand Up @@ -293,7 +293,7 @@ def update_pet(body, opts = {})
# Update an existing pet
# @param body [Pet] Pet object that needs to be added to the store
# @param [Hash] opts the optional parameters
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
def update_pet_with_http_info(body, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: PetApi.update_pet ...'
Expand Down Expand Up @@ -347,7 +347,7 @@ def update_pet_with_form(pet_id, opts = {})
# @param [Hash] opts the optional parameters
# @option opts [String] :name Updated name of the pet
# @option opts [String] :status Updated status of the pet
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
def update_pet_with_form_with_http_info(pet_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: PetApi.update_pet_with_form ...'
Expand Down Expand Up @@ -403,7 +403,7 @@ def upload_file(pet_id, opts = {})
# @param [Hash] opts the optional parameters
# @option opts [String] :additional_metadata Additional data to pass to server
# @option opts [File] :file file to upload
# @return [Array<(ApiResponse, Fixnum, Hash)>] ApiResponse data, response status code and response headers
# @return [Array<(ApiResponse, Integer, Hash)>] ApiResponse data, response status code and response headers
def upload_file_with_http_info(pet_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: PetApi.upload_file ...'
Expand Down Expand Up @@ -462,7 +462,7 @@ def upload_file_with_required_file(pet_id, required_file, opts = {})
# @param required_file [File] file to upload
# @param [Hash] opts the optional parameters
# @option opts [String] :additional_metadata Additional data to pass to server
# @return [Array<(ApiResponse, Fixnum, Hash)>] ApiResponse data, response status code and response headers
# @return [Array<(ApiResponse, Integer, Hash)>] ApiResponse data, response status code and response headers
def upload_file_with_required_file_with_http_info(pet_id, required_file, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: PetApi.upload_file_with_required_file ...'
Expand Down
8 changes: 4 additions & 4 deletions samples/client/petstore/ruby/lib/petstore/api/store_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def delete_order(order_id, opts = {})
# For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
# @param order_id [String] ID of the order that needs to be deleted
# @param [Hash] opts the optional parameters
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
def delete_order_with_http_info(order_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: StoreApi.delete_order ...'
Expand Down Expand Up @@ -81,7 +81,7 @@ def get_inventory(opts = {})
# Returns pet inventories by status
# Returns a map of status codes to quantities
# @param [Hash] opts the optional parameters
# @return [Array<(Hash<String, Integer>, Fixnum, Hash)>] Hash<String, Integer> data, response status code and response headers
# @return [Array<(Hash<String, Integer>, Integer, Hash)>] Hash<String, Integer> data, response status code and response headers
def get_inventory_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: StoreApi.get_inventory ...'
Expand Down Expand Up @@ -130,7 +130,7 @@ def get_order_by_id(order_id, opts = {})
# For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
# @param order_id [Integer] ID of pet that needs to be fetched
# @param [Hash] opts the optional parameters
# @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
# @return [Array<(Order, Integer, Hash)>] Order data, response status code and response headers
def get_order_by_id_with_http_info(order_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: StoreApi.get_order_by_id ...'
Expand Down Expand Up @@ -189,7 +189,7 @@ def place_order(body, opts = {})
# Place an order for a pet
# @param body [Order] order placed for purchasing the pet
# @param [Hash] opts the optional parameters
# @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
# @return [Array<(Order, Integer, Hash)>] Order data, response status code and response headers
def place_order_with_http_info(body, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: StoreApi.place_order ...'
Expand Down
Loading

0 comments on commit 033ab8a

Please sign in to comment.