forked from loafle/openapi-generator-original
regenerate ruby sample after remove tailing
This commit is contained in:
parent
6c626ccc7a
commit
1c3f1b4bf8
@ -8,7 +8,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/
|
|||||||
|
|
||||||
- API version: 1.0.0
|
- API version: 1.0.0
|
||||||
- Package version: 1.0.0
|
- Package version: 1.0.0
|
||||||
- Build date: 2016-05-10T14:47:49.265+08:00
|
- Build date: 2016-05-17T19:54:07.493+08:00
|
||||||
- Build package: class io.swagger.codegen.languages.RubyClientCodegen
|
- Build package: class io.swagger.codegen.languages.RubyClientCodegen
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
@ -138,12 +138,6 @@ Class | Method | HTTP request | Description
|
|||||||
## Documentation for Authorization
|
## Documentation for Authorization
|
||||||
|
|
||||||
|
|
||||||
### api_key
|
|
||||||
|
|
||||||
- **Type**: API key
|
|
||||||
- **API key parameter name**: api_key
|
|
||||||
- **Location**: HTTP header
|
|
||||||
|
|
||||||
### petstore_auth
|
### petstore_auth
|
||||||
|
|
||||||
- **Type**: OAuth
|
- **Type**: OAuth
|
||||||
@ -153,3 +147,9 @@ Class | Method | HTTP request | Description
|
|||||||
- write:pets: modify pets in your account
|
- write:pets: modify pets in your account
|
||||||
- read:pets: read your pets
|
- read:pets: read your pets
|
||||||
|
|
||||||
|
### api_key
|
||||||
|
|
||||||
|
- **Type**: API key
|
||||||
|
- **API key parameter name**: api_key
|
||||||
|
- **Location**: HTTP header
|
||||||
|
|
||||||
|
@ -4,5 +4,6 @@
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**class_name** | **String** | |
|
**class_name** | **String** | |
|
||||||
|
**color** | **String** | | [optional] [default to "red"]
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**class_name** | **String** | |
|
**class_name** | **String** | |
|
||||||
|
**color** | **String** | | [optional] [default to "red"]
|
||||||
**declawed** | **BOOLEAN** | | [optional]
|
**declawed** | **BOOLEAN** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**class_name** | **String** | |
|
**class_name** | **String** | |
|
||||||
|
**color** | **String** | | [optional] [default to "red"]
|
||||||
**breed** | **String** | | [optional]
|
**breed** | **String** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,5 +6,6 @@ Name | Type | Description | Notes
|
|||||||
**name** | **Integer** | |
|
**name** | **Integer** | |
|
||||||
**snake_case** | **Integer** | | [optional]
|
**snake_case** | **Integer** | | [optional]
|
||||||
**property** | **String** | | [optional]
|
**property** | **String** | | [optional]
|
||||||
|
**_123_number** | **Integer** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ Add a new pet to the store
|
|||||||
```ruby
|
```ruby
|
||||||
# load the gem
|
# load the gem
|
||||||
require 'petstore'
|
require 'petstore'
|
||||||
# setup authorization
|
# setup authorization
|
||||||
Petstore.configure do |config|
|
Petstore.configure do |config|
|
||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
config.access_token = 'YOUR ACCESS TOKEN'
|
config.access_token = 'YOUR ACCESS TOKEN'
|
||||||
@ -76,7 +76,7 @@ Deletes a pet
|
|||||||
```ruby
|
```ruby
|
||||||
# load the gem
|
# load the gem
|
||||||
require 'petstore'
|
require 'petstore'
|
||||||
# setup authorization
|
# setup authorization
|
||||||
Petstore.configure do |config|
|
Petstore.configure do |config|
|
||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
config.access_token = 'YOUR ACCESS TOKEN'
|
config.access_token = 'YOUR ACCESS TOKEN'
|
||||||
@ -131,7 +131,7 @@ Multiple status values can be provided with comma separated strings
|
|||||||
```ruby
|
```ruby
|
||||||
# load the gem
|
# load the gem
|
||||||
require 'petstore'
|
require 'petstore'
|
||||||
# setup authorization
|
# setup authorization
|
||||||
Petstore.configure do |config|
|
Petstore.configure do |config|
|
||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
config.access_token = 'YOUR ACCESS TOKEN'
|
config.access_token = 'YOUR ACCESS TOKEN'
|
||||||
@ -183,7 +183,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
|
|||||||
```ruby
|
```ruby
|
||||||
# load the gem
|
# load the gem
|
||||||
require 'petstore'
|
require 'petstore'
|
||||||
# setup authorization
|
# setup authorization
|
||||||
Petstore.configure do |config|
|
Petstore.configure do |config|
|
||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
config.access_token = 'YOUR ACCESS TOKEN'
|
config.access_token = 'YOUR ACCESS TOKEN'
|
||||||
@ -235,7 +235,7 @@ Returns a single pet
|
|||||||
```ruby
|
```ruby
|
||||||
# load the gem
|
# load the gem
|
||||||
require 'petstore'
|
require 'petstore'
|
||||||
# setup authorization
|
# setup authorization
|
||||||
Petstore.configure do |config|
|
Petstore.configure do |config|
|
||||||
# Configure API key authorization: api_key
|
# Configure API key authorization: api_key
|
||||||
config.api_key['api_key'] = 'YOUR API KEY'
|
config.api_key['api_key'] = 'YOUR API KEY'
|
||||||
@ -289,7 +289,7 @@ Update an existing pet
|
|||||||
```ruby
|
```ruby
|
||||||
# load the gem
|
# load the gem
|
||||||
require 'petstore'
|
require 'petstore'
|
||||||
# setup authorization
|
# setup authorization
|
||||||
Petstore.configure do |config|
|
Petstore.configure do |config|
|
||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
config.access_token = 'YOUR ACCESS TOKEN'
|
config.access_token = 'YOUR ACCESS TOKEN'
|
||||||
@ -340,7 +340,7 @@ Updates a pet in the store with form data
|
|||||||
```ruby
|
```ruby
|
||||||
# load the gem
|
# load the gem
|
||||||
require 'petstore'
|
require 'petstore'
|
||||||
# setup authorization
|
# setup authorization
|
||||||
Petstore.configure do |config|
|
Petstore.configure do |config|
|
||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
config.access_token = 'YOUR ACCESS TOKEN'
|
config.access_token = 'YOUR ACCESS TOKEN'
|
||||||
@ -397,7 +397,7 @@ uploads an image
|
|||||||
```ruby
|
```ruby
|
||||||
# load the gem
|
# load the gem
|
||||||
require 'petstore'
|
require 'petstore'
|
||||||
# setup authorization
|
# setup authorization
|
||||||
Petstore.configure do |config|
|
Petstore.configure do |config|
|
||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
config.access_token = 'YOUR ACCESS TOKEN'
|
config.access_token = 'YOUR ACCESS TOKEN'
|
||||||
|
@ -67,7 +67,7 @@ Returns a map of status codes to quantities
|
|||||||
```ruby
|
```ruby
|
||||||
# load the gem
|
# load the gem
|
||||||
require 'petstore'
|
require 'petstore'
|
||||||
# setup authorization
|
# setup authorization
|
||||||
Petstore.configure do |config|
|
Petstore.configure do |config|
|
||||||
# Configure API key authorization: api_key
|
# Configure API key authorization: api_key
|
||||||
config.api_key['api_key'] = 'YOUR API KEY'
|
config.api_key['api_key'] = 'YOUR API KEY'
|
||||||
|
@ -28,7 +28,7 @@ git init
|
|||||||
# Adds the files in the local repository and stages them for commit.
|
# Adds the files in the local repository and stages them for commit.
|
||||||
git add .
|
git add .
|
||||||
|
|
||||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||||
git commit -m "$release_note"
|
git commit -m "$release_note"
|
||||||
|
|
||||||
# Sets the new remote
|
# Sets the new remote
|
||||||
|
@ -157,13 +157,6 @@ module Petstore
|
|||||||
# Returns Auth Settings hash for api client.
|
# Returns Auth Settings hash for api client.
|
||||||
def auth_settings
|
def auth_settings
|
||||||
{
|
{
|
||||||
'api_key' =>
|
|
||||||
{
|
|
||||||
type: 'api_key',
|
|
||||||
in: 'header',
|
|
||||||
key: 'api_key',
|
|
||||||
value: api_key_with_prefix('api_key')
|
|
||||||
},
|
|
||||||
'petstore_auth' =>
|
'petstore_auth' =>
|
||||||
{
|
{
|
||||||
type: 'oauth2',
|
type: 'oauth2',
|
||||||
@ -171,6 +164,13 @@ module Petstore
|
|||||||
key: 'Authorization',
|
key: 'Authorization',
|
||||||
value: "Bearer #{access_token}"
|
value: "Bearer #{access_token}"
|
||||||
},
|
},
|
||||||
|
'api_key' =>
|
||||||
|
{
|
||||||
|
type: 'api_key',
|
||||||
|
in: 'header',
|
||||||
|
key: 'api_key',
|
||||||
|
value: api_key_with_prefix('api_key')
|
||||||
|
},
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -20,17 +20,21 @@ module Petstore
|
|||||||
class Animal
|
class Animal
|
||||||
attr_accessor :class_name
|
attr_accessor :class_name
|
||||||
|
|
||||||
|
attr_accessor :color
|
||||||
|
|
||||||
# Attribute mapping from ruby-style variable name to JSON key.
|
# Attribute mapping from ruby-style variable name to JSON key.
|
||||||
def self.attribute_map
|
def self.attribute_map
|
||||||
{
|
{
|
||||||
:'class_name' => :'className'
|
:'class_name' => :'className',
|
||||||
|
:'color' => :'color'
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
# Attribute type mapping.
|
# Attribute type mapping.
|
||||||
def self.swagger_types
|
def self.swagger_types
|
||||||
{
|
{
|
||||||
:'class_name' => :'String'
|
:'class_name' => :'String',
|
||||||
|
:'color' => :'String'
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -46,6 +50,12 @@ module Petstore
|
|||||||
self.class_name = attributes[:'className']
|
self.class_name = attributes[:'className']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if attributes.has_key?(:'color')
|
||||||
|
self.color = attributes[:'color']
|
||||||
|
else
|
||||||
|
self.color = "red"
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Show invalid properties with the reasons. Usually used together with valid?
|
# Show invalid properties with the reasons. Usually used together with valid?
|
||||||
@ -65,15 +75,16 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Checks equality by comparing each attribute.
|
# Checks equality by comparing each attribute.
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def ==(o)
|
def ==(o)
|
||||||
return true if self.equal?(o)
|
return true if self.equal?(o)
|
||||||
self.class == o.class &&
|
self.class == o.class &&
|
||||||
class_name == o.class_name
|
class_name == o.class_name &&
|
||||||
|
color == o.color
|
||||||
end
|
end
|
||||||
|
|
||||||
# @see the `==` method
|
# @see the `==` method
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def eql?(o)
|
def eql?(o)
|
||||||
self == o
|
self == o
|
||||||
end
|
end
|
||||||
@ -81,7 +92,7 @@ module Petstore
|
|||||||
# Calculates hash code according to all attributes.
|
# Calculates hash code according to all attributes.
|
||||||
# @return [Fixnum] Hash code
|
# @return [Fixnum] Hash code
|
||||||
def hash
|
def hash
|
||||||
[class_name].hash
|
[class_name, color].hash
|
||||||
end
|
end
|
||||||
|
|
||||||
# Builds the object from hash
|
# Builds the object from hash
|
||||||
@ -172,7 +183,7 @@ module Petstore
|
|||||||
|
|
||||||
# Outputs non-array value in the form of hash
|
# Outputs non-array value in the form of hash
|
||||||
# For object, use to_hash. Otherwise, just return the value
|
# For object, use to_hash. Otherwise, just return the value
|
||||||
# @param [Object] value Any valid value
|
# @param [Object] value Any valid value
|
||||||
# @return [Hash] Returns the value in the form of hash
|
# @return [Hash] Returns the value in the form of hash
|
||||||
def _to_hash(value)
|
def _to_hash(value)
|
||||||
if value.is_a?(Array)
|
if value.is_a?(Array)
|
||||||
|
@ -53,14 +53,14 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Checks equality by comparing each attribute.
|
# Checks equality by comparing each attribute.
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def ==(o)
|
def ==(o)
|
||||||
return true if self.equal?(o)
|
return true if self.equal?(o)
|
||||||
self.class == o.class
|
self.class == o.class
|
||||||
end
|
end
|
||||||
|
|
||||||
# @see the `==` method
|
# @see the `==` method
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def eql?(o)
|
def eql?(o)
|
||||||
self == o
|
self == o
|
||||||
end
|
end
|
||||||
@ -159,7 +159,7 @@ module Petstore
|
|||||||
|
|
||||||
# Outputs non-array value in the form of hash
|
# Outputs non-array value in the form of hash
|
||||||
# For object, use to_hash. Otherwise, just return the value
|
# For object, use to_hash. Otherwise, just return the value
|
||||||
# @param [Object] value Any valid value
|
# @param [Object] value Any valid value
|
||||||
# @return [Hash] Returns the value in the form of hash
|
# @return [Hash] Returns the value in the form of hash
|
||||||
def _to_hash(value)
|
def _to_hash(value)
|
||||||
if value.is_a?(Array)
|
if value.is_a?(Array)
|
||||||
|
@ -77,7 +77,7 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Checks equality by comparing each attribute.
|
# Checks equality by comparing each attribute.
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def ==(o)
|
def ==(o)
|
||||||
return true if self.equal?(o)
|
return true if self.equal?(o)
|
||||||
self.class == o.class &&
|
self.class == o.class &&
|
||||||
@ -87,7 +87,7 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# @see the `==` method
|
# @see the `==` method
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def eql?(o)
|
def eql?(o)
|
||||||
self == o
|
self == o
|
||||||
end
|
end
|
||||||
@ -186,7 +186,7 @@ module Petstore
|
|||||||
|
|
||||||
# Outputs non-array value in the form of hash
|
# Outputs non-array value in the form of hash
|
||||||
# For object, use to_hash. Otherwise, just return the value
|
# For object, use to_hash. Otherwise, just return the value
|
||||||
# @param [Object] value Any valid value
|
# @param [Object] value Any valid value
|
||||||
# @return [Hash] Returns the value in the form of hash
|
# @return [Hash] Returns the value in the form of hash
|
||||||
def _to_hash(value)
|
def _to_hash(value)
|
||||||
if value.is_a?(Array)
|
if value.is_a?(Array)
|
||||||
|
@ -20,12 +20,15 @@ module Petstore
|
|||||||
class Cat
|
class Cat
|
||||||
attr_accessor :class_name
|
attr_accessor :class_name
|
||||||
|
|
||||||
|
attr_accessor :color
|
||||||
|
|
||||||
attr_accessor :declawed
|
attr_accessor :declawed
|
||||||
|
|
||||||
# Attribute mapping from ruby-style variable name to JSON key.
|
# Attribute mapping from ruby-style variable name to JSON key.
|
||||||
def self.attribute_map
|
def self.attribute_map
|
||||||
{
|
{
|
||||||
:'class_name' => :'className',
|
:'class_name' => :'className',
|
||||||
|
:'color' => :'color',
|
||||||
:'declawed' => :'declawed'
|
:'declawed' => :'declawed'
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@ -34,6 +37,7 @@ module Petstore
|
|||||||
def self.swagger_types
|
def self.swagger_types
|
||||||
{
|
{
|
||||||
:'class_name' => :'String',
|
:'class_name' => :'String',
|
||||||
|
:'color' => :'String',
|
||||||
:'declawed' => :'BOOLEAN'
|
:'declawed' => :'BOOLEAN'
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@ -50,6 +54,12 @@ module Petstore
|
|||||||
self.class_name = attributes[:'className']
|
self.class_name = attributes[:'className']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if attributes.has_key?(:'color')
|
||||||
|
self.color = attributes[:'color']
|
||||||
|
else
|
||||||
|
self.color = "red"
|
||||||
|
end
|
||||||
|
|
||||||
if attributes.has_key?(:'declawed')
|
if attributes.has_key?(:'declawed')
|
||||||
self.declawed = attributes[:'declawed']
|
self.declawed = attributes[:'declawed']
|
||||||
end
|
end
|
||||||
@ -73,16 +83,17 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Checks equality by comparing each attribute.
|
# Checks equality by comparing each attribute.
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def ==(o)
|
def ==(o)
|
||||||
return true if self.equal?(o)
|
return true if self.equal?(o)
|
||||||
self.class == o.class &&
|
self.class == o.class &&
|
||||||
class_name == o.class_name &&
|
class_name == o.class_name &&
|
||||||
|
color == o.color &&
|
||||||
declawed == o.declawed
|
declawed == o.declawed
|
||||||
end
|
end
|
||||||
|
|
||||||
# @see the `==` method
|
# @see the `==` method
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def eql?(o)
|
def eql?(o)
|
||||||
self == o
|
self == o
|
||||||
end
|
end
|
||||||
@ -90,7 +101,7 @@ module Petstore
|
|||||||
# Calculates hash code according to all attributes.
|
# Calculates hash code according to all attributes.
|
||||||
# @return [Fixnum] Hash code
|
# @return [Fixnum] Hash code
|
||||||
def hash
|
def hash
|
||||||
[class_name, declawed].hash
|
[class_name, color, declawed].hash
|
||||||
end
|
end
|
||||||
|
|
||||||
# Builds the object from hash
|
# Builds the object from hash
|
||||||
@ -181,7 +192,7 @@ module Petstore
|
|||||||
|
|
||||||
# Outputs non-array value in the form of hash
|
# Outputs non-array value in the form of hash
|
||||||
# For object, use to_hash. Otherwise, just return the value
|
# For object, use to_hash. Otherwise, just return the value
|
||||||
# @param [Object] value Any valid value
|
# @param [Object] value Any valid value
|
||||||
# @return [Hash] Returns the value in the form of hash
|
# @return [Hash] Returns the value in the form of hash
|
||||||
def _to_hash(value)
|
def _to_hash(value)
|
||||||
if value.is_a?(Array)
|
if value.is_a?(Array)
|
||||||
|
@ -69,7 +69,7 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Checks equality by comparing each attribute.
|
# Checks equality by comparing each attribute.
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def ==(o)
|
def ==(o)
|
||||||
return true if self.equal?(o)
|
return true if self.equal?(o)
|
||||||
self.class == o.class &&
|
self.class == o.class &&
|
||||||
@ -78,7 +78,7 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# @see the `==` method
|
# @see the `==` method
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def eql?(o)
|
def eql?(o)
|
||||||
self == o
|
self == o
|
||||||
end
|
end
|
||||||
@ -177,7 +177,7 @@ module Petstore
|
|||||||
|
|
||||||
# Outputs non-array value in the form of hash
|
# Outputs non-array value in the form of hash
|
||||||
# For object, use to_hash. Otherwise, just return the value
|
# For object, use to_hash. Otherwise, just return the value
|
||||||
# @param [Object] value Any valid value
|
# @param [Object] value Any valid value
|
||||||
# @return [Hash] Returns the value in the form of hash
|
# @return [Hash] Returns the value in the form of hash
|
||||||
def _to_hash(value)
|
def _to_hash(value)
|
||||||
if value.is_a?(Array)
|
if value.is_a?(Array)
|
||||||
|
@ -20,12 +20,15 @@ module Petstore
|
|||||||
class Dog
|
class Dog
|
||||||
attr_accessor :class_name
|
attr_accessor :class_name
|
||||||
|
|
||||||
|
attr_accessor :color
|
||||||
|
|
||||||
attr_accessor :breed
|
attr_accessor :breed
|
||||||
|
|
||||||
# Attribute mapping from ruby-style variable name to JSON key.
|
# Attribute mapping from ruby-style variable name to JSON key.
|
||||||
def self.attribute_map
|
def self.attribute_map
|
||||||
{
|
{
|
||||||
:'class_name' => :'className',
|
:'class_name' => :'className',
|
||||||
|
:'color' => :'color',
|
||||||
:'breed' => :'breed'
|
:'breed' => :'breed'
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@ -34,6 +37,7 @@ module Petstore
|
|||||||
def self.swagger_types
|
def self.swagger_types
|
||||||
{
|
{
|
||||||
:'class_name' => :'String',
|
:'class_name' => :'String',
|
||||||
|
:'color' => :'String',
|
||||||
:'breed' => :'String'
|
:'breed' => :'String'
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@ -50,6 +54,12 @@ module Petstore
|
|||||||
self.class_name = attributes[:'className']
|
self.class_name = attributes[:'className']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if attributes.has_key?(:'color')
|
||||||
|
self.color = attributes[:'color']
|
||||||
|
else
|
||||||
|
self.color = "red"
|
||||||
|
end
|
||||||
|
|
||||||
if attributes.has_key?(:'breed')
|
if attributes.has_key?(:'breed')
|
||||||
self.breed = attributes[:'breed']
|
self.breed = attributes[:'breed']
|
||||||
end
|
end
|
||||||
@ -73,16 +83,17 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Checks equality by comparing each attribute.
|
# Checks equality by comparing each attribute.
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def ==(o)
|
def ==(o)
|
||||||
return true if self.equal?(o)
|
return true if self.equal?(o)
|
||||||
self.class == o.class &&
|
self.class == o.class &&
|
||||||
class_name == o.class_name &&
|
class_name == o.class_name &&
|
||||||
|
color == o.color &&
|
||||||
breed == o.breed
|
breed == o.breed
|
||||||
end
|
end
|
||||||
|
|
||||||
# @see the `==` method
|
# @see the `==` method
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def eql?(o)
|
def eql?(o)
|
||||||
self == o
|
self == o
|
||||||
end
|
end
|
||||||
@ -90,7 +101,7 @@ module Petstore
|
|||||||
# Calculates hash code according to all attributes.
|
# Calculates hash code according to all attributes.
|
||||||
# @return [Fixnum] Hash code
|
# @return [Fixnum] Hash code
|
||||||
def hash
|
def hash
|
||||||
[class_name, breed].hash
|
[class_name, color, breed].hash
|
||||||
end
|
end
|
||||||
|
|
||||||
# Builds the object from hash
|
# Builds the object from hash
|
||||||
@ -181,7 +192,7 @@ module Petstore
|
|||||||
|
|
||||||
# Outputs non-array value in the form of hash
|
# Outputs non-array value in the form of hash
|
||||||
# For object, use to_hash. Otherwise, just return the value
|
# For object, use to_hash. Otherwise, just return the value
|
||||||
# @param [Object] value Any valid value
|
# @param [Object] value Any valid value
|
||||||
# @return [Hash] Returns the value in the form of hash
|
# @return [Hash] Returns the value in the form of hash
|
||||||
def _to_hash(value)
|
def _to_hash(value)
|
||||||
if value.is_a?(Array)
|
if value.is_a?(Array)
|
||||||
|
@ -58,14 +58,14 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Checks equality by comparing each attribute.
|
# Checks equality by comparing each attribute.
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def ==(o)
|
def ==(o)
|
||||||
return true if self.equal?(o)
|
return true if self.equal?(o)
|
||||||
self.class == o.class
|
self.class == o.class
|
||||||
end
|
end
|
||||||
|
|
||||||
# @see the `==` method
|
# @see the `==` method
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def eql?(o)
|
def eql?(o)
|
||||||
self == o
|
self == o
|
||||||
end
|
end
|
||||||
@ -164,7 +164,7 @@ module Petstore
|
|||||||
|
|
||||||
# Outputs non-array value in the form of hash
|
# Outputs non-array value in the form of hash
|
||||||
# For object, use to_hash. Otherwise, just return the value
|
# For object, use to_hash. Otherwise, just return the value
|
||||||
# @param [Object] value Any valid value
|
# @param [Object] value Any valid value
|
||||||
# @return [Hash] Returns the value in the form of hash
|
# @return [Hash] Returns the value in the form of hash
|
||||||
def _to_hash(value)
|
def _to_hash(value)
|
||||||
if value.is_a?(Array)
|
if value.is_a?(Array)
|
||||||
|
@ -119,7 +119,7 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Checks equality by comparing each attribute.
|
# Checks equality by comparing each attribute.
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def ==(o)
|
def ==(o)
|
||||||
return true if self.equal?(o)
|
return true if self.equal?(o)
|
||||||
self.class == o.class &&
|
self.class == o.class &&
|
||||||
@ -129,7 +129,7 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# @see the `==` method
|
# @see the `==` method
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def eql?(o)
|
def eql?(o)
|
||||||
self == o
|
self == o
|
||||||
end
|
end
|
||||||
@ -228,7 +228,7 @@ module Petstore
|
|||||||
|
|
||||||
# Outputs non-array value in the form of hash
|
# Outputs non-array value in the form of hash
|
||||||
# For object, use to_hash. Otherwise, just return the value
|
# For object, use to_hash. Otherwise, just return the value
|
||||||
# @param [Object] value Any valid value
|
# @param [Object] value Any valid value
|
||||||
# @return [Hash] Returns the value in the form of hash
|
# @return [Hash] Returns the value in the form of hash
|
||||||
def _to_hash(value)
|
def _to_hash(value)
|
||||||
if value.is_a?(Array)
|
if value.is_a?(Array)
|
||||||
|
@ -347,7 +347,7 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Checks equality by comparing each attribute.
|
# Checks equality by comparing each attribute.
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def ==(o)
|
def ==(o)
|
||||||
return true if self.equal?(o)
|
return true if self.equal?(o)
|
||||||
self.class == o.class &&
|
self.class == o.class &&
|
||||||
@ -367,7 +367,7 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# @see the `==` method
|
# @see the `==` method
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def eql?(o)
|
def eql?(o)
|
||||||
self == o
|
self == o
|
||||||
end
|
end
|
||||||
@ -466,7 +466,7 @@ module Petstore
|
|||||||
|
|
||||||
# Outputs non-array value in the form of hash
|
# Outputs non-array value in the form of hash
|
||||||
# For object, use to_hash. Otherwise, just return the value
|
# For object, use to_hash. Otherwise, just return the value
|
||||||
# @param [Object] value Any valid value
|
# @param [Object] value Any valid value
|
||||||
# @return [Hash] Returns the value in the form of hash
|
# @return [Hash] Returns the value in the form of hash
|
||||||
def _to_hash(value)
|
def _to_hash(value)
|
||||||
if value.is_a?(Array)
|
if value.is_a?(Array)
|
||||||
|
@ -62,7 +62,7 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Checks equality by comparing each attribute.
|
# Checks equality by comparing each attribute.
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def ==(o)
|
def ==(o)
|
||||||
return true if self.equal?(o)
|
return true if self.equal?(o)
|
||||||
self.class == o.class &&
|
self.class == o.class &&
|
||||||
@ -70,7 +70,7 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# @see the `==` method
|
# @see the `==` method
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def eql?(o)
|
def eql?(o)
|
||||||
self == o
|
self == o
|
||||||
end
|
end
|
||||||
@ -169,7 +169,7 @@ module Petstore
|
|||||||
|
|
||||||
# Outputs non-array value in the form of hash
|
# Outputs non-array value in the form of hash
|
||||||
# For object, use to_hash. Otherwise, just return the value
|
# For object, use to_hash. Otherwise, just return the value
|
||||||
# @param [Object] value Any valid value
|
# @param [Object] value Any valid value
|
||||||
# @return [Hash] Returns the value in the form of hash
|
# @return [Hash] Returns the value in the form of hash
|
||||||
def _to_hash(value)
|
def _to_hash(value)
|
||||||
if value.is_a?(Array)
|
if value.is_a?(Array)
|
||||||
|
@ -62,7 +62,7 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Checks equality by comparing each attribute.
|
# Checks equality by comparing each attribute.
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def ==(o)
|
def ==(o)
|
||||||
return true if self.equal?(o)
|
return true if self.equal?(o)
|
||||||
self.class == o.class &&
|
self.class == o.class &&
|
||||||
@ -70,7 +70,7 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# @see the `==` method
|
# @see the `==` method
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def eql?(o)
|
def eql?(o)
|
||||||
self == o
|
self == o
|
||||||
end
|
end
|
||||||
@ -169,7 +169,7 @@ module Petstore
|
|||||||
|
|
||||||
# Outputs non-array value in the form of hash
|
# Outputs non-array value in the form of hash
|
||||||
# For object, use to_hash. Otherwise, just return the value
|
# For object, use to_hash. Otherwise, just return the value
|
||||||
# @param [Object] value Any valid value
|
# @param [Object] value Any valid value
|
||||||
# @return [Hash] Returns the value in the form of hash
|
# @return [Hash] Returns the value in the form of hash
|
||||||
def _to_hash(value)
|
def _to_hash(value)
|
||||||
if value.is_a?(Array)
|
if value.is_a?(Array)
|
||||||
|
@ -25,12 +25,15 @@ module Petstore
|
|||||||
|
|
||||||
attr_accessor :property
|
attr_accessor :property
|
||||||
|
|
||||||
|
attr_accessor :_123_number
|
||||||
|
|
||||||
# Attribute mapping from ruby-style variable name to JSON key.
|
# Attribute mapping from ruby-style variable name to JSON key.
|
||||||
def self.attribute_map
|
def self.attribute_map
|
||||||
{
|
{
|
||||||
:'name' => :'name',
|
:'name' => :'name',
|
||||||
:'snake_case' => :'snake_case',
|
:'snake_case' => :'snake_case',
|
||||||
:'property' => :'property'
|
:'property' => :'property',
|
||||||
|
:'_123_number' => :'123Number'
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -39,7 +42,8 @@ module Petstore
|
|||||||
{
|
{
|
||||||
:'name' => :'Integer',
|
:'name' => :'Integer',
|
||||||
:'snake_case' => :'Integer',
|
:'snake_case' => :'Integer',
|
||||||
:'property' => :'String'
|
:'property' => :'String',
|
||||||
|
:'_123_number' => :'Integer'
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -63,6 +67,10 @@ module Petstore
|
|||||||
self.property = attributes[:'property']
|
self.property = attributes[:'property']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if attributes.has_key?(:'123Number')
|
||||||
|
self._123_number = attributes[:'123Number']
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Show invalid properties with the reasons. Usually used together with valid?
|
# Show invalid properties with the reasons. Usually used together with valid?
|
||||||
@ -82,17 +90,18 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Checks equality by comparing each attribute.
|
# Checks equality by comparing each attribute.
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def ==(o)
|
def ==(o)
|
||||||
return true if self.equal?(o)
|
return true if self.equal?(o)
|
||||||
self.class == o.class &&
|
self.class == o.class &&
|
||||||
name == o.name &&
|
name == o.name &&
|
||||||
snake_case == o.snake_case &&
|
snake_case == o.snake_case &&
|
||||||
property == o.property
|
property == o.property &&
|
||||||
|
_123_number == o._123_number
|
||||||
end
|
end
|
||||||
|
|
||||||
# @see the `==` method
|
# @see the `==` method
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def eql?(o)
|
def eql?(o)
|
||||||
self == o
|
self == o
|
||||||
end
|
end
|
||||||
@ -100,7 +109,7 @@ module Petstore
|
|||||||
# Calculates hash code according to all attributes.
|
# Calculates hash code according to all attributes.
|
||||||
# @return [Fixnum] Hash code
|
# @return [Fixnum] Hash code
|
||||||
def hash
|
def hash
|
||||||
[name, snake_case, property].hash
|
[name, snake_case, property, _123_number].hash
|
||||||
end
|
end
|
||||||
|
|
||||||
# Builds the object from hash
|
# Builds the object from hash
|
||||||
@ -191,7 +200,7 @@ module Petstore
|
|||||||
|
|
||||||
# Outputs non-array value in the form of hash
|
# Outputs non-array value in the form of hash
|
||||||
# For object, use to_hash. Otherwise, just return the value
|
# For object, use to_hash. Otherwise, just return the value
|
||||||
# @param [Object] value Any valid value
|
# @param [Object] value Any valid value
|
||||||
# @return [Hash] Returns the value in the form of hash
|
# @return [Hash] Returns the value in the form of hash
|
||||||
def _to_hash(value)
|
def _to_hash(value)
|
||||||
if value.is_a?(Array)
|
if value.is_a?(Array)
|
||||||
|
@ -118,7 +118,7 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Checks equality by comparing each attribute.
|
# Checks equality by comparing each attribute.
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def ==(o)
|
def ==(o)
|
||||||
return true if self.equal?(o)
|
return true if self.equal?(o)
|
||||||
self.class == o.class &&
|
self.class == o.class &&
|
||||||
@ -131,7 +131,7 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# @see the `==` method
|
# @see the `==` method
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def eql?(o)
|
def eql?(o)
|
||||||
self == o
|
self == o
|
||||||
end
|
end
|
||||||
@ -230,7 +230,7 @@ module Petstore
|
|||||||
|
|
||||||
# Outputs non-array value in the form of hash
|
# Outputs non-array value in the form of hash
|
||||||
# For object, use to_hash. Otherwise, just return the value
|
# For object, use to_hash. Otherwise, just return the value
|
||||||
# @param [Object] value Any valid value
|
# @param [Object] value Any valid value
|
||||||
# @return [Hash] Returns the value in the form of hash
|
# @return [Hash] Returns the value in the form of hash
|
||||||
def _to_hash(value)
|
def _to_hash(value)
|
||||||
if value.is_a?(Array)
|
if value.is_a?(Array)
|
||||||
|
@ -128,7 +128,7 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Checks equality by comparing each attribute.
|
# Checks equality by comparing each attribute.
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def ==(o)
|
def ==(o)
|
||||||
return true if self.equal?(o)
|
return true if self.equal?(o)
|
||||||
self.class == o.class &&
|
self.class == o.class &&
|
||||||
@ -141,7 +141,7 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# @see the `==` method
|
# @see the `==` method
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def eql?(o)
|
def eql?(o)
|
||||||
self == o
|
self == o
|
||||||
end
|
end
|
||||||
@ -240,7 +240,7 @@ module Petstore
|
|||||||
|
|
||||||
# Outputs non-array value in the form of hash
|
# Outputs non-array value in the form of hash
|
||||||
# For object, use to_hash. Otherwise, just return the value
|
# For object, use to_hash. Otherwise, just return the value
|
||||||
# @param [Object] value Any valid value
|
# @param [Object] value Any valid value
|
||||||
# @return [Hash] Returns the value in the form of hash
|
# @return [Hash] Returns the value in the form of hash
|
||||||
def _to_hash(value)
|
def _to_hash(value)
|
||||||
if value.is_a?(Array)
|
if value.is_a?(Array)
|
||||||
|
@ -61,7 +61,7 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Checks equality by comparing each attribute.
|
# Checks equality by comparing each attribute.
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def ==(o)
|
def ==(o)
|
||||||
return true if self.equal?(o)
|
return true if self.equal?(o)
|
||||||
self.class == o.class &&
|
self.class == o.class &&
|
||||||
@ -69,7 +69,7 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# @see the `==` method
|
# @see the `==` method
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def eql?(o)
|
def eql?(o)
|
||||||
self == o
|
self == o
|
||||||
end
|
end
|
||||||
@ -168,7 +168,7 @@ module Petstore
|
|||||||
|
|
||||||
# Outputs non-array value in the form of hash
|
# Outputs non-array value in the form of hash
|
||||||
# For object, use to_hash. Otherwise, just return the value
|
# For object, use to_hash. Otherwise, just return the value
|
||||||
# @param [Object] value Any valid value
|
# @param [Object] value Any valid value
|
||||||
# @return [Hash] Returns the value in the form of hash
|
# @return [Hash] Returns the value in the form of hash
|
||||||
def _to_hash(value)
|
def _to_hash(value)
|
||||||
if value.is_a?(Array)
|
if value.is_a?(Array)
|
||||||
|
@ -69,7 +69,7 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Checks equality by comparing each attribute.
|
# Checks equality by comparing each attribute.
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def ==(o)
|
def ==(o)
|
||||||
return true if self.equal?(o)
|
return true if self.equal?(o)
|
||||||
self.class == o.class &&
|
self.class == o.class &&
|
||||||
@ -78,7 +78,7 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# @see the `==` method
|
# @see the `==` method
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def eql?(o)
|
def eql?(o)
|
||||||
self == o
|
self == o
|
||||||
end
|
end
|
||||||
@ -177,7 +177,7 @@ module Petstore
|
|||||||
|
|
||||||
# Outputs non-array value in the form of hash
|
# Outputs non-array value in the form of hash
|
||||||
# For object, use to_hash. Otherwise, just return the value
|
# For object, use to_hash. Otherwise, just return the value
|
||||||
# @param [Object] value Any valid value
|
# @param [Object] value Any valid value
|
||||||
# @return [Hash] Returns the value in the form of hash
|
# @return [Hash] Returns the value in the form of hash
|
||||||
def _to_hash(value)
|
def _to_hash(value)
|
||||||
if value.is_a?(Array)
|
if value.is_a?(Array)
|
||||||
|
@ -118,7 +118,7 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Checks equality by comparing each attribute.
|
# Checks equality by comparing each attribute.
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def ==(o)
|
def ==(o)
|
||||||
return true if self.equal?(o)
|
return true if self.equal?(o)
|
||||||
self.class == o.class &&
|
self.class == o.class &&
|
||||||
@ -133,7 +133,7 @@ module Petstore
|
|||||||
end
|
end
|
||||||
|
|
||||||
# @see the `==` method
|
# @see the `==` method
|
||||||
# @param [Object] Object to be compared
|
# @param [Object] Object to be compared
|
||||||
def eql?(o)
|
def eql?(o)
|
||||||
self == o
|
self == o
|
||||||
end
|
end
|
||||||
@ -232,7 +232,7 @@ module Petstore
|
|||||||
|
|
||||||
# Outputs non-array value in the form of hash
|
# Outputs non-array value in the form of hash
|
||||||
# For object, use to_hash. Otherwise, just return the value
|
# For object, use to_hash. Otherwise, just return the value
|
||||||
# @param [Object] value Any valid value
|
# @param [Object] value Any valid value
|
||||||
# @return [Hash] Returns the value in the form of hash
|
# @return [Hash] Returns the value in the form of hash
|
||||||
def _to_hash(value)
|
def _to_hash(value)
|
||||||
if value.is_a?(Array)
|
if value.is_a?(Array)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user