Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run bin/ruby-petstore.sh
Browse files Browse the repository at this point in the history
segiddins committed Jul 29, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 7769ecd commit 82613df
Showing 73 changed files with 492 additions and 101 deletions.
2 changes: 1 addition & 1 deletion samples/client/petstore-security-test/ruby/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated by: https://github.com/swagger-api/swagger-codegen.git
#
#

*.gem
*.rbc
154 changes: 154 additions & 0 deletions samples/client/petstore-security-test/ruby/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.0-SNAPSHOT
2.4.42-SNAPSHOT
2 changes: 1 addition & 1 deletion samples/client/petstore-security-test/ruby/README.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion samples/client/petstore-security-test/ruby/docs/FakeApi.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion samples/client/petstore-security-test/ruby/git_push.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion samples/client/petstore-security-test/ruby/lib/petstore.rb
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
Contact: [email protected] */ ' \" =_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

Original file line number Diff line number Diff line change
@@ -6,11 +6,11 @@
OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
Contact: [email protected] */ ' \" =_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 */ &#39; &quot; &#x3D;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 */ &#39; &quot; &#x3D;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
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
OpenAPI spec version: 1.0.0 */ &#39; \&quot; &#x3D;_end -- \\r\\n \\n \\r
Contact: [email protected] */ ' \" =_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<Pet>
sub_type = $1
data.map {|item| convert_to_type(item, sub_type) }
data.map { |item| convert_to_type(item, sub_type) }
when /\AHash\<String, (.+)\>\z/
# e.g. Hash<String, Integer>
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
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
OpenAPI spec version: 1.0.0 */ &#39; \&quot; &#x3D;_end -- \\r\\n \\n \\r
Contact: [email protected] */ ' \" =_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

Original file line number Diff line number Diff line change
@@ -6,11 +6,11 @@
OpenAPI spec version: 1.0.0 */ &#39; \&quot; &#x3D;_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).
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
OpenAPI spec version: 1.0.0 */ &#39; \&quot; &#x3D;_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
Original file line number Diff line number Diff line change
@@ -6,10 +6,10 @@
OpenAPI spec version: 1.0.0 */ &#39; \&quot; &#x3D;_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
18 changes: 12 additions & 6 deletions samples/client/petstore-security-test/ruby/petstore.gemspec
Original file line number Diff line number Diff line change
@@ -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 */ &#39; \&quot; &#x3D;_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
2 changes: 1 addition & 1 deletion samples/client/petstore/ruby/.swagger-codegen/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.16-SNAPSHOT
2.4.42-SNAPSHOT
3 changes: 3 additions & 0 deletions samples/client/petstore/ruby/README.md
Original file line number Diff line number Diff line change
@@ -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,13 +130,15 @@ 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)
- [Petstore::Model200Response](docs/Model200Response.md)
- [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)
7 changes: 7 additions & 0 deletions samples/client/petstore/ruby/docs/Boolean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Petstore::Boolean

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------


7 changes: 7 additions & 0 deletions samples/client/petstore/ruby/docs/Ints.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Petstore::Ints

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------


7 changes: 7 additions & 0 deletions samples/client/petstore/ruby/docs/Numbers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Petstore::Numbers

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------


5 changes: 4 additions & 1 deletion samples/client/petstore/ruby/lib/petstore.rb
Original file line number Diff line number Diff line change
@@ -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,13 +36,15 @@
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'
require 'petstore/models/model_200_response'
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'
Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion samples/client/petstore/ruby/lib/petstore/api/fake_api.rb
Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion samples/client/petstore/ruby/lib/petstore/api/pet_api.rb
Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion samples/client/petstore/ruby/lib/petstore/api/store_api.rb
Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion samples/client/petstore/ruby/lib/petstore/api/user_api.rb
Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion samples/client/petstore/ruby/lib/petstore/api_client.rb
Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion samples/client/petstore/ruby/lib/petstore/api_error.rb
Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion samples/client/petstore/ruby/lib/petstore/configuration.rb
Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion samples/client/petstore/ruby/lib/petstore/models/animal.rb
Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

30 changes: 30 additions & 0 deletions samples/client/petstore/ruby/lib/petstore/models/boolean.rb
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion samples/client/petstore/ruby/lib/petstore/models/cat.rb
Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion samples/client/petstore/ruby/lib/petstore/models/client.rb
Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion samples/client/petstore/ruby/lib/petstore/models/dog.rb
Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

35 changes: 35 additions & 0 deletions samples/client/petstore/ruby/lib/petstore/models/ints.rb
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion samples/client/petstore/ruby/lib/petstore/models/list.rb
Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion samples/client/petstore/ruby/lib/petstore/models/name.rb
Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

32 changes: 32 additions & 0 deletions samples/client/petstore/ruby/lib/petstore/models/numbers.rb
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion samples/client/petstore/ruby/lib/petstore/models/order.rb
Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion samples/client/petstore/ruby/lib/petstore/models/pet.rb
Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion samples/client/petstore/ruby/lib/petstore/models/tag.rb
Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion samples/client/petstore/ruby/lib/petstore/models/user.rb
Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion samples/client/petstore/ruby/lib/petstore/version.rb
Original file line number Diff line number Diff line change
@@ -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

12 changes: 9 additions & 3 deletions samples/client/petstore/ruby/petstore.gemspec
Original file line number Diff line number Diff line change
@@ -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
35 changes: 35 additions & 0 deletions samples/client/petstore/ruby/spec/models/boolean_spec.rb
Original file line number Diff line number Diff line change
@@ -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
35 changes: 35 additions & 0 deletions samples/client/petstore/ruby/spec/models/ints_spec.rb
Original file line number Diff line number Diff line change
@@ -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
35 changes: 35 additions & 0 deletions samples/client/petstore/ruby/spec/models/numbers_spec.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 82613df

Please sign in to comment.