From 82613df1255534c979acf4bf8b692ee664aa7dde Mon Sep 17 00:00:00 2001 From: Samuel Giddins Date: Tue, 25 Jun 2024 17:25:50 -0700 Subject: [PATCH] Run bin/ruby-petstore.sh --- .../petstore-security-test/ruby/.gitignore | 2 +- .../petstore-security-test/ruby/.rubocop.yml | 154 ++++++++++++++++++ .../ruby/.swagger-codegen/VERSION | 2 +- .../petstore-security-test/ruby/README.md | 2 +- .../ruby/docs/FakeApi.md | 2 +- .../petstore-security-test/ruby/git_push.sh | 2 +- .../ruby/lib/petstore.rb | 2 +- .../ruby/lib/petstore/api/fake_api.rb | 15 +- .../ruby/lib/petstore/api_client.rb | 26 +-- .../ruby/lib/petstore/api_error.rb | 2 +- .../ruby/lib/petstore/configuration.rb | 8 +- .../ruby/lib/petstore/models/model_return.rb | 17 +- .../ruby/lib/petstore/version.rb | 4 +- .../ruby/petstore.gemspec | 18 +- .../petstore/ruby/.swagger-codegen/VERSION | 2 +- samples/client/petstore/ruby/README.md | 3 + samples/client/petstore/ruby/docs/Boolean.md | 7 + samples/client/petstore/ruby/docs/Ints.md | 7 + samples/client/petstore/ruby/docs/Numbers.md | 7 + samples/client/petstore/ruby/lib/petstore.rb | 5 +- .../ruby/lib/petstore/api/another_fake_api.rb | 2 +- .../ruby/lib/petstore/api/fake_api.rb | 2 +- .../api/fake_classname_tags123_api.rb | 2 +- .../petstore/ruby/lib/petstore/api/pet_api.rb | 2 +- .../ruby/lib/petstore/api/store_api.rb | 2 +- .../ruby/lib/petstore/api/user_api.rb | 2 +- .../petstore/ruby/lib/petstore/api_client.rb | 2 +- .../petstore/ruby/lib/petstore/api_error.rb | 2 +- .../ruby/lib/petstore/configuration.rb | 2 +- .../models/additional_properties_class.rb | 2 +- .../ruby/lib/petstore/models/animal.rb | 2 +- .../ruby/lib/petstore/models/animal_farm.rb | 2 +- .../ruby/lib/petstore/models/api_response.rb | 2 +- .../models/array_of_array_of_number_only.rb | 2 +- .../petstore/models/array_of_number_only.rb | 2 +- .../ruby/lib/petstore/models/array_test.rb | 2 +- .../ruby/lib/petstore/models/boolean.rb | 30 ++++ .../lib/petstore/models/capitalization.rb | 2 +- .../petstore/ruby/lib/petstore/models/cat.rb | 2 +- .../ruby/lib/petstore/models/category.rb | 2 +- .../ruby/lib/petstore/models/class_model.rb | 2 +- .../ruby/lib/petstore/models/client.rb | 2 +- .../petstore/ruby/lib/petstore/models/dog.rb | 2 +- .../ruby/lib/petstore/models/enum_arrays.rb | 2 +- .../ruby/lib/petstore/models/enum_class.rb | 2 +- .../ruby/lib/petstore/models/enum_test.rb | 2 +- .../ruby/lib/petstore/models/format_test.rb | 2 +- .../lib/petstore/models/has_only_read_only.rb | 2 +- .../petstore/ruby/lib/petstore/models/ints.rb | 35 ++++ .../petstore/ruby/lib/petstore/models/list.rb | 2 +- .../ruby/lib/petstore/models/map_test.rb | 2 +- ...perties_and_additional_properties_class.rb | 2 +- .../lib/petstore/models/model_200_response.rb | 2 +- .../ruby/lib/petstore/models/model_return.rb | 2 +- .../petstore/ruby/lib/petstore/models/name.rb | 2 +- .../ruby/lib/petstore/models/number_only.rb | 2 +- .../ruby/lib/petstore/models/numbers.rb | 32 ++++ .../ruby/lib/petstore/models/order.rb | 2 +- .../ruby/lib/petstore/models/outer_boolean.rb | 2 +- .../lib/petstore/models/outer_composite.rb | 2 +- .../ruby/lib/petstore/models/outer_enum.rb | 2 +- .../ruby/lib/petstore/models/outer_number.rb | 2 +- .../ruby/lib/petstore/models/outer_string.rb | 2 +- .../petstore/ruby/lib/petstore/models/pet.rb | 2 +- .../lib/petstore/models/read_only_first.rb | 2 +- .../lib/petstore/models/special_model_name.rb | 2 +- .../petstore/ruby/lib/petstore/models/tag.rb | 2 +- .../petstore/ruby/lib/petstore/models/user.rb | 2 +- .../petstore/ruby/lib/petstore/version.rb | 2 +- samples/client/petstore/ruby/petstore.gemspec | 12 +- .../petstore/ruby/spec/models/boolean_spec.rb | 35 ++++ .../petstore/ruby/spec/models/ints_spec.rb | 35 ++++ .../petstore/ruby/spec/models/numbers_spec.rb | 35 ++++ 73 files changed, 492 insertions(+), 101 deletions(-) create mode 100644 samples/client/petstore-security-test/ruby/.rubocop.yml create mode 100644 samples/client/petstore/ruby/docs/Boolean.md create mode 100644 samples/client/petstore/ruby/docs/Ints.md create mode 100644 samples/client/petstore/ruby/docs/Numbers.md create mode 100644 samples/client/petstore/ruby/lib/petstore/models/boolean.rb create mode 100644 samples/client/petstore/ruby/lib/petstore/models/ints.rb create mode 100644 samples/client/petstore/ruby/lib/petstore/models/numbers.rb create mode 100644 samples/client/petstore/ruby/spec/models/boolean_spec.rb create mode 100644 samples/client/petstore/ruby/spec/models/ints_spec.rb create mode 100644 samples/client/petstore/ruby/spec/models/numbers_spec.rb diff --git a/samples/client/petstore-security-test/ruby/.gitignore b/samples/client/petstore-security-test/ruby/.gitignore index 4b91271a6d5..c021594bf3f 100644 --- a/samples/client/petstore-security-test/ruby/.gitignore +++ b/samples/client/petstore-security-test/ruby/.gitignore @@ -1,5 +1,5 @@ # Generated by: https://github.com/swagger-api/swagger-codegen.git -# +# *.gem *.rbc diff --git a/samples/client/petstore-security-test/ruby/.rubocop.yml b/samples/client/petstore-security-test/ruby/.rubocop.yml new file mode 100644 index 00000000000..19a777e1615 --- /dev/null +++ b/samples/client/petstore-security-test/ruby/.rubocop.yml @@ -0,0 +1,154 @@ +# This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license) +# Automatically generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen) +AllCops: + TargetRubyVersion: 2.2 + # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop + # to ignore them, so only the ones explicitly set in this file are enabled. + DisabledByDefault: true + Exclude: + - '**/templates/**/*' + - '**/vendor/**/*' + - 'actionpack/lib/action_dispatch/journey/parser.rb' + +# Prefer &&/|| over and/or. +Style/AndOr: + Enabled: true + +# Do not use braces for hash literals when they are the last argument of a +# method call. +Style/BracesAroundHashParameters: + Enabled: true + EnforcedStyle: context_dependent + +# Align `when` with `case`. +Layout/CaseIndentation: + Enabled: true + +# Align comments with method definitions. +Layout/CommentIndentation: + Enabled: true + +Layout/ElseAlignment: + Enabled: true + +Layout/EmptyLineAfterMagicComment: + Enabled: true + +# In a regular class definition, no empty lines around the body. +Layout/EmptyLinesAroundClassBody: + Enabled: true + +# In a regular method definition, no empty lines around the body. +Layout/EmptyLinesAroundMethodBody: + Enabled: true + +# In a regular module definition, no empty lines around the body. +Layout/EmptyLinesAroundModuleBody: + Enabled: true + +Layout/FirstParameterIndentation: + Enabled: true + +# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }. +Style/HashSyntax: + Enabled: false + +# Method definitions after `private` or `protected` isolated calls need one +# extra level of indentation. +Layout/IndentationConsistency: + Enabled: true + EnforcedStyle: rails + +# Two spaces, no tabs (for indentation). +Layout/IndentationWidth: + Enabled: true + +Layout/LeadingCommentSpace: + Enabled: true + +Layout/SpaceAfterColon: + Enabled: true + +Layout/SpaceAfterComma: + Enabled: true + +Layout/SpaceAroundEqualsInParameterDefault: + Enabled: true + +Layout/SpaceAroundKeyword: + Enabled: true + +Layout/SpaceAroundOperators: + Enabled: true + +Layout/SpaceBeforeComma: + Enabled: true + +Layout/SpaceBeforeFirstArg: + Enabled: true + +Style/DefWithParentheses: + Enabled: true + +# Defining a method with parameters needs parentheses. +Style/MethodDefParentheses: + Enabled: true + +Style/FrozenStringLiteralComment: + Enabled: false + EnforcedStyle: always + +# Use `foo {}` not `foo{}`. +Layout/SpaceBeforeBlockBraces: + Enabled: true + +# Use `foo { bar }` not `foo {bar}`. +Layout/SpaceInsideBlockBraces: + Enabled: true + +# Use `{ a: 1 }` not `{a:1}`. +Layout/SpaceInsideHashLiteralBraces: + Enabled: true + +Layout/SpaceInsideParens: + Enabled: true + +# Check quotes usage according to lint rule below. +#Style/StringLiterals: +# Enabled: true +# EnforcedStyle: single_quotes + +# Detect hard tabs, no hard tabs. +Layout/Tab: + Enabled: true + +# Blank lines should not have any spaces. +Layout/TrailingBlankLines: + Enabled: true + +# No trailing whitespace. +Layout/TrailingWhitespace: + Enabled: false + +# Use quotes for string literals when they are enough. +Style/UnneededPercentQ: + Enabled: true + +# Align `end` with the matching keyword or starting expression except for +# assignments, where it should be aligned with the LHS. +Lint/EndAlignment: + Enabled: true + EnforcedStyleAlignWith: variable + AutoCorrect: true + +# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg. +Lint/RequireParentheses: + Enabled: true + +Style/RedundantReturn: + Enabled: true + AllowMultipleReturnValues: true + +Style/Semicolon: + Enabled: true + AllowAsExpressionSeparator: true diff --git a/samples/client/petstore-security-test/ruby/.swagger-codegen/VERSION b/samples/client/petstore-security-test/ruby/.swagger-codegen/VERSION index f9f7450d135..5d1e420af01 100644 --- a/samples/client/petstore-security-test/ruby/.swagger-codegen/VERSION +++ b/samples/client/petstore-security-test/ruby/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.4.42-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore-security-test/ruby/README.md b/samples/client/petstore-security-test/ruby/README.md index 02148d50258..117b3eef3be 100644 --- a/samples/client/petstore-security-test/ruby/README.md +++ b/samples/client/petstore-security-test/ruby/README.md @@ -57,7 +57,7 @@ require 'petstore' api_instance = Petstore::FakeApi.new opts = { - test_code_inject____end____rn_n_r: "test_code_inject____end____rn_n_r_example" # String | To test code injection */ ' \" =_end -- \\r\\n \\n \\r + test_code_inject____end____rn_n_r: 'test_code_inject____end____rn_n_r_example' # String | To test code injection */ ' \" =_end -- \\r\\n \\n \\r } begin diff --git a/samples/client/petstore-security-test/ruby/docs/FakeApi.md b/samples/client/petstore-security-test/ruby/docs/FakeApi.md index 43e3d617072..3971530e429 100644 --- a/samples/client/petstore-security-test/ruby/docs/FakeApi.md +++ b/samples/client/petstore-security-test/ruby/docs/FakeApi.md @@ -20,7 +20,7 @@ require 'petstore' api_instance = Petstore::FakeApi.new opts = { - test_code_inject____end____rn_n_r: "test_code_inject____end____rn_n_r_example" # String | To test code injection */ ' \" =_end -- \\r\\n \\n \\r + test_code_inject____end____rn_n_r: 'test_code_inject____end____rn_n_r_example' # String | To test code injection */ ' \" =_end -- \\r\\n \\n \\r } begin diff --git a/samples/client/petstore-security-test/ruby/git_push.sh b/samples/client/petstore-security-test/ruby/git_push.sh index 7cb1edb122b..89eb49eca9c 100644 --- a/samples/client/petstore-security-test/ruby/git_push.sh +++ b/samples/client/petstore-security-test/ruby/git_push.sh @@ -39,7 +39,7 @@ git_remote=`git remote` if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git else git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git diff --git a/samples/client/petstore-security-test/ruby/lib/petstore.rb b/samples/client/petstore-security-test/ruby/lib/petstore.rb index 5c6e14b6a4a..3b1540c25ca 100644 --- a/samples/client/petstore-security-test/ruby/lib/petstore.rb +++ b/samples/client/petstore-security-test/ruby/lib/petstore.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.3.0-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore-security-test/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore-security-test/ruby/lib/petstore/api/fake_api.rb index 62ba6e73b8f..00cbb8c8aa9 100644 --- a/samples/client/petstore-security-test/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore-security-test/ruby/lib/petstore/api/fake_api.rb @@ -6,11 +6,11 @@ OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.3.0-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end -require "uri" +require 'uri' module Petstore class FakeApi @@ -19,28 +19,25 @@ class FakeApi def initialize(api_client = ApiClient.default) @api_client = api_client end - # To test code injection */ ' \" =_end -- \\r\\n \\n \\r - # # @param [Hash] opts the optional parameters # @option opts [String] :test_code_inject____end____rn_n_r To test code injection */ ' \" =_end -- \\r\\n \\n \\r # @return [nil] def test_code_inject____end__rn_n_r(opts = {}) test_code_inject____end__rn_n_r_with_http_info(opts) - return nil + nil end # To test code injection */ ' \" =_end -- \\r\\n \\n \\r - # # @param [Hash] opts the optional parameters # @option opts [String] :test_code_inject____end____rn_n_r To test code injection */ ' \" =_end -- \\r\\n \\n \\r # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def test_code_inject____end__rn_n_r_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: FakeApi.test_code_inject____end__rn_n_r ..." + @api_client.config.logger.debug 'Calling API: FakeApi.test_code_inject____end__rn_n_r ...' end # resource path - local_var_path = "/fake" + local_var_path = '/fake' # query parameters query_params = {} @@ -54,7 +51,7 @@ def test_code_inject____end__rn_n_r_with_http_info(opts = {}) # form parameters form_params = {} - form_params["test code inject */ ' " =end -- \r\n \n \r"] = opts[:'test_code_inject____end____rn_n_r'] if !opts[:'test_code_inject____end____rn_n_r'].nil? + form_params['test code inject */ ' " =end -- \r\n \n \r'] = opts[:'test_code_inject____end____rn_n_r'] if !opts[:'test_code_inject____end____rn_n_r'].nil? # http body (model) post_body = nil diff --git a/samples/client/petstore-security-test/ruby/lib/petstore/api_client.rb b/samples/client/petstore-security-test/ruby/lib/petstore/api_client.rb index 9c68cfea20d..aac2793cc34 100644 --- a/samples/client/petstore-security-test/ruby/lib/petstore/api_client.rb +++ b/samples/client/petstore-security-test/ruby/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.3.0-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end @@ -15,7 +15,7 @@ require 'logger' require 'tempfile' require 'typhoeus' -require 'uri' +require 'addressable/uri' module Petstore class ApiClient @@ -33,7 +33,7 @@ def initialize(config = Configuration.default) @config = config @user_agent = "Swagger-Codegen/#{VERSION}/ruby" @default_headers = { - 'Content-Type' => "application/json", + 'Content-Type' => 'application/json', 'User-Agent' => @user_agent } end @@ -63,7 +63,7 @@ def call_api(http_method, path, opts = {}) :message => response.return_message) else fail ApiError.new(:code => response.code, - :response_headers => response.headers, + :response_headers => response.headers.to_h, :response_body => response.body), response.status_message end @@ -112,6 +112,8 @@ def build_request(http_method, path, opts = {}) :verbose => @config.debugging } + req_opts.merge!(multipart: true) if header_params['Content-Type'].start_with? "multipart/" + # set custom cert, if provided req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert @@ -137,7 +139,7 @@ def build_request(http_method, path, opts = {}) # @param [String] mime MIME # @return [Boolean] True if the MIME is application/json def json_mime?(mime) - (mime == "*/*") || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil? + (mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil? end # Deserialize the response to the given return type. @@ -201,12 +203,12 @@ def convert_to_type(data, return_type) when /\AArray<(.+)>\z/ # e.g. Array sub_type = $1 - data.map {|item| convert_to_type(item, sub_type) } + data.map { |item| convert_to_type(item, sub_type) } when /\AHash\\z/ # e.g. Hash sub_type = $1 {}.tap do |hash| - data.each {|k, v| hash[k] = convert_to_type(v, sub_type) } + data.each { |k, v| hash[k] = convert_to_type(v, sub_type) } end else # models, e.g. Pet @@ -228,7 +230,7 @@ def download_file(request) encoding = nil request.on_headers do |response| content_disposition = response.headers['Content-Disposition'] - if content_disposition and content_disposition =~ /filename=/i + if content_disposition && content_disposition =~ /filename=/i filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1] prefix = sanitize_filename(filename) else @@ -264,7 +266,7 @@ def sanitize_filename(filename) def build_request_url(path) # Add leading and trailing slashes to path path = "/#{path}".gsub(/\/+/, '/') - URI.encode(@config.base_url + path) + Addressable::URI.encode(@config.base_url + path) end # Builds the HTTP request body @@ -327,7 +329,7 @@ def select_header_accept(accepts) return nil if accepts.nil? || accepts.empty? # use JSON when present, otherwise use all of the provided json_accept = accepts.find { |s| json_mime?(s) } - return json_accept || accepts.join(',') + json_accept || accepts.join(',') end # Return Content-Type header based on an array of content types provided. @@ -338,7 +340,7 @@ def select_header_content_type(content_types) return 'application/json' if content_types.nil? || content_types.empty? # use JSON when present, otherwise use the first one json_content_type = content_types.find { |s| json_mime?(s) } - return json_content_type || content_types.first + json_content_type || content_types.first end # Convert object (array, hash, object, etc) to JSON string. @@ -348,7 +350,7 @@ def object_to_http_body(model) return model if model.nil? || model.is_a?(String) local_body = nil if model.is_a?(Array) - local_body = model.map{|m| object_to_hash(m) } + local_body = model.map { |m| object_to_hash(m) } else local_body = object_to_hash(model) end diff --git a/samples/client/petstore-security-test/ruby/lib/petstore/api_error.rb b/samples/client/petstore-security-test/ruby/lib/petstore/api_error.rb index 27fd7c1a8ef..ac11441e792 100644 --- a/samples/client/petstore-security-test/ruby/lib/petstore/api_error.rb +++ b/samples/client/petstore-security-test/ruby/lib/petstore/api_error.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.3.0-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore-security-test/ruby/lib/petstore/configuration.rb b/samples/client/petstore-security-test/ruby/lib/petstore/configuration.rb index 78fcfc16030..4c60ce6c0ee 100644 --- a/samples/client/petstore-security-test/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore-security-test/ruby/lib/petstore/configuration.rb @@ -6,11 +6,11 @@ OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.3.0-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end -require 'uri' +require 'addressable/uri' module Petstore class Configuration @@ -170,12 +170,12 @@ def host=(host) def base_path=(base_path) # Add leading and trailing slashes to base_path @base_path = "/#{base_path}".gsub(/\/+/, '/') - @base_path = "" if @base_path == "/" + @base_path = '' if @base_path == '/' end def base_url url = "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') - URI.encode(url) + Addressable::URI.encode(url) end # Gets API key (with prefix if set). diff --git a/samples/client/petstore-security-test/ruby/lib/petstore/models/model_return.rb b/samples/client/petstore-security-test/ruby/lib/petstore/models/model_return.rb index 99d2d2eab1a..9ca516957ec 100644 --- a/samples/client/petstore-security-test/ruby/lib/petstore/models/model_return.rb +++ b/samples/client/petstore-security-test/ruby/lib/petstore/models/model_return.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.3.0-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end @@ -18,7 +18,6 @@ class ModelReturn # property description */ ' \" =_end -- \\r\\n \\n \\r attr_accessor :_return - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -39,25 +38,24 @@ def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key - attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'return') self._return = attributes[:'return'] end - end # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properies with the reasons + # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - return invalid_properties + invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return true + true end # Checks equality by comparing each attribute. @@ -90,7 +88,7 @@ def build_from_hash(attributes) # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) @@ -172,7 +170,7 @@ def to_hash # @return [Hash] Returns the value in the form of hash def _to_hash(value) if value.is_a?(Array) - value.compact.map{ |v| _to_hash(v) } + value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } @@ -185,5 +183,4 @@ def _to_hash(value) end end - end diff --git a/samples/client/petstore-security-test/ruby/lib/petstore/version.rb b/samples/client/petstore-security-test/ruby/lib/petstore/version.rb index c6ba3189c52..593b116d8a0 100644 --- a/samples/client/petstore-security-test/ruby/lib/petstore/version.rb +++ b/samples/client/petstore-security-test/ruby/lib/petstore/version.rb @@ -6,10 +6,10 @@ OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.3.0-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end module Petstore - VERSION = "1.0.0" + VERSION = '1.0.0' end diff --git a/samples/client/petstore-security-test/ruby/petstore.gemspec b/samples/client/petstore-security-test/ruby/petstore.gemspec index b525d76e62c..f02a756ac38 100644 --- a/samples/client/petstore-security-test/ruby/petstore.gemspec +++ b/samples/client/petstore-security-test/ruby/petstore.gemspec @@ -1,5 +1,5 @@ # -*- encoding: utf-8 -*- -# + =begin #Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r @@ -8,7 +8,7 @@ OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.3.0-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end @@ -24,12 +24,12 @@ Gem::Specification.new do |s| s.homepage = "https://github.com/swagger-api/swagger-codegen" s.summary = "Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r Ruby Gem" s.description = "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end -- " - # TODO uncomment and update below with a proper license - #s.license = "Apache 2.0" + s.license = "Unlicense" s.required_ruby_version = ">= 1.9" s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0' + s.add_runtime_dependency 'addressable', '~> 2.3', '>= 2.3.0' s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0' s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1' @@ -39,8 +39,14 @@ Gem::Specification.new do |s| s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16' s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12' - s.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? } - s.test_files = `find spec/*`.split("\n") + gemspec = File.basename(__FILE__) + spec.files = IO.popen(%w[find * -print0], chdir: __dir__, err: IO::NULL) do |ls| + ls.readlines("\x0", chomp: true).reject do |f| + (f == gemspec) || + f.start_with?(*%w[bin/ test/ spec/ features/ .git Gemfile]) || + f.end_with?(".gem") + end + end s.executables = [] s.require_paths = ["lib"] end diff --git a/samples/client/petstore/ruby/.swagger-codegen/VERSION b/samples/client/petstore/ruby/.swagger-codegen/VERSION index 0443c4ad098..5d1e420af01 100644 --- a/samples/client/petstore/ruby/.swagger-codegen/VERSION +++ b/samples/client/petstore/ruby/.swagger-codegen/VERSION @@ -1 +1 @@ -2.4.16-SNAPSHOT \ No newline at end of file +2.4.42-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ruby/README.md b/samples/client/petstore/ruby/README.md index e6216d676d1..262a52f64d2 100644 --- a/samples/client/petstore/ruby/README.md +++ b/samples/client/petstore/ruby/README.md @@ -118,6 +118,7 @@ Class | Method | HTTP request | Description - [Petstore::ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [Petstore::ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [Petstore::ArrayTest](docs/ArrayTest.md) + - [Petstore::Boolean](docs/Boolean.md) - [Petstore::Capitalization](docs/Capitalization.md) - [Petstore::Cat](docs/Cat.md) - [Petstore::Category](docs/Category.md) @@ -129,6 +130,7 @@ Class | Method | HTTP request | Description - [Petstore::EnumTest](docs/EnumTest.md) - [Petstore::FormatTest](docs/FormatTest.md) - [Petstore::HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [Petstore::Ints](docs/Ints.md) - [Petstore::List](docs/List.md) - [Petstore::MapTest](docs/MapTest.md) - [Petstore::MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) @@ -136,6 +138,7 @@ Class | Method | HTTP request | Description - [Petstore::ModelReturn](docs/ModelReturn.md) - [Petstore::Name](docs/Name.md) - [Petstore::NumberOnly](docs/NumberOnly.md) + - [Petstore::Numbers](docs/Numbers.md) - [Petstore::Order](docs/Order.md) - [Petstore::OuterBoolean](docs/OuterBoolean.md) - [Petstore::OuterComposite](docs/OuterComposite.md) diff --git a/samples/client/petstore/ruby/docs/Boolean.md b/samples/client/petstore/ruby/docs/Boolean.md new file mode 100644 index 00000000000..e7992e96528 --- /dev/null +++ b/samples/client/petstore/ruby/docs/Boolean.md @@ -0,0 +1,7 @@ +# Petstore::Boolean + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/samples/client/petstore/ruby/docs/Ints.md b/samples/client/petstore/ruby/docs/Ints.md new file mode 100644 index 00000000000..95a8e5f1a6d --- /dev/null +++ b/samples/client/petstore/ruby/docs/Ints.md @@ -0,0 +1,7 @@ +# Petstore::Ints + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/samples/client/petstore/ruby/docs/Numbers.md b/samples/client/petstore/ruby/docs/Numbers.md new file mode 100644 index 00000000000..28bf163c36b --- /dev/null +++ b/samples/client/petstore/ruby/docs/Numbers.md @@ -0,0 +1,7 @@ +# Petstore::Numbers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/samples/client/petstore/ruby/lib/petstore.rb b/samples/client/petstore/ruby/lib/petstore.rb index f9178c3093d..8a42966e01f 100644 --- a/samples/client/petstore/ruby/lib/petstore.rb +++ b/samples/client/petstore/ruby/lib/petstore.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end @@ -24,6 +24,7 @@ require 'petstore/models/array_of_array_of_number_only' require 'petstore/models/array_of_number_only' require 'petstore/models/array_test' +require 'petstore/models/boolean' require 'petstore/models/capitalization' require 'petstore/models/cat' require 'petstore/models/category' @@ -35,6 +36,7 @@ require 'petstore/models/enum_test' require 'petstore/models/format_test' require 'petstore/models/has_only_read_only' +require 'petstore/models/ints' require 'petstore/models/list' require 'petstore/models/map_test' require 'petstore/models/mixed_properties_and_additional_properties_class' @@ -42,6 +44,7 @@ require 'petstore/models/model_return' require 'petstore/models/name' require 'petstore/models/number_only' +require 'petstore/models/numbers' require 'petstore/models/order' require 'petstore/models/outer_boolean' require 'petstore/models/outer_composite' diff --git a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb index 1820a55565d..694707a4219 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb index d62894794fe..c61cd20dbec 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb index a66299b4818..655d31904c4 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb index ed93deaca0a..56376c3c890 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb index 6e5e90534c9..cfe15b11776 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb index e98e72edf2b..be93ca5619a 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_client.rb b/samples/client/petstore/ruby/lib/petstore/api_client.rb index 84f6e8eeaaf..5da87716aca 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_error.rb b/samples/client/petstore/ruby/lib/petstore/api_error.rb index bfb23ed2401..fbcff8b0bb9 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_error.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb index 6a238a3a556..9302cc179bb 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb index c461d0ecf04..52b7f3a3b1b 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/animal.rb b/samples/client/petstore/ruby/lib/petstore/models/animal.rb index 4166472bd44..fd29c18d49f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/animal.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb b/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb index 55a4a0c7715..222f1fb3aab 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb index 1b862a54068..3d3fba94905 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb index aa098102e57..98c5da6f86c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb index 74c7b9ee577..bb7d19effbb 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb index 3c1956544e0..abc41c69f6e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/boolean.rb b/samples/client/petstore/ruby/lib/petstore/models/boolean.rb new file mode 100644 index 00000000000..6e5518b62de --- /dev/null +++ b/samples/client/petstore/ruby/lib/petstore/models/boolean.rb @@ -0,0 +1,30 @@ +=begin +#Swagger Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +OpenAPI spec version: 1.0.0 +Contact: apiteam@swagger.io +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.42-SNAPSHOT + +=end + +require 'date' + +module Petstore + class Boolean + + TRUE = 'true'.freeze + FALSE = 'false'.freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = Boolean.constants.select { |c| Boolean::const_get(c) == value } + raise "Invalid ENUM value #{value} for class #Boolean" if constantValues.empty? + value + end + end +end diff --git a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb index 0c6fdcd27fc..074bf8806c2 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat.rb b/samples/client/petstore/ruby/lib/petstore/models/cat.rb index 3da29590f6d..877de181783 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/category.rb b/samples/client/petstore/ruby/lib/petstore/models/category.rb index 185b0db2294..81af239eb39 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/category.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb index da9ea871323..8b76ffd9a7a 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/client.rb b/samples/client/petstore/ruby/lib/petstore/models/client.rb index f77087a4e77..21b9ce7647a 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/client.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/client.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog.rb b/samples/client/petstore/ruby/lib/petstore/models/dog.rb index 8f792d2f19c..75f55d283a8 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb index ab1b9261009..2bafaef6ce0 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb index f88c4b57beb..6dfbb2ba43b 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb index b88ed2c5bc2..d77a6d82000 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb index cc945bcab14..22c84c1cc11 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb index 57a5dcb1143..aa1a1589429 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/ints.rb b/samples/client/petstore/ruby/lib/petstore/models/ints.rb new file mode 100644 index 00000000000..57fb5716627 --- /dev/null +++ b/samples/client/petstore/ruby/lib/petstore/models/ints.rb @@ -0,0 +1,35 @@ +=begin +#Swagger Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +OpenAPI spec version: 1.0.0 +Contact: apiteam@swagger.io +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.42-SNAPSHOT + +=end + +require 'date' + +module Petstore + class Ints + + N0 = 0.freeze + N1 = 1.freeze + N2 = 2.freeze + N3 = 3.freeze + N4 = 4.freeze + N5 = 5.freeze + N6 = 6.freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = Ints.constants.select { |c| Ints::const_get(c) == value } + raise "Invalid ENUM value #{value} for class #Ints" if constantValues.empty? + value + end + end +end diff --git a/samples/client/petstore/ruby/lib/petstore/models/list.rb b/samples/client/petstore/ruby/lib/petstore/models/list.rb index c7d9ea4d875..11e2297d905 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/list.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/list.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb index e985e71ec1d..15508a85fce 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index a1938120ae9..8dd0a4fe20d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model_200_response.rb b/samples/client/petstore/ruby/lib/petstore/models/model_200_response.rb index 2d907646865..0fb41db2e52 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model_200_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model_200_response.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb index d9dbbdf9a60..77eebe68f2f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/name.rb b/samples/client/petstore/ruby/lib/petstore/models/name.rb index 17116afdcf2..3b52f4c4250 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/name.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb index f80578c1834..5fa3e2b2823 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/numbers.rb b/samples/client/petstore/ruby/lib/petstore/models/numbers.rb new file mode 100644 index 00000000000..22fce87ba8b --- /dev/null +++ b/samples/client/petstore/ruby/lib/petstore/models/numbers.rb @@ -0,0 +1,32 @@ +=begin +#Swagger Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +OpenAPI spec version: 1.0.0 +Contact: apiteam@swagger.io +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.42-SNAPSHOT + +=end + +require 'date' + +module Petstore + class Numbers + + N7 = 7.freeze + N8 = 8.freeze + N9 = 9.freeze + N10 = 10.freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = Numbers.constants.select { |c| Numbers::const_get(c) == value } + raise "Invalid ENUM value #{value} for class #Numbers" if constantValues.empty? + value + end + end +end diff --git a/samples/client/petstore/ruby/lib/petstore/models/order.rb b/samples/client/petstore/ruby/lib/petstore/models/order.rb index 200419a00a6..51ca18a9373 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/order.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_boolean.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_boolean.rb index 3f51cf3c79e..49114cd6f88 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_boolean.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_boolean.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb index fcb9167cbb5..81d3a7c389b 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb index 0314b3f7c48..b7988f5608e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_number.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_number.rb index 2dd66c83a4a..47eaf8f92c2 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_number.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_number.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_string.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_string.rb index 35779fe39b9..5a9a6cb9b5e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_string.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_string.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/pet.rb b/samples/client/petstore/ruby/lib/petstore/models/pet.rb index 84f763dff4e..41b488c9271 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/pet.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb index ec3db1c62fd..dd9847250fe 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb index 8dfe91f923c..50c1e722e04 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/tag.rb b/samples/client/petstore/ruby/lib/petstore/models/tag.rb index fbada771e25..8a9b6c63482 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/tag.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/user.rb b/samples/client/petstore/ruby/lib/petstore/models/user.rb index 1d3bb555e7f..41db97a0de5 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/user.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/version.rb b/samples/client/petstore/ruby/lib/petstore/version.rb index 2f5f87c9635..7b0b8315dcb 100644 --- a/samples/client/petstore/ruby/lib/petstore/version.rb +++ b/samples/client/petstore/ruby/lib/petstore/version.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/petstore.gemspec b/samples/client/petstore/ruby/petstore.gemspec index 79539b5d59b..ca11de680f9 100644 --- a/samples/client/petstore/ruby/petstore.gemspec +++ b/samples/client/petstore/ruby/petstore.gemspec @@ -8,7 +8,7 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.4.16-SNAPSHOT +Swagger Codegen version: 2.4.42-SNAPSHOT =end @@ -39,8 +39,14 @@ Gem::Specification.new do |s| s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16' s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12' - s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? } - s.test_files = `find spec/*`.split("\n") + gemspec = File.basename(__FILE__) + spec.files = IO.popen(%w[find * -print0], chdir: __dir__, err: IO::NULL) do |ls| + ls.readlines("\x0", chomp: true).reject do |f| + (f == gemspec) || + f.start_with?(*%w[bin/ test/ spec/ features/ .git Gemfile]) || + f.end_with?(".gem") + end + end s.executables = [] s.require_paths = ["lib"] end diff --git a/samples/client/petstore/ruby/spec/models/boolean_spec.rb b/samples/client/petstore/ruby/spec/models/boolean_spec.rb new file mode 100644 index 00000000000..c9bb8ffd081 --- /dev/null +++ b/samples/client/petstore/ruby/spec/models/boolean_spec.rb @@ -0,0 +1,35 @@ +=begin +#Swagger Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +OpenAPI spec version: 1.0.0 +Contact: apiteam@swagger.io +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.42-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::Boolean +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Boolean' do + before do + # run before each test + @instance = Petstore::Boolean.new + end + + after do + # run after each test + end + + describe 'test an instance of Boolean' do + it 'should create an instance of Boolean' do + expect(@instance).to be_instance_of(Petstore::Boolean) + end + end +end diff --git a/samples/client/petstore/ruby/spec/models/ints_spec.rb b/samples/client/petstore/ruby/spec/models/ints_spec.rb new file mode 100644 index 00000000000..7964954703a --- /dev/null +++ b/samples/client/petstore/ruby/spec/models/ints_spec.rb @@ -0,0 +1,35 @@ +=begin +#Swagger Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +OpenAPI spec version: 1.0.0 +Contact: apiteam@swagger.io +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.42-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::Ints +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Ints' do + before do + # run before each test + @instance = Petstore::Ints.new + end + + after do + # run after each test + end + + describe 'test an instance of Ints' do + it 'should create an instance of Ints' do + expect(@instance).to be_instance_of(Petstore::Ints) + end + end +end diff --git a/samples/client/petstore/ruby/spec/models/numbers_spec.rb b/samples/client/petstore/ruby/spec/models/numbers_spec.rb new file mode 100644 index 00000000000..12a41f0f604 --- /dev/null +++ b/samples/client/petstore/ruby/spec/models/numbers_spec.rb @@ -0,0 +1,35 @@ +=begin +#Swagger Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +OpenAPI spec version: 1.0.0 +Contact: apiteam@swagger.io +Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.4.42-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::Numbers +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'Numbers' do + before do + # run before each test + @instance = Petstore::Numbers.new + end + + after do + # run after each test + end + + describe 'test an instance of Numbers' do + it 'should create an instance of Numbers' do + expect(@instance).to be_instance_of(Petstore::Numbers) + end + end +end