forked from loafle/openapi-generator-original
Update the default value of Ruby client generator (#320)
* fix ruby client default value * fix example value for ruby
This commit is contained in:
parent
0b6a59fa09
commit
e2251084f2
@ -17,11 +17,9 @@
|
||||
|
||||
package org.openapitools.codegen.languages;
|
||||
|
||||
import io.swagger.v3.oas.models.media.*;
|
||||
import org.openapitools.codegen.CliOption;
|
||||
import org.openapitools.codegen.CodegenConfig;
|
||||
import org.openapitools.codegen.CodegenConstants;
|
||||
import org.openapitools.codegen.CodegenOperation;
|
||||
import org.openapitools.codegen.CodegenParameter;
|
||||
import org.openapitools.codegen.CodegenProperty;
|
||||
import org.openapitools.codegen.CodegenType;
|
||||
@ -32,11 +30,9 @@ import org.openapitools.codegen.utils.ModelUtils;
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import io.swagger.v3.oas.models.OpenAPI;
|
||||
import io.swagger.v3.oas.models.Operation;
|
||||
import io.swagger.v3.oas.models.media.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -584,7 +580,8 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
if (p.defaultValue == null) {
|
||||
example = p.example;
|
||||
} else {
|
||||
example = p.defaultValue;
|
||||
p.example = p.defaultValue;
|
||||
return;
|
||||
}
|
||||
|
||||
String type = p.baseType;
|
||||
|
@ -3,7 +3,7 @@
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -16,7 +16,7 @@ class ArrayMapObject < Petstore::Category
|
||||
}
|
||||
end
|
||||
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:int_arr => :'Array<Integer>',
|
||||
:pet_arr => :'Array<Pet>',
|
||||
|
@ -43,7 +43,7 @@
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
{{#vars}}
|
||||
:'{{{name}}}' => :'{{{datatype}}}'{{#hasMore}},{{/hasMore}}
|
||||
|
2
samples/client/petstore/ruby/.gitignore
vendored
2
samples/client/petstore/ruby/.gitignore
vendored
@ -1,4 +1,4 @@
|
||||
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
# Generated by: https://openapi-generator.tech
|
||||
#
|
||||
|
||||
*.gem
|
||||
|
@ -1,5 +1,5 @@
|
||||
# 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)
|
||||
# Automatically generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
AllCops:
|
||||
TargetRubyVersion: 2.2
|
||||
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
|
||||
|
@ -4,7 +4,7 @@ Petstore - the Ruby gem for the 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: \" \\
|
||||
|
||||
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
||||
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 1.0.0
|
||||
- Package version: 1.0.0
|
||||
|
7
samples/client/petstore/ruby/docs/AnimalFarm.md
Normal file
7
samples/client/petstore/ruby/docs/AnimalFarm.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Petstore::AnimalFarm
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
@ -30,7 +30,7 @@ require 'petstore'
|
||||
|
||||
api_instance = Petstore::FakeApi.new
|
||||
opts = {
|
||||
boolean_post_body: true # BOOLEAN | Input boolean as post body
|
||||
body: true # BOOLEAN | Input boolean as post body
|
||||
}
|
||||
|
||||
begin
|
||||
@ -45,7 +45,7 @@ end
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**boolean_post_body** | **BOOLEAN**| Input boolean as post body | [optional]
|
||||
**body** | **BOOLEAN**| Input boolean as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -387,7 +387,7 @@ opts = {
|
||||
enum_query_integer: 56, # Integer | Query parameter enum test (double)
|
||||
enum_query_double: 3.4, # Float | Query parameter enum test (double)
|
||||
enum_form_string_array: nil, # Array<String> | Form parameter enum test (string array)
|
||||
enum_form_string: 'enum_form_string_example' # String | Form parameter enum test (string)
|
||||
enum_form_string: '-efg' # String | Form parameter enum test (string)
|
||||
}
|
||||
|
||||
begin
|
||||
@ -403,13 +403,13 @@ end
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**enum_header_string_array** | [**Array<String>**](String.md)| Header parameter enum test (string array) | [optional]
|
||||
**enum_header_string** | **String**| Header parameter enum test (string) | [optional] [default to -efg]
|
||||
**enum_header_string** | **String**| Header parameter enum test (string) | [optional] [default to '-efg']
|
||||
**enum_query_string_array** | [**Array<String>**](String.md)| Query parameter enum test (string array) | [optional]
|
||||
**enum_query_string** | **String**| Query parameter enum test (string) | [optional] [default to -efg]
|
||||
**enum_query_string** | **String**| Query parameter enum test (string) | [optional] [default to '-efg']
|
||||
**enum_query_integer** | **Integer**| Query parameter enum test (double) | [optional]
|
||||
**enum_query_double** | **Float**| Query parameter enum test (double) | [optional]
|
||||
**enum_form_string_array** | [**Array<String>**](Array.md)| Form parameter enum test (string array) | [optional]
|
||||
**enum_form_string** | **String**| Form parameter enum test (string) | [optional]
|
||||
**enum_form_string** | **String**| Form parameter enum test (string) | [optional] [default to '-efg']
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
# Generated by: https://openapi-generator.tech
|
||||
#
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -21,7 +21,7 @@ module Petstore
|
||||
end
|
||||
# Test serialization of outer boolean types
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [BOOLEAN] :boolean_post_body Input boolean as post body
|
||||
# @option opts [BOOLEAN] :body Input boolean as post body
|
||||
# @return [BOOLEAN]
|
||||
def fake_outer_boolean_serialize(opts = {})
|
||||
data, _status_code, _headers = fake_outer_boolean_serialize_with_http_info(opts)
|
||||
@ -30,7 +30,7 @@ module Petstore
|
||||
|
||||
# Test serialization of outer boolean types
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [BOOLEAN] :boolean_post_body Input boolean as post body
|
||||
# @option opts [BOOLEAN] :body Input boolean as post body
|
||||
# @return [Array<(BOOLEAN, Fixnum, Hash)>] BOOLEAN data, response status code and response headers
|
||||
def fake_outer_boolean_serialize_with_http_info(opts = {})
|
||||
if @api_client.config.debugging
|
||||
@ -51,7 +51,7 @@ module Petstore
|
||||
form_params = {}
|
||||
|
||||
# http body (model)
|
||||
post_body = @api_client.object_to_http_body(opts[:'boolean_post_body'])
|
||||
post_body = @api_client.object_to_http_body(opts[:'body'])
|
||||
auth_names = []
|
||||
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
||||
:header_params => header_params,
|
||||
@ -470,13 +470,13 @@ module Petstore
|
||||
# To test enum parameters
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [Array<String>] :enum_header_string_array Header parameter enum test (string array)
|
||||
# @option opts [String] :enum_header_string Header parameter enum test (string) (default to -efg)
|
||||
# @option opts [String] :enum_header_string Header parameter enum test (string) (default to '-efg')
|
||||
# @option opts [Array<String>] :enum_query_string_array Query parameter enum test (string array)
|
||||
# @option opts [String] :enum_query_string Query parameter enum test (string) (default to -efg)
|
||||
# @option opts [String] :enum_query_string Query parameter enum test (string) (default to '-efg')
|
||||
# @option opts [Integer] :enum_query_integer Query parameter enum test (double)
|
||||
# @option opts [Float] :enum_query_double Query parameter enum test (double)
|
||||
# @option opts [Array<String>] :enum_form_string_array Form parameter enum test (string array)
|
||||
# @option opts [String] :enum_form_string Form parameter enum test (string)
|
||||
# @option opts [String] :enum_form_string Form parameter enum test (string) (default to '-efg')
|
||||
# @return [nil]
|
||||
def test_enum_parameters(opts = {})
|
||||
test_enum_parameters_with_http_info(opts)
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -31,7 +31,7 @@ module Petstore
|
||||
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
||||
def initialize(config = Configuration.default)
|
||||
@config = config
|
||||
@user_agent = "Swagger-Codegen/#{VERSION}/ruby"
|
||||
@user_agent = "OpenAPI-Generator/#{VERSION}/ruby"
|
||||
@default_headers = {
|
||||
'Content-Type' => 'application/json',
|
||||
'User-Agent' => @user_agent
|
||||
@ -314,7 +314,7 @@ module Petstore
|
||||
|
||||
# Sets user agent in HTTP header
|
||||
#
|
||||
# @param [String] user_agent User agent (e.g. swagger-codegen/ruby/1.0.0)
|
||||
# @param [String] user_agent User agent (e.g. openapi-generator/ruby/1.0.0)
|
||||
def user_agent=(user_agent)
|
||||
@user_agent = user_agent
|
||||
@default_headers['User-Agent'] = @user_agent
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -27,7 +27,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'map_property' => :'Hash<String, String>',
|
||||
:'map_of_map_property' => :'Hash<String, Hash<String, String>>'
|
||||
@ -94,7 +94,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -27,7 +27,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'class_name' => :'String',
|
||||
:'color' => :'String'
|
||||
@ -97,7 +97,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -21,7 +21,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
}
|
||||
end
|
||||
@ -72,7 +72,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -30,7 +30,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'code' => :'Integer',
|
||||
:'type' => :'String',
|
||||
@ -99,7 +99,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -24,7 +24,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'array_array_number' => :'Array<Array<Float>>'
|
||||
}
|
||||
@ -83,7 +83,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -24,7 +24,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'array_number' => :'Array<Float>'
|
||||
}
|
||||
@ -83,7 +83,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -30,7 +30,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'array_of_string' => :'Array<String>',
|
||||
:'array_array_of_integer' => :'Array<Array<Integer>>',
|
||||
@ -105,7 +105,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -40,7 +40,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'small_camel' => :'String',
|
||||
:'capital_camel' => :'String',
|
||||
@ -127,7 +127,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -30,7 +30,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'class_name' => :'String',
|
||||
:'color' => :'String',
|
||||
@ -106,7 +106,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -27,7 +27,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'id' => :'Integer',
|
||||
:'name' => :'String'
|
||||
@ -90,7 +90,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -25,7 +25,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'_class' => :'String'
|
||||
}
|
||||
@ -82,7 +82,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -24,7 +24,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'client' => :'String'
|
||||
}
|
||||
@ -81,7 +81,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -30,7 +30,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'class_name' => :'String',
|
||||
:'color' => :'String',
|
||||
@ -106,7 +106,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -49,7 +49,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'just_symbol' => :'String',
|
||||
:'array_enum' => :'Array<String>'
|
||||
@ -126,7 +126,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -58,7 +58,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'enum_string' => :'String',
|
||||
:'enum_string_required' => :'String',
|
||||
@ -192,7 +192,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -60,7 +60,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'integer' => :'Integer',
|
||||
:'int32' => :'Integer',
|
||||
@ -395,7 +395,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -27,7 +27,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'bar' => :'String',
|
||||
:'foo' => :'String'
|
||||
@ -90,7 +90,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -24,7 +24,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'_123_list' => :'String'
|
||||
}
|
||||
@ -81,7 +81,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -49,7 +49,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'map_map_of_string' => :'Hash<String, Hash<String, String>>',
|
||||
:'map_of_enum_string' => :'Hash<String, String>'
|
||||
@ -116,7 +116,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -30,7 +30,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'uuid' => :'String',
|
||||
:'date_time' => :'DateTime',
|
||||
@ -101,7 +101,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -28,7 +28,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'name' => :'Integer',
|
||||
:'_class' => :'String'
|
||||
@ -91,7 +91,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -25,7 +25,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'_return' => :'Integer'
|
||||
}
|
||||
@ -82,7 +82,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -34,7 +34,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'name' => :'Integer',
|
||||
:'snake_case' => :'Integer',
|
||||
@ -114,7 +114,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -24,7 +24,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'just_number' => :'Float'
|
||||
}
|
||||
@ -81,7 +81,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -62,7 +62,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'id' => :'Integer',
|
||||
:'pet_id' => :'Integer',
|
||||
@ -163,7 +163,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -30,7 +30,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'my_number' => :'Float',
|
||||
:'my_string' => :'String',
|
||||
@ -99,7 +99,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -62,7 +62,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'id' => :'Integer',
|
||||
:'category' => :'Category',
|
||||
@ -175,7 +175,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -27,7 +27,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'bar' => :'String',
|
||||
:'baz' => :'String'
|
||||
@ -90,7 +90,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -24,7 +24,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'special_property_name' => :'Integer'
|
||||
}
|
||||
@ -81,7 +81,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -27,7 +27,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'id' => :'Integer',
|
||||
:'name' => :'String'
|
||||
@ -90,7 +90,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -46,7 +46,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.swagger_types
|
||||
def self.openapi_types
|
||||
{
|
||||
:'id' => :'Integer',
|
||||
:'username' => :'String',
|
||||
@ -145,7 +145,7 @@ module Petstore
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.swagger_types.each_pair do |key, type|
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the the attribute
|
||||
# is documented as an array but the input is not
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
Swagger Codegen version: 3.0.0-SNAPSHOT
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 3.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
@ -19,9 +19,9 @@ Gem::Specification.new do |s|
|
||||
s.name = "petstore"
|
||||
s.version = Petstore::VERSION
|
||||
s.platform = Gem::Platform::RUBY
|
||||
s.authors = ["Swagger-Codegen"]
|
||||
s.authors = ["OpenAPI-Generator"]
|
||||
s.email = ["apiteam@swagger.io"]
|
||||
s.homepage = "https://github.com/swagger-api/swagger-codegen"
|
||||
s.homepage = "https://openapi-generator.tech"
|
||||
s.summary = "Swagger Petstore 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: \" \\"
|
||||
s.license = "Unlicense"
|
||||
|
Loading…
x
Reference in New Issue
Block a user