From c245f2199f235b26dccaf69be8f6fd87866e1bce Mon Sep 17 00:00:00 2001 From: Igor Markov Date: Thu, 19 May 2016 11:50:57 +0300 Subject: [PATCH 01/60] [Objc] fixed code generation for collection parameter --- .../swagger-codegen/src/main/resources/objc/api-body.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/swagger-codegen/src/main/resources/objc/api-body.mustache b/modules/swagger-codegen/src/main/resources/objc/api-body.mustache index 92dbf1d0065..b478230cfef 100644 --- a/modules/swagger-codegen/src/main/resources/objc/api-body.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/api-body.mustache @@ -113,7 +113,7 @@ NSInteger k{{classname}}MissingParamErrorCode = 234513; {{#queryParams}} if ({{paramName}} != nil) { {{#collectionFormat}} - queryParams[@"{{baseName}}"] = [[{{classPrefix}}QueryParamCollection alloc] initWithValuesAndFormat: {{baseName}} format: @"{{collectionFormat}}"]; + queryParams[@"{{baseName}}"] = [[{{classPrefix}}QueryParamCollection alloc] initWithValuesAndFormat: {{paramName}} format: @"{{collectionFormat}}"]; {{/collectionFormat}} {{^collectionFormat}}queryParams[@"{{baseName}}"] = {{paramName}};{{/collectionFormat}} } From 942b015c8fa744469144ce2f49c9f1a2178c20d0 Mon Sep 17 00:00:00 2001 From: Newell Zhu Date: Mon, 23 May 2016 20:46:32 +0800 Subject: [PATCH 02/60] Add normal class enum support --- .../ruby/partial_model_generic.mustache | 74 +++++++++---------- 1 file changed, 36 insertions(+), 38 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/ruby/partial_model_generic.mustache b/modules/swagger-codegen/src/main/resources/ruby/partial_model_generic.mustache index 25a71610168..0335500863f 100644 --- a/modules/swagger-codegen/src/main/resources/ruby/partial_model_generic.mustache +++ b/modules/swagger-codegen/src/main/resources/ruby/partial_model_generic.mustache @@ -4,6 +4,30 @@ attr_accessor :{{{name}}} {{/vars}} +{{#hasEnums}} + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end +{{/hasEnums}} + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -53,13 +77,6 @@ # @return Array for valid properies with the reasons def list_invalid_properties invalid_properties = Array.new - {{#isEnum}} - allowed_values = [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] - if @{{{name}}} && !allowed_values.include?({{{name}}}) - invalid_properties.push("invalid value for '{{{name}}}', must be one of #{allowed_values}.") - end - - {{/isEnum}} {{#hasValidation}} if @{{{name}}}.nil? fail ArgumentError, "{{{name}}} cannot be nil" @@ -104,50 +121,31 @@ def valid? {{#vars}} {{#required}} - if @{{{name}}}.nil? - return false - end - + return false if @{{{name}}}.nil? {{/required}} {{#isEnum}} - allowed_values = [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] - if @{{{name}}} && !allowed_values.include?(@{{{name}}}) - return false - end + {{{name}}}_validator = EnumAttributeValidator.new('{{{datatype}}}', [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}]) + return false unless {{{name}}}_validator.valid?(@{{{name}}}) {{/isEnum}} {{#hasValidation}} {{#minLength}} - if @{{{name}}}.to_s.length > {{{maxLength}}} - return false - end - + return false if @{{{name}}}.to_s.length > {{{maxLength}}} {{/minLength}} {{#maxLength}} - if @{{{name}}}.to_s.length < {{{minLength}}} - return false - end - + return false if @{{{name}}}.to_s.length < {{{minLength}}} {{/maxLength}} {{#maximum}} - if @{{{name}}} > {{{maximum}}} - return false - end - + return false if @{{{name}}} > {{{maximum}}} {{/maximum}} {{#minimum}} - if @{{{name}}} < {{{minimum}}} - return false - end - + return false if @{{{name}}} < {{{minimum}}} {{/minimum}} {{#pattern}} - if @{{{name}}} !~ Regexp.new({{{pattern}}}) - return false - end - + return false if @{{{name}}} !~ Regexp.new({{{pattern}}}) {{/pattern}} {{/hasValidation}} {{/vars}} + return true end {{#vars}} @@ -155,9 +153,9 @@ # Custom attribute writer method checking allowed values (enum). # @param [Object] {{{name}}} Object to be assigned def {{{name}}}=({{{name}}}) - allowed_values = [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] - if {{{name}}} && !allowed_values.include?({{{name}}}) - fail ArgumentError, "invalid value for '{{{name}}}', must be one of #{allowed_values}." + validator = EnumAttributeValidator.new('{{{datatype}}}', [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}]) + unless validator.valid?({{{name}}}) + fail ArgumentError, "invalid value for '{{{name}}}', must be one of #{validator.allowable_values}." end @{{{name}}} = {{{name}}} end From a9b81504428ce41839da524ea802c1bbea340b71 Mon Sep 17 00:00:00 2001 From: Newell Zhu Date: Mon, 23 May 2016 20:54:45 +0800 Subject: [PATCH 03/60] regenerate ruby client sample --- .../petstore/ruby/.swagger-codegen-ignore | 23 ++ samples/client/petstore/ruby/README.md | 5 +- .../ruby/docs/AdditionalPropertiesClass.md | 7 + samples/client/petstore/ruby/docs/FakeApi.md | 4 +- ...dPropertiesAndAdditionalPropertiesClass.md | 9 + .../petstore/ruby/docs/ReadOnlyFirst.md | 9 + samples/client/petstore/ruby/lib/petstore.rb | 3 + .../ruby/lib/petstore/api/fake_api.rb | 4 +- .../models/additional_properties_class.rb | 183 ++++++++++++++++ .../ruby/lib/petstore/models/animal.rb | 9 +- .../ruby/lib/petstore/models/animal_farm.rb | 4 + .../ruby/lib/petstore/models/api_response.rb | 4 + .../petstore/ruby/lib/petstore/models/cat.rb | 9 +- .../ruby/lib/petstore/models/category.rb | 4 + .../petstore/ruby/lib/petstore/models/dog.rb | 9 +- .../ruby/lib/petstore/models/enum_class.rb | 9 +- .../ruby/lib/petstore/models/enum_test.rb | 61 ++++-- .../ruby/lib/petstore/models/format_test.rb | 89 ++------ ...perties_and_additional_properties_class.rb | 201 ++++++++++++++++++ .../lib/petstore/models/model_200_response.rb | 3 + .../ruby/lib/petstore/models/model_return.rb | 3 + .../petstore/ruby/lib/petstore/models/name.rb | 8 +- .../ruby/lib/petstore/models/order.rb | 37 +++- .../petstore/ruby/lib/petstore/models/pet.rb | 47 ++-- .../lib/petstore/models/read_only_first.rb | 201 ++++++++++++++++++ .../lib/petstore/models/special_model_name.rb | 4 + .../petstore/ruby/lib/petstore/models/tag.rb | 4 + .../petstore/ruby/lib/petstore/models/user.rb | 4 + .../additional_properties_class_spec.rb | 40 ++++ ...es_and_additional_properties_class_spec.rb | 52 +++++ .../ruby/spec/models/read_only_first_spec.rb | 52 +++++ 31 files changed, 965 insertions(+), 136 deletions(-) create mode 100644 samples/client/petstore/ruby/.swagger-codegen-ignore create mode 100644 samples/client/petstore/ruby/docs/AdditionalPropertiesClass.md create mode 100644 samples/client/petstore/ruby/docs/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/client/petstore/ruby/docs/ReadOnlyFirst.md create mode 100644 samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb create mode 100644 samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb create mode 100644 samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb create mode 100644 samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb create mode 100644 samples/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb create mode 100644 samples/client/petstore/ruby/spec/models/read_only_first_spec.rb diff --git a/samples/client/petstore/ruby/.swagger-codegen-ignore b/samples/client/petstore/ruby/.swagger-codegen-ignore new file mode 100644 index 00000000000..19d3377182e --- /dev/null +++ b/samples/client/petstore/ruby/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# Thsi matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/ruby/README.md b/samples/client/petstore/ruby/README.md index 1ff27c5eb29..8767f816482 100644 --- a/samples/client/petstore/ruby/README.md +++ b/samples/client/petstore/ruby/README.md @@ -8,7 +8,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/ - API version: 1.0.0 - Package version: 1.0.0 -- Build date: 2016-05-11T16:13:11.464+08:00 +- Build date: 2016-05-23T20:51:09.022+08:00 - Build package: class io.swagger.codegen.languages.RubyClientCodegen ## Installation @@ -116,6 +116,7 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [Petstore::AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - [Petstore::Animal](docs/Animal.md) - [Petstore::AnimalFarm](docs/AnimalFarm.md) - [Petstore::ApiResponse](docs/ApiResponse.md) @@ -125,11 +126,13 @@ Class | Method | HTTP request | Description - [Petstore::EnumClass](docs/EnumClass.md) - [Petstore::EnumTest](docs/EnumTest.md) - [Petstore::FormatTest](docs/FormatTest.md) + - [Petstore::MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - [Petstore::Model200Response](docs/Model200Response.md) - [Petstore::ModelReturn](docs/ModelReturn.md) - [Petstore::Name](docs/Name.md) - [Petstore::Order](docs/Order.md) - [Petstore::Pet](docs/Pet.md) + - [Petstore::ReadOnlyFirst](docs/ReadOnlyFirst.md) - [Petstore::SpecialModelName](docs/SpecialModelName.md) - [Petstore::Tag](docs/Tag.md) - [Petstore::User](docs/User.md) diff --git a/samples/client/petstore/ruby/docs/AdditionalPropertiesClass.md b/samples/client/petstore/ruby/docs/AdditionalPropertiesClass.md new file mode 100644 index 00000000000..8c9c63a74a3 --- /dev/null +++ b/samples/client/petstore/ruby/docs/AdditionalPropertiesClass.md @@ -0,0 +1,7 @@ +# Petstore::AdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/samples/client/petstore/ruby/docs/FakeApi.md b/samples/client/petstore/ruby/docs/FakeApi.md index c0312e00f51..7b687dc67b9 100644 --- a/samples/client/petstore/ruby/docs/FakeApi.md +++ b/samples/client/petstore/ruby/docs/FakeApi.md @@ -75,8 +75,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json + - **Content-Type**: application/xml; charset=utf-8, application/json; charset=utf-8 + - **Accept**: application/xml; charset=utf-8, application/json; charset=utf-8 diff --git a/samples/client/petstore/ruby/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/ruby/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 00000000000..973c03c8396 --- /dev/null +++ b/samples/client/petstore/ruby/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,9 @@ +# Petstore::MixedPropertiesAndAdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **String** | | [optional] +**date_time** | **DateTime** | | [optional] + + diff --git a/samples/client/petstore/ruby/docs/ReadOnlyFirst.md b/samples/client/petstore/ruby/docs/ReadOnlyFirst.md new file mode 100644 index 00000000000..e49b5119478 --- /dev/null +++ b/samples/client/petstore/ruby/docs/ReadOnlyFirst.md @@ -0,0 +1,9 @@ +# Petstore::ReadOnlyFirst + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] +**baz** | **String** | | [optional] + + diff --git a/samples/client/petstore/ruby/lib/petstore.rb b/samples/client/petstore/ruby/lib/petstore.rb index ce77b3d21b6..403cf32b448 100644 --- a/samples/client/petstore/ruby/lib/petstore.rb +++ b/samples/client/petstore/ruby/lib/petstore.rb @@ -21,6 +21,7 @@ require 'petstore/version' require 'petstore/configuration' # Models +require 'petstore/models/additional_properties_class' require 'petstore/models/animal' require 'petstore/models/animal_farm' require 'petstore/models/api_response' @@ -30,11 +31,13 @@ require 'petstore/models/dog' require 'petstore/models/enum_class' require 'petstore/models/enum_test' require 'petstore/models/format_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/order' require 'petstore/models/pet' +require 'petstore/models/read_only_first' require 'petstore/models/special_model_name' require 'petstore/models/tag' require 'petstore/models/user' diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb index e7e6e45c262..e308b35153a 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -131,11 +131,11 @@ module Petstore header_params = {} # HTTP header 'Accept' (if needed) - local_header_accept = ['application/xml', 'application/json'] + local_header_accept = ['application/xml; charset=utf-8', 'application/json; charset=utf-8'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' - local_header_content_type = [] + local_header_content_type = ['application/xml; charset=utf-8', 'application/json; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb new file mode 100644 index 00000000000..c2baf6ab38e --- /dev/null +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb @@ -0,0 +1,183 @@ +=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 + +License: Apache 2.0 +http://www.apache.org/licenses/LICENSE-2.0.html + +Terms of Service: http://swagger.io/terms/ + +=end + +require 'date' + +module Petstore + + class AdditionalPropertiesClass + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + } + end + + # Attribute type mapping. + def self.swagger_types + { + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + 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} + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + return 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 + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @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| + if type =~ /^Array<(.*)>/i + # check to ensure the input is an array given that the 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) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /^(true|t|yes|y|1)$/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = Petstore.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @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) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/samples/client/petstore/ruby/lib/petstore/models/animal.rb b/samples/client/petstore/ruby/lib/petstore/models/animal.rb index 60edb0004a7..67c7a49d30f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/animal.rb @@ -17,11 +17,13 @@ Terms of Service: http://swagger.io/terms/ require 'date' module Petstore + class Animal attr_accessor :class_name attr_accessor :color + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -68,10 +70,8 @@ module Petstore # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @class_name.nil? - return false - end - + return false if @class_name.nil? + return true end # Checks equality by comparing each attribute. @@ -200,4 +200,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb b/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb index 3328854e56b..bcf857a5d03 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb @@ -17,7 +17,9 @@ Terms of Service: http://swagger.io/terms/ require 'date' module Petstore + class AnimalFarm + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -50,6 +52,7 @@ module Petstore # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return true end # Checks equality by comparing each attribute. @@ -176,4 +179,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb index 9bc6c7b7ae7..15307a0343e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb @@ -17,6 +17,7 @@ Terms of Service: http://swagger.io/terms/ require 'date' module Petstore + class ApiResponse attr_accessor :code @@ -24,6 +25,7 @@ module Petstore attr_accessor :message + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -74,6 +76,7 @@ module Petstore # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return true end # Checks equality by comparing each attribute. @@ -203,4 +206,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat.rb b/samples/client/petstore/ruby/lib/petstore/models/cat.rb index 58f9bca969e..f646c9fc7da 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat.rb @@ -17,6 +17,7 @@ Terms of Service: http://swagger.io/terms/ require 'date' module Petstore + class Cat attr_accessor :class_name @@ -24,6 +25,7 @@ module Petstore attr_accessor :declawed + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -76,10 +78,8 @@ module Petstore # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @class_name.nil? - return false - end - + return false if @class_name.nil? + return true end # Checks equality by comparing each attribute. @@ -209,4 +209,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/category.rb b/samples/client/petstore/ruby/lib/petstore/models/category.rb index 0a0679c8e0a..56f10935270 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/category.rb @@ -17,11 +17,13 @@ Terms of Service: http://swagger.io/terms/ require 'date' module Petstore + class Category attr_accessor :id attr_accessor :name + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -66,6 +68,7 @@ module Petstore # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return true end # Checks equality by comparing each attribute. @@ -194,4 +197,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog.rb b/samples/client/petstore/ruby/lib/petstore/models/dog.rb index 78738dfb323..d8de4d6b812 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog.rb @@ -17,6 +17,7 @@ Terms of Service: http://swagger.io/terms/ require 'date' module Petstore + class Dog attr_accessor :class_name @@ -24,6 +25,7 @@ module Petstore attr_accessor :breed + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -76,10 +78,8 @@ module Petstore # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @class_name.nil? - return false - end - + return false if @class_name.nil? + return true end # Checks equality by comparing each attribute. @@ -209,4 +209,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb index 8f9781813e9..700ef381d8b 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb @@ -1,7 +1,7 @@ =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: \" \\ +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 @@ -18,9 +18,10 @@ require 'date' module Petstore class EnumClass - - ABC = "_ab\"c".freeze + + ABC = "_abc".freeze EFG = "-efg".freeze - XYZ = "(xy'z)".freeze + XYZ = "(xyz)".freeze end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb index 31a75aebb8b..1c9c255cfff 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb @@ -17,6 +17,7 @@ Terms of Service: http://swagger.io/terms/ require 'date' module Petstore + class EnumTest attr_accessor :enum_string @@ -24,6 +25,28 @@ module Petstore attr_accessor :enum_number + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -74,26 +97,21 @@ module Petstore # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - allowed_values = ["UPPER", "lower"] - if @enum_string && !allowed_values.include?(@enum_string) - return false - end - allowed_values = ["1", "-1"] - if @enum_integer && !allowed_values.include?(@enum_integer) - return false - end - allowed_values = ["1.1", "-1.2"] - if @enum_number && !allowed_values.include?(@enum_number) - return false - end + enum_string_validator = EnumAttributeValidator.new('String', ["UPPER", "lower"]) + return false unless enum_string_validator.valid?(@enum_string) + enum_integer_validator = EnumAttributeValidator.new('Integer', ["1", "-1"]) + return false unless enum_integer_validator.valid?(@enum_integer) + enum_number_validator = EnumAttributeValidator.new('Float', ["1.1", "-1.2"]) + return false unless enum_number_validator.valid?(@enum_number) + return true end # Custom attribute writer method checking allowed values (enum). # @param [Object] enum_string Object to be assigned def enum_string=(enum_string) - allowed_values = ["UPPER", "lower"] - if enum_string && !allowed_values.include?(enum_string) - fail ArgumentError, "invalid value for 'enum_string', must be one of #{allowed_values}." + validator = EnumAttributeValidator.new('String', ["UPPER", "lower"]) + unless validator.valid?(enum_string) + fail ArgumentError, "invalid value for 'enum_string', must be one of #{validator.allowable_values}." end @enum_string = enum_string end @@ -101,9 +119,9 @@ module Petstore # Custom attribute writer method checking allowed values (enum). # @param [Object] enum_integer Object to be assigned def enum_integer=(enum_integer) - allowed_values = ["1", "-1"] - if enum_integer && !allowed_values.include?(enum_integer) - fail ArgumentError, "invalid value for 'enum_integer', must be one of #{allowed_values}." + validator = EnumAttributeValidator.new('Integer', ["1", "-1"]) + unless validator.valid?(enum_integer) + fail ArgumentError, "invalid value for 'enum_integer', must be one of #{validator.allowable_values}." end @enum_integer = enum_integer end @@ -111,9 +129,9 @@ module Petstore # Custom attribute writer method checking allowed values (enum). # @param [Object] enum_number Object to be assigned def enum_number=(enum_number) - allowed_values = ["1.1", "-1.2"] - if enum_number && !allowed_values.include?(enum_number) - fail ArgumentError, "invalid value for 'enum_number', must be one of #{allowed_values}." + validator = EnumAttributeValidator.new('Float', ["1.1", "-1.2"]) + unless validator.valid?(enum_number) + fail ArgumentError, "invalid value for 'enum_number', must be one of #{validator.allowable_values}." end @enum_number = enum_number end @@ -245,4 +263,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb index bd6a02d4a73..c517d909b72 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb @@ -17,6 +17,7 @@ Terms of Service: http://swagger.io/terms/ require 'date' module Petstore + class FormatTest attr_accessor :integer @@ -44,6 +45,7 @@ module Petstore attr_accessor :password + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -154,74 +156,24 @@ module Petstore # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @integer > 100.0 - return false - end - - if @integer < 10.0 - return false - end - - if @int32 > 200.0 - return false - end - - if @int32 < 20.0 - return false - end - - if @number.nil? - return false - end - - if @number > 543.2 - return false - end - - if @number < 32.1 - return false - end - - if @float > 987.6 - return false - end - - if @float < 54.3 - return false - end - - if @double > 123.4 - return false - end - - if @double < 67.8 - return false - end - - if @string !~ Regexp.new(/[a-z]/i) - return false - end - - if @byte.nil? - return false - end - - if @date.nil? - return false - end - - if @password.nil? - return false - end - - if @password.to_s.length > 64 - return false - end - - if @password.to_s.length < 10 - return false - end - + return false if @integer > 100.0 + return false if @integer < 10.0 + return false if @int32 > 200.0 + return false if @int32 < 20.0 + return false if @number.nil? + return false if @number > 543.2 + return false if @number < 32.1 + return false if @float > 987.6 + return false if @float < 54.3 + return false if @double > 123.4 + return false if @double < 67.8 + return false if @string !~ Regexp.new(/[a-z]/i) + return false if @byte.nil? + return false if @date.nil? + return false if @password.nil? + return false if @password.to_s.length > 64 + return false if @password.to_s.length < 10 + return true end # Custom attribute writer method with validation @@ -483,4 +435,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb new file mode 100644 index 00000000000..6b2c9b8cecf --- /dev/null +++ b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -0,0 +1,201 @@ +=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 + +License: Apache 2.0 +http://www.apache.org/licenses/LICENSE-2.0.html + +Terms of Service: http://swagger.io/terms/ + +=end + +require 'date' + +module Petstore + + class MixedPropertiesAndAdditionalPropertiesClass + attr_accessor :uuid + + attr_accessor :date_time + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'uuid' => :'uuid', + :'date_time' => :'dateTime' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'uuid' => :'String', + :'date_time' => :'DateTime' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + 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} + + if attributes.has_key?(:'uuid') + self.uuid = attributes[:'uuid'] + end + + if attributes.has_key?(:'dateTime') + self.date_time = attributes[:'dateTime'] + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + return 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 + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + uuid == o.uuid && + date_time == o.date_time + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [uuid, date_time].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @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| + if type =~ /^Array<(.*)>/i + # check to ensure the input is an array given that the 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) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /^(true|t|yes|y|1)$/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = Petstore.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @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) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model_200_response.rb b/samples/client/petstore/ruby/lib/petstore/models/model_200_response.rb index 15675e5dd22..ad6926b260f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model_200_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model_200_response.rb @@ -21,6 +21,7 @@ module Petstore class Model200Response attr_accessor :name + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -59,6 +60,7 @@ module Petstore # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return true end # Checks equality by comparing each attribute. @@ -186,4 +188,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb index 06150419de3..d2a24d316c2 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb @@ -21,6 +21,7 @@ module Petstore class ModelReturn attr_accessor :_return + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -59,6 +60,7 @@ module Petstore # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return true end # Checks equality by comparing each attribute. @@ -186,4 +188,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/name.rb b/samples/client/petstore/ruby/lib/petstore/models/name.rb index 01d3910b948..c029d5c6010 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/name.rb @@ -27,6 +27,7 @@ module Petstore attr_accessor :_123_number + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -83,10 +84,8 @@ module Petstore # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @name.nil? - return false - end - + return false if @name.nil? + return true end # Checks equality by comparing each attribute. @@ -217,4 +216,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/order.rb b/samples/client/petstore/ruby/lib/petstore/models/order.rb index 4aefb422eb6..8c510a97927 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/order.rb @@ -17,6 +17,7 @@ Terms of Service: http://swagger.io/terms/ require 'date' module Petstore + class Order attr_accessor :id @@ -31,6 +32,28 @@ module Petstore attr_accessor :complete + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -101,18 +124,17 @@ module Petstore # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - allowed_values = ["placed", "approved", "delivered"] - if @status && !allowed_values.include?(@status) - return false - end + status_validator = EnumAttributeValidator.new('String', ["placed", "approved", "delivered"]) + return false unless status_validator.valid?(@status) + return true end # Custom attribute writer method checking allowed values (enum). # @param [Object] status Object to be assigned def status=(status) - allowed_values = ["placed", "approved", "delivered"] - if status && !allowed_values.include?(status) - fail ArgumentError, "invalid value for 'status', must be one of #{allowed_values}." + validator = EnumAttributeValidator.new('String', ["placed", "approved", "delivered"]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}." end @status = status end @@ -247,4 +269,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/pet.rb b/samples/client/petstore/ruby/lib/petstore/models/pet.rb index b2432b09e5e..3b47127903b 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/pet.rb @@ -17,6 +17,7 @@ Terms of Service: http://swagger.io/terms/ require 'date' module Petstore + class Pet attr_accessor :id @@ -31,6 +32,28 @@ module Petstore # pet status in the store attr_accessor :status + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -103,26 +126,19 @@ module Petstore # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @name.nil? - return false - end - - if @photo_urls.nil? - return false - end - - allowed_values = ["available", "pending", "sold"] - if @status && !allowed_values.include?(@status) - return false - end + return false if @name.nil? + return false if @photo_urls.nil? + status_validator = EnumAttributeValidator.new('String', ["available", "pending", "sold"]) + return false unless status_validator.valid?(@status) + return true end # Custom attribute writer method checking allowed values (enum). # @param [Object] status Object to be assigned def status=(status) - allowed_values = ["available", "pending", "sold"] - if status && !allowed_values.include?(status) - fail ArgumentError, "invalid value for 'status', must be one of #{allowed_values}." + validator = EnumAttributeValidator.new('String', ["available", "pending", "sold"]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}." end @status = status end @@ -257,4 +273,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb new file mode 100644 index 00000000000..80d14387f62 --- /dev/null +++ b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb @@ -0,0 +1,201 @@ +=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 + +License: Apache 2.0 +http://www.apache.org/licenses/LICENSE-2.0.html + +Terms of Service: http://swagger.io/terms/ + +=end + +require 'date' + +module Petstore + + class ReadOnlyFirst + attr_accessor :bar + + attr_accessor :baz + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'bar' => :'bar', + :'baz' => :'baz' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'bar' => :'String', + :'baz' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + 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} + + if attributes.has_key?(:'bar') + self.bar = attributes[:'bar'] + end + + if attributes.has_key?(:'baz') + self.baz = attributes[:'baz'] + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + return 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 + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + bar == o.bar && + baz == o.baz + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [bar, baz].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @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| + if type =~ /^Array<(.*)>/i + # check to ensure the input is an array given that the 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) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /^(true|t|yes|y|1)$/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = Petstore.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @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) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb index caf84588f22..9423b2d3443 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb @@ -17,9 +17,11 @@ Terms of Service: http://swagger.io/terms/ require 'date' module Petstore + class SpecialModelName attr_accessor :special_property_name + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -58,6 +60,7 @@ module Petstore # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return true end # Checks equality by comparing each attribute. @@ -185,4 +188,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/tag.rb b/samples/client/petstore/ruby/lib/petstore/models/tag.rb index b47fc2f86e9..86cc8b9dce4 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/tag.rb @@ -17,11 +17,13 @@ Terms of Service: http://swagger.io/terms/ require 'date' module Petstore + class Tag attr_accessor :id attr_accessor :name + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -66,6 +68,7 @@ module Petstore # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return true end # Checks equality by comparing each attribute. @@ -194,4 +197,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/user.rb b/samples/client/petstore/ruby/lib/petstore/models/user.rb index da720b1f559..5681a1f6928 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/user.rb @@ -17,6 +17,7 @@ Terms of Service: http://swagger.io/terms/ require 'date' module Petstore + class User attr_accessor :id @@ -35,6 +36,7 @@ module Petstore # User Status attr_accessor :user_status + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -115,6 +117,7 @@ module Petstore # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return true end # Checks equality by comparing each attribute. @@ -249,4 +252,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb new file mode 100644 index 00000000000..edf0371b127 --- /dev/null +++ b/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb @@ -0,0 +1,40 @@ +=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 + +License: Apache 2.0 +http://www.apache.org/licenses/LICENSE-2.0.html + +Terms of Service: http://swagger.io/terms/ + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::AdditionalPropertiesClass +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'AdditionalPropertiesClass' do + before do + # run before each test + @instance = Petstore::AdditionalPropertiesClass.new + end + + after do + # run after each test + end + + describe 'test an instance of AdditionalPropertiesClass' do + it 'should create an instact of AdditionalPropertiesClass' do + expect(@instance).to be_instance_of(Petstore::AdditionalPropertiesClass) + end + end +end + diff --git a/samples/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb b/samples/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb new file mode 100644 index 00000000000..f1f9c33d78f --- /dev/null +++ b/samples/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb @@ -0,0 +1,52 @@ +=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 + +License: Apache 2.0 +http://www.apache.org/licenses/LICENSE-2.0.html + +Terms of Service: http://swagger.io/terms/ + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::MixedPropertiesAndAdditionalPropertiesClass +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'MixedPropertiesAndAdditionalPropertiesClass' do + before do + # run before each test + @instance = Petstore::MixedPropertiesAndAdditionalPropertiesClass.new + end + + after do + # run after each test + end + + describe 'test an instance of MixedPropertiesAndAdditionalPropertiesClass' do + it 'should create an instact of MixedPropertiesAndAdditionalPropertiesClass' do + expect(@instance).to be_instance_of(Petstore::MixedPropertiesAndAdditionalPropertiesClass) + end + end + describe 'test attribute "uuid"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "date_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end + diff --git a/samples/client/petstore/ruby/spec/models/read_only_first_spec.rb b/samples/client/petstore/ruby/spec/models/read_only_first_spec.rb new file mode 100644 index 00000000000..ab631729310 --- /dev/null +++ b/samples/client/petstore/ruby/spec/models/read_only_first_spec.rb @@ -0,0 +1,52 @@ +=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 + +License: Apache 2.0 +http://www.apache.org/licenses/LICENSE-2.0.html + +Terms of Service: http://swagger.io/terms/ + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::ReadOnlyFirst +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ReadOnlyFirst' do + before do + # run before each test + @instance = Petstore::ReadOnlyFirst.new + end + + after do + # run after each test + end + + describe 'test an instance of ReadOnlyFirst' do + it 'should create an instact of ReadOnlyFirst' do + expect(@instance).to be_instance_of(Petstore::ReadOnlyFirst) + end + end + describe 'test attribute "bar"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "baz"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end + From 24a0ced972fd41d1f136932d6937b6319f1e521c Mon Sep 17 00:00:00 2001 From: Newell Zhu Date: Mon, 23 May 2016 21:30:05 +0800 Subject: [PATCH 04/60] regenerate ruby spec file --- .../src/main/resources/ruby/model_test.mustache | 8 ++++++++ samples/client/petstore/ruby/README.md | 2 +- .../ruby/spec/models/animal_farm_spec.rb | 2 +- .../petstore/ruby/spec/models/animal_spec.rb | 8 +++++++- .../ruby/spec/models/api_response_spec.rb | 2 +- .../petstore/ruby/spec/models/cat_spec.rb | 8 +++++++- .../petstore/ruby/spec/models/category_spec.rb | 2 +- .../petstore/ruby/spec/models/dog_spec.rb | 8 +++++++- .../ruby/spec/models/enum_class_spec.rb | 2 +- .../petstore/ruby/spec/models/enum_test_spec.rb | 17 +++++++++++++---- .../ruby/spec/models/format_test_spec.rb | 2 +- .../ruby/spec/models/model_200_response_spec.rb | 2 +- .../ruby/spec/models/model_return_spec.rb | 2 +- .../petstore/ruby/spec/models/name_spec.rb | 8 +++++++- .../petstore/ruby/spec/models/order_spec.rb | 7 +++++-- .../petstore/ruby/spec/models/pet_spec.rb | 7 +++++-- .../ruby/spec/models/special_model_name_spec.rb | 2 +- .../petstore/ruby/spec/models/tag_spec.rb | 2 +- .../petstore/ruby/spec/models/user_spec.rb | 2 +- 19 files changed, 70 insertions(+), 23 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/ruby/model_test.mustache b/modules/swagger-codegen/src/main/resources/ruby/model_test.mustache index 305a10d6467..9425585780f 100644 --- a/modules/swagger-codegen/src/main/resources/ruby/model_test.mustache +++ b/modules/swagger-codegen/src/main/resources/ruby/model_test.mustache @@ -27,7 +27,15 @@ require 'date' {{#vars}} describe 'test attribute "{{{name}}}"' do it 'should work' do + {{#isEnum}} + validator = Petstore::EnumTest::EnumAttributeValidator.new('{{{datatype}}}', [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}]) + validator.allowable_values.each do |value| + expect { @instance.{{name}} = value }.not_to raise_error + end + {{/isEnum}} + {{^isEnum}} # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + {{/isEnum}} end end diff --git a/samples/client/petstore/ruby/README.md b/samples/client/petstore/ruby/README.md index 8767f816482..03e5ef14f4f 100644 --- a/samples/client/petstore/ruby/README.md +++ b/samples/client/petstore/ruby/README.md @@ -8,7 +8,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/ - API version: 1.0.0 - Package version: 1.0.0 -- Build date: 2016-05-23T20:51:09.022+08:00 +- Build date: 2016-05-23T21:28:35.293+08:00 - Build package: class io.swagger.codegen.languages.RubyClientCodegen ## Installation diff --git a/samples/client/petstore/ruby/spec/models/animal_farm_spec.rb b/samples/client/petstore/ruby/spec/models/animal_farm_spec.rb index 016b86fd8af..1535c7cb4ec 100644 --- a/samples/client/petstore/ruby/spec/models/animal_farm_spec.rb +++ b/samples/client/petstore/ruby/spec/models/animal_farm_spec.rb @@ -1,7 +1,7 @@ =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. +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 diff --git a/samples/client/petstore/ruby/spec/models/animal_spec.rb b/samples/client/petstore/ruby/spec/models/animal_spec.rb index 3f98b0f7b84..5c4f8dc0e69 100644 --- a/samples/client/petstore/ruby/spec/models/animal_spec.rb +++ b/samples/client/petstore/ruby/spec/models/animal_spec.rb @@ -1,7 +1,7 @@ =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. +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 @@ -42,5 +42,11 @@ describe 'Animal' do end end + describe 'test attribute "color"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/samples/client/petstore/ruby/spec/models/api_response_spec.rb b/samples/client/petstore/ruby/spec/models/api_response_spec.rb index 67b0cbe1a03..18ab87bf551 100644 --- a/samples/client/petstore/ruby/spec/models/api_response_spec.rb +++ b/samples/client/petstore/ruby/spec/models/api_response_spec.rb @@ -1,7 +1,7 @@ =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. +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 diff --git a/samples/client/petstore/ruby/spec/models/cat_spec.rb b/samples/client/petstore/ruby/spec/models/cat_spec.rb index 97ae668ea3b..86d600213b3 100644 --- a/samples/client/petstore/ruby/spec/models/cat_spec.rb +++ b/samples/client/petstore/ruby/spec/models/cat_spec.rb @@ -1,7 +1,7 @@ =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. +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 @@ -42,6 +42,12 @@ describe 'Cat' do end end + describe 'test attribute "color"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "declawed"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/samples/client/petstore/ruby/spec/models/category_spec.rb b/samples/client/petstore/ruby/spec/models/category_spec.rb index 1481358afdc..021de250efc 100644 --- a/samples/client/petstore/ruby/spec/models/category_spec.rb +++ b/samples/client/petstore/ruby/spec/models/category_spec.rb @@ -1,7 +1,7 @@ =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. +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 diff --git a/samples/client/petstore/ruby/spec/models/dog_spec.rb b/samples/client/petstore/ruby/spec/models/dog_spec.rb index e3eb4be12fc..10a5b831f25 100644 --- a/samples/client/petstore/ruby/spec/models/dog_spec.rb +++ b/samples/client/petstore/ruby/spec/models/dog_spec.rb @@ -1,7 +1,7 @@ =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. +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 @@ -42,6 +42,12 @@ describe 'Dog' do end end + describe 'test attribute "color"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "breed"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/samples/client/petstore/ruby/spec/models/enum_class_spec.rb b/samples/client/petstore/ruby/spec/models/enum_class_spec.rb index b8610d74a1b..02fe0a113fe 100644 --- a/samples/client/petstore/ruby/spec/models/enum_class_spec.rb +++ b/samples/client/petstore/ruby/spec/models/enum_class_spec.rb @@ -1,7 +1,7 @@ =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. +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 diff --git a/samples/client/petstore/ruby/spec/models/enum_test_spec.rb b/samples/client/petstore/ruby/spec/models/enum_test_spec.rb index 91941d8a50d..f85c15564f1 100644 --- a/samples/client/petstore/ruby/spec/models/enum_test_spec.rb +++ b/samples/client/petstore/ruby/spec/models/enum_test_spec.rb @@ -1,7 +1,7 @@ =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. +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 @@ -38,19 +38,28 @@ describe 'EnumTest' do end describe 'test attribute "enum_string"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["UPPER", "lower"]) + validator.allowable_values.each do |value| + expect { @instance.enum_string = value }.not_to raise_error + end end end describe 'test attribute "enum_integer"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + validator = Petstore::EnumTest::EnumAttributeValidator.new('Integer', ["1", "-1"]) + validator.allowable_values.each do |value| + expect { @instance.enum_integer = value }.not_to raise_error + end end end describe 'test attribute "enum_number"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + validator = Petstore::EnumTest::EnumAttributeValidator.new('Float', ["1.1", "-1.2"]) + validator.allowable_values.each do |value| + expect { @instance.enum_number = value }.not_to raise_error + end end end diff --git a/samples/client/petstore/ruby/spec/models/format_test_spec.rb b/samples/client/petstore/ruby/spec/models/format_test_spec.rb index e7a81fe537c..fd6cf6c0381 100644 --- a/samples/client/petstore/ruby/spec/models/format_test_spec.rb +++ b/samples/client/petstore/ruby/spec/models/format_test_spec.rb @@ -1,7 +1,7 @@ =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. +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 diff --git a/samples/client/petstore/ruby/spec/models/model_200_response_spec.rb b/samples/client/petstore/ruby/spec/models/model_200_response_spec.rb index 8b8879105d0..b986604e1ef 100644 --- a/samples/client/petstore/ruby/spec/models/model_200_response_spec.rb +++ b/samples/client/petstore/ruby/spec/models/model_200_response_spec.rb @@ -1,7 +1,7 @@ =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. +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 diff --git a/samples/client/petstore/ruby/spec/models/model_return_spec.rb b/samples/client/petstore/ruby/spec/models/model_return_spec.rb index 5a80c97542b..d21f4f1ed3e 100644 --- a/samples/client/petstore/ruby/spec/models/model_return_spec.rb +++ b/samples/client/petstore/ruby/spec/models/model_return_spec.rb @@ -1,7 +1,7 @@ =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. +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 diff --git a/samples/client/petstore/ruby/spec/models/name_spec.rb b/samples/client/petstore/ruby/spec/models/name_spec.rb index 03a9c69ece1..5ad2a851827 100644 --- a/samples/client/petstore/ruby/spec/models/name_spec.rb +++ b/samples/client/petstore/ruby/spec/models/name_spec.rb @@ -1,7 +1,7 @@ =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. +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 @@ -54,5 +54,11 @@ describe 'Name' do end end + describe 'test attribute "_123_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/samples/client/petstore/ruby/spec/models/order_spec.rb b/samples/client/petstore/ruby/spec/models/order_spec.rb index 73bd5c082fd..008d226ce6e 100644 --- a/samples/client/petstore/ruby/spec/models/order_spec.rb +++ b/samples/client/petstore/ruby/spec/models/order_spec.rb @@ -1,7 +1,7 @@ =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. +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 @@ -62,7 +62,10 @@ describe 'Order' do describe 'test attribute "status"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["placed", "approved", "delivered"]) + validator.allowable_values.each do |value| + expect { @instance.status = value }.not_to raise_error + end end end diff --git a/samples/client/petstore/ruby/spec/models/pet_spec.rb b/samples/client/petstore/ruby/spec/models/pet_spec.rb index 9911ced1366..72780cf80c9 100644 --- a/samples/client/petstore/ruby/spec/models/pet_spec.rb +++ b/samples/client/petstore/ruby/spec/models/pet_spec.rb @@ -1,7 +1,7 @@ =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. +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 @@ -68,7 +68,10 @@ describe 'Pet' do describe 'test attribute "status"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["available", "pending", "sold"]) + validator.allowable_values.each do |value| + expect { @instance.status = value }.not_to raise_error + end end end diff --git a/samples/client/petstore/ruby/spec/models/special_model_name_spec.rb b/samples/client/petstore/ruby/spec/models/special_model_name_spec.rb index cd93568e8f9..5b10f4c8f9f 100644 --- a/samples/client/petstore/ruby/spec/models/special_model_name_spec.rb +++ b/samples/client/petstore/ruby/spec/models/special_model_name_spec.rb @@ -1,7 +1,7 @@ =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. +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 diff --git a/samples/client/petstore/ruby/spec/models/tag_spec.rb b/samples/client/petstore/ruby/spec/models/tag_spec.rb index 68b77e026b1..c6a5a954b7e 100644 --- a/samples/client/petstore/ruby/spec/models/tag_spec.rb +++ b/samples/client/petstore/ruby/spec/models/tag_spec.rb @@ -1,7 +1,7 @@ =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. +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 diff --git a/samples/client/petstore/ruby/spec/models/user_spec.rb b/samples/client/petstore/ruby/spec/models/user_spec.rb index fc510605b5c..ae780d5d656 100644 --- a/samples/client/petstore/ruby/spec/models/user_spec.rb +++ b/samples/client/petstore/ruby/spec/models/user_spec.rb @@ -1,7 +1,7 @@ =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. +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 From 00c4877baf480a6bb4a4c3feb94b88535c8c03e4 Mon Sep 17 00:00:00 2001 From: Joseph Zuromski Date: Mon, 23 May 2016 20:08:00 -0700 Subject: [PATCH 05/60] move swift samples into swift/default and swift/promisekit directories --- bin/swift-petstore-promisekit.sh | 2 +- bin/swift-petstore.sh | 2 +- .../petstore/swift-promisekit/.gitignore | 63 ------------------- .../petstore/swift/{ => default}/Cartfile | 0 .../{ => default}/PetstoreClient.podspec | 0 .../Classes/Swaggers/APIHelper.swift | 0 .../Classes/Swaggers/APIs.swift | 0 .../Classes/Swaggers/APIs/PetAPI.swift | 0 .../Classes/Swaggers/APIs/StoreAPI.swift | 0 .../Classes/Swaggers/APIs/UserAPI.swift | 0 .../Swaggers/AlamofireImplementations.swift | 0 .../Classes/Swaggers/Extensions.swift | 0 .../Classes/Swaggers/Models.swift | 0 .../Classes/Swaggers/Models/Category.swift | 0 .../Classes/Swaggers/Models/Order.swift | 0 .../Classes/Swaggers/Models/Pet.swift | 0 .../Classes/Swaggers/Models/Tag.swift | 0 .../Classes/Swaggers/Models/User.swift | 0 .../default}/SwaggerClientTests/Podfile | 0 .../SwaggerClientTests/Podfile.lock | 0 .../SwaggerClientTests/Pods/Alamofire/LICENSE | 0 .../Pods/Alamofire/README.md | 0 .../Pods/Alamofire/Source/Alamofire.swift | 0 .../Pods/Alamofire/Source/Download.swift | 0 .../Pods/Alamofire/Source/Error.swift | 0 .../Pods/Alamofire/Source/Manager.swift | 0 .../Alamofire/Source/MultipartFormData.swift | 0 .../Alamofire/Source/ParameterEncoding.swift | 0 .../Pods/Alamofire/Source/Request.swift | 0 .../Pods/Alamofire/Source/Response.swift | 0 .../Source/ResponseSerialization.swift | 0 .../Pods/Alamofire/Source/Result.swift | 0 .../Alamofire/Source/ServerTrustPolicy.swift | 0 .../Pods/Alamofire/Source/Stream.swift | 0 .../Pods/Alamofire/Source/Upload.swift | 0 .../Pods/Alamofire/Source/Validation.swift | 0 .../PetstoreClient.podspec.json | 0 .../SwaggerClientTests/Pods/Manifest.lock | 0 .../Pods/Pods.xcodeproj/project.pbxproj | 0 .../Alamofire/Alamofire-dummy.m | 0 .../Alamofire/Alamofire-prefix.pch | 0 .../Alamofire/Alamofire-umbrella.h | 0 .../Alamofire/Alamofire.modulemap | 0 .../Alamofire/Alamofire.xcconfig | 0 .../Target Support Files/Alamofire/Info.plist | 0 .../PetstoreClient/Info.plist | 0 .../PetstoreClient/PetstoreClient-dummy.m | 0 .../PetstoreClient/PetstoreClient-prefix.pch | 0 .../PetstoreClient/PetstoreClient-umbrella.h | 0 .../PetstoreClient/PetstoreClient.modulemap | 0 .../PetstoreClient/PetstoreClient.xcconfig | 0 .../Pods-SwaggerClient/Info.plist | 0 ...ds-SwaggerClient-acknowledgements.markdown | 0 .../Pods-SwaggerClient-acknowledgements.plist | 0 .../Pods-SwaggerClient-dummy.m | 0 .../Pods-SwaggerClient-frameworks.sh | 0 .../Pods-SwaggerClient-resources.sh | 0 .../Pods-SwaggerClient-umbrella.h | 0 .../Pods-SwaggerClient.debug.xcconfig | 0 .../Pods-SwaggerClient.modulemap | 0 .../Pods-SwaggerClient.release.xcconfig | 0 .../Pods-SwaggerClientTests/Info.plist | 0 ...aggerClientTests-acknowledgements.markdown | 0 ...-SwaggerClientTests-acknowledgements.plist | 0 .../Pods-SwaggerClientTests-dummy.m | 0 .../Pods-SwaggerClientTests-frameworks.sh | 0 .../Pods-SwaggerClientTests-resources.sh | 0 .../Pods-SwaggerClientTests-umbrella.h | 0 .../Pods-SwaggerClientTests.debug.xcconfig | 0 .../Pods-SwaggerClientTests.modulemap | 0 .../Pods-SwaggerClientTests.release.xcconfig | 0 .../SwaggerClient.xcodeproj/project.pbxproj | 0 .../xcschemes/SwaggerClient.xcscheme | 0 .../contents.xcworkspacedata | 0 .../SwaggerClient/AppDelegate.swift | 0 .../AppIcon.appiconset/Contents.json | 0 .../Base.lproj/LaunchScreen.storyboard | 0 .../SwaggerClient/Base.lproj/Main.storyboard | 0 .../SwaggerClient/Info.plist | 0 .../SwaggerClient/ViewController.swift | 0 .../SwaggerClientTests/Info.plist | 0 .../SwaggerClientTests/PetAPITests.swift | 0 .../SwaggerClientTests/StoreAPITests.swift | 0 .../SwaggerClientTests/UserAPITests.swift | 0 .../{ => default}/SwaggerClientTests/pom.xml | 0 .../default}/git_push.sh | 0 .../promisekit}/Cartfile | 0 .../promisekit}/PetstoreClient.podspec | 0 .../Classes/Swaggers/APIHelper.swift | 0 .../Classes/Swaggers/APIs.swift | 0 .../Classes/Swaggers/APIs/PetAPI.swift | 0 .../Classes/Swaggers/APIs/StoreAPI.swift | 0 .../Classes/Swaggers/APIs/UserAPI.swift | 0 .../Swaggers/AlamofireImplementations.swift | 0 .../Classes/Swaggers/Extensions.swift | 0 .../Classes/Swaggers/Models.swift | 0 .../Classes/Swaggers/Models/Category.swift | 0 .../Classes/Swaggers/Models/Order.swift | 0 .../Classes/Swaggers/Models/Pet.swift | 0 .../Classes/Swaggers/Models/Tag.swift | 0 .../Classes/Swaggers/Models/User.swift | 0 .../SwaggerClientTests/Podfile | 0 .../SwaggerClientTests/Podfile.lock | 0 .../SwaggerClientTests/Pods/Alamofire/LICENSE | 0 .../Pods/Alamofire/README.md | 0 .../Pods/Alamofire/Source/Alamofire.swift | 0 .../Pods/Alamofire/Source/Download.swift | 0 .../Pods/Alamofire/Source/Error.swift | 0 .../Pods/Alamofire/Source/Manager.swift | 0 .../Alamofire/Source/MultipartFormData.swift | 0 .../Alamofire/Source/ParameterEncoding.swift | 0 .../Pods/Alamofire/Source/Request.swift | 0 .../Pods/Alamofire/Source/Response.swift | 0 .../Source/ResponseSerialization.swift | 0 .../Pods/Alamofire/Source/Result.swift | 0 .../Alamofire/Source/ServerTrustPolicy.swift | 0 .../Pods/Alamofire/Source/Stream.swift | 0 .../Pods/Alamofire/Source/Upload.swift | 0 .../Pods/Alamofire/Source/Validation.swift | 0 .../PetstoreClient.podspec.json | 0 .../SwaggerClientTests/Pods/Manifest.lock | 0 .../Pods/OMGHTTPURLRQ/README.markdown | 0 .../OMGHTTPURLRQ/Sources/OMGFormURLEncode.h | 0 .../OMGHTTPURLRQ/Sources/OMGFormURLEncode.m | 0 .../Pods/OMGHTTPURLRQ/Sources/OMGHTTPURLRQ.h | 0 .../Pods/OMGHTTPURLRQ/Sources/OMGHTTPURLRQ.m | 0 .../Pods/OMGHTTPURLRQ/Sources/OMGUserAgent.h | 0 .../Pods/OMGHTTPURLRQ/Sources/OMGUserAgent.m | 0 .../Pods/Pods.xcodeproj/project.pbxproj | 0 .../NSNotificationCenter+AnyPromise.h | 0 .../NSNotificationCenter+AnyPromise.m | 0 .../NSNotificationCenter+Promise.swift | 0 .../Foundation/NSObject+Promise.swift | 0 .../Foundation/NSURLConnection+AnyPromise.h | 0 .../Foundation/NSURLConnection+AnyPromise.m | 0 .../Foundation/NSURLConnection+Promise.swift | 0 .../Foundation/NSURLSession+Promise.swift | 0 .../Categories/Foundation/afterlife.swift | 0 .../QuartzCore/CALayer+AnyPromise.h | 0 .../QuartzCore/CALayer+AnyPromise.m | 0 .../Categories/UIKit/PMKAlertController.swift | 0 .../UIKit/UIActionSheet+AnyPromise.h | 0 .../UIKit/UIActionSheet+AnyPromise.m | 0 .../UIKit/UIActionSheet+Promise.swift | 0 .../Categories/UIKit/UIAlertView+AnyPromise.h | 0 .../Categories/UIKit/UIAlertView+AnyPromise.m | 0 .../UIKit/UIAlertView+Promise.swift | 0 .../Categories/UIKit/UIView+AnyPromise.h | 0 .../Categories/UIKit/UIView+AnyPromise.m | 0 .../Categories/UIKit/UIView+Promise.swift | 0 .../UIKit/UIViewController+AnyPromise.h | 0 .../UIKit/UIViewController+AnyPromise.m | 0 .../UIKit/UIViewController+Promise.swift | 0 .../Pods/PromiseKit/README.markdown | 0 .../PromiseKit/Sources/AnyPromise+Private.h | 0 .../Pods/PromiseKit/Sources/AnyPromise.h | 0 .../Pods/PromiseKit/Sources/AnyPromise.m | 0 .../Pods/PromiseKit/Sources/AnyPromise.swift | 0 .../Pods/PromiseKit/Sources/Error.swift | 0 .../PromiseKit/Sources/NSError+Cancellation.h | 0 .../Sources/NSMethodSignatureForBlock.m | 0 .../Pods/PromiseKit/Sources/PMK.modulemap | 0 .../PromiseKit/Sources/PMKCallVariadicBlock.m | 0 .../Sources/Promise+Properties.swift | 0 .../Pods/PromiseKit/Sources/Promise.swift | 0 .../Pods/PromiseKit/Sources/PromiseKit.h | 0 .../Pods/PromiseKit/Sources/State.swift | 0 .../PromiseKit/Sources/URLDataPromise.swift | 0 .../Pods/PromiseKit/Sources/Umbrella.h | 0 .../Pods/PromiseKit/Sources/after.m | 0 .../Pods/PromiseKit/Sources/after.swift | 0 .../PromiseKit/Sources/dispatch_promise.m | 0 .../PromiseKit/Sources/dispatch_promise.swift | 0 .../Pods/PromiseKit/Sources/hang.m | 0 .../Pods/PromiseKit/Sources/join.m | 0 .../Pods/PromiseKit/Sources/join.swift | 0 .../Pods/PromiseKit/Sources/race.swift | 0 .../Pods/PromiseKit/Sources/when.m | 0 .../Pods/PromiseKit/Sources/when.swift | 0 .../Alamofire/Alamofire-dummy.m | 0 .../Alamofire/Alamofire-prefix.pch | 0 .../Alamofire/Alamofire-umbrella.h | 0 .../Alamofire/Alamofire.modulemap | 0 .../Alamofire/Alamofire.xcconfig | 0 .../Target Support Files/Alamofire/Info.plist | 0 .../OMGHTTPURLRQ/Info.plist | 0 .../OMGHTTPURLRQ/OMGHTTPURLRQ-dummy.m | 0 .../OMGHTTPURLRQ/OMGHTTPURLRQ-prefix.pch | 0 .../OMGHTTPURLRQ/OMGHTTPURLRQ-umbrella.h | 0 .../OMGHTTPURLRQ/OMGHTTPURLRQ.modulemap | 0 .../OMGHTTPURLRQ/OMGHTTPURLRQ.xcconfig | 0 .../PetstoreClient/Info.plist | 0 .../PetstoreClient/PetstoreClient-dummy.m | 0 .../PetstoreClient/PetstoreClient-prefix.pch | 0 .../PetstoreClient/PetstoreClient-umbrella.h | 0 .../PetstoreClient/PetstoreClient.modulemap | 0 .../PetstoreClient/PetstoreClient.xcconfig | 0 .../Pods-SwaggerClient/Info.plist | 0 ...ds-SwaggerClient-acknowledgements.markdown | 0 .../Pods-SwaggerClient-acknowledgements.plist | 0 .../Pods-SwaggerClient-dummy.m | 0 .../Pods-SwaggerClient-frameworks.sh | 0 .../Pods-SwaggerClient-resources.sh | 0 .../Pods-SwaggerClient-umbrella.h | 0 .../Pods-SwaggerClient.debug.xcconfig | 0 .../Pods-SwaggerClient.modulemap | 0 .../Pods-SwaggerClient.release.xcconfig | 0 .../Pods-SwaggerClientTests/Info.plist | 0 ...aggerClientTests-acknowledgements.markdown | 0 ...-SwaggerClientTests-acknowledgements.plist | 0 .../Pods-SwaggerClientTests-dummy.m | 0 .../Pods-SwaggerClientTests-frameworks.sh | 0 .../Pods-SwaggerClientTests-resources.sh | 0 .../Pods-SwaggerClientTests-umbrella.h | 0 .../Pods-SwaggerClientTests.debug.xcconfig | 0 .../Pods-SwaggerClientTests.modulemap | 0 .../Pods-SwaggerClientTests.release.xcconfig | 0 .../PromiseKit/Info.plist | 0 .../PromiseKit/PromiseKit-dummy.m | 0 .../PromiseKit/PromiseKit-prefix.pch | 0 .../PromiseKit/PromiseKit.modulemap | 0 .../PromiseKit/PromiseKit.xcconfig | 0 .../SwaggerClient.xcodeproj/project.pbxproj | 0 .../xcschemes/SwaggerClient.xcscheme | 0 .../contents.xcworkspacedata | 0 .../SwaggerClient/AppDelegate.swift | 0 .../AppIcon.appiconset/Contents.json | 0 .../Base.lproj/LaunchScreen.storyboard | 0 .../SwaggerClient/Base.lproj/Main.storyboard | 0 .../SwaggerClient/Info.plist | 0 .../SwaggerClient/ViewController.swift | 0 .../SwaggerClientTests/Info.plist | 0 .../SwaggerClientTests/PetAPITests.swift | 0 .../SwaggerClientTests/StoreAPITests.swift | 0 .../SwaggerClientTests/UserAPITests.swift | 0 .../promisekit}/SwaggerClientTests/pom.xml | 0 .../swift/{ => promisekit}/git_push.sh | 0 237 files changed, 2 insertions(+), 65 deletions(-) delete mode 100644 samples/client/petstore/swift-promisekit/.gitignore rename samples/client/petstore/swift/{ => default}/Cartfile (100%) rename samples/client/petstore/swift/{ => default}/PetstoreClient.podspec (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/PetstoreClient/Classes/Swaggers/APIHelper.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/PetstoreClient/Classes/Swaggers/APIs.swift (100%) rename samples/client/petstore/swift/{ => default}/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift (100%) rename samples/client/petstore/swift/{ => default}/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift (100%) rename samples/client/petstore/swift/{ => default}/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/PetstoreClient/Classes/Swaggers/AlamofireImplementations.swift (100%) rename samples/client/petstore/swift/{ => default}/PetstoreClient/Classes/Swaggers/Extensions.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/PetstoreClient/Classes/Swaggers/Models.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/PetstoreClient/Classes/Swaggers/Models/Category.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/PetstoreClient/Classes/Swaggers/Models/Order.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/PetstoreClient/Classes/Swaggers/Models/Pet.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/PetstoreClient/Classes/Swaggers/Models/Tag.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/PetstoreClient/Classes/Swaggers/Models/User.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Podfile (100%) rename samples/client/petstore/swift/{ => default}/SwaggerClientTests/Podfile.lock (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Alamofire/LICENSE (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Alamofire/README.md (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Alamofire/Source/Download.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Alamofire/Source/Error.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Alamofire/Source/Manager.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Alamofire/Source/Request.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Alamofire/Source/Response.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Alamofire/Source/Result.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Alamofire/Source/Stream.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Alamofire/Source/Upload.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift (100%) rename samples/client/petstore/swift/{ => default}/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json (100%) rename samples/client/petstore/swift/{ => default}/SwaggerClientTests/Pods/Manifest.lock (100%) rename samples/client/petstore/swift/{ => default}/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.xcconfig (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap (100%) rename samples/client/petstore/swift/{ => default}/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.xcconfig (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist (100%) rename samples/client/petstore/swift/{ => default}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown (100%) rename samples/client/petstore/swift/{ => default}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m (100%) rename samples/client/petstore/swift/{ => default}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h (100%) rename samples/client/petstore/swift/{ => default}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap (100%) rename samples/client/petstore/swift/{ => default}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h (100%) rename samples/client/petstore/swift/{ => default}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap (100%) rename samples/client/petstore/swift/{ => default}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/SwaggerClient/AppDelegate.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/SwaggerClient/Info.plist (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/SwaggerClient/ViewController.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/SwaggerClientTests/SwaggerClientTests/Info.plist (100%) rename samples/client/petstore/swift/{ => default}/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift (100%) rename samples/client/petstore/swift/{ => default}/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift (100%) rename samples/client/petstore/swift/{ => default}/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift (100%) rename samples/client/petstore/swift/{ => default}/SwaggerClientTests/pom.xml (100%) rename samples/client/petstore/{swift-promisekit => swift/default}/git_push.sh (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/Cartfile (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/PetstoreClient.podspec (100%) rename samples/client/petstore/swift/{ => promisekit}/PetstoreClient/Classes/Swaggers/APIHelper.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/PetstoreClient/Classes/Swaggers/APIs.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/PetstoreClient/Classes/Swaggers/AlamofireImplementations.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/PetstoreClient/Classes/Swaggers/Extensions.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/PetstoreClient/Classes/Swaggers/Models.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/PetstoreClient/Classes/Swaggers/Models/Category.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/PetstoreClient/Classes/Swaggers/Models/Order.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/PetstoreClient/Classes/Swaggers/Models/Pet.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/PetstoreClient/Classes/Swaggers/Models/Tag.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/PetstoreClient/Classes/Swaggers/Models/User.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Podfile (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Podfile.lock (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Alamofire/LICENSE (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Alamofire/README.md (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Alamofire/Source/Download.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Alamofire/Source/Error.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Alamofire/Source/Manager.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Alamofire/Source/Request.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Alamofire/Source/Response.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Alamofire/Source/Result.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Alamofire/Source/Stream.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Alamofire/Source/Upload.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/Manifest.lock (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/OMGHTTPURLRQ/README.markdown (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGFormURLEncode.h (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGFormURLEncode.m (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGHTTPURLRQ.h (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGHTTPURLRQ.m (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGUserAgent.h (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGUserAgent.m (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSNotificationCenter+AnyPromise.h (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSNotificationCenter+AnyPromise.m (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSNotificationCenter+Promise.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSObject+Promise.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSURLConnection+AnyPromise.h (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSURLConnection+AnyPromise.m (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSURLConnection+Promise.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSURLSession+Promise.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/afterlife.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/QuartzCore/CALayer+AnyPromise.h (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/QuartzCore/CALayer+AnyPromise.m (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/PMKAlertController.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIActionSheet+AnyPromise.h (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIActionSheet+AnyPromise.m (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIActionSheet+Promise.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIAlertView+AnyPromise.h (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIAlertView+AnyPromise.m (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIAlertView+Promise.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIView+AnyPromise.h (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIView+AnyPromise.m (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIView+Promise.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIViewController+AnyPromise.h (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIViewController+AnyPromise.m (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIViewController+Promise.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/README.markdown (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise+Private.h (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.h (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.m (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/Error.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/NSError+Cancellation.h (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/NSMethodSignatureForBlock.m (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/PMK.modulemap (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/PMKCallVariadicBlock.m (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/Promise+Properties.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/Promise.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/PromiseKit.h (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/State.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/URLDataPromise.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/Umbrella.h (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/after.m (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/after.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/dispatch_promise.m (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/dispatch_promise.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/hang.m (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/join.m (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/join.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/race.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/when.m (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/PromiseKit/Sources/when.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.xcconfig (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/Info.plist (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-dummy.m (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-prefix.pch (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-umbrella.h (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ.modulemap (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ.xcconfig (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.xcconfig (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/Target Support Files/PromiseKit/Info.plist (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-dummy.m (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-prefix.pch (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit.xcconfig (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/SwaggerClient/AppDelegate.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/SwaggerClient/Info.plist (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/SwaggerClient/ViewController.swift (100%) rename samples/client/petstore/swift/{ => promisekit}/SwaggerClientTests/SwaggerClientTests/Info.plist (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift (100%) rename samples/client/petstore/{swift-promisekit => swift/promisekit}/SwaggerClientTests/pom.xml (100%) rename samples/client/petstore/swift/{ => promisekit}/git_push.sh (100%) diff --git a/bin/swift-petstore-promisekit.sh b/bin/swift-petstore-promisekit.sh index 0fe36cbf4a8..d2787a876a0 100755 --- a/bin/swift-petstore-promisekit.sh +++ b/bin/swift-petstore-promisekit.sh @@ -26,6 +26,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="$@ generate -t modules/swagger-codegen/src/main/resources/swift -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l swift -c ./bin/swift-petstore-promisekit.json -o samples/client/petstore/swift-promisekit" +ags="$@ generate -t modules/swagger-codegen/src/main/resources/swift -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l swift -c ./bin/swift-petstore-promisekit.json -o samples/client/petstore/swift/promisekit" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/swift-petstore.sh b/bin/swift-petstore.sh index 96433e5b72d..3747b3adca4 100644 --- a/bin/swift-petstore.sh +++ b/bin/swift-petstore.sh @@ -26,6 +26,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="$@ generate -t modules/swagger-codegen/src/main/resources/swift -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l swift -c ./bin/swift-petstore.json -o samples/client/petstore/swift" +ags="$@ generate -t modules/swagger-codegen/src/main/resources/swift -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l swift -c ./bin/swift-petstore.json -o samples/client/petstore/swift/default" java $JAVA_OPTS -jar $executable $ags diff --git a/samples/client/petstore/swift-promisekit/.gitignore b/samples/client/petstore/swift-promisekit/.gitignore deleted file mode 100644 index 5e5d5cebcf4..00000000000 --- a/samples/client/petstore/swift-promisekit/.gitignore +++ /dev/null @@ -1,63 +0,0 @@ -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated -build/ -DerivedData - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata - -## Other -*.xccheckout -*.moved-aside -*.xcuserstate -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa - -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -.build/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md - -fastlane/report.xml -fastlane/screenshots diff --git a/samples/client/petstore/swift/Cartfile b/samples/client/petstore/swift/default/Cartfile similarity index 100% rename from samples/client/petstore/swift/Cartfile rename to samples/client/petstore/swift/default/Cartfile diff --git a/samples/client/petstore/swift/PetstoreClient.podspec b/samples/client/petstore/swift/default/PetstoreClient.podspec similarity index 100% rename from samples/client/petstore/swift/PetstoreClient.podspec rename to samples/client/petstore/swift/default/PetstoreClient.podspec diff --git a/samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/APIHelper.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/APIHelper.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/APIHelper.swift rename to samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/APIHelper.swift diff --git a/samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/APIs.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/APIs.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/APIs.swift rename to samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/APIs.swift diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift similarity index 100% rename from samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift rename to samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift similarity index 100% rename from samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift rename to samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift similarity index 100% rename from samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift rename to samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift diff --git a/samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/AlamofireImplementations.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/AlamofireImplementations.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/AlamofireImplementations.swift rename to samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/AlamofireImplementations.swift diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Extensions.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/Extensions.swift similarity index 100% rename from samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Extensions.swift rename to samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/Extensions.swift diff --git a/samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/Models.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/Models.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/Models.swift rename to samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/Models.swift diff --git a/samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/Models/Category.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/Models/Category.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/Models/Category.swift rename to samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/Models/Category.swift diff --git a/samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/Models/Order.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/Models/Order.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/Models/Order.swift rename to samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/Models/Order.swift diff --git a/samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/Models/Pet.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/Models/Pet.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/Models/Pet.swift rename to samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/Models/Pet.swift diff --git a/samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/Models/Tag.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/Models/Tag.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/Models/Tag.swift rename to samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/Models/Tag.swift diff --git a/samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/Models/User.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/Models/User.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/Models/User.swift rename to samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/Models/User.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Podfile b/samples/client/petstore/swift/default/SwaggerClientTests/Podfile similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Podfile rename to samples/client/petstore/swift/default/SwaggerClientTests/Podfile diff --git a/samples/client/petstore/swift/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift/default/SwaggerClientTests/Podfile.lock similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Podfile.lock rename to samples/client/petstore/swift/default/SwaggerClientTests/Podfile.lock diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/LICENSE b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/LICENSE similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/LICENSE rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/LICENSE diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/README.md b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/README.md similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/README.md rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/README.md diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/Download.swift b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/Download.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/Download.swift rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/Download.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/Error.swift b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/Error.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/Error.swift rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/Error.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/Manager.swift b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/Manager.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/Manager.swift rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/Manager.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/Request.swift b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/Request.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/Request.swift rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/Request.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/Response.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/Response.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/Result.swift b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/Result.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/Result.swift rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/Result.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/Stream.swift b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/Stream.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/Stream.swift rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/Stream.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/Upload.swift b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/Upload.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/Upload.swift rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/Upload.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Manifest.lock b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Manifest.lock similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Manifest.lock rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Manifest.lock diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.xcconfig b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.xcconfig similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.xcconfig rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.xcconfig diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.xcconfig b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.xcconfig similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.xcconfig rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.xcconfig diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig b/samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig rename to samples/client/petstore/swift/default/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj rename to samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme rename to samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata rename to samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClient/AppDelegate.swift b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient/AppDelegate.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClient/AppDelegate.swift rename to samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient/AppDelegate.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json rename to samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard rename to samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard rename to samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClient/Info.plist b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient/Info.plist similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClient/Info.plist rename to samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient/Info.plist diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClient/ViewController.swift b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient/ViewController.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClient/ViewController.swift rename to samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient/ViewController.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClientTests/Info.plist b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClientTests/Info.plist similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClientTests/Info.plist rename to samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClientTests/Info.plist diff --git a/samples/client/petstore/swift/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift rename to samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift diff --git a/samples/client/petstore/swift/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift rename to samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift diff --git a/samples/client/petstore/swift/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift rename to samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift diff --git a/samples/client/petstore/swift/SwaggerClientTests/pom.xml b/samples/client/petstore/swift/default/SwaggerClientTests/pom.xml similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/pom.xml rename to samples/client/petstore/swift/default/SwaggerClientTests/pom.xml diff --git a/samples/client/petstore/swift-promisekit/git_push.sh b/samples/client/petstore/swift/default/git_push.sh similarity index 100% rename from samples/client/petstore/swift-promisekit/git_push.sh rename to samples/client/petstore/swift/default/git_push.sh diff --git a/samples/client/petstore/swift-promisekit/Cartfile b/samples/client/petstore/swift/promisekit/Cartfile similarity index 100% rename from samples/client/petstore/swift-promisekit/Cartfile rename to samples/client/petstore/swift/promisekit/Cartfile diff --git a/samples/client/petstore/swift-promisekit/PetstoreClient.podspec b/samples/client/petstore/swift/promisekit/PetstoreClient.podspec similarity index 100% rename from samples/client/petstore/swift-promisekit/PetstoreClient.podspec rename to samples/client/petstore/swift/promisekit/PetstoreClient.podspec diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/APIHelper.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/APIHelper.swift similarity index 100% rename from samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/APIHelper.swift rename to samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/APIHelper.swift diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/APIs.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/APIs.swift similarity index 100% rename from samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/APIs.swift rename to samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/APIs.swift diff --git a/samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift rename to samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift diff --git a/samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift rename to samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift diff --git a/samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift rename to samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/AlamofireImplementations.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/AlamofireImplementations.swift similarity index 100% rename from samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/AlamofireImplementations.swift rename to samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/AlamofireImplementations.swift diff --git a/samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/Extensions.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/Extensions.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/PetstoreClient/Classes/Swaggers/Extensions.swift rename to samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/Extensions.swift diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/Models.swift similarity index 100% rename from samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models.swift rename to samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/Models.swift diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Category.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/Models/Category.swift similarity index 100% rename from samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Category.swift rename to samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/Models/Category.swift diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Order.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/Models/Order.swift similarity index 100% rename from samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Order.swift rename to samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/Models/Order.swift diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Pet.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/Models/Pet.swift similarity index 100% rename from samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Pet.swift rename to samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/Models/Pet.swift diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Tag.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/Models/Tag.swift similarity index 100% rename from samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Tag.swift rename to samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/Models/Tag.swift diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/User.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/Models/User.swift similarity index 100% rename from samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/User.swift rename to samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/Models/User.swift diff --git a/samples/client/petstore/swift/SwaggerClientTests/Podfile b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Podfile similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Podfile rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Podfile diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Podfile.lock similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Podfile.lock rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Podfile.lock diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/LICENSE b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/LICENSE similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/LICENSE rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/LICENSE diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/README.md b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/README.md similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/README.md rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/README.md diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/Download.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Download.swift similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/Download.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Download.swift diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/Error.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Error.swift similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/Error.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Error.swift diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/Manager.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Manager.swift similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/Manager.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Manager.swift diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/Request.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Request.swift similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/Request.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Request.swift diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/Response.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/Response.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/Result.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Result.swift similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/Result.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Result.swift diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/Stream.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Stream.swift similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/Stream.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Stream.swift diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/Upload.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Upload.swift similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/Upload.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Upload.swift diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Manifest.lock b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Manifest.lock similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Manifest.lock rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Manifest.lock diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/README.markdown b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/README.markdown similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/README.markdown rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/README.markdown diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGFormURLEncode.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGFormURLEncode.h similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGFormURLEncode.h rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGFormURLEncode.h diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGFormURLEncode.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGFormURLEncode.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGFormURLEncode.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGFormURLEncode.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGHTTPURLRQ.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGHTTPURLRQ.h similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGHTTPURLRQ.h rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGHTTPURLRQ.h diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGHTTPURLRQ.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGHTTPURLRQ.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGHTTPURLRQ.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGHTTPURLRQ.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGUserAgent.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGUserAgent.h similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGUserAgent.h rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGUserAgent.h diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGUserAgent.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGUserAgent.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGUserAgent.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/OMGHTTPURLRQ/Sources/OMGUserAgent.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSNotificationCenter+AnyPromise.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSNotificationCenter+AnyPromise.h similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSNotificationCenter+AnyPromise.h rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSNotificationCenter+AnyPromise.h diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSNotificationCenter+AnyPromise.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSNotificationCenter+AnyPromise.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSNotificationCenter+AnyPromise.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSNotificationCenter+AnyPromise.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSNotificationCenter+Promise.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSNotificationCenter+Promise.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSNotificationCenter+Promise.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSNotificationCenter+Promise.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSObject+Promise.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSObject+Promise.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSObject+Promise.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSObject+Promise.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSURLConnection+AnyPromise.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSURLConnection+AnyPromise.h similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSURLConnection+AnyPromise.h rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSURLConnection+AnyPromise.h diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSURLConnection+AnyPromise.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSURLConnection+AnyPromise.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSURLConnection+AnyPromise.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSURLConnection+AnyPromise.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSURLConnection+Promise.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSURLConnection+Promise.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSURLConnection+Promise.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSURLConnection+Promise.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSURLSession+Promise.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSURLSession+Promise.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSURLSession+Promise.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/NSURLSession+Promise.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/afterlife.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/afterlife.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/afterlife.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/Foundation/afterlife.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/QuartzCore/CALayer+AnyPromise.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/QuartzCore/CALayer+AnyPromise.h similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/QuartzCore/CALayer+AnyPromise.h rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/QuartzCore/CALayer+AnyPromise.h diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/QuartzCore/CALayer+AnyPromise.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/QuartzCore/CALayer+AnyPromise.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/QuartzCore/CALayer+AnyPromise.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/QuartzCore/CALayer+AnyPromise.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/PMKAlertController.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/PMKAlertController.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/PMKAlertController.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/PMKAlertController.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIActionSheet+AnyPromise.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIActionSheet+AnyPromise.h similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIActionSheet+AnyPromise.h rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIActionSheet+AnyPromise.h diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIActionSheet+AnyPromise.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIActionSheet+AnyPromise.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIActionSheet+AnyPromise.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIActionSheet+AnyPromise.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIActionSheet+Promise.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIActionSheet+Promise.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIActionSheet+Promise.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIActionSheet+Promise.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIAlertView+AnyPromise.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIAlertView+AnyPromise.h similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIAlertView+AnyPromise.h rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIAlertView+AnyPromise.h diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIAlertView+AnyPromise.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIAlertView+AnyPromise.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIAlertView+AnyPromise.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIAlertView+AnyPromise.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIAlertView+Promise.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIAlertView+Promise.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIAlertView+Promise.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIAlertView+Promise.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIView+AnyPromise.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIView+AnyPromise.h similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIView+AnyPromise.h rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIView+AnyPromise.h diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIView+AnyPromise.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIView+AnyPromise.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIView+AnyPromise.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIView+AnyPromise.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIView+Promise.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIView+Promise.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIView+Promise.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIView+Promise.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIViewController+AnyPromise.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIViewController+AnyPromise.h similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIViewController+AnyPromise.h rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIViewController+AnyPromise.h diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIViewController+AnyPromise.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIViewController+AnyPromise.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIViewController+AnyPromise.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIViewController+AnyPromise.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIViewController+Promise.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIViewController+Promise.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIViewController+Promise.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Categories/UIKit/UIViewController+Promise.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/README.markdown b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/README.markdown similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/README.markdown rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/README.markdown diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise+Private.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise+Private.h similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise+Private.h rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise+Private.h diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.h similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.h rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.h diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/AnyPromise.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Error.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Error.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Error.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Error.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/NSError+Cancellation.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/NSError+Cancellation.h similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/NSError+Cancellation.h rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/NSError+Cancellation.h diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/NSMethodSignatureForBlock.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/NSMethodSignatureForBlock.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/NSMethodSignatureForBlock.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/NSMethodSignatureForBlock.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PMK.modulemap b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PMK.modulemap similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PMK.modulemap rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PMK.modulemap diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PMKCallVariadicBlock.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PMKCallVariadicBlock.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PMKCallVariadicBlock.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PMKCallVariadicBlock.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise+Properties.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise+Properties.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise+Properties.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise+Properties.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Promise.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PromiseKit.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PromiseKit.h similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PromiseKit.h rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/PromiseKit.h diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/State.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/State.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/State.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/State.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/URLDataPromise.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/URLDataPromise.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/URLDataPromise.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/URLDataPromise.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Umbrella.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Umbrella.h similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Umbrella.h rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/Umbrella.h diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/after.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/after.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/after.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/after.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/after.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/after.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/after.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/after.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/dispatch_promise.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/dispatch_promise.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/dispatch_promise.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/dispatch_promise.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/dispatch_promise.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/dispatch_promise.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/dispatch_promise.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/dispatch_promise.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/hang.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/hang.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/hang.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/hang.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/join.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/join.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/join.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/join.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/join.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/join.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/join.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/join.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/race.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/race.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/race.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/race.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/when.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/when.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/when.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/when.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/when.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/when.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/when.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/PromiseKit/Sources/when.swift diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-dummy.m diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.modulemap diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.xcconfig b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.xcconfig similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.xcconfig rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire.xcconfig diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/Info.plist b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/Info.plist similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/Info.plist rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/Info.plist diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-dummy.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-dummy.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-dummy.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-dummy.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-prefix.pch b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-prefix.pch similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-prefix.pch rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-prefix.pch diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-umbrella.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-umbrella.h similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-umbrella.h rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-umbrella.h diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ.modulemap b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ.modulemap similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ.modulemap rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ.modulemap diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ.xcconfig b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ.xcconfig similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ.xcconfig rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ.xcconfig diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/Info.plist diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-dummy.m diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-prefix.pch diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.modulemap diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.xcconfig b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.xcconfig similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.xcconfig rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient.xcconfig diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Info.plist diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-dummy.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Info.plist diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.markdown diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-acknowledgements.plist diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-dummy.m diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/Info.plist b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/Info.plist similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/Info.plist rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/Info.plist diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-dummy.m b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-dummy.m similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-dummy.m rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-dummy.m diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-prefix.pch b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-prefix.pch similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-prefix.pch rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit-prefix.pch diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit.xcconfig b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit.xcconfig similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit.xcconfig rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PromiseKit/PromiseKit.xcconfig diff --git a/samples/client/petstore/swift/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj diff --git a/samples/client/petstore/swift/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme diff --git a/samples/client/petstore/swift/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata diff --git a/samples/client/petstore/swift/SwaggerClientTests/SwaggerClient/AppDelegate.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient/AppDelegate.swift similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/SwaggerClient/AppDelegate.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient/AppDelegate.swift diff --git a/samples/client/petstore/swift/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/samples/client/petstore/swift/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard diff --git a/samples/client/petstore/swift/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard diff --git a/samples/client/petstore/swift/SwaggerClientTests/SwaggerClient/Info.plist b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient/Info.plist similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/SwaggerClient/Info.plist rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient/Info.plist diff --git a/samples/client/petstore/swift/SwaggerClientTests/SwaggerClient/ViewController.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient/ViewController.swift similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/SwaggerClient/ViewController.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient/ViewController.swift diff --git a/samples/client/petstore/swift/SwaggerClientTests/SwaggerClientTests/Info.plist b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClientTests/Info.plist similarity index 100% rename from samples/client/petstore/swift/SwaggerClientTests/SwaggerClientTests/Info.plist rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClientTests/Info.plist diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift diff --git a/samples/client/petstore/swift-promisekit/SwaggerClientTests/pom.xml b/samples/client/petstore/swift/promisekit/SwaggerClientTests/pom.xml similarity index 100% rename from samples/client/petstore/swift-promisekit/SwaggerClientTests/pom.xml rename to samples/client/petstore/swift/promisekit/SwaggerClientTests/pom.xml diff --git a/samples/client/petstore/swift/git_push.sh b/samples/client/petstore/swift/promisekit/git_push.sh similarity index 100% rename from samples/client/petstore/swift/git_push.sh rename to samples/client/petstore/swift/promisekit/git_push.sh From 673784491eee8969d03870be9523121b69f797ae Mon Sep 17 00:00:00 2001 From: Joseph Zuromski Date: Mon, 23 May 2016 20:09:06 -0700 Subject: [PATCH 06/60] couple new files --- .../petstore/swift/promisekit/.gitignore | 63 +++++++++++++++++++ .../swift/promisekit/.swagger-codegen-ignore | 23 +++++++ 2 files changed, 86 insertions(+) create mode 100644 samples/client/petstore/swift/promisekit/.gitignore create mode 100644 samples/client/petstore/swift/promisekit/.swagger-codegen-ignore diff --git a/samples/client/petstore/swift/promisekit/.gitignore b/samples/client/petstore/swift/promisekit/.gitignore new file mode 100644 index 00000000000..5e5d5cebcf4 --- /dev/null +++ b/samples/client/petstore/swift/promisekit/.gitignore @@ -0,0 +1,63 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md + +fastlane/report.xml +fastlane/screenshots diff --git a/samples/client/petstore/swift/promisekit/.swagger-codegen-ignore b/samples/client/petstore/swift/promisekit/.swagger-codegen-ignore new file mode 100644 index 00000000000..19d3377182e --- /dev/null +++ b/samples/client/petstore/swift/promisekit/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# Thsi matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md From c7110debee1cca225cf491d1f666052f5649e1ba Mon Sep 17 00:00:00 2001 From: wing328 Date: Tue, 24 May 2016 17:50:28 +0800 Subject: [PATCH 07/60] update ruby api client to use apache v2 license --- .../codegen/languages/RubyClientCodegen.java | 3 + .../src/main/resources/ruby/api_info.mustache | 23 +- .../petstore/ruby/.swagger-codegen-ignore | 23 ++ samples/client/petstore/ruby/LICENSE | 201 +++++++++++++++++ samples/client/petstore/ruby/README.md | 17 +- .../ruby/docs/AdditionalPropertiesClass.md | 7 + samples/client/petstore/ruby/docs/FakeApi.md | 4 +- ...dPropertiesAndAdditionalPropertiesClass.md | 9 + .../petstore/ruby/docs/ReadOnlyFirst.md | 9 + samples/client/petstore/ruby/lib/petstore.rb | 16 +- .../ruby/lib/petstore/api/fake_api.rb | 17 +- .../petstore/ruby/lib/petstore/api/pet_api.rb | 13 +- .../ruby/lib/petstore/api/store_api.rb | 13 +- .../ruby/lib/petstore/api/user_api.rb | 13 +- .../petstore/ruby/lib/petstore/api_client.rb | 13 +- .../petstore/ruby/lib/petstore/api_error.rb | 13 +- .../ruby/lib/petstore/configuration.rb | 14 +- .../models/additional_properties_class.rb | 188 ++++++++++++++++ .../ruby/lib/petstore/models/animal.rb | 15 +- .../ruby/lib/petstore/models/animal_farm.rb | 15 +- .../ruby/lib/petstore/models/api_response.rb | 15 +- .../petstore/ruby/lib/petstore/models/cat.rb | 15 +- .../ruby/lib/petstore/models/category.rb | 15 +- .../petstore/ruby/lib/petstore/models/dog.rb | 15 +- .../ruby/lib/petstore/models/enum_class.rb | 22 +- .../ruby/lib/petstore/models/enum_test.rb | 15 +- .../ruby/lib/petstore/models/format_test.rb | 15 +- ...perties_and_additional_properties_class.rb | 206 ++++++++++++++++++ .../lib/petstore/models/model_200_response.rb | 14 +- .../ruby/lib/petstore/models/model_return.rb | 14 +- .../petstore/ruby/lib/petstore/models/name.rb | 14 +- .../ruby/lib/petstore/models/order.rb | 15 +- .../petstore/ruby/lib/petstore/models/pet.rb | 15 +- .../lib/petstore/models/read_only_first.rb | 206 ++++++++++++++++++ .../lib/petstore/models/special_model_name.rb | 15 +- .../petstore/ruby/lib/petstore/models/tag.rb | 15 +- .../petstore/ruby/lib/petstore/models/user.rb | 15 +- .../petstore/ruby/lib/petstore/version.rb | 13 +- .../client/petstore/ruby/spec/.spec_helper.rb | 71 ++++++ .../additional_properties_class_spec.rb | 40 ++++ ...es_and_additional_properties_class_spec.rb | 52 +++++ .../ruby/spec/models/read_only_first_spec.rb | 52 +++++ 42 files changed, 1389 insertions(+), 106 deletions(-) create mode 100644 samples/client/petstore/ruby/.swagger-codegen-ignore create mode 100644 samples/client/petstore/ruby/LICENSE create mode 100644 samples/client/petstore/ruby/docs/AdditionalPropertiesClass.md create mode 100644 samples/client/petstore/ruby/docs/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/client/petstore/ruby/docs/ReadOnlyFirst.md create mode 100644 samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb create mode 100644 samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb create mode 100644 samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb create mode 100644 samples/client/petstore/ruby/spec/.spec_helper.rb create mode 100644 samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb create mode 100644 samples/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb create mode 100644 samples/client/petstore/ruby/spec/models/read_only_first_spec.rb diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/RubyClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/RubyClientCodegen.java index 70b3a32085a..0db5598f7f0 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/RubyClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/RubyClientCodegen.java @@ -225,6 +225,9 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig { supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh")); supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")); + supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE")); + + // test files should not be overwritten writeOptional(outputFolder, new SupportingFile("rspec.mustache", "", ".rspec")); writeOptional(outputFolder, new SupportingFile("spec_helper.mustache", specFolder, "spec_helper.rb")); writeOptional(outputFolder, new SupportingFile("configuration_spec.mustache", specFolder, "configuration_spec.rb")); diff --git a/modules/swagger-codegen/src/main/resources/ruby/api_info.mustache b/modules/swagger-codegen/src/main/resources/ruby/api_info.mustache index 28301757e70..44d38c5cfad 100644 --- a/modules/swagger-codegen/src/main/resources/ruby/api_info.mustache +++ b/modules/swagger-codegen/src/main/resources/ruby/api_info.mustache @@ -1,18 +1,23 @@ -{{#appName}}{{{appName}}} +{{#appName}} +{{{appName}}} {{/appName}} -{{#appDescription}}{{{appDescription}}} +{{#appDescription}} +{{{appDescription}}} {{/appDescription}} {{#version}}OpenAPI spec version: {{version}}{{/version}} {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} Generated by: https://github.com/swagger-api/swagger-codegen.git -{{#licenseInfo}} -License: {{{licenseInfo}}} -{{#licenseUrl}}{{licenseUrl}}{{/licenseUrl}} +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -{{/licenseInfo}} -{{#termsOfService}} -Terms of Service: {{{termsOfService}}} -{{/termsOfService}} +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/samples/client/petstore/ruby/.swagger-codegen-ignore b/samples/client/petstore/ruby/.swagger-codegen-ignore new file mode 100644 index 00000000000..19d3377182e --- /dev/null +++ b/samples/client/petstore/ruby/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# Thsi matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/ruby/LICENSE b/samples/client/petstore/ruby/LICENSE new file mode 100644 index 00000000000..8dada3edaf5 --- /dev/null +++ b/samples/client/petstore/ruby/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/samples/client/petstore/ruby/README.md b/samples/client/petstore/ruby/README.md index 1ff27c5eb29..528cca0b768 100644 --- a/samples/client/petstore/ruby/README.md +++ b/samples/client/petstore/ruby/README.md @@ -8,7 +8,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/ - API version: 1.0.0 - Package version: 1.0.0 -- Build date: 2016-05-11T16:13:11.464+08:00 +- Build date: 2016-05-24T17:47:46.459+08:00 - Build package: class io.swagger.codegen.languages.RubyClientCodegen ## Installation @@ -116,6 +116,7 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [Petstore::AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - [Petstore::Animal](docs/Animal.md) - [Petstore::AnimalFarm](docs/AnimalFarm.md) - [Petstore::ApiResponse](docs/ApiResponse.md) @@ -125,11 +126,13 @@ Class | Method | HTTP request | Description - [Petstore::EnumClass](docs/EnumClass.md) - [Petstore::EnumTest](docs/EnumTest.md) - [Petstore::FormatTest](docs/FormatTest.md) + - [Petstore::MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - [Petstore::Model200Response](docs/Model200Response.md) - [Petstore::ModelReturn](docs/ModelReturn.md) - [Petstore::Name](docs/Name.md) - [Petstore::Order](docs/Order.md) - [Petstore::Pet](docs/Pet.md) + - [Petstore::ReadOnlyFirst](docs/ReadOnlyFirst.md) - [Petstore::SpecialModelName](docs/SpecialModelName.md) - [Petstore::Tag](docs/Tag.md) - [Petstore::User](docs/User.md) @@ -138,6 +141,12 @@ Class | Method | HTTP request | Description ## Documentation for Authorization +### api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + ### petstore_auth - **Type**: OAuth @@ -147,9 +156,3 @@ Class | Method | HTTP request | Description - write:pets: modify pets in your account - read:pets: read your pets -### api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - diff --git a/samples/client/petstore/ruby/docs/AdditionalPropertiesClass.md b/samples/client/petstore/ruby/docs/AdditionalPropertiesClass.md new file mode 100644 index 00000000000..8c9c63a74a3 --- /dev/null +++ b/samples/client/petstore/ruby/docs/AdditionalPropertiesClass.md @@ -0,0 +1,7 @@ +# Petstore::AdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/samples/client/petstore/ruby/docs/FakeApi.md b/samples/client/petstore/ruby/docs/FakeApi.md index c0312e00f51..7b687dc67b9 100644 --- a/samples/client/petstore/ruby/docs/FakeApi.md +++ b/samples/client/petstore/ruby/docs/FakeApi.md @@ -75,8 +75,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json + - **Content-Type**: application/xml; charset=utf-8, application/json; charset=utf-8 + - **Accept**: application/xml; charset=utf-8, application/json; charset=utf-8 diff --git a/samples/client/petstore/ruby/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/ruby/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 00000000000..973c03c8396 --- /dev/null +++ b/samples/client/petstore/ruby/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,9 @@ +# Petstore::MixedPropertiesAndAdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **String** | | [optional] +**date_time** | **DateTime** | | [optional] + + diff --git a/samples/client/petstore/ruby/docs/ReadOnlyFirst.md b/samples/client/petstore/ruby/docs/ReadOnlyFirst.md new file mode 100644 index 00000000000..e49b5119478 --- /dev/null +++ b/samples/client/petstore/ruby/docs/ReadOnlyFirst.md @@ -0,0 +1,9 @@ +# Petstore::ReadOnlyFirst + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] +**baz** | **String** | | [optional] + + diff --git a/samples/client/petstore/ruby/lib/petstore.rb b/samples/client/petstore/ruby/lib/petstore.rb index ce77b3d21b6..f4375e14a84 100644 --- a/samples/client/petstore/ruby/lib/petstore.rb +++ b/samples/client/petstore/ruby/lib/petstore.rb @@ -7,10 +7,17 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end @@ -21,6 +28,7 @@ require 'petstore/version' require 'petstore/configuration' # Models +require 'petstore/models/additional_properties_class' require 'petstore/models/animal' require 'petstore/models/animal_farm' require 'petstore/models/api_response' @@ -30,11 +38,13 @@ require 'petstore/models/dog' require 'petstore/models/enum_class' require 'petstore/models/enum_test' require 'petstore/models/format_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/order' require 'petstore/models/pet' +require 'petstore/models/read_only_first' require 'petstore/models/special_model_name' require 'petstore/models/tag' require 'petstore/models/user' diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb index e7e6e45c262..80f71d81b1a 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -7,10 +7,17 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end @@ -131,11 +138,11 @@ module Petstore header_params = {} # HTTP header 'Accept' (if needed) - local_header_accept = ['application/xml', 'application/json'] + local_header_accept = ['application/xml; charset=utf-8', 'application/json; charset=utf-8'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' - local_header_content_type = [] + local_header_content_type = ['application/xml; charset=utf-8', 'application/json; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters diff --git a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb index 2d7a12dfd2a..88dbcdfb662 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb @@ -7,10 +7,17 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb index 2ef8b526c69..bf4ab2ec8db 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb @@ -7,10 +7,17 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb index bdecfa87ec2..3db9234ef90 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb @@ -7,10 +7,17 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_client.rb b/samples/client/petstore/ruby/lib/petstore/api_client.rb index 1723abbac42..2ecbea204f9 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_client.rb @@ -7,10 +7,17 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_error.rb b/samples/client/petstore/ruby/lib/petstore/api_error.rb index 95b1fc6cdb7..cf271ae8265 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_error.rb @@ -7,10 +7,17 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb index 0a67bae014f..05973753287 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -157,13 +157,6 @@ module Petstore # Returns Auth Settings hash for api client. def auth_settings { - 'petstore_auth' => - { - type: 'oauth2', - in: 'header', - key: 'Authorization', - value: "Bearer #{access_token}" - }, 'api_key' => { type: 'api_key', @@ -171,6 +164,13 @@ module Petstore key: 'api_key', value: api_key_with_prefix('api_key') }, + 'petstore_auth' => + { + type: 'oauth2', + in: 'header', + key: 'Authorization', + value: "Bearer #{access_token}" + }, } end end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb new file mode 100644 index 00000000000..6426f058398 --- /dev/null +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb @@ -0,0 +1,188 @@ +=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 + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +=end + +require 'date' + +module Petstore + + class AdditionalPropertiesClass + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + } + end + + # Attribute type mapping. + def self.swagger_types + { + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + 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} + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + return 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? + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @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| + if type =~ /^Array<(.*)>/i + # check to ensure the input is an array given that the 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) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /^(true|t|yes|y|1)$/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = Petstore.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @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) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/samples/client/petstore/ruby/lib/petstore/models/animal.rb b/samples/client/petstore/ruby/lib/petstore/models/animal.rb index 60edb0004a7..355df9f8c67 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/animal.rb @@ -7,16 +7,24 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end require 'date' module Petstore + class Animal attr_accessor :class_name @@ -200,4 +208,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb b/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb index 3328854e56b..244a0ca62af 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb @@ -7,16 +7,24 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end require 'date' module Petstore + class AnimalFarm # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map @@ -176,4 +184,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb index 9bc6c7b7ae7..8f3c8ed3193 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb @@ -7,16 +7,24 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end require 'date' module Petstore + class ApiResponse attr_accessor :code @@ -203,4 +211,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat.rb b/samples/client/petstore/ruby/lib/petstore/models/cat.rb index 58f9bca969e..e277b6602bf 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat.rb @@ -7,16 +7,24 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end require 'date' module Petstore + class Cat attr_accessor :class_name @@ -209,4 +217,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/category.rb b/samples/client/petstore/ruby/lib/petstore/models/category.rb index 0a0679c8e0a..da887681789 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/category.rb @@ -7,16 +7,24 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end require 'date' module Petstore + class Category attr_accessor :id @@ -194,4 +202,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog.rb b/samples/client/petstore/ruby/lib/petstore/models/dog.rb index 78738dfb323..f9db9ab7c50 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog.rb @@ -7,16 +7,24 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end require 'date' module Petstore + class Dog attr_accessor :class_name @@ -209,4 +217,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb index 8f9781813e9..b5046df8f31 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb @@ -1,16 +1,23 @@ =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: \" \\ +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 -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end @@ -18,9 +25,10 @@ require 'date' module Petstore class EnumClass - - ABC = "_ab\"c".freeze + + ABC = "_abc".freeze EFG = "-efg".freeze - XYZ = "(xy'z)".freeze + XYZ = "(xyz)".freeze end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb index 31a75aebb8b..f4d85b99357 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb @@ -7,16 +7,24 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end require 'date' module Petstore + class EnumTest attr_accessor :enum_string @@ -245,4 +253,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb index bd6a02d4a73..63107bd2128 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb @@ -7,16 +7,24 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end require 'date' module Petstore + class FormatTest attr_accessor :integer @@ -483,4 +491,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb new file mode 100644 index 00000000000..8208fc64638 --- /dev/null +++ b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -0,0 +1,206 @@ +=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 + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +=end + +require 'date' + +module Petstore + + class MixedPropertiesAndAdditionalPropertiesClass + attr_accessor :uuid + + attr_accessor :date_time + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'uuid' => :'uuid', + :'date_time' => :'dateTime' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'uuid' => :'String', + :'date_time' => :'DateTime' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + 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} + + if attributes.has_key?(:'uuid') + self.uuid = attributes[:'uuid'] + end + + if attributes.has_key?(:'dateTime') + self.date_time = attributes[:'dateTime'] + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + return 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? + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + uuid == o.uuid && + date_time == o.date_time + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [uuid, date_time].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @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| + if type =~ /^Array<(.*)>/i + # check to ensure the input is an array given that the 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) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /^(true|t|yes|y|1)$/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = Petstore.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @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) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model_200_response.rb b/samples/client/petstore/ruby/lib/petstore/models/model_200_response.rb index 15675e5dd22..186f46f6b3f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model_200_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model_200_response.rb @@ -7,10 +7,17 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end @@ -186,4 +193,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb index 06150419de3..595b1c76bec 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb @@ -7,10 +7,17 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end @@ -186,4 +193,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/name.rb b/samples/client/petstore/ruby/lib/petstore/models/name.rb index 01d3910b948..d063138e41b 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/name.rb @@ -7,10 +7,17 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end @@ -217,4 +224,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/order.rb b/samples/client/petstore/ruby/lib/petstore/models/order.rb index 4aefb422eb6..5dd15cbe92d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/order.rb @@ -7,16 +7,24 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end require 'date' module Petstore + class Order attr_accessor :id @@ -247,4 +255,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/pet.rb b/samples/client/petstore/ruby/lib/petstore/models/pet.rb index b2432b09e5e..81330cf5c56 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/pet.rb @@ -7,16 +7,24 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end require 'date' module Petstore + class Pet attr_accessor :id @@ -257,4 +265,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb new file mode 100644 index 00000000000..4f8b79f225e --- /dev/null +++ b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb @@ -0,0 +1,206 @@ +=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 + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +=end + +require 'date' + +module Petstore + + class ReadOnlyFirst + attr_accessor :bar + + attr_accessor :baz + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'bar' => :'bar', + :'baz' => :'baz' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'bar' => :'String', + :'baz' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + 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} + + if attributes.has_key?(:'bar') + self.bar = attributes[:'bar'] + end + + if attributes.has_key?(:'baz') + self.baz = attributes[:'baz'] + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + return 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? + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + bar == o.bar && + baz == o.baz + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [bar, baz].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @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| + if type =~ /^Array<(.*)>/i + # check to ensure the input is an array given that the 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) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /^(true|t|yes|y|1)$/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = Petstore.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @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) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb index caf84588f22..d888b01cd05 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb @@ -7,16 +7,24 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end require 'date' module Petstore + class SpecialModelName attr_accessor :special_property_name @@ -185,4 +193,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/tag.rb b/samples/client/petstore/ruby/lib/petstore/models/tag.rb index b47fc2f86e9..bc587aabb83 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/tag.rb @@ -7,16 +7,24 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end require 'date' module Petstore + class Tag attr_accessor :id @@ -194,4 +202,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/models/user.rb b/samples/client/petstore/ruby/lib/petstore/models/user.rb index da720b1f559..fa311a5b123 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/user.rb @@ -7,16 +7,24 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end require 'date' module Petstore + class User attr_accessor :id @@ -249,4 +257,5 @@ module Petstore end end + end diff --git a/samples/client/petstore/ruby/lib/petstore/version.rb b/samples/client/petstore/ruby/lib/petstore/version.rb index e5c868d3d09..58d992d9c27 100644 --- a/samples/client/petstore/ruby/lib/petstore/version.rb +++ b/samples/client/petstore/ruby/lib/petstore/version.rb @@ -7,10 +7,17 @@ OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io Generated by: https://github.com/swagger-api/swagger-codegen.git -License: Apache 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -Terms of Service: http://swagger.io/terms/ +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. =end diff --git a/samples/client/petstore/ruby/spec/.spec_helper.rb b/samples/client/petstore/ruby/spec/.spec_helper.rb new file mode 100644 index 00000000000..50702c439b7 --- /dev/null +++ b/samples/client/petstore/ruby/spec/.spec_helper.rb @@ -0,0 +1,71 @@ +require 'rubygems' +require 'bundler/setup' +require 'petstore' +require 'vcr' +require 'typhoeus' +require 'json' +require 'yaml' +require 'rspec' + +RSpec.configure do |config| + # some (optional) config here + config.expect_with :rspec do |c| + c.syntax = :should + end + config.mock_with :rspec do |c| + c.syntax = :should + end +end + + +WebMock.allow_net_connect! if defined? WebMock + +def help + puts "\nOh noes! You gotta stuff your swagger credentials in ~/.swagger.yml like so:\n\n" + puts "api_key: '12345abcdefg'" + puts "username: 'fumanchu'" + puts "password: 'kalamazoo'\n\n" + exit +end + +# no longer reading credentials (not used) from file (20150413) +# Parse ~/.swagger.yml for user credentials +#begin +# CREDENTIALS = YAML::load_file(File.join(ENV['HOME'], ".swagger.yml")).symbolize_keys +#rescue +# help +#end + +API_CLIENT = Petstore::ApiClient.new(Petstore::Configuration.new) + +def random_id + rand(1000000) + 20000 +end + +# create a random pet, return its id +def prepare_pet(pet_api) + pet_id = random_id + category = Petstore::Category.new('id' => 20002, 'name' => 'category test') + tag = Petstore::Tag.new('id' => 30002, 'name' => 'tag test') + pet = Petstore::Pet.new('id' => pet_id, 'name' => "RUBY UNIT TESTING", 'photo_urls' => 'photo url', + 'category' => category, 'tags' => [tag], 'status' => 'pending') + pet_api.add_pet(pet) + return pet_id +end + +# create a random order, return its id +def prepare_store(store_api) + order_id = 5 + order = Petstore::Order.new("id" => order_id, + "petId" => 123, + "quantity" => 789, + "shipDate" => "2015-04-06T23:42:01.678Z", + "status" => "placed", + "complete" => false) + store_api.place_order(order) + return order_id +end + +# A random string to tack onto stuff to ensure we're not seeing +# data from a previous test run +RAND = ("a".."z").to_a.sample(8).join diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb new file mode 100644 index 00000000000..edf0371b127 --- /dev/null +++ b/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb @@ -0,0 +1,40 @@ +=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 + +License: Apache 2.0 +http://www.apache.org/licenses/LICENSE-2.0.html + +Terms of Service: http://swagger.io/terms/ + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::AdditionalPropertiesClass +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'AdditionalPropertiesClass' do + before do + # run before each test + @instance = Petstore::AdditionalPropertiesClass.new + end + + after do + # run after each test + end + + describe 'test an instance of AdditionalPropertiesClass' do + it 'should create an instact of AdditionalPropertiesClass' do + expect(@instance).to be_instance_of(Petstore::AdditionalPropertiesClass) + end + end +end + diff --git a/samples/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb b/samples/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb new file mode 100644 index 00000000000..f1f9c33d78f --- /dev/null +++ b/samples/client/petstore/ruby/spec/models/mixed_properties_and_additional_properties_class_spec.rb @@ -0,0 +1,52 @@ +=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 + +License: Apache 2.0 +http://www.apache.org/licenses/LICENSE-2.0.html + +Terms of Service: http://swagger.io/terms/ + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::MixedPropertiesAndAdditionalPropertiesClass +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'MixedPropertiesAndAdditionalPropertiesClass' do + before do + # run before each test + @instance = Petstore::MixedPropertiesAndAdditionalPropertiesClass.new + end + + after do + # run after each test + end + + describe 'test an instance of MixedPropertiesAndAdditionalPropertiesClass' do + it 'should create an instact of MixedPropertiesAndAdditionalPropertiesClass' do + expect(@instance).to be_instance_of(Petstore::MixedPropertiesAndAdditionalPropertiesClass) + end + end + describe 'test attribute "uuid"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "date_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end + diff --git a/samples/client/petstore/ruby/spec/models/read_only_first_spec.rb b/samples/client/petstore/ruby/spec/models/read_only_first_spec.rb new file mode 100644 index 00000000000..ab631729310 --- /dev/null +++ b/samples/client/petstore/ruby/spec/models/read_only_first_spec.rb @@ -0,0 +1,52 @@ +=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 + +License: Apache 2.0 +http://www.apache.org/licenses/LICENSE-2.0.html + +Terms of Service: http://swagger.io/terms/ + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::ReadOnlyFirst +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ReadOnlyFirst' do + before do + # run before each test + @instance = Petstore::ReadOnlyFirst.new + end + + after do + # run after each test + end + + describe 'test an instance of ReadOnlyFirst' do + it 'should create an instact of ReadOnlyFirst' do + expect(@instance).to be_instance_of(Petstore::ReadOnlyFirst) + end + end + describe 'test attribute "bar"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "baz"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end + From 041c5d1d3438d50fd0a245f60ef2e80a07f20d12 Mon Sep 17 00:00:00 2001 From: Mikolaj Przybysz Date: Tue, 24 May 2016 14:23:51 +0200 Subject: [PATCH 08/60] Replaced \n with PHP_EOL --- .../src/main/resources/php/ApiClient.mustache | 4 ++-- .../src/main/resources/php/ObjectSerializer.mustache | 2 +- .../src/main/resources/php/README.mustache | 2 +- .../src/main/resources/php/api_doc.mustache | 2 +- .../src/main/resources/php/configuration.mustache | 12 ++++++------ 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/php/ApiClient.mustache b/modules/swagger-codegen/src/main/resources/php/ApiClient.mustache index bfd811b89f0..508e40a4afa 100644 --- a/modules/swagger-codegen/src/main/resources/php/ApiClient.mustache +++ b/modules/swagger-codegen/src/main/resources/php/ApiClient.mustache @@ -211,7 +211,7 @@ class ApiClient // debugging for curl if ($this->config->getDebug()) { - error_log("[DEBUG] HTTP Request body ~BEGIN~\n".print_r($postData, true)."\n~END~\n", 3, $this->config->getDebugFile()); + error_log("[DEBUG] HTTP Request body ~BEGIN~".PHP_EOL.print_r($postData, true).PHP_EOL."~END~".PHP_EOL, 3, $this->config->getDebugFile()); curl_setopt($curl, CURLOPT_VERBOSE, 1); curl_setopt($curl, CURLOPT_STDERR, fopen($this->config->getDebugFile(), 'a')); @@ -231,7 +231,7 @@ class ApiClient // debug HTTP response body if ($this->config->getDebug()) { - error_log("[DEBUG] HTTP Response body ~BEGIN~\n".print_r($http_body, true)."\n~END~\n", 3, $this->config->getDebugFile()); + error_log("[DEBUG] HTTP Response body ~BEGIN~".PHP_EOL.print_r($http_body, true).PHP_EOL."~END~".PHP_EOL, 3, $this->config->getDebugFile()); } // Handle the response diff --git a/modules/swagger-codegen/src/main/resources/php/ObjectSerializer.mustache b/modules/swagger-codegen/src/main/resources/php/ObjectSerializer.mustache index 7de8d9d085e..06b21d05e54 100644 --- a/modules/swagger-codegen/src/main/resources/php/ObjectSerializer.mustache +++ b/modules/swagger-codegen/src/main/resources/php/ObjectSerializer.mustache @@ -271,7 +271,7 @@ class ObjectSerializer $byte_written = $deserialized->fwrite($data); if (Configuration::getDefaultConfiguration()->getDebug()) { - error_log("[DEBUG] Written $byte_written byte to $filename. Please move the file to a proper folder or delete the temp file after processing.\n", 3, Configuration::getDefaultConfiguration()->getDebugFile()); + error_log("[DEBUG] Written $byte_written byte to $filename. Please move the file to a proper folder or delete the temp file after processing.".PHP_EOL, 3, Configuration::getDefaultConfiguration()->getDebugFile()); } return $deserialized; diff --git a/modules/swagger-codegen/src/main/resources/php/README.mustache b/modules/swagger-codegen/src/main/resources/php/README.mustache index 1f96e378f1b..16694d0dad7 100644 --- a/modules/swagger-codegen/src/main/resources/php/README.mustache +++ b/modules/swagger-codegen/src/main/resources/php/README.mustache @@ -82,7 +82,7 @@ try { {{#returnType}}$result = {{/returnType}}$api_instance->{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} print_r($result);{{/returnType}} } catch (Exception $e) { - echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), "\n"; + echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL; } {{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} ?> diff --git a/modules/swagger-codegen/src/main/resources/php/api_doc.mustache b/modules/swagger-codegen/src/main/resources/php/api_doc.mustache index be2cb895fed..1edcf0a3f3a 100644 --- a/modules/swagger-codegen/src/main/resources/php/api_doc.mustache +++ b/modules/swagger-codegen/src/main/resources/php/api_doc.mustache @@ -41,7 +41,7 @@ try { {{#returnType}}$result = {{/returnType}}$api_instance->{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} print_r($result);{{/returnType}} } catch (Exception $e) { - echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), "\n"; + echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL; } ?> ``` diff --git a/modules/swagger-codegen/src/main/resources/php/configuration.mustache b/modules/swagger-codegen/src/main/resources/php/configuration.mustache index 1b920e48357..704edbe0f61 100644 --- a/modules/swagger-codegen/src/main/resources/php/configuration.mustache +++ b/modules/swagger-codegen/src/main/resources/php/configuration.mustache @@ -513,12 +513,12 @@ class Configuration */ public static function toDebugReport() { - $report = "PHP SDK ({{invokerPackage}}) Debug Report:\n"; - $report .= " OS: ".php_uname()."\n"; - $report .= " PHP Version: ".phpversion()."\n"; - $report .= " OpenAPI Spec Version: {{version}}\n"; - $report .= " SDK Package Version: {{artifactVersion}}\n"; - $report .= " Temp Folder Path: ".self::getDefaultConfiguration()->getTempFolderPath()."\n"; + $report = "PHP SDK ({{invokerPackage}}) Debug Report:".PHP_EOL; + $report .= " OS: ".php_uname().PHP_EOL; + $report .= " PHP Version: ".phpversion().PHP_EOL; + $report .= " OpenAPI Spec Version: {{version}}".PHP_EOL; + $report .= " SDK Package Version: {{artifactVersion}}".PHP_EOL; + $report .= " Temp Folder Path: ".self::getDefaultConfiguration()->getTempFolderPath().PHP_EOL; return $report; } From 6aa821d76dcb093f7ebbadec6f87a1fd989f3c81 Mon Sep 17 00:00:00 2001 From: Mikolaj Przybysz Date: Tue, 24 May 2016 15:03:25 +0200 Subject: [PATCH 09/60] Rebuild php petstore sample client --- .../petstore/php/.swagger-codegen-ignore | 23 ++ .../petstore/php/SwaggerClient-php/README.md | 5 +- .../php/SwaggerClient-php/docs/Api/FakeApi.md | 2 +- .../php/SwaggerClient-php/docs/Api/PetApi.md | 16 +- .../SwaggerClient-php/docs/Api/StoreApi.md | 8 +- .../php/SwaggerClient-php/docs/Api/UserApi.md | 16 +- .../docs/Model/AdditionalPropertiesClass.md | 9 + ...dPropertiesAndAdditionalPropertiesClass.md | 11 + .../docs/Model/ReadOnlyFirst.md | 11 + .../php/SwaggerClient-php/lib/ApiClient.php | 4 +- .../SwaggerClient-php/lib/Configuration.php | 12 +- .../lib/Model/AdditionalPropertiesClass.php | 204 ++++++++++++++ ...PropertiesAndAdditionalPropertiesClass.php | 252 ++++++++++++++++++ .../lib/Model/ReadOnlyFirst.php | 252 ++++++++++++++++++ .../lib/ObjectSerializer.php | 2 +- .../Model/AdditionalPropertiesClassTest.php | 72 +++++ ...ertiesAndAdditionalPropertiesClassTest.php | 72 +++++ .../test/Model/ReadOnlyFirstTest.php | 72 +++++ 18 files changed, 1011 insertions(+), 32 deletions(-) create mode 100644 samples/client/petstore/php/.swagger-codegen-ignore create mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/Model/AdditionalPropertiesClass.md create mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/Model/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/Model/ReadOnlyFirst.md create mode 100644 samples/client/petstore/php/SwaggerClient-php/lib/Model/AdditionalPropertiesClass.php create mode 100644 samples/client/petstore/php/SwaggerClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php create mode 100644 samples/client/petstore/php/SwaggerClient-php/lib/Model/ReadOnlyFirst.php create mode 100644 samples/client/petstore/php/SwaggerClient-php/test/Model/AdditionalPropertiesClassTest.php create mode 100644 samples/client/petstore/php/SwaggerClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php create mode 100644 samples/client/petstore/php/SwaggerClient-php/test/Model/ReadOnlyFirstTest.php diff --git a/samples/client/petstore/php/.swagger-codegen-ignore b/samples/client/petstore/php/.swagger-codegen-ignore new file mode 100644 index 00000000000..19d3377182e --- /dev/null +++ b/samples/client/petstore/php/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# Thsi matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/php/SwaggerClient-php/README.md b/samples/client/petstore/php/SwaggerClient-php/README.md index 25596bbd7d9..cf492be945c 100644 --- a/samples/client/petstore/php/SwaggerClient-php/README.md +++ b/samples/client/petstore/php/SwaggerClient-php/README.md @@ -5,7 +5,7 @@ This PHP package is automatically generated by the [Swagger Codegen](https://git - API version: 1.0.0 - Package version: -- Build date: 2016-05-20T17:45:19.363+08:00 +- Build date: 2016-05-24T14:56:49.287+02:00 - Build package: class io.swagger.codegen.languages.PhpClientCodegen ## Requirements @@ -75,7 +75,7 @@ $password = "password_example"; // string | None try { $api_instance->testEndpointParameters($number, $double, $string, $byte, $integer, $int32, $int64, $float, $binary, $date, $date_time, $password); } catch (Exception $e) { - echo 'Exception when calling FakeApi->testEndpointParameters: ', $e->getMessage(), "\n"; + echo 'Exception when calling FakeApi->testEndpointParameters: ', $e->getMessage(), PHP_EOL; } ?> @@ -128,6 +128,7 @@ Class | Method | HTTP request | Description - [Name](docs/Model/Name.md) - [Order](docs/Model/Order.md) - [Pet](docs/Model/Pet.md) + - [ReadOnlyFirst](docs/Model/ReadOnlyFirst.md) - [SpecialModelName](docs/Model/SpecialModelName.md) - [Tag](docs/Model/Tag.md) - [User](docs/Model/User.md) diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Api/FakeApi.md b/samples/client/petstore/php/SwaggerClient-php/docs/Api/FakeApi.md index bf07517eac1..d3351321e46 100644 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Api/FakeApi.md +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Api/FakeApi.md @@ -36,7 +36,7 @@ $password = "password_example"; // string | None try { $api_instance->testEndpointParameters($number, $double, $string, $byte, $integer, $int32, $int64, $float, $binary, $date, $date_time, $password); } catch (Exception $e) { - echo 'Exception when calling FakeApi->testEndpointParameters: ', $e->getMessage(), "\n"; + echo 'Exception when calling FakeApi->testEndpointParameters: ', $e->getMessage(), PHP_EOL; } ?> ``` diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Api/PetApi.md b/samples/client/petstore/php/SwaggerClient-php/docs/Api/PetApi.md index 6ab902730c7..3d6bbc24a81 100644 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Api/PetApi.md +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Api/PetApi.md @@ -35,7 +35,7 @@ $body = new \Swagger\Client\Model\Pet(); // \Swagger\Client\Model\Pet | Pet obje try { $api_instance->addPet($body); } catch (Exception $e) { - echo 'Exception when calling PetApi->addPet: ', $e->getMessage(), "\n"; + echo 'Exception when calling PetApi->addPet: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -83,7 +83,7 @@ $api_key = "api_key_example"; // string | try { $api_instance->deletePet($pet_id, $api_key); } catch (Exception $e) { - echo 'Exception when calling PetApi->deletePet: ', $e->getMessage(), "\n"; + echo 'Exception when calling PetApi->deletePet: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -132,7 +132,7 @@ try { $result = $api_instance->findPetsByStatus($status); print_r($result); } catch (Exception $e) { - echo 'Exception when calling PetApi->findPetsByStatus: ', $e->getMessage(), "\n"; + echo 'Exception when calling PetApi->findPetsByStatus: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -180,7 +180,7 @@ try { $result = $api_instance->findPetsByTags($tags); print_r($result); } catch (Exception $e) { - echo 'Exception when calling PetApi->findPetsByTags: ', $e->getMessage(), "\n"; + echo 'Exception when calling PetApi->findPetsByTags: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -230,7 +230,7 @@ try { $result = $api_instance->getPetById($pet_id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling PetApi->getPetById: ', $e->getMessage(), "\n"; + echo 'Exception when calling PetApi->getPetById: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -277,7 +277,7 @@ $body = new \Swagger\Client\Model\Pet(); // \Swagger\Client\Model\Pet | Pet obje try { $api_instance->updatePet($body); } catch (Exception $e) { - echo 'Exception when calling PetApi->updatePet: ', $e->getMessage(), "\n"; + echo 'Exception when calling PetApi->updatePet: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -326,7 +326,7 @@ $status = "status_example"; // string | Updated status of the pet try { $api_instance->updatePetWithForm($pet_id, $name, $status); } catch (Exception $e) { - echo 'Exception when calling PetApi->updatePetWithForm: ', $e->getMessage(), "\n"; + echo 'Exception when calling PetApi->updatePetWithForm: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -378,7 +378,7 @@ try { $result = $api_instance->uploadFile($pet_id, $additional_metadata, $file); print_r($result); } catch (Exception $e) { - echo 'Exception when calling PetApi->uploadFile: ', $e->getMessage(), "\n"; + echo 'Exception when calling PetApi->uploadFile: ', $e->getMessage(), PHP_EOL; } ?> ``` diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Api/StoreApi.md b/samples/client/petstore/php/SwaggerClient-php/docs/Api/StoreApi.md index 24cacd22b47..36a3db3bfb2 100644 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Api/StoreApi.md +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Api/StoreApi.md @@ -28,7 +28,7 @@ $order_id = "order_id_example"; // string | ID of the order that needs to be del try { $api_instance->deleteOrder($order_id); } catch (Exception $e) { - echo 'Exception when calling StoreApi->deleteOrder: ', $e->getMessage(), "\n"; + echo 'Exception when calling StoreApi->deleteOrder: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -77,7 +77,7 @@ try { $result = $api_instance->getInventory(); print_r($result); } catch (Exception $e) { - echo 'Exception when calling StoreApi->getInventory: ', $e->getMessage(), "\n"; + echo 'Exception when calling StoreApi->getInventory: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -119,7 +119,7 @@ try { $result = $api_instance->getOrderById($order_id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling StoreApi->getOrderById: ', $e->getMessage(), "\n"; + echo 'Exception when calling StoreApi->getOrderById: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -164,7 +164,7 @@ try { $result = $api_instance->placeOrder($body); print_r($result); } catch (Exception $e) { - echo 'Exception when calling StoreApi->placeOrder: ', $e->getMessage(), "\n"; + echo 'Exception when calling StoreApi->placeOrder: ', $e->getMessage(), PHP_EOL; } ?> ``` diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Api/UserApi.md b/samples/client/petstore/php/SwaggerClient-php/docs/Api/UserApi.md index 5737f3cdb5e..cc7a222b13f 100644 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Api/UserApi.md +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Api/UserApi.md @@ -32,7 +32,7 @@ $body = new \Swagger\Client\Model\User(); // \Swagger\Client\Model\User | Create try { $api_instance->createUser($body); } catch (Exception $e) { - echo 'Exception when calling UserApi->createUser: ', $e->getMessage(), "\n"; + echo 'Exception when calling UserApi->createUser: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -76,7 +76,7 @@ $body = array(new User()); // \Swagger\Client\Model\User[] | List of user object try { $api_instance->createUsersWithArrayInput($body); } catch (Exception $e) { - echo 'Exception when calling UserApi->createUsersWithArrayInput: ', $e->getMessage(), "\n"; + echo 'Exception when calling UserApi->createUsersWithArrayInput: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -120,7 +120,7 @@ $body = array(new User()); // \Swagger\Client\Model\User[] | List of user object try { $api_instance->createUsersWithListInput($body); } catch (Exception $e) { - echo 'Exception when calling UserApi->createUsersWithListInput: ', $e->getMessage(), "\n"; + echo 'Exception when calling UserApi->createUsersWithListInput: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -164,7 +164,7 @@ $username = "username_example"; // string | The name that needs to be deleted try { $api_instance->deleteUser($username); } catch (Exception $e) { - echo 'Exception when calling UserApi->deleteUser: ', $e->getMessage(), "\n"; + echo 'Exception when calling UserApi->deleteUser: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -209,7 +209,7 @@ try { $result = $api_instance->getUserByName($username); print_r($result); } catch (Exception $e) { - echo 'Exception when calling UserApi->getUserByName: ', $e->getMessage(), "\n"; + echo 'Exception when calling UserApi->getUserByName: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -255,7 +255,7 @@ try { $result = $api_instance->loginUser($username, $password); print_r($result); } catch (Exception $e) { - echo 'Exception when calling UserApi->loginUser: ', $e->getMessage(), "\n"; + echo 'Exception when calling UserApi->loginUser: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -299,7 +299,7 @@ $api_instance = new Swagger\Client\Api\UserApi(); try { $api_instance->logoutUser(); } catch (Exception $e) { - echo 'Exception when calling UserApi->logoutUser: ', $e->getMessage(), "\n"; + echo 'Exception when calling UserApi->logoutUser: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -341,7 +341,7 @@ $body = new \Swagger\Client\Model\User(); // \Swagger\Client\Model\User | Update try { $api_instance->updateUser($username, $body); } catch (Exception $e) { - echo 'Exception when calling UserApi->updateUser: ', $e->getMessage(), "\n"; + echo 'Exception when calling UserApi->updateUser: ', $e->getMessage(), PHP_EOL; } ?> ``` diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Model/AdditionalPropertiesClass.md b/samples/client/petstore/php/SwaggerClient-php/docs/Model/AdditionalPropertiesClass.md new file mode 100644 index 00000000000..420ac6efe67 --- /dev/null +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Model/AdditionalPropertiesClass.md @@ -0,0 +1,9 @@ +# AdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Model/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/php/SwaggerClient-php/docs/Model/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 00000000000..c05cee84500 --- /dev/null +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Model/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,11 @@ +# MixedPropertiesAndAdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **string** | | [optional] +**date_time** | [**\DateTime**](\DateTime.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Model/ReadOnlyFirst.md b/samples/client/petstore/php/SwaggerClient-php/docs/Model/ReadOnlyFirst.md new file mode 100644 index 00000000000..90662a00cf3 --- /dev/null +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Model/ReadOnlyFirst.md @@ -0,0 +1,11 @@ +# ReadOnlyFirst + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **string** | | [optional] +**baz** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/ApiClient.php b/samples/client/petstore/php/SwaggerClient-php/lib/ApiClient.php index 6370b9be7a5..da1f438f4da 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/ApiClient.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/ApiClient.php @@ -211,7 +211,7 @@ class ApiClient // debugging for curl if ($this->config->getDebug()) { - error_log("[DEBUG] HTTP Request body ~BEGIN~\n".print_r($postData, true)."\n~END~\n", 3, $this->config->getDebugFile()); + error_log("[DEBUG] HTTP Request body ~BEGIN~".PHP_EOL.print_r($postData, true).PHP_EOL."~END~".PHP_EOL, 3, $this->config->getDebugFile()); curl_setopt($curl, CURLOPT_VERBOSE, 1); curl_setopt($curl, CURLOPT_STDERR, fopen($this->config->getDebugFile(), 'a')); @@ -231,7 +231,7 @@ class ApiClient // debug HTTP response body if ($this->config->getDebug()) { - error_log("[DEBUG] HTTP Response body ~BEGIN~\n".print_r($http_body, true)."\n~END~\n", 3, $this->config->getDebugFile()); + error_log("[DEBUG] HTTP Response body ~BEGIN~".PHP_EOL.print_r($http_body, true).PHP_EOL."~END~".PHP_EOL, 3, $this->config->getDebugFile()); } // Handle the response diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Configuration.php b/samples/client/petstore/php/SwaggerClient-php/lib/Configuration.php index 33bf0e93651..aed1094c269 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Configuration.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Configuration.php @@ -513,12 +513,12 @@ class Configuration */ public static function toDebugReport() { - $report = "PHP SDK (Swagger\Client) Debug Report:\n"; - $report .= " OS: ".php_uname()."\n"; - $report .= " PHP Version: ".phpversion()."\n"; - $report .= " OpenAPI Spec Version: 1.0.0\n"; - $report .= " SDK Package Version: \n"; - $report .= " Temp Folder Path: ".self::getDefaultConfiguration()->getTempFolderPath()."\n"; + $report = "PHP SDK (Swagger\Client) Debug Report:".PHP_EOL; + $report .= " OS: ".php_uname().PHP_EOL; + $report .= " PHP Version: ".phpversion().PHP_EOL; + $report .= " OpenAPI Spec Version: 1.0.0".PHP_EOL; + $report .= " SDK Package Version: ".PHP_EOL; + $report .= " Temp Folder Path: ".self::getDefaultConfiguration()->getTempFolderPath().PHP_EOL; return $report; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/AdditionalPropertiesClass.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/AdditionalPropertiesClass.php new file mode 100644 index 00000000000..4999bc62a8d --- /dev/null +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/AdditionalPropertiesClass.php @@ -0,0 +1,204 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php new file mode 100644 index 00000000000..86bb4051f0e --- /dev/null +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -0,0 +1,252 @@ + 'string', + 'date_time' => '\DateTime' + ); + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = array( + 'uuid' => 'uuid', + 'date_time' => 'dateTime' + ); + + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = array( + 'uuid' => 'setUuid', + 'date_time' => 'setDateTime' + ); + + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = array( + 'uuid' => 'getUuid', + 'date_time' => 'getDateTime' + ); + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = array(); + + /** + * Constructor + * @param mixed[] $data Associated array of property value initalizing the model + */ + public function __construct(array $data = null) + { + $this->container['uuid'] = isset($data['uuid']) ? $data['uuid'] : null; + $this->container['date_time'] = isset($data['date_time']) ? $data['date_time'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = array(); + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properteis are valid + */ + public function valid() + { + return true; + } + + + /** + * Gets uuid + * @return string + */ + public function getUuid() + { + return $this->container['uuid']; + } + + /** + * Sets uuid + * @param string $uuid + * @return $this + */ + public function setUuid($uuid) + { + $this->container['uuid'] = $uuid; + + return $this; + } + + /** + * Gets date_time + * @return \DateTime + */ + public function getDateTime() + { + return $this->container['date_time']; + } + + /** + * Sets date_time + * @param \DateTime $date_time + * @return $this + */ + public function setDateTime($date_time) + { + $this->container['date_time'] = $date_time; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ReadOnlyFirst.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ReadOnlyFirst.php new file mode 100644 index 00000000000..1378f043b64 --- /dev/null +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ReadOnlyFirst.php @@ -0,0 +1,252 @@ + 'string', + 'baz' => 'string' + ); + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = array( + 'bar' => 'bar', + 'baz' => 'baz' + ); + + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = array( + 'bar' => 'setBar', + 'baz' => 'setBaz' + ); + + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = array( + 'bar' => 'getBar', + 'baz' => 'getBaz' + ); + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = array(); + + /** + * Constructor + * @param mixed[] $data Associated array of property value initalizing the model + */ + public function __construct(array $data = null) + { + $this->container['bar'] = isset($data['bar']) ? $data['bar'] : null; + $this->container['baz'] = isset($data['baz']) ? $data['baz'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = array(); + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properteis are valid + */ + public function valid() + { + return true; + } + + + /** + * Gets bar + * @return string + */ + public function getBar() + { + return $this->container['bar']; + } + + /** + * Sets bar + * @param string $bar + * @return $this + */ + public function setBar($bar) + { + $this->container['bar'] = $bar; + + return $this; + } + + /** + * Gets baz + * @return string + */ + public function getBaz() + { + return $this->container['baz']; + } + + /** + * Sets baz + * @param string $baz + * @return $this + */ + public function setBaz($baz) + { + $this->container['baz'] = $baz; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/SwaggerClient-php/lib/ObjectSerializer.php index 19165ad7bb3..af6e87f89fc 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/ObjectSerializer.php @@ -271,7 +271,7 @@ class ObjectSerializer $byte_written = $deserialized->fwrite($data); if (Configuration::getDefaultConfiguration()->getDebug()) { - error_log("[DEBUG] Written $byte_written byte to $filename. Please move the file to a proper folder or delete the temp file after processing.\n", 3, Configuration::getDefaultConfiguration()->getDebugFile()); + error_log("[DEBUG] Written $byte_written byte to $filename. Please move the file to a proper folder or delete the temp file after processing.".PHP_EOL, 3, Configuration::getDefaultConfiguration()->getDebugFile()); } return $deserialized; diff --git a/samples/client/petstore/php/SwaggerClient-php/test/Model/AdditionalPropertiesClassTest.php b/samples/client/petstore/php/SwaggerClient-php/test/Model/AdditionalPropertiesClassTest.php new file mode 100644 index 00000000000..d5150f44b8d --- /dev/null +++ b/samples/client/petstore/php/SwaggerClient-php/test/Model/AdditionalPropertiesClassTest.php @@ -0,0 +1,72 @@ + Date: Tue, 24 May 2016 22:47:03 +0800 Subject: [PATCH 10/60] update pom to use 2.2.0-SNAPSHOT --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4dfd8c6fdcd..c557f4c0680 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ swagger-codegen-project pom swagger-codegen-project - 2.1.6 + 2.2.0-SNAPSHOT https://github.com/swagger-api/swagger-codegen scm:git:git@github.com:swagger-api/swagger-codegen.git From 568fa4f514e46fb5d551645198afacab0f944d02 Mon Sep 17 00:00:00 2001 From: wing328 Date: Tue, 24 May 2016 23:20:23 +0800 Subject: [PATCH 11/60] add apache license to remaining ruby files (test, spec, etc) --- .../resources/ruby/api_client_spec.mustache | 4 ++++ .../resources/ruby/configuration.mustache | 4 ++++ .../ruby/configuration_spec.mustache | 4 ++++ .../src/main/resources/ruby/gemspec.mustache | 5 ++++ .../main/resources/ruby/git_push.sh.mustache | 15 ++++++++++++ .../main/resources/ruby/gitignore.mustache | 14 +++++++++++ .../main/resources/ruby/spec_helper.mustache | 4 ++++ samples/client/petstore/ruby/.gitignore | 14 +++++++++++ samples/client/petstore/ruby/README.md | 2 +- samples/client/petstore/ruby/git_push.sh | 15 ++++++++++++ .../ruby/lib/petstore/configuration.rb | 23 ++++++++++++++++++ samples/client/petstore/ruby/petstore.gemspec | 24 +++++++++++++++++++ 12 files changed, 127 insertions(+), 1 deletion(-) diff --git a/modules/swagger-codegen/src/main/resources/ruby/api_client_spec.mustache b/modules/swagger-codegen/src/main/resources/ruby/api_client_spec.mustache index 1ed497da21e..ae32ff0ccfa 100644 --- a/modules/swagger-codegen/src/main/resources/ruby/api_client_spec.mustache +++ b/modules/swagger-codegen/src/main/resources/ruby/api_client_spec.mustache @@ -1,3 +1,7 @@ +=begin +{{> api_info}} +=end + require 'spec_helper' describe {{moduleName}}::ApiClient do diff --git a/modules/swagger-codegen/src/main/resources/ruby/configuration.mustache b/modules/swagger-codegen/src/main/resources/ruby/configuration.mustache index 160fa85a57d..e22b6d6f8a1 100644 --- a/modules/swagger-codegen/src/main/resources/ruby/configuration.mustache +++ b/modules/swagger-codegen/src/main/resources/ruby/configuration.mustache @@ -1,3 +1,7 @@ +=begin +{{> api_info}} +=end + require 'uri' module {{moduleName}} diff --git a/modules/swagger-codegen/src/main/resources/ruby/configuration_spec.mustache b/modules/swagger-codegen/src/main/resources/ruby/configuration_spec.mustache index 4c23a067175..6ea22543491 100644 --- a/modules/swagger-codegen/src/main/resources/ruby/configuration_spec.mustache +++ b/modules/swagger-codegen/src/main/resources/ruby/configuration_spec.mustache @@ -1,3 +1,7 @@ +=begin +{{> api_info}} +=end + require 'spec_helper' describe {{moduleName}}::Configuration do diff --git a/modules/swagger-codegen/src/main/resources/ruby/gemspec.mustache b/modules/swagger-codegen/src/main/resources/ruby/gemspec.mustache index 65884d0f562..86d9a6e55d8 100644 --- a/modules/swagger-codegen/src/main/resources/ruby/gemspec.mustache +++ b/modules/swagger-codegen/src/main/resources/ruby/gemspec.mustache @@ -1,4 +1,9 @@ # -*- encoding: utf-8 -*- +# +=begin +{{> api_info}} +=end + $:.push File.expand_path("../lib", __FILE__) require "{{gemName}}/version" diff --git a/modules/swagger-codegen/src/main/resources/ruby/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/ruby/git_push.sh.mustache index a9b0f28edfb..3def1140afc 100755 --- a/modules/swagger-codegen/src/main/resources/ruby/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/ruby/git_push.sh.mustache @@ -1,4 +1,19 @@ #!/bin/sh +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # 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" diff --git a/modules/swagger-codegen/src/main/resources/ruby/gitignore.mustache b/modules/swagger-codegen/src/main/resources/ruby/gitignore.mustache index a8b1cda23f8..522134fcdd3 100644 --- a/modules/swagger-codegen/src/main/resources/ruby/gitignore.mustache +++ b/modules/swagger-codegen/src/main/resources/ruby/gitignore.mustache @@ -1,3 +1,17 @@ +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + *.gem *.rbc /.config diff --git a/modules/swagger-codegen/src/main/resources/ruby/spec_helper.mustache b/modules/swagger-codegen/src/main/resources/ruby/spec_helper.mustache index bc4187c3378..8f4bb754165 100644 --- a/modules/swagger-codegen/src/main/resources/ruby/spec_helper.mustache +++ b/modules/swagger-codegen/src/main/resources/ruby/spec_helper.mustache @@ -1,3 +1,7 @@ +=begin +{{> api_info}} +=end + # load the gem require '{{{gemName}}}' diff --git a/samples/client/petstore/ruby/.gitignore b/samples/client/petstore/ruby/.gitignore index a8b1cda23f8..522134fcdd3 100644 --- a/samples/client/petstore/ruby/.gitignore +++ b/samples/client/petstore/ruby/.gitignore @@ -1,3 +1,17 @@ +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + *.gem *.rbc /.config diff --git a/samples/client/petstore/ruby/README.md b/samples/client/petstore/ruby/README.md index 528cca0b768..1c3d604f206 100644 --- a/samples/client/petstore/ruby/README.md +++ b/samples/client/petstore/ruby/README.md @@ -8,7 +8,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/ - API version: 1.0.0 - Package version: 1.0.0 -- Build date: 2016-05-24T17:47:46.459+08:00 +- Build date: 2016-05-24T23:13:57.542+08:00 - Build package: class io.swagger.codegen.languages.RubyClientCodegen ## Installation diff --git a/samples/client/petstore/ruby/git_push.sh b/samples/client/petstore/ruby/git_push.sh index 792320114fb..7e44b9aade1 100644 --- a/samples/client/petstore/ruby/git_push.sh +++ b/samples/client/petstore/ruby/git_push.sh @@ -1,4 +1,19 @@ #!/bin/sh +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # 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" diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb index 05973753287..92aeb4010eb 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -1,3 +1,26 @@ +=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 + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +=end + require 'uri' module Petstore diff --git a/samples/client/petstore/ruby/petstore.gemspec b/samples/client/petstore/ruby/petstore.gemspec index 66258d1ff5c..f52a27ba00f 100644 --- a/samples/client/petstore/ruby/petstore.gemspec +++ b/samples/client/petstore/ruby/petstore.gemspec @@ -1,4 +1,28 @@ # -*- encoding: utf-8 -*- +# +=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 + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +=end + $:.push File.expand_path("../lib", __FILE__) require "petstore/version" From dbc3e418a9310663a5f63849e3985be3b4ec41b1 Mon Sep 17 00:00:00 2001 From: wing328 Date: Tue, 24 May 2016 23:27:11 +0800 Subject: [PATCH 12/60] udpate pom for other sub modules --- modules/swagger-codegen-cli/pom.xml | 4 ++-- modules/swagger-codegen-maven-plugin/pom.xml | 2 +- modules/swagger-generator/pom.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/swagger-codegen-cli/pom.xml b/modules/swagger-codegen-cli/pom.xml index 90a14b16deb..92490778689 100644 --- a/modules/swagger-codegen-cli/pom.xml +++ b/modules/swagger-codegen-cli/pom.xml @@ -3,7 +3,7 @@ io.swagger swagger-codegen-project - 2.1.6 + 2.2.0-SNAPSHOT ../.. 4.0.0 @@ -100,4 +100,4 @@ - \ No newline at end of file + diff --git a/modules/swagger-codegen-maven-plugin/pom.xml b/modules/swagger-codegen-maven-plugin/pom.xml index b45e0d97874..0b6885bf048 100644 --- a/modules/swagger-codegen-maven-plugin/pom.xml +++ b/modules/swagger-codegen-maven-plugin/pom.xml @@ -6,7 +6,7 @@ io.swagger swagger-codegen-project - 2.1.6 + 2.2.0-SNAPSHOT ../.. swagger-codegen-maven-plugin diff --git a/modules/swagger-generator/pom.xml b/modules/swagger-generator/pom.xml index 2d2b45d7892..7304fdd04bc 100644 --- a/modules/swagger-generator/pom.xml +++ b/modules/swagger-generator/pom.xml @@ -4,7 +4,7 @@ io.swagger swagger-codegen-project - 2.1.6 + 2.2.0-SNAPSHOT ../.. swagger-generator From 29008b58021e2bdf8f862a2b55a81439e94a2a81 Mon Sep 17 00:00:00 2001 From: wing328 Date: Wed, 25 May 2016 00:48:31 +0800 Subject: [PATCH 13/60] add licence template for ruby api client --- .../src/main/resources/ruby/LICENSE | 201 ++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 modules/swagger-codegen/src/main/resources/ruby/LICENSE diff --git a/modules/swagger-codegen/src/main/resources/ruby/LICENSE b/modules/swagger-codegen/src/main/resources/ruby/LICENSE new file mode 100644 index 00000000000..8dada3edaf5 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/ruby/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. From 105b4b9199ab503007ddaa49f96cc834facdee31 Mon Sep 17 00:00:00 2001 From: wing328 Date: Wed, 25 May 2016 01:18:50 +0800 Subject: [PATCH 14/60] new test case to cover model with array properties --- ...ith-fake-endpoints-models-for-testing.yaml | 19 ++ samples/client/petstore/ruby/README.md | 3 +- .../client/petstore/ruby/docs/ArrayTest.md | 7 + samples/client/petstore/ruby/lib/petstore.rb | 1 + .../ruby/lib/petstore/models/array_test.rb | 188 ++++++++++++++++++ .../ruby/spec/models/array_test_spec.rb | 47 +++++ 6 files changed, 264 insertions(+), 1 deletion(-) create mode 100644 samples/client/petstore/ruby/docs/ArrayTest.md create mode 100644 samples/client/petstore/ruby/lib/petstore/models/array_test.rb create mode 100644 samples/client/petstore/ruby/spec/models/array_test_spec.rb diff --git a/modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml index cb710b32566..d1181a53ead 100644 --- a/modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml @@ -971,6 +971,25 @@ definitions: readOnly: true baz: type: string + ArrayTest: + type: object + array_of_string: + type: array + items: + type: string + array_array_of_integer: + type: array + items: + type: array + items: + type: integer + format: int64 + array_array_of_model: + type: array + items: + type: array + items: + $ref: '#/definitions/ReadOnlyFirst' externalDocs: description: Find out more about Swagger url: 'http://swagger.io' diff --git a/samples/client/petstore/ruby/README.md b/samples/client/petstore/ruby/README.md index 1c3d604f206..6038fb2cbc1 100644 --- a/samples/client/petstore/ruby/README.md +++ b/samples/client/petstore/ruby/README.md @@ -8,7 +8,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/ - API version: 1.0.0 - Package version: 1.0.0 -- Build date: 2016-05-24T23:13:57.542+08:00 +- Build date: 2016-05-25T01:17:54.676+08:00 - Build package: class io.swagger.codegen.languages.RubyClientCodegen ## Installation @@ -120,6 +120,7 @@ Class | Method | HTTP request | Description - [Petstore::Animal](docs/Animal.md) - [Petstore::AnimalFarm](docs/AnimalFarm.md) - [Petstore::ApiResponse](docs/ApiResponse.md) + - [Petstore::ArrayTest](docs/ArrayTest.md) - [Petstore::Cat](docs/Cat.md) - [Petstore::Category](docs/Category.md) - [Petstore::Dog](docs/Dog.md) diff --git a/samples/client/petstore/ruby/docs/ArrayTest.md b/samples/client/petstore/ruby/docs/ArrayTest.md new file mode 100644 index 00000000000..aa084814f0f --- /dev/null +++ b/samples/client/petstore/ruby/docs/ArrayTest.md @@ -0,0 +1,7 @@ +# Petstore::ArrayTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/samples/client/petstore/ruby/lib/petstore.rb b/samples/client/petstore/ruby/lib/petstore.rb index f4375e14a84..b8daaf4cb76 100644 --- a/samples/client/petstore/ruby/lib/petstore.rb +++ b/samples/client/petstore/ruby/lib/petstore.rb @@ -32,6 +32,7 @@ require 'petstore/models/additional_properties_class' require 'petstore/models/animal' require 'petstore/models/animal_farm' require 'petstore/models/api_response' +require 'petstore/models/array_test' require 'petstore/models/cat' require 'petstore/models/category' require 'petstore/models/dog' diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb new file mode 100644 index 00000000000..35d498fc9af --- /dev/null +++ b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb @@ -0,0 +1,188 @@ +=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 + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +=end + +require 'date' + +module Petstore + + class ArrayTest + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + } + end + + # Attribute type mapping. + def self.swagger_types + { + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + 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} + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + return 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? + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @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| + if type =~ /^Array<(.*)>/i + # check to ensure the input is an array given that the 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) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /^(true|t|yes|y|1)$/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = Petstore.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @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) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/samples/client/petstore/ruby/spec/models/array_test_spec.rb b/samples/client/petstore/ruby/spec/models/array_test_spec.rb new file mode 100644 index 00000000000..b0b84f6a4f6 --- /dev/null +++ b/samples/client/petstore/ruby/spec/models/array_test_spec.rb @@ -0,0 +1,47 @@ +=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 + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::ArrayTest +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'ArrayTest' do + before do + # run before each test + @instance = Petstore::ArrayTest.new + end + + after do + # run after each test + end + + describe 'test an instance of ArrayTest' do + it 'should create an instact of ArrayTest' do + expect(@instance).to be_instance_of(Petstore::ArrayTest) + end + end +end + From 06dd7c4794fff20495ff42b2b569bb6d9e3cf6d5 Mon Sep 17 00:00:00 2001 From: Shaun Reich Date: Tue, 24 May 2016 14:44:21 -0400 Subject: [PATCH 15/60] add custom generator example to readme fixes #2923 --- .../swagger-codegen-maven-plugin/README.md | 40 ++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/modules/swagger-codegen-maven-plugin/README.md b/modules/swagger-codegen-maven-plugin/README.md index 488148727b2..d9282c97ebf 100644 --- a/modules/swagger-codegen-maven-plugin/README.md +++ b/modules/swagger-codegen-maven-plugin/README.md @@ -48,6 +48,44 @@ mvn clean compile - `configOptions` - a map of language-specific parameters (see below) - `configHelp` - dumps the configuration help for the specified library (generates no sources) +### Custom Generator + +Specifying a custom generator is a bit different. It doesn't support the classpath:/ syntax, but it does support the fully qualified name of the package. You can also specify your custom templates, which also get pulled in. Notice the dependency on a project, in the plugin scope. That would be your generator/template jar. + +```xml + + io.swagger + swagger-codegen-maven-plugin + ${swagger-codegen-maven-plugin-version} + + + + generate + + + src/main/resources/yaml/yamlfilename.yaml + + com.my.package.for.GeneratorLanguage + myTemplateDir + + ${project.build.directory}/generated-sources + ${default.package}.handler + ${default.package}.model + ${default.package}.handler + + + + + + + com.my.generator + customgenerator + 1.0-SNAPSHOT + + + +``` + ### Sample configuration -- Please see [an example configuration](examples) for using the plugin \ No newline at end of file +- Please see [an example configuration](examples) for using the plugin From 4404b907bc5ea7fc6fd0941c81293c63fa2cee72 Mon Sep 17 00:00:00 2001 From: Fabien Da Silva Date: Tue, 24 May 2016 21:54:46 +0200 Subject: [PATCH 16/60] [Swift] Remove force unwrap in model constructor Fix #2955 --- modules/swagger-codegen/src/main/resources/swift/model.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/swagger-codegen/src/main/resources/swift/model.mustache b/modules/swagger-codegen/src/main/resources/swift/model.mustache index 96c4d2ff683..a42ff74a644 100644 --- a/modules/swagger-codegen/src/main/resources/swift/model.mustache +++ b/modules/swagger-codegen/src/main/resources/swift/model.mustache @@ -33,7 +33,7 @@ public class {{classname}}: JSONEncodable { public init() {} {{/unwrapRequired}} {{#unwrapRequired}} - public init({{#requiredVars}}{{^-first}}, {{/-first}}{{name}}: {{#isEnum}}{{datatypeWithEnum}}!{{/isEnum}}{{^isEnum}}{{datatype}}!{{/isEnum}}{{/requiredVars}}) { + public init({{#requiredVars}}{{^-first}}, {{/-first}}{{name}}: {{#isEnum}}{{datatypeWithEnum}}{{/isEnum}}{{^isEnum}}{{datatype}}{{/isEnum}}{{/requiredVars}}) { {{#requiredVars}} self.{{name}} = {{name}} {{/requiredVars}} From d55a691e1156e2e9ab1316695c0aa6b2ca072c36 Mon Sep 17 00:00:00 2001 From: Joseph Zuromski Date: Tue, 24 May 2016 14:37:37 -0700 Subject: [PATCH 17/60] fix path --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4dfd8c6fdcd..73ea4f2f0ba 100644 --- a/pom.xml +++ b/pom.xml @@ -411,7 +411,7 @@ - samples/client/petstore/swift/SwaggerClientTests + samples/client/petstore/swift/default/SwaggerClientTests From 8096308657f8488311397bf65cd155da707a69ac Mon Sep 17 00:00:00 2001 From: wing328 Date: Wed, 25 May 2016 14:41:17 +0800 Subject: [PATCH 18/60] add apache v2 license to csharp api client --- .gitignore | 1 + .../languages/CSharpClientCodegen.java | 2 + .../main/resources/csharp/ApiClient.mustache | 1 + .../resources/csharp/ApiException.mustache | 1 + .../resources/csharp/ApiResponse.mustache | 1 + .../resources/csharp/Configuration.mustache | 1 + .../resources/csharp/IApiAccessor.mustache | 4 +- .../src/main/resources/csharp/LICENSE | 201 ++++++++++++++++++ .../main/resources/csharp/Project.mustache | 25 +++ .../resources/csharp/TestProject.mustache | 25 +++ .../src/main/resources/csharp/api.mustache | 1 + .../main/resources/csharp/api_test.mustache | 1 + .../src/main/resources/csharp/model.mustache | 1 + .../main/resources/csharp/model_test.mustache | 2 + .../resources/csharp/partial_header.mustache | 25 +++ .../csharp/SwaggerClient/IO.Swagger.sln | 10 +- .../petstore/csharp/SwaggerClient/LICENSE | 201 ++++++++++++++++++ .../petstore/csharp/SwaggerClient/README.md | 3 +- .../csharp/SwaggerClient/docs/ArrayTest.md | 8 + .../IO.Swagger.Test/IO.Swagger.Test.csproj | 63 ++++-- .../IO.Swagger.Test/Model/ArrayTestTests.cs | 56 +++++ .../src/IO.Swagger/Api/FakeApi.cs | 22 ++ .../src/IO.Swagger/Api/PetApi.cs | 22 ++ .../src/IO.Swagger/Api/StoreApi.cs | 22 ++ .../src/IO.Swagger/Api/UserApi.cs | 22 ++ .../src/IO.Swagger/Client/ApiClient.cs | 22 ++ .../src/IO.Swagger/Client/ApiException.cs | 22 ++ .../src/IO.Swagger/Client/ApiResponse.cs | 22 ++ .../src/IO.Swagger/Client/Configuration.cs | 22 ++ .../src/IO.Swagger/Client/IApiAccessor.cs | 25 ++- .../src/IO.Swagger/IO.Swagger.csproj | 23 +- .../Model/AdditionalPropertiesClass.cs | 22 ++ .../src/IO.Swagger/Model/Animal.cs | 22 ++ .../src/IO.Swagger/Model/AnimalFarm.cs | 22 ++ .../src/IO.Swagger/Model/ApiResponse.cs | 22 ++ .../src/IO.Swagger/Model/ArrayTest.cs | 111 ++++++++++ .../SwaggerClient/src/IO.Swagger/Model/Cat.cs | 22 ++ .../src/IO.Swagger/Model/Category.cs | 22 ++ .../SwaggerClient/src/IO.Swagger/Model/Dog.cs | 22 ++ .../src/IO.Swagger/Model/EnumClass.cs | 22 ++ .../src/IO.Swagger/Model/EnumTest.cs | 22 ++ .../src/IO.Swagger/Model/FormatTest.cs | 22 ++ ...dPropertiesAndAdditionalPropertiesClass.cs | 22 ++ .../src/IO.Swagger/Model/Model200Response.cs | 22 ++ .../src/IO.Swagger/Model/ModelReturn.cs | 22 ++ .../src/IO.Swagger/Model/Name.cs | 22 ++ .../src/IO.Swagger/Model/Order.cs | 22 ++ .../SwaggerClient/src/IO.Swagger/Model/Pet.cs | 22 ++ .../src/IO.Swagger/Model/ReadOnlyFirst.cs | 22 ++ .../src/IO.Swagger/Model/SpecialModelName.cs | 22 ++ .../SwaggerClient/src/IO.Swagger/Model/Tag.cs | 22 ++ .../src/IO.Swagger/Model/User.cs | 22 ++ 52 files changed, 1379 insertions(+), 29 deletions(-) create mode 100644 modules/swagger-codegen/src/main/resources/csharp/LICENSE create mode 100644 modules/swagger-codegen/src/main/resources/csharp/partial_header.mustache create mode 100644 samples/client/petstore/csharp/SwaggerClient/LICENSE create mode 100644 samples/client/petstore/csharp/SwaggerClient/docs/ArrayTest.md create mode 100644 samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ArrayTestTests.cs create mode 100644 samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ArrayTest.cs diff --git a/.gitignore b/.gitignore index be288357f94..4e650733033 100644 --- a/.gitignore +++ b/.gitignore @@ -89,6 +89,7 @@ samples/client/petstore/swift/SwaggerClientTests/Pods/Pods.xcodeproj/xcshareddat # C# *.csproj.user +samples/client/petstore/csharp/SwaggerClient/IO.Swagger.userprefs samples/client/petstore/csharp/SwaggerClientTest/.vs samples/client/petstore/csharp/SwaggerClientTest/obj samples/client/petstore/csharp/SwaggerClientTest/bin diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java index 4162ad1aeb4..e926235ba90 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java @@ -247,6 +247,8 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh")); supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")); + // apache v2 license + supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE")); if (optionalAssemblyInfoFlag) { supportingFiles.add(new SupportingFile("AssemblyInfo.mustache", packageFolder + File.separator + "Properties", "AssemblyInfo.cs")); diff --git a/modules/swagger-codegen/src/main/resources/csharp/ApiClient.mustache b/modules/swagger-codegen/src/main/resources/csharp/ApiClient.mustache index f9b9f766299..1d34ff21eae 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/ApiClient.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/ApiClient.mustache @@ -1,3 +1,4 @@ +{{>partial_header}} using System; using System.Collections; using System.Collections.Generic; diff --git a/modules/swagger-codegen/src/main/resources/csharp/ApiException.mustache b/modules/swagger-codegen/src/main/resources/csharp/ApiException.mustache index e6185abc162..ad7c2264d78 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/ApiException.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/ApiException.mustache @@ -1,3 +1,4 @@ +{{>partial_header}} using System; namespace {{packageName}}.Client diff --git a/modules/swagger-codegen/src/main/resources/csharp/ApiResponse.mustache b/modules/swagger-codegen/src/main/resources/csharp/ApiResponse.mustache index 4b9f0a3a43c..d8c1b79e545 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/ApiResponse.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/ApiResponse.mustache @@ -1,3 +1,4 @@ +{{>partial_header}} using System; using System.Collections.Generic; diff --git a/modules/swagger-codegen/src/main/resources/csharp/Configuration.mustache b/modules/swagger-codegen/src/main/resources/csharp/Configuration.mustache index bf7f4d003ad..eddb9d0de1f 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/Configuration.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/Configuration.mustache @@ -1,3 +1,4 @@ +{{>partial_header}} using System; using System.Reflection; using System.Collections.Generic; diff --git a/modules/swagger-codegen/src/main/resources/csharp/IApiAccessor.mustache b/modules/swagger-codegen/src/main/resources/csharp/IApiAccessor.mustache index eecd5284493..22db465efaa 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/IApiAccessor.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/IApiAccessor.mustache @@ -1,3 +1,5 @@ +{{>partial_header}} + using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -23,4 +25,4 @@ namespace {{packageName}}.Client /// The base path String GetBasePath(); } -} \ No newline at end of file +} diff --git a/modules/swagger-codegen/src/main/resources/csharp/LICENSE b/modules/swagger-codegen/src/main/resources/csharp/LICENSE new file mode 100644 index 00000000000..8dada3edaf5 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/csharp/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/modules/swagger-codegen/src/main/resources/csharp/Project.mustache b/modules/swagger-codegen/src/main/resources/csharp/Project.mustache index 141d541a5b5..a8e18ea91ac 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/Project.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/Project.mustache @@ -1,4 +1,29 @@ + Debug diff --git a/modules/swagger-codegen/src/main/resources/csharp/TestProject.mustache b/modules/swagger-codegen/src/main/resources/csharp/TestProject.mustache index 0e0bd6c1671..2866dcb0601 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/TestProject.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/TestProject.mustache @@ -1,4 +1,29 @@ + Debug diff --git a/modules/swagger-codegen/src/main/resources/csharp/api.mustache b/modules/swagger-codegen/src/main/resources/csharp/api.mustache index da1cee8caef..1145421d22d 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/api.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/api.mustache @@ -1,3 +1,4 @@ +{{>partial_header}} using System; using System.Collections.Generic; using System.Collections.ObjectModel; diff --git a/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache b/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache index 21471de3c27..cc487fb681e 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache @@ -1,3 +1,4 @@ +{{>partial_header}} using System; using System.IO; using System.Collections.Generic; diff --git a/modules/swagger-codegen/src/main/resources/csharp/model.mustache b/modules/swagger-codegen/src/main/resources/csharp/model.mustache index 6c6ae8fdbb6..863d7ba93ef 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/model.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/model.mustache @@ -1,3 +1,4 @@ +{{>partial_header}} using System; using System.Linq; using System.IO; diff --git a/modules/swagger-codegen/src/main/resources/csharp/model_test.mustache b/modules/swagger-codegen/src/main/resources/csharp/model_test.mustache index 0d20b9f03a3..f9dd3c08efc 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/model_test.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/model_test.mustache @@ -1,3 +1,5 @@ +{{>partial_header}} + using NUnit.Framework; using System; diff --git a/modules/swagger-codegen/src/main/resources/csharp/partial_header.mustache b/modules/swagger-codegen/src/main/resources/csharp/partial_header.mustache new file mode 100644 index 00000000000..bf5862deafd --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/csharp/partial_header.mustache @@ -0,0 +1,25 @@ +/* + {{#appName}} + * {{{appName}}} + * + {{/appName}} + {{#appDescription}} + * {{{appDescription}}} + * + {{/appDescription}} + * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} + * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ diff --git a/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln b/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln index d6a0243de57..f3e0be76b47 100644 --- a/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln +++ b/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 VisualStudioVersion = 12.0.0.0 MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{098D14FD-4F35-417E-9B8E-67875ACD0AD3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{D4DE6CAE-4BE8-4F73-862A-6E6B7DF37446}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger.Test", "src\IO.Swagger.Test\IO.Swagger.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" EndProject @@ -12,10 +12,10 @@ Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution -{098D14FD-4F35-417E-9B8E-67875ACD0AD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{098D14FD-4F35-417E-9B8E-67875ACD0AD3}.Debug|Any CPU.Build.0 = Debug|Any CPU -{098D14FD-4F35-417E-9B8E-67875ACD0AD3}.Release|Any CPU.ActiveCfg = Release|Any CPU -{098D14FD-4F35-417E-9B8E-67875ACD0AD3}.Release|Any CPU.Build.0 = Release|Any CPU +{D4DE6CAE-4BE8-4F73-862A-6E6B7DF37446}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{D4DE6CAE-4BE8-4F73-862A-6E6B7DF37446}.Debug|Any CPU.Build.0 = Debug|Any CPU +{D4DE6CAE-4BE8-4F73-862A-6E6B7DF37446}.Release|Any CPU.ActiveCfg = Release|Any CPU +{D4DE6CAE-4BE8-4F73-862A-6E6B7DF37446}.Release|Any CPU.Build.0 = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/samples/client/petstore/csharp/SwaggerClient/LICENSE b/samples/client/petstore/csharp/SwaggerClient/LICENSE new file mode 100644 index 00000000000..8dada3edaf5 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/samples/client/petstore/csharp/SwaggerClient/README.md b/samples/client/petstore/csharp/SwaggerClient/README.md index 7cd00026612..e4677b09503 100644 --- a/samples/client/petstore/csharp/SwaggerClient/README.md +++ b/samples/client/petstore/csharp/SwaggerClient/README.md @@ -6,7 +6,7 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c - API version: 1.0.0 - SDK version: 1.0.0 -- Build date: 2016-05-21T22:36:46.367+08:00 +- Build date: 2016-05-25T14:35:23.891+08:00 - Build package: class io.swagger.codegen.languages.CSharpClientCodegen ## Frameworks supported @@ -116,6 +116,7 @@ Class | Method | HTTP request | Description - [Model.Animal](docs/Animal.md) - [Model.AnimalFarm](docs/AnimalFarm.md) - [Model.ApiResponse](docs/ApiResponse.md) + - [Model.ArrayTest](docs/ArrayTest.md) - [Model.Cat](docs/Cat.md) - [Model.Category](docs/Category.md) - [Model.Dog](docs/Dog.md) diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/ArrayTest.md b/samples/client/petstore/csharp/SwaggerClient/docs/ArrayTest.md new file mode 100644 index 00000000000..8f9cff9e9cf --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/docs/ArrayTest.md @@ -0,0 +1,8 @@ +# IO.Swagger.Model.ArrayTest +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/IO.Swagger.Test.csproj b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/IO.Swagger.Test.csproj index a2f1f209fa3..f101ec8e206 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/IO.Swagger.Test.csproj +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/IO.Swagger.Test.csproj @@ -1,5 +1,26 @@ - + + Debug AnyCPU @@ -38,36 +59,38 @@ - $(SolutionDir)\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\vendor\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll - $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll + $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll - $(SolutionDir)\packages\NUnit.2.6.3\lib\nunit.framework.dll - ..\packages\NUnit.2.6.3\lib\nunit.framework.dll - ..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll - ..\..\vendor\NUnit.2.6.3\lib\nunit.framework.dll + $(SolutionDir)\packages\NUnit.2.6.3\lib\nunit.framework.dll + ..\packages\NUnit.2.6.3\lib\nunit.framework.dll + ..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll + ..\..\vendor\NUnit.2.6.3\lib\nunit.framework.dll - + - + - - {098D14FD-4F35-417E-9B8E-67875ACD0AD3} - IO.Swagger - + + {D4DE6CAE-4BE8-4F73-862A-6E6B7DF37446} + IO.Swagger + + + + - diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ArrayTestTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ArrayTestTests.cs new file mode 100644 index 00000000000..fd6b6f31d86 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ArrayTestTests.cs @@ -0,0 +1,56 @@ +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using IO.Swagger.Api; +using IO.Swagger.Model; +using IO.Swagger.Client; +using System.Reflection; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing ArrayTest + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class ArrayTestTests + { + private ArrayTest instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + instance = new ArrayTest(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of ArrayTest + /// + [Test] + public void ArrayTestInstanceTest() + { + Assert.IsInstanceOf (instance, "instance is a ArrayTest"); + } + + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs index ce3c07d74a5..00ce83ef910 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Collections.Generic; using System.Collections.ObjectModel; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/PetApi.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/PetApi.cs index d1e842d6d79..e147d33cceb 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/PetApi.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/PetApi.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Collections.Generic; using System.Collections.ObjectModel; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/StoreApi.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/StoreApi.cs index 16f589f924e..ed5dd54ec40 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/StoreApi.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Collections.Generic; using System.Collections.ObjectModel; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/UserApi.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/UserApi.cs index e7b14a0cdd7..6cb5bee041c 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/UserApi.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/UserApi.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Collections.Generic; using System.Collections.ObjectModel; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiClient.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiClient.cs index fa4f899389a..4331456ceaa 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiClient.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Collections; using System.Collections.Generic; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiException.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiException.cs index 7b7a11721df..a19a664112f 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiException.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiException.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; namespace IO.Swagger.Client diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiResponse.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiResponse.cs index 808837b4aa1..6c6134c114a 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiResponse.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiResponse.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Collections.Generic; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/Configuration.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/Configuration.cs index acbaee1e688..451f6d61354 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/Configuration.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/Configuration.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Reflection; using System.Collections.Generic; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/IApiAccessor.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/IApiAccessor.cs index a80ed3eb1a0..1c91ef50003 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/IApiAccessor.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/IApiAccessor.cs @@ -1,3 +1,26 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -23,4 +46,4 @@ namespace IO.Swagger.Client /// The base path String GetBasePath(); } -} \ No newline at end of file +} diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj index dbd3abb9cbd..93ba033f6ad 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj @@ -1,9 +1,30 @@ + Debug AnyCPU - {098D14FD-4F35-417E-9B8E-67875ACD0AD3} + {D4DE6CAE-4BE8-4F73-862A-6E6B7DF37446} Library Properties Swagger Library diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AdditionalPropertiesClass.cs index d8d95d82d20..b442c5e8791 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AdditionalPropertiesClass.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Linq; using System.IO; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Animal.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Animal.cs index a1d69d92f86..5d8417c74a3 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Animal.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Animal.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Linq; using System.IO; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AnimalFarm.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AnimalFarm.cs index 89ac71d7d1e..267ab5f4017 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AnimalFarm.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AnimalFarm.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Linq; using System.IO; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ApiResponse.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ApiResponse.cs index c4720de276a..0543e709b29 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ApiResponse.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Linq; using System.IO; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ArrayTest.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ArrayTest.cs new file mode 100644 index 00000000000..9521ae2e3ae --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ArrayTest.cs @@ -0,0 +1,111 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace IO.Swagger.Model +{ + /// + /// ArrayTest + /// + [DataContract] + public partial class ArrayTest : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + public ArrayTest() + { + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ArrayTest {\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as ArrayTest); + } + + /// + /// Returns true if ArrayTest instances are equal + /// + /// Instance of ArrayTest to be compared + /// Boolean + public bool Equals(ArrayTest other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return false; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + return hash; + } + } + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Cat.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Cat.cs index 0ecfc2ee3f5..f288be939c4 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Cat.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Cat.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Linq; using System.IO; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Category.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Category.cs index bac1069ab9c..be9d35a9fb7 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Category.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Category.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Linq; using System.IO; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Dog.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Dog.cs index 7984703d1b0..000b1f1bec9 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Dog.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Dog.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Linq; using System.IO; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumClass.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumClass.cs index 1fb5f0b6626..3ce229e2efd 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumClass.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumClass.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Linq; using System.IO; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumTest.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumTest.cs index 721482f31c5..2725d9d17a4 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumTest.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Linq; using System.IO; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs index a0d33e71bb4..eb1a6a8924b 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Linq; using System.IO; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 8d4234e8171..d66f758575a 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Linq; using System.IO; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Model200Response.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Model200Response.cs index c772fedc172..7e6d1c79a16 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Model200Response.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Linq; using System.IO; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ModelReturn.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ModelReturn.cs index b5fa9d341f6..e6255f285ee 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ModelReturn.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ModelReturn.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Linq; using System.IO; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Name.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Name.cs index 35a69deba48..1c1b771f53b 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Name.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Name.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Linq; using System.IO; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Order.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Order.cs index b030bab781a..33f1b2d99da 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Order.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Order.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Linq; using System.IO; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Pet.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Pet.cs index ace8a28d34c..7db2644307a 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Pet.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Pet.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Linq; using System.IO; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ReadOnlyFirst.cs index 4627581d86b..422c7671139 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ReadOnlyFirst.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Linq; using System.IO; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/SpecialModelName.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/SpecialModelName.cs index fa2962f6914..82cde053d0b 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/SpecialModelName.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Linq; using System.IO; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Tag.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Tag.cs index b1d6f167837..93b7b66c005 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Tag.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Tag.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Linq; using System.IO; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/User.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/User.cs index ef933e5469f..34e60b081b4 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/User.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/User.cs @@ -1,3 +1,25 @@ +/* + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Linq; using System.IO; From 0a724a30085b501c1019648139ae698aa976e7dd Mon Sep 17 00:00:00 2001 From: wing328 Date: Wed, 25 May 2016 17:25:18 +0800 Subject: [PATCH 19/60] update pom for swagger codegen module --- modules/swagger-codegen/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/swagger-codegen/pom.xml b/modules/swagger-codegen/pom.xml index b4defc425cb..8f7e98074de 100644 --- a/modules/swagger-codegen/pom.xml +++ b/modules/swagger-codegen/pom.xml @@ -3,7 +3,7 @@ io.swagger swagger-codegen-project - 2.1.6 + 2.2.0-SNAPSHOT ../.. 4.0.0 From 537ee960b6be293a9885aa5c2d6726c77c31fb16 Mon Sep 17 00:00:00 2001 From: Mateusz Mackowiak Date: Wed, 25 May 2016 15:09:05 +0200 Subject: [PATCH 20/60] [Objc] Add Apache v2 license to auto-generated files #2963 --- .../codegen/languages/ObjcClientCodegen.java | 12 +- .../src/main/resources/objc/LICENSE.mustache | 201 ++++++++++++++++++ .../src/main/resources/objc/podspec.mustache | 2 +- samples/client/petstore/objc/LICENSE | 201 ++++++++++++++++++ .../petstore/objc/SwaggerClient.podspec | 2 +- 5 files changed, 412 insertions(+), 6 deletions(-) create mode 100644 modules/swagger-codegen/src/main/resources/objc/LICENSE.mustache create mode 100644 samples/client/petstore/objc/LICENSE diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java index 1a9d0a80c24..474f800e2b4 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java @@ -26,9 +26,11 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig { public static final String POD_NAME = "podName"; public static final String AUTHOR_NAME = "authorName"; public static final String AUTHOR_EMAIL = "authorEmail"; - public static final String GIT_REPO_URL = "gitRepoURL"; public static final String LICENSE = "license"; - + public static final String GIT_REPO_URL = "gitRepoURL"; + + public static final String DEFAULT_LICENSE = "Apache License, Version 2.0"; + public static final String BinaryDataType = "ObjcClientCodegenBinaryData"; protected Set foundationClasses = new HashSet(); @@ -37,7 +39,7 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig { protected String classPrefix = "SWG"; protected String authorName = "Swagger"; protected String authorEmail = "apiteam@swagger.io"; - protected String license = "MIT"; + protected String license = DEFAULT_LICENSE; protected String gitRepoURL = "https://github.com/swagger-api/swagger-codegen"; protected String[] specialWords = {"new", "copy"}; protected String apiDocPath = "docs/"; @@ -254,7 +256,9 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig { supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh")); supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")); - + if (license == null || DEFAULT_LICENSE.equals(license)) { + supportingFiles.add(new SupportingFile("LICENSE.mustache", "", "LICENSE")); + } } @Override diff --git a/modules/swagger-codegen/src/main/resources/objc/LICENSE.mustache b/modules/swagger-codegen/src/main/resources/objc/LICENSE.mustache new file mode 100644 index 00000000000..8dada3edaf5 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/objc/LICENSE.mustache @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/modules/swagger-codegen/src/main/resources/objc/podspec.mustache b/modules/swagger-codegen/src/main/resources/objc/podspec.mustache index c308a399c0a..706a583454f 100644 --- a/modules/swagger-codegen/src/main/resources/objc/podspec.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/podspec.mustache @@ -22,7 +22,7 @@ Pod::Spec.new do |s| s.framework = 'SystemConfiguration' s.homepage = "{{gitRepoURL}}" - s.license = "{{license}}" + s.license = "{{#license}}{{license}}{{/license}}{{^license}}Apache License, Version 2.0{{/license}}" s.source = { :git => "{{gitRepoURL}}.git", :tag => "#{s.version}" } s.author = { "{{authorName}}" => "{{authorEmail}}" } diff --git a/samples/client/petstore/objc/LICENSE b/samples/client/petstore/objc/LICENSE new file mode 100644 index 00000000000..8dada3edaf5 --- /dev/null +++ b/samples/client/petstore/objc/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/samples/client/petstore/objc/SwaggerClient.podspec b/samples/client/petstore/objc/SwaggerClient.podspec index 885b29f7806..3c8e0e79516 100644 --- a/samples/client/petstore/objc/SwaggerClient.podspec +++ b/samples/client/petstore/objc/SwaggerClient.podspec @@ -22,7 +22,7 @@ Pod::Spec.new do |s| s.framework = 'SystemConfiguration' s.homepage = "https://github.com/swagger-api/swagger-codegen" - s.license = "MIT" + s.license = "Apache License, Version 2.0" s.source = { :git => "https://github.com/swagger-api/swagger-codegen.git", :tag => "#{s.version}" } s.author = { "Swagger" => "apiteam@swagger.io" } From 4df140956f87590b894c2b4b5ea94bea2e114409 Mon Sep 17 00:00:00 2001 From: wing328 Date: Wed, 25 May 2016 22:17:11 +0800 Subject: [PATCH 21/60] update version to 2.2.0-SNAPSHOT --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e1a52bd483..5e9eaa84fe4 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20 Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes -------------------------- | ------------ | -------------------------- | ----- -2.1.7-SNAPSHOT | | 1.0, 1.1, 1.2, 2.0 | [master](https://github.com/swagger-api/swagger-codegen) +2.2.0-SNAPSHOT | | 1.0, 1.1, 1.2, 2.0 | [master](https://github.com/swagger-api/swagger-codegen) 2.1.6 (**current stable**) | 2016-04-06 | 1.0, 1.1, 1.2, 2.0 | [tag v2.1.6](https://github.com/swagger-api/swagger-codegen/tree/v2.1.6) 2.0.17 | 2014-08-22 | 1.1, 1.2 | [tag v2.0.17](https://github.com/swagger-api/swagger-codegen/tree/v2.0.17) 1.0.4 | 2012-04-12 | 1.0, 1.1 | [tag v1.0.4](https://github.com/swagger-api/swagger-codegen/tree/swagger-codegen_2.9.1-1.1) From 09a29063be73a1f194d63ae3aca687688412b815 Mon Sep 17 00:00:00 2001 From: zhenjun115 Date: Wed, 25 May 2016 23:44:44 +0800 Subject: [PATCH 22/60] add markdown docs for java api client using retrofit2; --- .../codegen/languages/JavaClientCodegen.java | 7 + .../docs/AdditionalPropertiesClass.md | 9 + .../petstore/java/retrofit2/docs/Animal.md | 11 + .../java/retrofit2/docs/AnimalFarm.md | 9 + .../petstore/java/retrofit2/docs/ArrayTest.md | 9 + .../petstore/java/retrofit2/docs/Cat.md | 12 + .../petstore/java/retrofit2/docs/Category.md | 11 + .../petstore/java/retrofit2/docs/Dog.md | 12 + .../petstore/java/retrofit2/docs/EnumClass.md | 14 + .../petstore/java/retrofit2/docs/EnumTest.md | 36 ++ .../petstore/java/retrofit2/docs/FakeApi.md | 76 +++ .../java/retrofit2/docs/FormatTest.md | 22 + ...dPropertiesAndAdditionalPropertiesClass.md | 11 + .../java/retrofit2/docs/Model200Response.md | 10 + .../java/retrofit2/docs/ModelApiResponse.md | 12 + .../java/retrofit2/docs/ModelReturn.md | 10 + .../petstore/java/retrofit2/docs/Name.md | 13 + .../petstore/java/retrofit2/docs/Order.md | 24 + .../petstore/java/retrofit2/docs/Pet.md | 24 + .../petstore/java/retrofit2/docs/PetApi.md | 452 ++++++++++++++++++ .../java/retrofit2/docs/ReadOnlyFirst.md | 11 + .../java/retrofit2/docs/SpecialModelName.md | 10 + .../petstore/java/retrofit2/docs/StoreApi.md | 198 ++++++++ .../petstore/java/retrofit2/docs/Tag.md | 11 + .../petstore/java/retrofit2/docs/User.md | 17 + .../petstore/java/retrofit2/docs/UserApi.md | 376 +++++++++++++++ .../docs/AdditionalPropertiesClass.md | 9 + .../petstore/java/retrofit2rx/docs/Animal.md | 11 + .../java/retrofit2rx/docs/AnimalFarm.md | 9 + .../java/retrofit2rx/docs/ArrayTest.md | 9 + .../petstore/java/retrofit2rx/docs/Cat.md | 12 + .../java/retrofit2rx/docs/Category.md | 11 + .../petstore/java/retrofit2rx/docs/Dog.md | 12 + .../java/retrofit2rx/docs/EnumClass.md | 14 + .../java/retrofit2rx/docs/EnumTest.md | 36 ++ .../petstore/java/retrofit2rx/docs/FakeApi.md | 76 +++ .../java/retrofit2rx/docs/FormatTest.md | 22 + ...dPropertiesAndAdditionalPropertiesClass.md | 11 + .../java/retrofit2rx/docs/Model200Response.md | 10 + .../java/retrofit2rx/docs/ModelApiResponse.md | 12 + .../java/retrofit2rx/docs/ModelReturn.md | 10 + .../petstore/java/retrofit2rx/docs/Name.md | 13 + .../petstore/java/retrofit2rx/docs/Order.md | 24 + .../petstore/java/retrofit2rx/docs/Pet.md | 24 + .../petstore/java/retrofit2rx/docs/PetApi.md | 452 ++++++++++++++++++ .../java/retrofit2rx/docs/ReadOnlyFirst.md | 11 + .../java/retrofit2rx/docs/SpecialModelName.md | 10 + .../java/retrofit2rx/docs/StoreApi.md | 198 ++++++++ .../petstore/java/retrofit2rx/docs/Tag.md | 11 + .../petstore/java/retrofit2rx/docs/User.md | 17 + .../petstore/java/retrofit2rx/docs/UserApi.md | 376 +++++++++++++++ 51 files changed, 2807 insertions(+) create mode 100644 samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesClass.md create mode 100644 samples/client/petstore/java/retrofit2/docs/Animal.md create mode 100644 samples/client/petstore/java/retrofit2/docs/AnimalFarm.md create mode 100644 samples/client/petstore/java/retrofit2/docs/ArrayTest.md create mode 100644 samples/client/petstore/java/retrofit2/docs/Cat.md create mode 100644 samples/client/petstore/java/retrofit2/docs/Category.md create mode 100644 samples/client/petstore/java/retrofit2/docs/Dog.md create mode 100644 samples/client/petstore/java/retrofit2/docs/EnumClass.md create mode 100644 samples/client/petstore/java/retrofit2/docs/EnumTest.md create mode 100644 samples/client/petstore/java/retrofit2/docs/FakeApi.md create mode 100644 samples/client/petstore/java/retrofit2/docs/FormatTest.md create mode 100644 samples/client/petstore/java/retrofit2/docs/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/client/petstore/java/retrofit2/docs/Model200Response.md create mode 100644 samples/client/petstore/java/retrofit2/docs/ModelApiResponse.md create mode 100644 samples/client/petstore/java/retrofit2/docs/ModelReturn.md create mode 100644 samples/client/petstore/java/retrofit2/docs/Name.md create mode 100644 samples/client/petstore/java/retrofit2/docs/Order.md create mode 100644 samples/client/petstore/java/retrofit2/docs/Pet.md create mode 100644 samples/client/petstore/java/retrofit2/docs/PetApi.md create mode 100644 samples/client/petstore/java/retrofit2/docs/ReadOnlyFirst.md create mode 100644 samples/client/petstore/java/retrofit2/docs/SpecialModelName.md create mode 100644 samples/client/petstore/java/retrofit2/docs/StoreApi.md create mode 100644 samples/client/petstore/java/retrofit2/docs/Tag.md create mode 100644 samples/client/petstore/java/retrofit2/docs/User.md create mode 100644 samples/client/petstore/java/retrofit2/docs/UserApi.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/AdditionalPropertiesClass.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/Animal.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/AnimalFarm.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/ArrayTest.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/Cat.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/Category.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/Dog.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/EnumClass.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/EnumTest.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/FakeApi.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/FormatTest.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/Model200Response.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/ModelApiResponse.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/ModelReturn.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/Name.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/Order.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/Pet.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/PetApi.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/ReadOnlyFirst.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/SpecialModelName.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/StoreApi.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/Tag.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/User.md create mode 100644 samples/client/petstore/java/retrofit2rx/docs/UserApi.md diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java index 1fba93891a4..9f771f05607 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java @@ -332,6 +332,13 @@ public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig { gradleWrapperPackage.replace( ".", File.separator ), "gradle-wrapper.properties") ); supportingFiles.add( new SupportingFile( "gradle-wrapper.jar", gradleWrapperPackage.replace( ".", File.separator ), "gradle-wrapper.jar") ); + + //generate markdown docs for retrofit2 + if ( usesRetrofit2Library() ){ + modelDocTemplateFiles.put("model_doc.mustache", ".md"); + apiDocTemplateFiles.put("api_doc.mustache", ".md"); + } + } else if("jersey2".equals(getLibrary())) { // generate markdown docs modelDocTemplateFiles.put("model_doc.mustache", ".md"); diff --git a/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesClass.md new file mode 100644 index 00000000000..c72785d450f --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesClass.md @@ -0,0 +1,9 @@ + +# AdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + + diff --git a/samples/client/petstore/java/retrofit2/docs/Animal.md b/samples/client/petstore/java/retrofit2/docs/Animal.md new file mode 100644 index 00000000000..b3f325c3524 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/Animal.md @@ -0,0 +1,11 @@ + +# Animal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2/docs/AnimalFarm.md b/samples/client/petstore/java/retrofit2/docs/AnimalFarm.md new file mode 100644 index 00000000000..c7c7f1ddcce --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/AnimalFarm.md @@ -0,0 +1,9 @@ + +# AnimalFarm + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + + diff --git a/samples/client/petstore/java/retrofit2/docs/ArrayTest.md b/samples/client/petstore/java/retrofit2/docs/ArrayTest.md new file mode 100644 index 00000000000..73c3e5305ad --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/ArrayTest.md @@ -0,0 +1,9 @@ + +# ArrayTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + + diff --git a/samples/client/petstore/java/retrofit2/docs/Cat.md b/samples/client/petstore/java/retrofit2/docs/Cat.md new file mode 100644 index 00000000000..be6e56fa8ce --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/Cat.md @@ -0,0 +1,12 @@ + +# Cat + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] +**declawed** | **Boolean** | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2/docs/Category.md b/samples/client/petstore/java/retrofit2/docs/Category.md new file mode 100644 index 00000000000..e2df0803278 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/Category.md @@ -0,0 +1,11 @@ + +# Category + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | | [optional] +**name** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2/docs/Dog.md b/samples/client/petstore/java/retrofit2/docs/Dog.md new file mode 100644 index 00000000000..71a7dbe809e --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/Dog.md @@ -0,0 +1,12 @@ + +# Dog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] +**breed** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2/docs/EnumClass.md b/samples/client/petstore/java/retrofit2/docs/EnumClass.md new file mode 100644 index 00000000000..c746edc3cb1 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/EnumClass.md @@ -0,0 +1,14 @@ + +# EnumClass + +## Enum + + +* `_ABC` (value: `"_abc"`) + +* `_EFG` (value: `"-efg"`) + +* `_XYZ_` (value: `"(xyz)"`) + + + diff --git a/samples/client/petstore/java/retrofit2/docs/EnumTest.md b/samples/client/petstore/java/retrofit2/docs/EnumTest.md new file mode 100644 index 00000000000..deb1951c552 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/EnumTest.md @@ -0,0 +1,36 @@ + +# EnumTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] +**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] +**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] + + + +## Enum: EnumStringEnum +Name | Value +---- | ----- +UPPER | "UPPER" +LOWER | "lower" + + + +## Enum: EnumIntegerEnum +Name | Value +---- | ----- +NUMBER_1 | 1 +NUMBER_MINUS_1 | -1 + + + +## Enum: EnumNumberEnum +Name | Value +---- | ----- +NUMBER_1_DOT_1 | 1.1 +NUMBER_MINUS_1_DOT_2 | -1.2 + + + diff --git a/samples/client/petstore/java/retrofit2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2/docs/FakeApi.md new file mode 100644 index 00000000000..55f7cef2df4 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/FakeApi.md @@ -0,0 +1,76 @@ +# FakeApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + + +# **testEndpointParameters** +> Void testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password) + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.FakeApi; + + +FakeApi apiInstance = new FakeApi(); +BigDecimal number = new BigDecimal(); // BigDecimal | None +Double _double = 3.4D; // Double | None +String string = "string_example"; // String | None +byte[] _byte = B; // byte[] | None +Integer integer = 56; // Integer | None +Integer int32 = 56; // Integer | None +Long int64 = 789L; // Long | None +Float _float = 3.4F; // Float | None +byte[] binary = B; // byte[] | None +Date date = new Date(); // Date | None +Date dateTime = new Date(); // Date | None +String password = "password_example"; // String | None +try { + Void result = apiInstance.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEndpointParameters"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **BigDecimal**| None | + **_double** | **Double**| None | + **string** | **String**| None | + **_byte** | **byte[]**| None | + **integer** | **Integer**| None | [optional] + **int32** | **Integer**| None | [optional] + **int64** | **Long**| None | [optional] + **_float** | **Float**| None | [optional] + **binary** | **byte[]**| None | [optional] + **date** | **Date**| None | [optional] + **dateTime** | **Date**| None | [optional] + **password** | **String**| None | [optional] + +### Return type + +[**Void**](.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/xml; charset=utf-8, application/json; charset=utf-8 + - **Accept**: application/xml; charset=utf-8, application/json; charset=utf-8 + diff --git a/samples/client/petstore/java/retrofit2/docs/FormatTest.md b/samples/client/petstore/java/retrofit2/docs/FormatTest.md new file mode 100644 index 00000000000..dc2b559dad2 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/FormatTest.md @@ -0,0 +1,22 @@ + +# FormatTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Integer** | | [optional] +**int32** | **Integer** | | [optional] +**int64** | **Long** | | [optional] +**number** | [**BigDecimal**](BigDecimal.md) | | +**_float** | **Float** | | [optional] +**_double** | **Double** | | [optional] +**string** | **String** | | [optional] +**_byte** | **byte[]** | | +**binary** | **byte[]** | | [optional] +**date** | [**Date**](Date.md) | | +**dateTime** | [**Date**](Date.md) | | [optional] +**uuid** | **String** | | [optional] +**password** | **String** | | + + + diff --git a/samples/client/petstore/java/retrofit2/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 00000000000..fcdbd390517 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,11 @@ + +# MixedPropertiesAndAdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **String** | | [optional] +**dateTime** | [**Date**](Date.md) | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2/docs/Model200Response.md b/samples/client/petstore/java/retrofit2/docs/Model200Response.md new file mode 100644 index 00000000000..0819b88c4f4 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/Model200Response.md @@ -0,0 +1,10 @@ + +# Model200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Integer** | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2/docs/ModelApiResponse.md b/samples/client/petstore/java/retrofit2/docs/ModelApiResponse.md new file mode 100644 index 00000000000..3eec8686cc9 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/ModelApiResponse.md @@ -0,0 +1,12 @@ + +# ModelApiResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Integer** | | [optional] +**type** | **String** | | [optional] +**message** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2/docs/ModelReturn.md b/samples/client/petstore/java/retrofit2/docs/ModelReturn.md new file mode 100644 index 00000000000..a679b04953e --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/ModelReturn.md @@ -0,0 +1,10 @@ + +# ModelReturn + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **Integer** | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2/docs/Name.md b/samples/client/petstore/java/retrofit2/docs/Name.md new file mode 100644 index 00000000000..ce2fb4dee50 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/Name.md @@ -0,0 +1,13 @@ + +# Name + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Integer** | | +**snakeCase** | **Integer** | | [optional] +**property** | **String** | | [optional] +**_123Number** | **Integer** | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2/docs/Order.md b/samples/client/petstore/java/retrofit2/docs/Order.md new file mode 100644 index 00000000000..29ca3ddbc6b --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/Order.md @@ -0,0 +1,24 @@ + +# Order + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | | [optional] +**petId** | **Long** | | [optional] +**quantity** | **Integer** | | [optional] +**shipDate** | [**Date**](Date.md) | | [optional] +**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] +**complete** | **Boolean** | | [optional] + + + +## Enum: StatusEnum +Name | Value +---- | ----- +PLACED | "placed" +APPROVED | "approved" +DELIVERED | "delivered" + + + diff --git a/samples/client/petstore/java/retrofit2/docs/Pet.md b/samples/client/petstore/java/retrofit2/docs/Pet.md new file mode 100644 index 00000000000..5b63109ef92 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/Pet.md @@ -0,0 +1,24 @@ + +# Pet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **String** | | +**photoUrls** | **List<String>** | | +**tags** | [**List<Tag>**](Tag.md) | | [optional] +**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] + + + +## Enum: StatusEnum +Name | Value +---- | ----- +AVAILABLE | "available" +PENDING | "pending" +SOLD | "sold" + + + diff --git a/samples/client/petstore/java/retrofit2/docs/PetApi.md b/samples/client/petstore/java/retrofit2/docs/PetApi.md new file mode 100644 index 00000000000..40ea199b153 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/PetApi.md @@ -0,0 +1,452 @@ +# PetApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetApi.md#addPet) | **POST** pet | Add a new pet to the store +[**deletePet**](PetApi.md#deletePet) | **DELETE** pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** pet/findByTags | Finds Pets by tags +[**getPetById**](PetApi.md#getPetById) | **GET** pet/{petId} | Find pet by ID +[**updatePet**](PetApi.md#updatePet) | **PUT** pet | Update an existing pet +[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetApi.md#uploadFile) | **POST** pet/{petId}/uploadImage | uploads an image + + + +# **addPet** +> Void addPet(body) + +Add a new pet to the store + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Pet body = new Pet(); // Pet | Pet object that needs to be added to the store +try { + Void result = apiInstance.addPet(body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +[**Void**](.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: application/xml, application/json + + +# **deletePet** +> Void deletePet(petId, apiKey) + +Deletes a pet + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 789L; // Long | Pet id to delete +String apiKey = "apiKey_example"; // String | +try { + Void result = apiInstance.deletePet(petId, apiKey); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| Pet id to delete | + **apiKey** | **String**| | [optional] + +### Return type + +[**Void**](.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **findPetsByStatus** +> List<Pet> findPetsByStatus(status) + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +List status = Arrays.asList("status_example"); // List | Status values that need to be considered for filter +try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | + +### Return type + +[**List<Pet>**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **findPetsByTags** +> List<Pet> findPetsByTags(tags) + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +List tags = Arrays.asList("tags_example"); // List | Tags to filter by +try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**List<String>**](String.md)| Tags to filter by | + +### Return type + +[**List<Pet>**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **getPetById** +> Pet getPetById(petId) + +Find pet by ID + +Returns a single pet + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api_key +ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); +api_key.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//api_key.setApiKeyPrefix("Token"); + +PetApi apiInstance = new PetApi(); +Long petId = 789L; // Long | ID of pet to return +try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **updatePet** +> Void updatePet(body) + +Update an existing pet + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Pet body = new Pet(); // Pet | Pet object that needs to be added to the store +try { + Void result = apiInstance.updatePet(body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +[**Void**](.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: application/xml, application/json + + +# **updatePetWithForm** +> Void updatePetWithForm(petId, name, status) + +Updates a pet in the store with form data + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 789L; // Long | ID of pet that needs to be updated +String name = "name_example"; // String | Updated name of the pet +String status = "status_example"; // String | Updated status of the pet +try { + Void result = apiInstance.updatePetWithForm(petId, name, status); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet that needs to be updated | + **name** | **String**| Updated name of the pet | [optional] + **status** | **String**| Updated status of the pet | [optional] + +### Return type + +[**Void**](.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/xml, application/json + + +# **uploadFile** +> ModelApiResponse uploadFile(petId, additionalMetadata, file) + +uploads an image + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 789L; // Long | ID of pet to update +String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server +File file = new File("/path/to/file.txt"); // File | file to upload +try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] + **file** | **File**| file to upload | [optional] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/retrofit2/docs/ReadOnlyFirst.md b/samples/client/petstore/java/retrofit2/docs/ReadOnlyFirst.md new file mode 100644 index 00000000000..426b7cde95a --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/ReadOnlyFirst.md @@ -0,0 +1,11 @@ + +# ReadOnlyFirst + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] +**baz** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2/docs/SpecialModelName.md b/samples/client/petstore/java/retrofit2/docs/SpecialModelName.md new file mode 100644 index 00000000000..c2c6117c552 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/SpecialModelName.md @@ -0,0 +1,10 @@ + +# SpecialModelName + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**specialPropertyName** | **Long** | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2/docs/StoreApi.md b/samples/client/petstore/java/retrofit2/docs/StoreApi.md new file mode 100644 index 00000000000..30e3c11d440 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/StoreApi.md @@ -0,0 +1,198 @@ +# StoreApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** store/order/{orderId} | Delete purchase order by ID +[**getInventory**](StoreApi.md#getInventory) | **GET** store/inventory | Returns pet inventories by status +[**getOrderById**](StoreApi.md#getOrderById) | **GET** store/order/{orderId} | Find purchase order by ID +[**placeOrder**](StoreApi.md#placeOrder) | **POST** store/order | Place an order for a pet + + + +# **deleteOrder** +> Void deleteOrder(orderId) + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.StoreApi; + + +StoreApi apiInstance = new StoreApi(); +String orderId = "orderId_example"; // String | ID of the order that needs to be deleted +try { + Void result = apiInstance.deleteOrder(orderId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String**| ID of the order that needs to be deleted | + +### Return type + +[**Void**](.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **getInventory** +> Map<String, Integer> getInventory() + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.StoreApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api_key +ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); +api_key.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//api_key.setApiKeyPrefix("Token"); + +StoreApi apiInstance = new StoreApi(); +try { + Map result = apiInstance.getInventory(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Map<String, Integer>**](Map.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getOrderById** +> Order getOrderById(orderId) + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.StoreApi; + + +StoreApi apiInstance = new StoreApi(); +Long orderId = 789L; // Long | ID of pet that needs to be fetched +try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **Long**| ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **placeOrder** +> Order placeOrder(body) + +Place an order for a pet + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.StoreApi; + + +StoreApi apiInstance = new StoreApi(); +Order body = new Order(); // Order | order placed for purchasing the pet +try { + Order result = apiInstance.placeOrder(body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md)| order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + diff --git a/samples/client/petstore/java/retrofit2/docs/Tag.md b/samples/client/petstore/java/retrofit2/docs/Tag.md new file mode 100644 index 00000000000..de6814b55d5 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/Tag.md @@ -0,0 +1,11 @@ + +# Tag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | | [optional] +**name** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2/docs/User.md b/samples/client/petstore/java/retrofit2/docs/User.md new file mode 100644 index 00000000000..8b6753dd284 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/User.md @@ -0,0 +1,17 @@ + +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | | [optional] +**username** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] +**email** | **String** | | [optional] +**password** | **String** | | [optional] +**phone** | **String** | | [optional] +**userStatus** | **Integer** | User Status | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2/docs/UserApi.md b/samples/client/petstore/java/retrofit2/docs/UserApi.md new file mode 100644 index 00000000000..b0a0149a50a --- /dev/null +++ b/samples/client/petstore/java/retrofit2/docs/UserApi.md @@ -0,0 +1,376 @@ +# UserApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserApi.md#createUser) | **POST** user | Create user +[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** user/createWithList | Creates list of users with given input array +[**deleteUser**](UserApi.md#deleteUser) | **DELETE** user/{username} | Delete user +[**getUserByName**](UserApi.md#getUserByName) | **GET** user/{username} | Get user by user name +[**loginUser**](UserApi.md#loginUser) | **GET** user/login | Logs user into the system +[**logoutUser**](UserApi.md#logoutUser) | **GET** user/logout | Logs out current logged in user session +[**updateUser**](UserApi.md#updateUser) | **PUT** user/{username} | Updated user + + + +# **createUser** +> Void createUser(body) + +Create user + +This can only be done by the logged in user. + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.UserApi; + + +UserApi apiInstance = new UserApi(); +User body = new User(); // User | Created user object +try { + Void result = apiInstance.createUser(body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md)| Created user object | + +### Return type + +[**Void**](.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **createUsersWithArrayInput** +> Void createUsersWithArrayInput(body) + +Creates list of users with given input array + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.UserApi; + + +UserApi apiInstance = new UserApi(); +List body = Arrays.asList(new User()); // List | List of user object +try { + Void result = apiInstance.createUsersWithArrayInput(body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**List<User>**](User.md)| List of user object | + +### Return type + +[**Void**](.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **createUsersWithListInput** +> Void createUsersWithListInput(body) + +Creates list of users with given input array + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.UserApi; + + +UserApi apiInstance = new UserApi(); +List body = Arrays.asList(new User()); // List | List of user object +try { + Void result = apiInstance.createUsersWithListInput(body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**List<User>**](User.md)| List of user object | + +### Return type + +[**Void**](.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **deleteUser** +> Void deleteUser(username) + +Delete user + +This can only be done by the logged in user. + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.UserApi; + + +UserApi apiInstance = new UserApi(); +String username = "username_example"; // String | The name that needs to be deleted +try { + Void result = apiInstance.deleteUser(username); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be deleted | + +### Return type + +[**Void**](.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **getUserByName** +> User getUserByName(username) + +Get user by user name + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.UserApi; + + +UserApi apiInstance = new UserApi(); +String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. +try { + User result = apiInstance.getUserByName(username); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **loginUser** +> String loginUser(username, password) + +Logs user into the system + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.UserApi; + + +UserApi apiInstance = new UserApi(); +String username = "username_example"; // String | The user name for login +String password = "password_example"; // String | The password for login in clear text +try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The user name for login | + **password** | **String**| The password for login in clear text | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **logoutUser** +> Void logoutUser() + +Logs out current logged in user session + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.UserApi; + + +UserApi apiInstance = new UserApi(); +try { + Void result = apiInstance.logoutUser(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Void**](.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **updateUser** +> Void updateUser(username, body) + +Updated user + +This can only be done by the logged in user. + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.UserApi; + + +UserApi apiInstance = new UserApi(); +String username = "username_example"; // String | name that need to be deleted +User body = new User(); // User | Updated user object +try { + Void result = apiInstance.updateUser(username, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| name that need to be deleted | + **body** | [**User**](User.md)| Updated user object | + +### Return type + +[**Void**](.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + diff --git a/samples/client/petstore/java/retrofit2rx/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2rx/docs/AdditionalPropertiesClass.md new file mode 100644 index 00000000000..c72785d450f --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/AdditionalPropertiesClass.md @@ -0,0 +1,9 @@ + +# AdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + + diff --git a/samples/client/petstore/java/retrofit2rx/docs/Animal.md b/samples/client/petstore/java/retrofit2rx/docs/Animal.md new file mode 100644 index 00000000000..b3f325c3524 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/Animal.md @@ -0,0 +1,11 @@ + +# Animal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2rx/docs/AnimalFarm.md b/samples/client/petstore/java/retrofit2rx/docs/AnimalFarm.md new file mode 100644 index 00000000000..c7c7f1ddcce --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/AnimalFarm.md @@ -0,0 +1,9 @@ + +# AnimalFarm + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + + diff --git a/samples/client/petstore/java/retrofit2rx/docs/ArrayTest.md b/samples/client/petstore/java/retrofit2rx/docs/ArrayTest.md new file mode 100644 index 00000000000..73c3e5305ad --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/ArrayTest.md @@ -0,0 +1,9 @@ + +# ArrayTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + + diff --git a/samples/client/petstore/java/retrofit2rx/docs/Cat.md b/samples/client/petstore/java/retrofit2rx/docs/Cat.md new file mode 100644 index 00000000000..be6e56fa8ce --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/Cat.md @@ -0,0 +1,12 @@ + +# Cat + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] +**declawed** | **Boolean** | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2rx/docs/Category.md b/samples/client/petstore/java/retrofit2rx/docs/Category.md new file mode 100644 index 00000000000..e2df0803278 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/Category.md @@ -0,0 +1,11 @@ + +# Category + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | | [optional] +**name** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2rx/docs/Dog.md b/samples/client/petstore/java/retrofit2rx/docs/Dog.md new file mode 100644 index 00000000000..71a7dbe809e --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/Dog.md @@ -0,0 +1,12 @@ + +# Dog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] +**breed** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2rx/docs/EnumClass.md b/samples/client/petstore/java/retrofit2rx/docs/EnumClass.md new file mode 100644 index 00000000000..c746edc3cb1 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/EnumClass.md @@ -0,0 +1,14 @@ + +# EnumClass + +## Enum + + +* `_ABC` (value: `"_abc"`) + +* `_EFG` (value: `"-efg"`) + +* `_XYZ_` (value: `"(xyz)"`) + + + diff --git a/samples/client/petstore/java/retrofit2rx/docs/EnumTest.md b/samples/client/petstore/java/retrofit2rx/docs/EnumTest.md new file mode 100644 index 00000000000..deb1951c552 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/EnumTest.md @@ -0,0 +1,36 @@ + +# EnumTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] +**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] +**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] + + + +## Enum: EnumStringEnum +Name | Value +---- | ----- +UPPER | "UPPER" +LOWER | "lower" + + + +## Enum: EnumIntegerEnum +Name | Value +---- | ----- +NUMBER_1 | 1 +NUMBER_MINUS_1 | -1 + + + +## Enum: EnumNumberEnum +Name | Value +---- | ----- +NUMBER_1_DOT_1 | 1.1 +NUMBER_MINUS_1_DOT_2 | -1.2 + + + diff --git a/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md new file mode 100644 index 00000000000..55f7cef2df4 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md @@ -0,0 +1,76 @@ +# FakeApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + + +# **testEndpointParameters** +> Void testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password) + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.FakeApi; + + +FakeApi apiInstance = new FakeApi(); +BigDecimal number = new BigDecimal(); // BigDecimal | None +Double _double = 3.4D; // Double | None +String string = "string_example"; // String | None +byte[] _byte = B; // byte[] | None +Integer integer = 56; // Integer | None +Integer int32 = 56; // Integer | None +Long int64 = 789L; // Long | None +Float _float = 3.4F; // Float | None +byte[] binary = B; // byte[] | None +Date date = new Date(); // Date | None +Date dateTime = new Date(); // Date | None +String password = "password_example"; // String | None +try { + Void result = apiInstance.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testEndpointParameters"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **BigDecimal**| None | + **_double** | **Double**| None | + **string** | **String**| None | + **_byte** | **byte[]**| None | + **integer** | **Integer**| None | [optional] + **int32** | **Integer**| None | [optional] + **int64** | **Long**| None | [optional] + **_float** | **Float**| None | [optional] + **binary** | **byte[]**| None | [optional] + **date** | **Date**| None | [optional] + **dateTime** | **Date**| None | [optional] + **password** | **String**| None | [optional] + +### Return type + +[**Void**](.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/xml; charset=utf-8, application/json; charset=utf-8 + - **Accept**: application/xml; charset=utf-8, application/json; charset=utf-8 + diff --git a/samples/client/petstore/java/retrofit2rx/docs/FormatTest.md b/samples/client/petstore/java/retrofit2rx/docs/FormatTest.md new file mode 100644 index 00000000000..dc2b559dad2 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/FormatTest.md @@ -0,0 +1,22 @@ + +# FormatTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Integer** | | [optional] +**int32** | **Integer** | | [optional] +**int64** | **Long** | | [optional] +**number** | [**BigDecimal**](BigDecimal.md) | | +**_float** | **Float** | | [optional] +**_double** | **Double** | | [optional] +**string** | **String** | | [optional] +**_byte** | **byte[]** | | +**binary** | **byte[]** | | [optional] +**date** | [**Date**](Date.md) | | +**dateTime** | [**Date**](Date.md) | | [optional] +**uuid** | **String** | | [optional] +**password** | **String** | | + + + diff --git a/samples/client/petstore/java/retrofit2rx/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2rx/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 00000000000..fcdbd390517 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,11 @@ + +# MixedPropertiesAndAdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **String** | | [optional] +**dateTime** | [**Date**](Date.md) | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2rx/docs/Model200Response.md b/samples/client/petstore/java/retrofit2rx/docs/Model200Response.md new file mode 100644 index 00000000000..0819b88c4f4 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/Model200Response.md @@ -0,0 +1,10 @@ + +# Model200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Integer** | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2rx/docs/ModelApiResponse.md b/samples/client/petstore/java/retrofit2rx/docs/ModelApiResponse.md new file mode 100644 index 00000000000..3eec8686cc9 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/ModelApiResponse.md @@ -0,0 +1,12 @@ + +# ModelApiResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Integer** | | [optional] +**type** | **String** | | [optional] +**message** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2rx/docs/ModelReturn.md b/samples/client/petstore/java/retrofit2rx/docs/ModelReturn.md new file mode 100644 index 00000000000..a679b04953e --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/ModelReturn.md @@ -0,0 +1,10 @@ + +# ModelReturn + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **Integer** | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2rx/docs/Name.md b/samples/client/petstore/java/retrofit2rx/docs/Name.md new file mode 100644 index 00000000000..ce2fb4dee50 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/Name.md @@ -0,0 +1,13 @@ + +# Name + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Integer** | | +**snakeCase** | **Integer** | | [optional] +**property** | **String** | | [optional] +**_123Number** | **Integer** | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2rx/docs/Order.md b/samples/client/petstore/java/retrofit2rx/docs/Order.md new file mode 100644 index 00000000000..29ca3ddbc6b --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/Order.md @@ -0,0 +1,24 @@ + +# Order + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | | [optional] +**petId** | **Long** | | [optional] +**quantity** | **Integer** | | [optional] +**shipDate** | [**Date**](Date.md) | | [optional] +**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] +**complete** | **Boolean** | | [optional] + + + +## Enum: StatusEnum +Name | Value +---- | ----- +PLACED | "placed" +APPROVED | "approved" +DELIVERED | "delivered" + + + diff --git a/samples/client/petstore/java/retrofit2rx/docs/Pet.md b/samples/client/petstore/java/retrofit2rx/docs/Pet.md new file mode 100644 index 00000000000..5b63109ef92 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/Pet.md @@ -0,0 +1,24 @@ + +# Pet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **String** | | +**photoUrls** | **List<String>** | | +**tags** | [**List<Tag>**](Tag.md) | | [optional] +**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] + + + +## Enum: StatusEnum +Name | Value +---- | ----- +AVAILABLE | "available" +PENDING | "pending" +SOLD | "sold" + + + diff --git a/samples/client/petstore/java/retrofit2rx/docs/PetApi.md b/samples/client/petstore/java/retrofit2rx/docs/PetApi.md new file mode 100644 index 00000000000..40ea199b153 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/PetApi.md @@ -0,0 +1,452 @@ +# PetApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetApi.md#addPet) | **POST** pet | Add a new pet to the store +[**deletePet**](PetApi.md#deletePet) | **DELETE** pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** pet/findByTags | Finds Pets by tags +[**getPetById**](PetApi.md#getPetById) | **GET** pet/{petId} | Find pet by ID +[**updatePet**](PetApi.md#updatePet) | **PUT** pet | Update an existing pet +[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetApi.md#uploadFile) | **POST** pet/{petId}/uploadImage | uploads an image + + + +# **addPet** +> Void addPet(body) + +Add a new pet to the store + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Pet body = new Pet(); // Pet | Pet object that needs to be added to the store +try { + Void result = apiInstance.addPet(body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +[**Void**](.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: application/xml, application/json + + +# **deletePet** +> Void deletePet(petId, apiKey) + +Deletes a pet + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 789L; // Long | Pet id to delete +String apiKey = "apiKey_example"; // String | +try { + Void result = apiInstance.deletePet(petId, apiKey); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| Pet id to delete | + **apiKey** | **String**| | [optional] + +### Return type + +[**Void**](.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **findPetsByStatus** +> List<Pet> findPetsByStatus(status) + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +List status = Arrays.asList("status_example"); // List | Status values that need to be considered for filter +try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | + +### Return type + +[**List<Pet>**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **findPetsByTags** +> List<Pet> findPetsByTags(tags) + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +List tags = Arrays.asList("tags_example"); // List | Tags to filter by +try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**List<String>**](String.md)| Tags to filter by | + +### Return type + +[**List<Pet>**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **getPetById** +> Pet getPetById(petId) + +Find pet by ID + +Returns a single pet + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api_key +ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); +api_key.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//api_key.setApiKeyPrefix("Token"); + +PetApi apiInstance = new PetApi(); +Long petId = 789L; // Long | ID of pet to return +try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **updatePet** +> Void updatePet(body) + +Update an existing pet + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Pet body = new Pet(); // Pet | Pet object that needs to be added to the store +try { + Void result = apiInstance.updatePet(body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +[**Void**](.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: application/xml, application/json + + +# **updatePetWithForm** +> Void updatePetWithForm(petId, name, status) + +Updates a pet in the store with form data + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 789L; // Long | ID of pet that needs to be updated +String name = "name_example"; // String | Updated name of the pet +String status = "status_example"; // String | Updated status of the pet +try { + Void result = apiInstance.updatePetWithForm(petId, name, status); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet that needs to be updated | + **name** | **String**| Updated name of the pet | [optional] + **status** | **String**| Updated status of the pet | [optional] + +### Return type + +[**Void**](.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/xml, application/json + + +# **uploadFile** +> ModelApiResponse uploadFile(petId, additionalMetadata, file) + +uploads an image + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 789L; // Long | ID of pet to update +String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server +File file = new File("/path/to/file.txt"); // File | file to upload +try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] + **file** | **File**| file to upload | [optional] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/retrofit2rx/docs/ReadOnlyFirst.md b/samples/client/petstore/java/retrofit2rx/docs/ReadOnlyFirst.md new file mode 100644 index 00000000000..426b7cde95a --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/ReadOnlyFirst.md @@ -0,0 +1,11 @@ + +# ReadOnlyFirst + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] +**baz** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2rx/docs/SpecialModelName.md b/samples/client/petstore/java/retrofit2rx/docs/SpecialModelName.md new file mode 100644 index 00000000000..c2c6117c552 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/SpecialModelName.md @@ -0,0 +1,10 @@ + +# SpecialModelName + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**specialPropertyName** | **Long** | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2rx/docs/StoreApi.md b/samples/client/petstore/java/retrofit2rx/docs/StoreApi.md new file mode 100644 index 00000000000..30e3c11d440 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/StoreApi.md @@ -0,0 +1,198 @@ +# StoreApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** store/order/{orderId} | Delete purchase order by ID +[**getInventory**](StoreApi.md#getInventory) | **GET** store/inventory | Returns pet inventories by status +[**getOrderById**](StoreApi.md#getOrderById) | **GET** store/order/{orderId} | Find purchase order by ID +[**placeOrder**](StoreApi.md#placeOrder) | **POST** store/order | Place an order for a pet + + + +# **deleteOrder** +> Void deleteOrder(orderId) + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.StoreApi; + + +StoreApi apiInstance = new StoreApi(); +String orderId = "orderId_example"; // String | ID of the order that needs to be deleted +try { + Void result = apiInstance.deleteOrder(orderId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String**| ID of the order that needs to be deleted | + +### Return type + +[**Void**](.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **getInventory** +> Map<String, Integer> getInventory() + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.StoreApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api_key +ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); +api_key.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//api_key.setApiKeyPrefix("Token"); + +StoreApi apiInstance = new StoreApi(); +try { + Map result = apiInstance.getInventory(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Map<String, Integer>**](Map.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getOrderById** +> Order getOrderById(orderId) + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.StoreApi; + + +StoreApi apiInstance = new StoreApi(); +Long orderId = 789L; // Long | ID of pet that needs to be fetched +try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **Long**| ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **placeOrder** +> Order placeOrder(body) + +Place an order for a pet + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.StoreApi; + + +StoreApi apiInstance = new StoreApi(); +Order body = new Order(); // Order | order placed for purchasing the pet +try { + Order result = apiInstance.placeOrder(body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md)| order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + diff --git a/samples/client/petstore/java/retrofit2rx/docs/Tag.md b/samples/client/petstore/java/retrofit2rx/docs/Tag.md new file mode 100644 index 00000000000..de6814b55d5 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/Tag.md @@ -0,0 +1,11 @@ + +# Tag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | | [optional] +**name** | **String** | | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2rx/docs/User.md b/samples/client/petstore/java/retrofit2rx/docs/User.md new file mode 100644 index 00000000000..8b6753dd284 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/User.md @@ -0,0 +1,17 @@ + +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | | [optional] +**username** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] +**email** | **String** | | [optional] +**password** | **String** | | [optional] +**phone** | **String** | | [optional] +**userStatus** | **Integer** | User Status | [optional] + + + diff --git a/samples/client/petstore/java/retrofit2rx/docs/UserApi.md b/samples/client/petstore/java/retrofit2rx/docs/UserApi.md new file mode 100644 index 00000000000..b0a0149a50a --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/docs/UserApi.md @@ -0,0 +1,376 @@ +# UserApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserApi.md#createUser) | **POST** user | Create user +[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** user/createWithList | Creates list of users with given input array +[**deleteUser**](UserApi.md#deleteUser) | **DELETE** user/{username} | Delete user +[**getUserByName**](UserApi.md#getUserByName) | **GET** user/{username} | Get user by user name +[**loginUser**](UserApi.md#loginUser) | **GET** user/login | Logs user into the system +[**logoutUser**](UserApi.md#logoutUser) | **GET** user/logout | Logs out current logged in user session +[**updateUser**](UserApi.md#updateUser) | **PUT** user/{username} | Updated user + + + +# **createUser** +> Void createUser(body) + +Create user + +This can only be done by the logged in user. + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.UserApi; + + +UserApi apiInstance = new UserApi(); +User body = new User(); // User | Created user object +try { + Void result = apiInstance.createUser(body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md)| Created user object | + +### Return type + +[**Void**](.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **createUsersWithArrayInput** +> Void createUsersWithArrayInput(body) + +Creates list of users with given input array + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.UserApi; + + +UserApi apiInstance = new UserApi(); +List body = Arrays.asList(new User()); // List | List of user object +try { + Void result = apiInstance.createUsersWithArrayInput(body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**List<User>**](User.md)| List of user object | + +### Return type + +[**Void**](.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **createUsersWithListInput** +> Void createUsersWithListInput(body) + +Creates list of users with given input array + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.UserApi; + + +UserApi apiInstance = new UserApi(); +List body = Arrays.asList(new User()); // List | List of user object +try { + Void result = apiInstance.createUsersWithListInput(body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**List<User>**](User.md)| List of user object | + +### Return type + +[**Void**](.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **deleteUser** +> Void deleteUser(username) + +Delete user + +This can only be done by the logged in user. + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.UserApi; + + +UserApi apiInstance = new UserApi(); +String username = "username_example"; // String | The name that needs to be deleted +try { + Void result = apiInstance.deleteUser(username); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be deleted | + +### Return type + +[**Void**](.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **getUserByName** +> User getUserByName(username) + +Get user by user name + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.UserApi; + + +UserApi apiInstance = new UserApi(); +String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. +try { + User result = apiInstance.getUserByName(username); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **loginUser** +> String loginUser(username, password) + +Logs user into the system + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.UserApi; + + +UserApi apiInstance = new UserApi(); +String username = "username_example"; // String | The user name for login +String password = "password_example"; // String | The password for login in clear text +try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The user name for login | + **password** | **String**| The password for login in clear text | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **logoutUser** +> Void logoutUser() + +Logs out current logged in user session + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.UserApi; + + +UserApi apiInstance = new UserApi(); +try { + Void result = apiInstance.logoutUser(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Void**](.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + + +# **updateUser** +> Void updateUser(username, body) + +Updated user + +This can only be done by the logged in user. + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.UserApi; + + +UserApi apiInstance = new UserApi(); +String username = "username_example"; // String | name that need to be deleted +User body = new User(); // User | Updated user object +try { + Void result = apiInstance.updateUser(username, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| name that need to be deleted | + **body** | [**User**](User.md)| Updated user object | + +### Return type + +[**Void**](.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + From ce426ee86873e5ec40c36f9d72c3603963638a09 Mon Sep 17 00:00:00 2001 From: wing328 Date: Thu, 26 May 2016 00:00:23 +0800 Subject: [PATCH 23/60] add SCOOP software --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5e9eaa84fe4..7099b0e238d 100644 --- a/README.md +++ b/README.md @@ -836,6 +836,7 @@ Here are some companies/projects using Swagger Codegen in production. To add you - [REstore](https://www.restore.eu) - [Revault Sàrl](http://revault.ch) - [Royal Bank of Canada (RBC)](http://www.rbc.com/canada.html) +- [SCOOP Software GmbH](http://www.scoop-software.de) - [SmartRecruiters](https://www.smartrecruiters.com/) - [StyleRecipe](http://stylerecipe.co.jp) - [Svenska Spel AB](https://www.svenskaspel.se/) From c68168fa27805dd824a017c637fa2bc6e608859b Mon Sep 17 00:00:00 2001 From: Mateusz Mackowiak Date: Wed, 25 May 2016 18:13:27 +0200 Subject: [PATCH 24/60] - Remove optional license property - License in all header files --- .../codegen/languages/ObjcClientCodegen.java | 9 +----- .../resources/objc/ApiClient-header.mustache | 7 ++--- .../objc/Configuration-header.mustache | 7 +---- .../JSONRequestSerializer-header.mustache | 2 ++ .../JSONResponseSerializer-header.mustache | 2 ++ .../objc/JSONValueTransformer+ISO8601.h | 3 ++ .../resources/objc/Logger-header.mustache | 6 +--- .../resources/objc/Object-header.mustache | 3 ++ .../objc/QueryParamCollection-header.mustache | 2 ++ .../objc/ResponseDeserializer-header.mustache | 6 +--- .../resources/objc/Sanitizer-header.mustache | 6 +--- .../main/resources/objc/api-header.mustache | 12 +++----- .../main/resources/objc/api-protocol.mustache | 6 +--- .../main/resources/objc/licenceInfo.mustache | 23 +++++++++++++++ .../main/resources/objc/model-header.mustache | 6 +--- .../petstore/objc/.swagger-codegen-ignore | 23 +++++++++++++++ samples/client/petstore/objc/README.md | 14 ++++----- .../objc/SwaggerClient/Api/SWGPetApi.h | 26 ++++++++++++++--- .../objc/SwaggerClient/Api/SWGPetApi.m | 2 +- .../objc/SwaggerClient/Api/SWGStoreApi.h | 26 ++++++++++++++--- .../objc/SwaggerClient/Api/SWGUserApi.h | 26 ++++++++++++++--- .../Core/JSONValueTransformer+ISO8601.h | 3 ++ .../petstore/objc/SwaggerClient/Core/SWGApi.h | 26 ++++++++++++++--- .../objc/SwaggerClient/Core/SWGApiClient.h | 27 ++++++++++++++--- .../SwaggerClient/Core/SWGConfiguration.h | 29 +++++++++++++++---- .../SwaggerClient/Core/SWGConfiguration.m | 14 ++++----- .../Core/SWGJSONRequestSerializer.h | 24 +++++++++++++++ .../Core/SWGJSONResponseSerializer.h | 24 +++++++++++++++ .../objc/SwaggerClient/Core/SWGLogger.h | 26 ++++++++++++++--- .../objc/SwaggerClient/Core/SWGObject.h | 25 ++++++++++++++++ .../Core/SWGQueryParamCollection.h | 24 +++++++++++++++ .../Core/SWGResponseDeserializer.h | 26 ++++++++++++++--- .../objc/SwaggerClient/Core/SWGSanitizer.h | 26 ++++++++++++++--- .../objc/SwaggerClient/Model/SWGCategory.h | 26 ++++++++++++++--- .../objc/SwaggerClient/Model/SWGCategory.m | 2 +- .../objc/SwaggerClient/Model/SWGOrder.h | 26 ++++++++++++++--- .../objc/SwaggerClient/Model/SWGOrder.m | 2 +- .../objc/SwaggerClient/Model/SWGPet.h | 26 ++++++++++++++--- .../objc/SwaggerClient/Model/SWGPet.m | 2 +- .../objc/SwaggerClient/Model/SWGTag.h | 26 ++++++++++++++--- .../objc/SwaggerClient/Model/SWGTag.m | 2 +- .../objc/SwaggerClient/Model/SWGUser.h | 26 ++++++++++++++--- .../objc/SwaggerClient/Model/SWGUser.m | 2 +- .../client/petstore/objc/docs/SWGPetApi.md | 8 ++--- 44 files changed, 505 insertions(+), 134 deletions(-) create mode 100644 modules/swagger-codegen/src/main/resources/objc/licenceInfo.mustache create mode 100644 samples/client/petstore/objc/.swagger-codegen-ignore diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java index 474f800e2b4..57f14bf2bce 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java @@ -166,7 +166,6 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig { cliOptions.add(new CliOption(AUTHOR_EMAIL, "Email to use in the podspec file.").defaultValue("apiteam@swagger.io")); cliOptions.add(new CliOption(GIT_REPO_URL, "URL for the git repo where this podspec should point to.") .defaultValue("https://github.com/swagger-api/swagger-codegen")); - cliOptions.add(new CliOption(LICENSE, "License to use in the podspec file.").defaultValue("MIT")); } @Override @@ -212,10 +211,6 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig { setGitRepoURL((String) additionalProperties.get(GIT_REPO_URL)); } - if (additionalProperties.containsKey(LICENSE)) { - setLicense((String) additionalProperties.get(LICENSE)); - } - additionalProperties.put(POD_NAME, podName); additionalProperties.put(CodegenConstants.POD_VERSION, podVersion); additionalProperties.put(CLASS_PREFIX, classPrefix); @@ -256,9 +251,7 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig { supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh")); supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")); - if (license == null || DEFAULT_LICENSE.equals(license)) { - supportingFiles.add(new SupportingFile("LICENSE.mustache", "", "LICENSE")); - } + supportingFiles.add(new SupportingFile("LICENSE.mustache", "", "LICENSE")); } @Override diff --git a/modules/swagger-codegen/src/main/resources/objc/ApiClient-header.mustache b/modules/swagger-codegen/src/main/resources/objc/ApiClient-header.mustache index db7df9b3407..125d42e3491 100644 --- a/modules/swagger-codegen/src/main/resources/objc/ApiClient-header.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/ApiClient-header.mustache @@ -8,11 +8,8 @@ #import "{{classPrefix}}ResponseDeserializer.h" #import "{{classPrefix}}Sanitizer.h" #import "{{classPrefix}}Logger.h" -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ + +{{>licenceInfo}} {{#models}}{{#model}}#import "{{classname}}.h" {{/model}}{{/models}} diff --git a/modules/swagger-codegen/src/main/resources/objc/Configuration-header.mustache b/modules/swagger-codegen/src/main/resources/objc/Configuration-header.mustache index 12807ca5411..e727942a4f2 100644 --- a/modules/swagger-codegen/src/main/resources/objc/Configuration-header.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/Configuration-header.mustache @@ -2,12 +2,7 @@ #import "{{classPrefix}}ApiClient.h" #import "{{classPrefix}}Logger.h" -/** The `{{classPrefix}}Configuration` class manages the configurations for the sdk. - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ +{{>licenceInfo}} @class {{classPrefix}}ApiClient; diff --git a/modules/swagger-codegen/src/main/resources/objc/JSONRequestSerializer-header.mustache b/modules/swagger-codegen/src/main/resources/objc/JSONRequestSerializer-header.mustache index a0732b93706..1259c5d1530 100644 --- a/modules/swagger-codegen/src/main/resources/objc/JSONRequestSerializer-header.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/JSONRequestSerializer-header.mustache @@ -1,5 +1,7 @@ #import #import +{{>licenceInfo}} + @interface {{classPrefix}}JSONRequestSerializer : AFJSONRequestSerializer @end diff --git a/modules/swagger-codegen/src/main/resources/objc/JSONResponseSerializer-header.mustache b/modules/swagger-codegen/src/main/resources/objc/JSONResponseSerializer-header.mustache index 7a5f152e271..360e4f9cdc5 100644 --- a/modules/swagger-codegen/src/main/resources/objc/JSONResponseSerializer-header.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/JSONResponseSerializer-header.mustache @@ -1,6 +1,8 @@ #import #import +{{>licenceInfo}} + @interface {{classPrefix}}JSONResponseSerializer : AFJSONResponseSerializer @end diff --git a/modules/swagger-codegen/src/main/resources/objc/JSONValueTransformer+ISO8601.h b/modules/swagger-codegen/src/main/resources/objc/JSONValueTransformer+ISO8601.h index 832f485f4f0..2a8d5b0c9e7 100644 --- a/modules/swagger-codegen/src/main/resources/objc/JSONValueTransformer+ISO8601.h +++ b/modules/swagger-codegen/src/main/resources/objc/JSONValueTransformer+ISO8601.h @@ -2,5 +2,8 @@ #import #import +{{>licenceInfo}} + @interface JSONValueTransformer (ISO8601) + @end diff --git a/modules/swagger-codegen/src/main/resources/objc/Logger-header.mustache b/modules/swagger-codegen/src/main/resources/objc/Logger-header.mustache index 2070f95ae9f..37afea41a09 100644 --- a/modules/swagger-codegen/src/main/resources/objc/Logger-header.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/Logger-header.mustache @@ -1,10 +1,6 @@ #import -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ +{{>licenceInfo}} #ifndef {{classPrefix}}DebugLogResponse #define {{classPrefix}}DebugLogResponse(response, responseObject,request, error) [[{{classPrefix}}Logger sharedLogger] logResponse:response responseObject:responseObject request:request error:error]; diff --git a/modules/swagger-codegen/src/main/resources/objc/Object-header.mustache b/modules/swagger-codegen/src/main/resources/objc/Object-header.mustache index d96e379908f..89da6a4d8b6 100644 --- a/modules/swagger-codegen/src/main/resources/objc/Object-header.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/Object-header.mustache @@ -1,5 +1,8 @@ #import #import +{{>licenceInfo}} + @interface {{classPrefix}}Object : JSONModel + @end diff --git a/modules/swagger-codegen/src/main/resources/objc/QueryParamCollection-header.mustache b/modules/swagger-codegen/src/main/resources/objc/QueryParamCollection-header.mustache index 0389cce98be..9729c182bd8 100644 --- a/modules/swagger-codegen/src/main/resources/objc/QueryParamCollection-header.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/QueryParamCollection-header.mustache @@ -1,5 +1,7 @@ #import +{{>licenceInfo}} + @interface {{classPrefix}}QueryParamCollection : NSObject @property(nonatomic, readonly) NSArray* values; diff --git a/modules/swagger-codegen/src/main/resources/objc/ResponseDeserializer-header.mustache b/modules/swagger-codegen/src/main/resources/objc/ResponseDeserializer-header.mustache index 2dd038c13f0..90aa174d7c4 100644 --- a/modules/swagger-codegen/src/main/resources/objc/ResponseDeserializer-header.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/ResponseDeserializer-header.mustache @@ -1,10 +1,6 @@ #import -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ +{{>licenceInfo}} /** * A key for deserialization ErrorDomain diff --git a/modules/swagger-codegen/src/main/resources/objc/Sanitizer-header.mustache b/modules/swagger-codegen/src/main/resources/objc/Sanitizer-header.mustache index cd946661615..f975018a020 100644 --- a/modules/swagger-codegen/src/main/resources/objc/Sanitizer-header.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/Sanitizer-header.mustache @@ -1,10 +1,6 @@ #import -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ +{{>licenceInfo}} extern NSString * {{classPrefix}}PercentEscapedStringFromString(NSString *string); diff --git a/modules/swagger-codegen/src/main/resources/objc/api-header.mustache b/modules/swagger-codegen/src/main/resources/objc/api-header.mustache index 67bb9045ec8..abe4cf64eb0 100644 --- a/modules/swagger-codegen/src/main/resources/objc/api-header.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/api-header.mustache @@ -2,14 +2,9 @@ {{#imports}}#import "{{import}}.h" {{/imports}} #import "{{classPrefix}}Api.h" -{{newline}} -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ -{{#operations}} +{{>licenceInfo}} + @interface {{classname}}: NSObject <{{classPrefix}}Api> @@ -18,6 +13,7 @@ extern NSInteger k{{classname}}MissingParamErrorCode; +(instancetype) sharedAPI; +{{#operations}} {{#operation}} /// {{{summary}}} /// {{#notes}}{{{notes}}}{{/notes}} @@ -33,6 +29,6 @@ extern NSInteger k{{classname}}MissingParamErrorCode; {{newline}} {{/operation}} - {{/operations}} + @end diff --git a/modules/swagger-codegen/src/main/resources/objc/api-protocol.mustache b/modules/swagger-codegen/src/main/resources/objc/api-protocol.mustache index 142b75dabaa..da87a712fa2 100644 --- a/modules/swagger-codegen/src/main/resources/objc/api-protocol.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/api-protocol.mustache @@ -2,11 +2,7 @@ #import "{{classPrefix}}Object.h" #import "{{classPrefix}}ApiClient.h" -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ +{{>licenceInfo}} @protocol {{classPrefix}}Api diff --git a/modules/swagger-codegen/src/main/resources/objc/licenceInfo.mustache b/modules/swagger-codegen/src/main/resources/objc/licenceInfo.mustache new file mode 100644 index 00000000000..2f0f1940e89 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/objc/licenceInfo.mustache @@ -0,0 +1,23 @@ +/** +* {{{appName}}} +* {{{appDescription}}} +* +* {{#version}}OpenAPI spec version: {{{version}}}{{/version}} +* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} +* +* NOTE: This class is auto generated by the swagger code generator program. +* https://github.com/swagger-api/swagger-codegen.git +* Do not edit the class manually. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/objc/model-header.mustache b/modules/swagger-codegen/src/main/resources/objc/model-header.mustache index f9a33042491..04570e71a2f 100644 --- a/modules/swagger-codegen/src/main/resources/objc/model-header.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/model-header.mustache @@ -1,11 +1,7 @@ #import #import "{{classPrefix}}Object.h" -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ +{{>licenceInfo}} {{#imports}}#import "{{import}}.h" {{/imports}} diff --git a/samples/client/petstore/objc/.swagger-codegen-ignore b/samples/client/petstore/objc/.swagger-codegen-ignore new file mode 100644 index 00000000000..19d3377182e --- /dev/null +++ b/samples/client/petstore/objc/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# Thsi matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/objc/README.md b/samples/client/petstore/objc/README.md index 32999a5e80b..c30a7813e83 100644 --- a/samples/client/petstore/objc/README.md +++ b/samples/client/petstore/objc/README.md @@ -6,7 +6,7 @@ This ObjC package is automatically generated by the [Swagger Codegen](https://gi - API version: 1.0.0 - Package version: -- Build date: 2016-05-18T23:48:57.670+08:00 +- Build date: 2016-05-25T18:06:49.729+02:00 - Build package: class io.swagger.codegen.languages.ObjcClientCodegen ## Requirements @@ -124,12 +124,6 @@ Class | Method | HTTP request | Description ## Documentation For Authorization -## api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - ## petstore_auth - **Type**: OAuth @@ -139,6 +133,12 @@ Class | Method | HTTP request | Description - **write:pets**: modify pets in your account - **read:pets**: read your pets +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + ## Author diff --git a/samples/client/petstore/objc/SwaggerClient/Api/SWGPetApi.h b/samples/client/petstore/objc/SwaggerClient/Api/SWGPetApi.h index be068cdb77e..97f914a627e 100644 --- a/samples/client/petstore/objc/SwaggerClient/Api/SWGPetApi.h +++ b/samples/client/petstore/objc/SwaggerClient/Api/SWGPetApi.h @@ -3,10 +3,28 @@ #import "SWGApi.h" /** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ +* Swagger Petstore +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* OpenAPI spec version: 1.0.0 +* Contact: apiteam@wordnik.com +* +* NOTE: This class is auto generated by the swagger code generator program. +* https://github.com/swagger-api/swagger-codegen.git +* Do not edit the class manually. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ @interface SWGPetApi: NSObject diff --git a/samples/client/petstore/objc/SwaggerClient/Api/SWGPetApi.m b/samples/client/petstore/objc/SwaggerClient/Api/SWGPetApi.m index e35421fc520..409f5b86655 100644 --- a/samples/client/petstore/objc/SwaggerClient/Api/SWGPetApi.m +++ b/samples/client/petstore/objc/SwaggerClient/Api/SWGPetApi.m @@ -376,7 +376,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; // Authentication setting - NSArray *authSettings = @[@"api_key", @"petstore_auth"]; + NSArray *authSettings = @[@"petstore_auth", @"api_key"]; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; diff --git a/samples/client/petstore/objc/SwaggerClient/Api/SWGStoreApi.h b/samples/client/petstore/objc/SwaggerClient/Api/SWGStoreApi.h index b39dcce9e6b..bbd588dba25 100644 --- a/samples/client/petstore/objc/SwaggerClient/Api/SWGStoreApi.h +++ b/samples/client/petstore/objc/SwaggerClient/Api/SWGStoreApi.h @@ -3,10 +3,28 @@ #import "SWGApi.h" /** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ +* Swagger Petstore +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* OpenAPI spec version: 1.0.0 +* Contact: apiteam@wordnik.com +* +* NOTE: This class is auto generated by the swagger code generator program. +* https://github.com/swagger-api/swagger-codegen.git +* Do not edit the class manually. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ @interface SWGStoreApi: NSObject diff --git a/samples/client/petstore/objc/SwaggerClient/Api/SWGUserApi.h b/samples/client/petstore/objc/SwaggerClient/Api/SWGUserApi.h index c3b375d7133..67f8ec9cbb2 100644 --- a/samples/client/petstore/objc/SwaggerClient/Api/SWGUserApi.h +++ b/samples/client/petstore/objc/SwaggerClient/Api/SWGUserApi.h @@ -3,10 +3,28 @@ #import "SWGApi.h" /** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ +* Swagger Petstore +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* OpenAPI spec version: 1.0.0 +* Contact: apiteam@wordnik.com +* +* NOTE: This class is auto generated by the swagger code generator program. +* https://github.com/swagger-api/swagger-codegen.git +* Do not edit the class manually. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ @interface SWGUserApi: NSObject diff --git a/samples/client/petstore/objc/SwaggerClient/Core/JSONValueTransformer+ISO8601.h b/samples/client/petstore/objc/SwaggerClient/Core/JSONValueTransformer+ISO8601.h index 832f485f4f0..2a8d5b0c9e7 100644 --- a/samples/client/petstore/objc/SwaggerClient/Core/JSONValueTransformer+ISO8601.h +++ b/samples/client/petstore/objc/SwaggerClient/Core/JSONValueTransformer+ISO8601.h @@ -2,5 +2,8 @@ #import #import +{{>licenceInfo}} + @interface JSONValueTransformer (ISO8601) + @end diff --git a/samples/client/petstore/objc/SwaggerClient/Core/SWGApi.h b/samples/client/petstore/objc/SwaggerClient/Core/SWGApi.h index 874f1f48a5d..93b564be3d1 100644 --- a/samples/client/petstore/objc/SwaggerClient/Core/SWGApi.h +++ b/samples/client/petstore/objc/SwaggerClient/Core/SWGApi.h @@ -3,10 +3,28 @@ #import "SWGApiClient.h" /** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ +* Swagger Petstore +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* OpenAPI spec version: 1.0.0 +* Contact: apiteam@wordnik.com +* +* NOTE: This class is auto generated by the swagger code generator program. +* https://github.com/swagger-api/swagger-codegen.git +* Do not edit the class manually. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ @protocol SWGApi diff --git a/samples/client/petstore/objc/SwaggerClient/Core/SWGApiClient.h b/samples/client/petstore/objc/SwaggerClient/Core/SWGApiClient.h index bd35b341eff..a926598ce5f 100644 --- a/samples/client/petstore/objc/SwaggerClient/Core/SWGApiClient.h +++ b/samples/client/petstore/objc/SwaggerClient/Core/SWGApiClient.h @@ -8,11 +8,30 @@ #import "SWGResponseDeserializer.h" #import "SWGSanitizer.h" #import "SWGLogger.h" + /** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ +* Swagger Petstore +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* OpenAPI spec version: 1.0.0 +* Contact: apiteam@wordnik.com +* +* NOTE: This class is auto generated by the swagger code generator program. +* https://github.com/swagger-api/swagger-codegen.git +* Do not edit the class manually. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ #import "SWGCategory.h" #import "SWGOrder.h" diff --git a/samples/client/petstore/objc/SwaggerClient/Core/SWGConfiguration.h b/samples/client/petstore/objc/SwaggerClient/Core/SWGConfiguration.h index 0738a528171..b6c37405ca2 100644 --- a/samples/client/petstore/objc/SwaggerClient/Core/SWGConfiguration.h +++ b/samples/client/petstore/objc/SwaggerClient/Core/SWGConfiguration.h @@ -2,12 +2,29 @@ #import "SWGApiClient.h" #import "SWGLogger.h" -/** The `SWGConfiguration` class manages the configurations for the sdk. - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ +/** +* Swagger Petstore +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* OpenAPI spec version: 1.0.0 +* Contact: apiteam@wordnik.com +* +* NOTE: This class is auto generated by the swagger code generator program. +* https://github.com/swagger-api/swagger-codegen.git +* Do not edit the class manually. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ @class SWGApiClient; diff --git a/samples/client/petstore/objc/SwaggerClient/Core/SWGConfiguration.m b/samples/client/petstore/objc/SwaggerClient/Core/SWGConfiguration.m index 630c751ce74..cd8d6e7aeef 100644 --- a/samples/client/petstore/objc/SwaggerClient/Core/SWGConfiguration.m +++ b/samples/client/petstore/objc/SwaggerClient/Core/SWGConfiguration.m @@ -109,13 +109,6 @@ - (NSDictionary *) authSettings { return @{ - @"api_key": - @{ - @"type": @"api_key", - @"in": @"header", - @"key": @"api_key", - @"value": [self getApiKeyWithPrefix:@"api_key"] - }, @"petstore_auth": @{ @"type": @"oauth", @@ -123,6 +116,13 @@ @"key": @"Authorization", @"value": [self getAccessToken] }, + @"api_key": + @{ + @"type": @"api_key", + @"in": @"header", + @"key": @"api_key", + @"value": [self getApiKeyWithPrefix:@"api_key"] + }, }; } diff --git a/samples/client/petstore/objc/SwaggerClient/Core/SWGJSONRequestSerializer.h b/samples/client/petstore/objc/SwaggerClient/Core/SWGJSONRequestSerializer.h index 49dd7fca3e2..d9c4d4ad060 100644 --- a/samples/client/petstore/objc/SwaggerClient/Core/SWGJSONRequestSerializer.h +++ b/samples/client/petstore/objc/SwaggerClient/Core/SWGJSONRequestSerializer.h @@ -1,5 +1,29 @@ #import #import +/** +* Swagger Petstore +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* OpenAPI spec version: 1.0.0 +* Contact: apiteam@wordnik.com +* +* NOTE: This class is auto generated by the swagger code generator program. +* https://github.com/swagger-api/swagger-codegen.git +* Do not edit the class manually. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + @interface SWGJSONRequestSerializer : AFJSONRequestSerializer @end diff --git a/samples/client/petstore/objc/SwaggerClient/Core/SWGJSONResponseSerializer.h b/samples/client/petstore/objc/SwaggerClient/Core/SWGJSONResponseSerializer.h index 16cda122217..20535a6b92e 100644 --- a/samples/client/petstore/objc/SwaggerClient/Core/SWGJSONResponseSerializer.h +++ b/samples/client/petstore/objc/SwaggerClient/Core/SWGJSONResponseSerializer.h @@ -1,6 +1,30 @@ #import #import +/** +* Swagger Petstore +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* OpenAPI spec version: 1.0.0 +* Contact: apiteam@wordnik.com +* +* NOTE: This class is auto generated by the swagger code generator program. +* https://github.com/swagger-api/swagger-codegen.git +* Do not edit the class manually. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + @interface SWGJSONResponseSerializer : AFJSONResponseSerializer @end diff --git a/samples/client/petstore/objc/SwaggerClient/Core/SWGLogger.h b/samples/client/petstore/objc/SwaggerClient/Core/SWGLogger.h index 19c1e509dfa..cb4279f182b 100644 --- a/samples/client/petstore/objc/SwaggerClient/Core/SWGLogger.h +++ b/samples/client/petstore/objc/SwaggerClient/Core/SWGLogger.h @@ -1,10 +1,28 @@ #import /** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ +* Swagger Petstore +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* OpenAPI spec version: 1.0.0 +* Contact: apiteam@wordnik.com +* +* NOTE: This class is auto generated by the swagger code generator program. +* https://github.com/swagger-api/swagger-codegen.git +* Do not edit the class manually. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ #ifndef SWGDebugLogResponse #define SWGDebugLogResponse(response, responseObject,request, error) [[SWGLogger sharedLogger] logResponse:response responseObject:responseObject request:request error:error]; diff --git a/samples/client/petstore/objc/SwaggerClient/Core/SWGObject.h b/samples/client/petstore/objc/SwaggerClient/Core/SWGObject.h index fb27b4a4ebb..be57583b8f6 100644 --- a/samples/client/petstore/objc/SwaggerClient/Core/SWGObject.h +++ b/samples/client/petstore/objc/SwaggerClient/Core/SWGObject.h @@ -1,5 +1,30 @@ #import #import +/** +* Swagger Petstore +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* OpenAPI spec version: 1.0.0 +* Contact: apiteam@wordnik.com +* +* NOTE: This class is auto generated by the swagger code generator program. +* https://github.com/swagger-api/swagger-codegen.git +* Do not edit the class manually. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + @interface SWGObject : JSONModel + @end diff --git a/samples/client/petstore/objc/SwaggerClient/Core/SWGQueryParamCollection.h b/samples/client/petstore/objc/SwaggerClient/Core/SWGQueryParamCollection.h index 3b771881b0f..69a5ab3c133 100644 --- a/samples/client/petstore/objc/SwaggerClient/Core/SWGQueryParamCollection.h +++ b/samples/client/petstore/objc/SwaggerClient/Core/SWGQueryParamCollection.h @@ -1,5 +1,29 @@ #import +/** +* Swagger Petstore +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* OpenAPI spec version: 1.0.0 +* Contact: apiteam@wordnik.com +* +* NOTE: This class is auto generated by the swagger code generator program. +* https://github.com/swagger-api/swagger-codegen.git +* Do not edit the class manually. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + @interface SWGQueryParamCollection : NSObject @property(nonatomic, readonly) NSArray* values; diff --git a/samples/client/petstore/objc/SwaggerClient/Core/SWGResponseDeserializer.h b/samples/client/petstore/objc/SwaggerClient/Core/SWGResponseDeserializer.h index b20ead44f83..c0d7b716a01 100644 --- a/samples/client/petstore/objc/SwaggerClient/Core/SWGResponseDeserializer.h +++ b/samples/client/petstore/objc/SwaggerClient/Core/SWGResponseDeserializer.h @@ -1,10 +1,28 @@ #import /** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ +* Swagger Petstore +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* OpenAPI spec version: 1.0.0 +* Contact: apiteam@wordnik.com +* +* NOTE: This class is auto generated by the swagger code generator program. +* https://github.com/swagger-api/swagger-codegen.git +* Do not edit the class manually. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ /** * A key for deserialization ErrorDomain diff --git a/samples/client/petstore/objc/SwaggerClient/Core/SWGSanitizer.h b/samples/client/petstore/objc/SwaggerClient/Core/SWGSanitizer.h index aa2c6f85163..59699c2bdd5 100644 --- a/samples/client/petstore/objc/SwaggerClient/Core/SWGSanitizer.h +++ b/samples/client/petstore/objc/SwaggerClient/Core/SWGSanitizer.h @@ -1,10 +1,28 @@ #import /** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ +* Swagger Petstore +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* OpenAPI spec version: 1.0.0 +* Contact: apiteam@wordnik.com +* +* NOTE: This class is auto generated by the swagger code generator program. +* https://github.com/swagger-api/swagger-codegen.git +* Do not edit the class manually. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ extern NSString * SWGPercentEscapedStringFromString(NSString *string); diff --git a/samples/client/petstore/objc/SwaggerClient/Model/SWGCategory.h b/samples/client/petstore/objc/SwaggerClient/Model/SWGCategory.h index 983fd610123..1565724cf8c 100644 --- a/samples/client/petstore/objc/SwaggerClient/Model/SWGCategory.h +++ b/samples/client/petstore/objc/SwaggerClient/Model/SWGCategory.h @@ -2,10 +2,28 @@ #import "SWGObject.h" /** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ +* Swagger Petstore +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* OpenAPI spec version: 1.0.0 +* Contact: apiteam@wordnik.com +* +* NOTE: This class is auto generated by the swagger code generator program. +* https://github.com/swagger-api/swagger-codegen.git +* Do not edit the class manually. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ diff --git a/samples/client/petstore/objc/SwaggerClient/Model/SWGCategory.m b/samples/client/petstore/objc/SwaggerClient/Model/SWGCategory.m index 29e3bc16226..85297c56d78 100644 --- a/samples/client/petstore/objc/SwaggerClient/Model/SWGCategory.m +++ b/samples/client/petstore/objc/SwaggerClient/Model/SWGCategory.m @@ -5,7 +5,7 @@ - (instancetype)init { self = [super init]; if (self) { - // initalise property's default value, if any + // initialize property's default value, if any } return self; diff --git a/samples/client/petstore/objc/SwaggerClient/Model/SWGOrder.h b/samples/client/petstore/objc/SwaggerClient/Model/SWGOrder.h index 48a7cf0d6c1..5c29f61c0e6 100644 --- a/samples/client/petstore/objc/SwaggerClient/Model/SWGOrder.h +++ b/samples/client/petstore/objc/SwaggerClient/Model/SWGOrder.h @@ -2,10 +2,28 @@ #import "SWGObject.h" /** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ +* Swagger Petstore +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* OpenAPI spec version: 1.0.0 +* Contact: apiteam@wordnik.com +* +* NOTE: This class is auto generated by the swagger code generator program. +* https://github.com/swagger-api/swagger-codegen.git +* Do not edit the class manually. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ diff --git a/samples/client/petstore/objc/SwaggerClient/Model/SWGOrder.m b/samples/client/petstore/objc/SwaggerClient/Model/SWGOrder.m index d10ed802b8d..299385f616f 100644 --- a/samples/client/petstore/objc/SwaggerClient/Model/SWGOrder.m +++ b/samples/client/petstore/objc/SwaggerClient/Model/SWGOrder.m @@ -5,7 +5,7 @@ - (instancetype)init { self = [super init]; if (self) { - // initalise property's default value, if any + // initialize property's default value, if any } return self; diff --git a/samples/client/petstore/objc/SwaggerClient/Model/SWGPet.h b/samples/client/petstore/objc/SwaggerClient/Model/SWGPet.h index 2f83af6c4e1..90de23fbbf5 100644 --- a/samples/client/petstore/objc/SwaggerClient/Model/SWGPet.h +++ b/samples/client/petstore/objc/SwaggerClient/Model/SWGPet.h @@ -2,10 +2,28 @@ #import "SWGObject.h" /** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ +* Swagger Petstore +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* OpenAPI spec version: 1.0.0 +* Contact: apiteam@wordnik.com +* +* NOTE: This class is auto generated by the swagger code generator program. +* https://github.com/swagger-api/swagger-codegen.git +* Do not edit the class manually. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ #import "SWGCategory.h" #import "SWGTag.h" diff --git a/samples/client/petstore/objc/SwaggerClient/Model/SWGPet.m b/samples/client/petstore/objc/SwaggerClient/Model/SWGPet.m index 98e75189ed3..0518c311850 100644 --- a/samples/client/petstore/objc/SwaggerClient/Model/SWGPet.m +++ b/samples/client/petstore/objc/SwaggerClient/Model/SWGPet.m @@ -5,7 +5,7 @@ - (instancetype)init { self = [super init]; if (self) { - // initalise property's default value, if any + // initialize property's default value, if any } return self; diff --git a/samples/client/petstore/objc/SwaggerClient/Model/SWGTag.h b/samples/client/petstore/objc/SwaggerClient/Model/SWGTag.h index 97e95807550..97aa6162af6 100644 --- a/samples/client/petstore/objc/SwaggerClient/Model/SWGTag.h +++ b/samples/client/petstore/objc/SwaggerClient/Model/SWGTag.h @@ -2,10 +2,28 @@ #import "SWGObject.h" /** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ +* Swagger Petstore +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* OpenAPI spec version: 1.0.0 +* Contact: apiteam@wordnik.com +* +* NOTE: This class is auto generated by the swagger code generator program. +* https://github.com/swagger-api/swagger-codegen.git +* Do not edit the class manually. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ diff --git a/samples/client/petstore/objc/SwaggerClient/Model/SWGTag.m b/samples/client/petstore/objc/SwaggerClient/Model/SWGTag.m index 8ad1742750d..2b720d287e1 100644 --- a/samples/client/petstore/objc/SwaggerClient/Model/SWGTag.m +++ b/samples/client/petstore/objc/SwaggerClient/Model/SWGTag.m @@ -5,7 +5,7 @@ - (instancetype)init { self = [super init]; if (self) { - // initalise property's default value, if any + // initialize property's default value, if any } return self; diff --git a/samples/client/petstore/objc/SwaggerClient/Model/SWGUser.h b/samples/client/petstore/objc/SwaggerClient/Model/SWGUser.h index 6ba19e632b8..2c94220a57e 100644 --- a/samples/client/petstore/objc/SwaggerClient/Model/SWGUser.h +++ b/samples/client/petstore/objc/SwaggerClient/Model/SWGUser.h @@ -2,10 +2,28 @@ #import "SWGObject.h" /** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ +* Swagger Petstore +* This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* OpenAPI spec version: 1.0.0 +* Contact: apiteam@wordnik.com +* +* NOTE: This class is auto generated by the swagger code generator program. +* https://github.com/swagger-api/swagger-codegen.git +* Do not edit the class manually. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ diff --git a/samples/client/petstore/objc/SwaggerClient/Model/SWGUser.m b/samples/client/petstore/objc/SwaggerClient/Model/SWGUser.m index 2551108cb5f..7aed8343af9 100644 --- a/samples/client/petstore/objc/SwaggerClient/Model/SWGUser.m +++ b/samples/client/petstore/objc/SwaggerClient/Model/SWGUser.m @@ -5,7 +5,7 @@ - (instancetype)init { self = [super init]; if (self) { - // initalise property's default value, if any + // initialize property's default value, if any } return self; diff --git a/samples/client/petstore/objc/docs/SWGPetApi.md b/samples/client/petstore/objc/docs/SWGPetApi.md index 92fb2c4de81..d702c353855 100644 --- a/samples/client/petstore/objc/docs/SWGPetApi.md +++ b/samples/client/petstore/objc/docs/SWGPetApi.md @@ -246,14 +246,14 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond ```objc SWGConfiguration *apiConfig = [SWGConfiguration sharedConfig]; +// Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth) +[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; + // Configure API key authorization: (authentication scheme: api_key) [apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"]; // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed //[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"]; -// Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth) -[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; - NSNumber* petId = @789; // ID of pet that needs to be fetched @@ -283,7 +283,7 @@ Name | Type | Description | Notes ### Authorization -[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth) +[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key) ### HTTP request headers From 7b57a26a97ff000f5cdde47ae242ce3c5c18f5e8 Mon Sep 17 00:00:00 2001 From: Guo Huang Date: Wed, 25 May 2016 10:11:52 -0700 Subject: [PATCH 25/60] added apache LICENSE --- .../codegen/languages/GoClientCodegen.java | 1 + .../src/main/resources/go/LICENSE | 201 ++++++++++++++++++ .../src/main/resources/go/api.mustache | 1 + .../src/main/resources/go/api_client.mustache | 1 + .../main/resources/go/api_response.mustache | 1 + .../main/resources/go/configuration.mustache | 1 + .../src/main/resources/go/model.mustache | 1 + .../main/resources/go/partial_header.mustache | 25 +++ .../go/go-petstore/.swagger-codegen-ignore | 23 ++ .../client/petstore/go/go-petstore/LICENSE | 201 ++++++++++++++++++ .../client/petstore/go/go-petstore/README.md | 2 +- .../petstore/go/go-petstore/api_client.go | 22 ++ .../petstore/go/go-petstore/api_response.go | 22 ++ .../petstore/go/go-petstore/category.go | 22 ++ .../petstore/go/go-petstore/configuration.go | 22 ++ .../go/go-petstore/model_api_response.go | 22 ++ .../client/petstore/go/go-petstore/order.go | 22 ++ samples/client/petstore/go/go-petstore/pet.go | 22 ++ .../client/petstore/go/go-petstore/pet_api.go | 22 ++ .../petstore/go/go-petstore/store_api.go | 22 ++ samples/client/petstore/go/go-petstore/tag.go | 22 ++ .../client/petstore/go/go-petstore/user.go | 22 ++ .../petstore/go/go-petstore/user_api.go | 22 ++ 23 files changed, 721 insertions(+), 1 deletion(-) create mode 100644 modules/swagger-codegen/src/main/resources/go/LICENSE create mode 100644 modules/swagger-codegen/src/main/resources/go/partial_header.mustache create mode 100644 samples/client/petstore/go/go-petstore/.swagger-codegen-ignore create mode 100644 samples/client/petstore/go/go-petstore/LICENSE diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/GoClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/GoClientCodegen.java index f1c3db7c430..efcde6d8c41 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/GoClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/GoClientCodegen.java @@ -148,6 +148,7 @@ public class GoClientCodegen extends DefaultCodegen implements CodegenConfig { supportingFiles.add(new SupportingFile("api_response.mustache", "", "api_response.go")); supportingFiles.add(new SupportingFile(".travis.yml", "", ".travis.yml")); supportingFiles.add(new SupportingFile("pom.mustache", "", "pom.xml")); + supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE")); } @Override diff --git a/modules/swagger-codegen/src/main/resources/go/LICENSE b/modules/swagger-codegen/src/main/resources/go/LICENSE new file mode 100644 index 00000000000..8dada3edaf5 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/go/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/modules/swagger-codegen/src/main/resources/go/api.mustache b/modules/swagger-codegen/src/main/resources/go/api.mustache index 0209e8590c3..b3e2f6db9af 100644 --- a/modules/swagger-codegen/src/main/resources/go/api.mustache +++ b/modules/swagger-codegen/src/main/resources/go/api.mustache @@ -1,3 +1,4 @@ +{{>partial_header}} package {{packageName}} {{#operations}} diff --git a/modules/swagger-codegen/src/main/resources/go/api_client.mustache b/modules/swagger-codegen/src/main/resources/go/api_client.mustache index 2fa6d14ef2b..be0f60673d8 100644 --- a/modules/swagger-codegen/src/main/resources/go/api_client.mustache +++ b/modules/swagger-codegen/src/main/resources/go/api_client.mustache @@ -1,3 +1,4 @@ +{{>partial_header}} package {{packageName}} import ( diff --git a/modules/swagger-codegen/src/main/resources/go/api_response.mustache b/modules/swagger-codegen/src/main/resources/go/api_response.mustache index a15293f4402..9bacc9578e4 100644 --- a/modules/swagger-codegen/src/main/resources/go/api_response.mustache +++ b/modules/swagger-codegen/src/main/resources/go/api_response.mustache @@ -1,3 +1,4 @@ +{{>partial_header}} package {{packageName}} import ( diff --git a/modules/swagger-codegen/src/main/resources/go/configuration.mustache b/modules/swagger-codegen/src/main/resources/go/configuration.mustache index 463f77c54dc..fbc22f603d0 100644 --- a/modules/swagger-codegen/src/main/resources/go/configuration.mustache +++ b/modules/swagger-codegen/src/main/resources/go/configuration.mustache @@ -1,3 +1,4 @@ +{{>partial_header}} package {{packageName}} import ( diff --git a/modules/swagger-codegen/src/main/resources/go/model.mustache b/modules/swagger-codegen/src/main/resources/go/model.mustache index fd799a0e35d..7cc53fabbce 100644 --- a/modules/swagger-codegen/src/main/resources/go/model.mustache +++ b/modules/swagger-codegen/src/main/resources/go/model.mustache @@ -1,3 +1,4 @@ +{{>partial_header}} package {{packageName}} {{#models}}{{#imports}} import ({{/imports}}{{#imports}} diff --git a/modules/swagger-codegen/src/main/resources/go/partial_header.mustache b/modules/swagger-codegen/src/main/resources/go/partial_header.mustache new file mode 100644 index 00000000000..bf5862deafd --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/go/partial_header.mustache @@ -0,0 +1,25 @@ +/* + {{#appName}} + * {{{appName}}} + * + {{/appName}} + {{#appDescription}} + * {{{appDescription}}} + * + {{/appDescription}} + * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} + * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ diff --git a/samples/client/petstore/go/go-petstore/.swagger-codegen-ignore b/samples/client/petstore/go/go-petstore/.swagger-codegen-ignore new file mode 100644 index 00000000000..19d3377182e --- /dev/null +++ b/samples/client/petstore/go/go-petstore/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# Thsi matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/go/go-petstore/LICENSE b/samples/client/petstore/go/go-petstore/LICENSE new file mode 100644 index 00000000000..8dada3edaf5 --- /dev/null +++ b/samples/client/petstore/go/go-petstore/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/samples/client/petstore/go/go-petstore/README.md b/samples/client/petstore/go/go-petstore/README.md index 9f725fb007b..20083469110 100644 --- a/samples/client/petstore/go/go-petstore/README.md +++ b/samples/client/petstore/go/go-petstore/README.md @@ -7,7 +7,7 @@ This API client was generated by the [swagger-codegen](https://github.com/swagge - API version: 1.0.0 - Package version: 1.0.0 -- Build date: 2016-05-03T10:14:09.589-07:00 +- Build date: 2016-05-25T10:00:28.559-07:00 - Build package: class io.swagger.codegen.languages.GoClientCodegen ## Installation diff --git a/samples/client/petstore/go/go-petstore/api_client.go b/samples/client/petstore/go/go-petstore/api_client.go index fe73dc5682a..132ca3949fb 100644 --- a/samples/client/petstore/go/go-petstore/api_client.go +++ b/samples/client/petstore/go/go-petstore/api_client.go @@ -1,3 +1,25 @@ +/* + * Swagger Petstore + * + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package petstore import ( diff --git a/samples/client/petstore/go/go-petstore/api_response.go b/samples/client/petstore/go/go-petstore/api_response.go index 0404289f96b..57b94271eae 100644 --- a/samples/client/petstore/go/go-petstore/api_response.go +++ b/samples/client/petstore/go/go-petstore/api_response.go @@ -1,3 +1,25 @@ +/* + * Swagger Petstore + * + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package petstore import ( diff --git a/samples/client/petstore/go/go-petstore/category.go b/samples/client/petstore/go/go-petstore/category.go index 197316d62ef..b8591811511 100644 --- a/samples/client/petstore/go/go-petstore/category.go +++ b/samples/client/petstore/go/go-petstore/category.go @@ -1,3 +1,25 @@ +/* + * Swagger Petstore + * + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package petstore type Category struct { diff --git a/samples/client/petstore/go/go-petstore/configuration.go b/samples/client/petstore/go/go-petstore/configuration.go index 5d7df91948e..2bba74c7f53 100644 --- a/samples/client/petstore/go/go-petstore/configuration.go +++ b/samples/client/petstore/go/go-petstore/configuration.go @@ -1,3 +1,25 @@ +/* + * Swagger Petstore + * + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package petstore import ( diff --git a/samples/client/petstore/go/go-petstore/model_api_response.go b/samples/client/petstore/go/go-petstore/model_api_response.go index 774f781ee93..85bba3df10e 100644 --- a/samples/client/petstore/go/go-petstore/model_api_response.go +++ b/samples/client/petstore/go/go-petstore/model_api_response.go @@ -1,3 +1,25 @@ +/* + * Swagger Petstore + * + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package petstore type ModelApiResponse struct { diff --git a/samples/client/petstore/go/go-petstore/order.go b/samples/client/petstore/go/go-petstore/order.go index 582d45a747f..f5b83768175 100644 --- a/samples/client/petstore/go/go-petstore/order.go +++ b/samples/client/petstore/go/go-petstore/order.go @@ -1,3 +1,25 @@ +/* + * Swagger Petstore + * + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package petstore import ( diff --git a/samples/client/petstore/go/go-petstore/pet.go b/samples/client/petstore/go/go-petstore/pet.go index 88e86af7399..b230ea45dac 100644 --- a/samples/client/petstore/go/go-petstore/pet.go +++ b/samples/client/petstore/go/go-petstore/pet.go @@ -1,3 +1,25 @@ +/* + * Swagger Petstore + * + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package petstore type Pet struct { diff --git a/samples/client/petstore/go/go-petstore/pet_api.go b/samples/client/petstore/go/go-petstore/pet_api.go index 34efe36d9be..07dc51eb90e 100644 --- a/samples/client/petstore/go/go-petstore/pet_api.go +++ b/samples/client/petstore/go/go-petstore/pet_api.go @@ -1,3 +1,25 @@ +/* + * Swagger Petstore + * + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package petstore import ( diff --git a/samples/client/petstore/go/go-petstore/store_api.go b/samples/client/petstore/go/go-petstore/store_api.go index 9e24fe68b53..e2de74695ee 100644 --- a/samples/client/petstore/go/go-petstore/store_api.go +++ b/samples/client/petstore/go/go-petstore/store_api.go @@ -1,3 +1,25 @@ +/* + * Swagger Petstore + * + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package petstore import ( diff --git a/samples/client/petstore/go/go-petstore/tag.go b/samples/client/petstore/go/go-petstore/tag.go index ae901c30ec4..80d219bb36c 100644 --- a/samples/client/petstore/go/go-petstore/tag.go +++ b/samples/client/petstore/go/go-petstore/tag.go @@ -1,3 +1,25 @@ +/* + * Swagger Petstore + * + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package petstore type Tag struct { diff --git a/samples/client/petstore/go/go-petstore/user.go b/samples/client/petstore/go/go-petstore/user.go index 140a94a275b..a2cc5850d75 100644 --- a/samples/client/petstore/go/go-petstore/user.go +++ b/samples/client/petstore/go/go-petstore/user.go @@ -1,3 +1,25 @@ +/* + * Swagger Petstore + * + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package petstore type User struct { diff --git a/samples/client/petstore/go/go-petstore/user_api.go b/samples/client/petstore/go/go-petstore/user_api.go index af0ea7b85f5..2cd9ed6605c 100644 --- a/samples/client/petstore/go/go-petstore/user_api.go +++ b/samples/client/petstore/go/go-petstore/user_api.go @@ -1,3 +1,25 @@ +/* + * Swagger Petstore + * + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package petstore import ( From d9d3a41deb3a7d7b45578cc88bd149370a27cac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20J=C3=B8rgensen?= Date: Wed, 25 May 2016 22:49:24 +0200 Subject: [PATCH 26/60] [PHP] add apache v2 license to PHP client See #2963. --- .../codegen/languages/PhpClientCodegen.java | 3 +- .../src/main/resources/php/ApiClient.mustache | 17 +- .../main/resources/php/ApiException.mustache | 17 +- .../src/main/resources/php/LICENSE | 201 ++++++++++++++++++ .../resources/php/ObjectSerializer.mustache | 17 +- .../src/main/resources/php/api.mustache | 16 +- .../src/main/resources/php/api_test.mustache | 16 +- .../src/main/resources/php/autoload.mustache | 2 + .../main/resources/php/configuration.mustache | 17 +- .../src/main/resources/php/model.mustache | 17 +- .../main/resources/php/model_test.mustache | 17 +- .../resources/php/partial_header.mustache | 25 +++ 12 files changed, 243 insertions(+), 122 deletions(-) create mode 100644 modules/swagger-codegen/src/main/resources/php/LICENSE create mode 100644 modules/swagger-codegen/src/main/resources/php/partial_header.mustache diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java index c89a7b4e5ba..fed3a68f15c 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java @@ -264,7 +264,8 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig { supportingFiles.add(new SupportingFile("README.mustache", getPackagePath(), "README.md")); supportingFiles.add(new SupportingFile(".travis.yml", getPackagePath(), ".travis.yml")); supportingFiles.add(new SupportingFile("git_push.sh.mustache", getPackagePath(), "git_push.sh")); - + // apache v2 license + supportingFiles.add(new SupportingFile("LICENSE", getPackagePath(), "LICENSE")); } @Override diff --git a/modules/swagger-codegen/src/main/resources/php/ApiClient.mustache b/modules/swagger-codegen/src/main/resources/php/ApiClient.mustache index 508e40a4afa..98a6ad5df8c 100644 --- a/modules/swagger-codegen/src/main/resources/php/ApiClient.mustache +++ b/modules/swagger-codegen/src/main/resources/php/ApiClient.mustache @@ -10,21 +10,8 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ -/** - * Copyright 2016 SmartBear Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ + +{{>partial_header}} /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/modules/swagger-codegen/src/main/resources/php/ApiException.mustache b/modules/swagger-codegen/src/main/resources/php/ApiException.mustache index 031e8cd995e..2cffdea5ccf 100644 --- a/modules/swagger-codegen/src/main/resources/php/ApiException.mustache +++ b/modules/swagger-codegen/src/main/resources/php/ApiException.mustache @@ -9,21 +9,8 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ -/** - * Copyright 2016 SmartBear Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ + +{{>partial_header}} /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/modules/swagger-codegen/src/main/resources/php/LICENSE b/modules/swagger-codegen/src/main/resources/php/LICENSE new file mode 100644 index 00000000000..8dada3edaf5 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/php/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/modules/swagger-codegen/src/main/resources/php/ObjectSerializer.mustache b/modules/swagger-codegen/src/main/resources/php/ObjectSerializer.mustache index 06b21d05e54..4f99eaac4c3 100644 --- a/modules/swagger-codegen/src/main/resources/php/ObjectSerializer.mustache +++ b/modules/swagger-codegen/src/main/resources/php/ObjectSerializer.mustache @@ -10,21 +10,8 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ -/** - * Copyright 2016 SmartBear Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ + +{{>partial_header}} /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/modules/swagger-codegen/src/main/resources/php/api.mustache b/modules/swagger-codegen/src/main/resources/php/api.mustache index 26024ea4789..26f79cd6139 100644 --- a/modules/swagger-codegen/src/main/resources/php/api.mustache +++ b/modules/swagger-codegen/src/main/resources/php/api.mustache @@ -9,22 +9,8 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ -/** - * Copyright 2016 SmartBear Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +{{>partial_header}} /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/modules/swagger-codegen/src/main/resources/php/api_test.mustache b/modules/swagger-codegen/src/main/resources/php/api_test.mustache index 6a525223584..c53cd6e1ad2 100644 --- a/modules/swagger-codegen/src/main/resources/php/api_test.mustache +++ b/modules/swagger-codegen/src/main/resources/php/api_test.mustache @@ -9,22 +9,8 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ -/** - * Copyright 2016 SmartBear Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +{{>partial_header}} /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/modules/swagger-codegen/src/main/resources/php/autoload.mustache b/modules/swagger-codegen/src/main/resources/php/autoload.mustache index 0942715ce8d..28ce32ae50a 100644 --- a/modules/swagger-codegen/src/main/resources/php/autoload.mustache +++ b/modules/swagger-codegen/src/main/resources/php/autoload.mustache @@ -1,4 +1,6 @@ partial_header}} /** * An example of a project-specific implementation. * diff --git a/modules/swagger-codegen/src/main/resources/php/configuration.mustache b/modules/swagger-codegen/src/main/resources/php/configuration.mustache index 704edbe0f61..da21523cfa5 100644 --- a/modules/swagger-codegen/src/main/resources/php/configuration.mustache +++ b/modules/swagger-codegen/src/main/resources/php/configuration.mustache @@ -10,22 +10,7 @@ * @link https://github.com/swagger-api/swagger-codegen */ -/** - * Copyright 2016 SmartBear Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - +{{>partial_header}} /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/modules/swagger-codegen/src/main/resources/php/model.mustache b/modules/swagger-codegen/src/main/resources/php/model.mustache index 488b82433d9..9fc2b620ddd 100644 --- a/modules/swagger-codegen/src/main/resources/php/model.mustache +++ b/modules/swagger-codegen/src/main/resources/php/model.mustache @@ -12,21 +12,8 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ -/** - * Copyright 2016 SmartBear Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ + +{{>partial_header}} /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/modules/swagger-codegen/src/main/resources/php/model_test.mustache b/modules/swagger-codegen/src/main/resources/php/model_test.mustache index 3482629f917..d7d93f32186 100644 --- a/modules/swagger-codegen/src/main/resources/php/model_test.mustache +++ b/modules/swagger-codegen/src/main/resources/php/model_test.mustache @@ -12,21 +12,8 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ -/** - * Copyright 2016 SmartBear Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ + +{{>partial_header}} /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/modules/swagger-codegen/src/main/resources/php/partial_header.mustache b/modules/swagger-codegen/src/main/resources/php/partial_header.mustache new file mode 100644 index 00000000000..61098d84563 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/php/partial_header.mustache @@ -0,0 +1,25 @@ +/** + {{#appName}} + * {{{appName}}} + * + {{/appName}} + {{#appDescription}} + * {{{appDescription}}} + * + {{/appDescription}} + * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} + * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ From 5c97d1b8f7755385fa5d2a3c39909c3267eb78af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20J=C3=B8rgensen?= Date: Wed, 25 May 2016 22:51:40 +0200 Subject: [PATCH 27/60] [PHP] Improve code style of generated code Avoid trailing whitespace. --- .../io/swagger/codegen/languages/PhpClientCodegen.java | 9 +++++++++ .../src/main/resources/php/api_doc.mustache | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java index fed3a68f15c..ac76770c1a4 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java @@ -167,6 +167,15 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig { .replaceAll(regLastPathSeparator+ "$", ""); } + @Override + public String escapeText(String input) { + if (input != null) { + // Trim the string to avoid leading and trailing spaces. + return super.escapeText(input).trim(); + } + return input; + } + @Override public CodegenType getTag() { return CodegenType.CLIENT; diff --git a/modules/swagger-codegen/src/main/resources/php/api_doc.mustache b/modules/swagger-codegen/src/main/resources/php/api_doc.mustache index 1edcf0a3f3a..75ec5f8acd8 100644 --- a/modules/swagger-codegen/src/main/resources/php/api_doc.mustache +++ b/modules/swagger-codegen/src/main/resources/php/api_doc.mustache @@ -50,7 +50,7 @@ try { {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**](../Model/{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**](../Model/{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}} {{/allParams}} ### Return type From 349b727b2c839f1ce3aff989f66275bc11eebfe9 Mon Sep 17 00:00:00 2001 From: Scott Williams Date: Wed, 25 May 2016 22:20:08 +0100 Subject: [PATCH 28/60] Include license in genrated client --- .../languages/PythonClientCodegen.java | 3 +- .../src/main/resources/python/LICENSE | 201 ++++++++++++++++++ .../petstore/python/.swagger-codegen-ignore | 23 ++ samples/client/petstore/python/LICENSE | 201 ++++++++++++++++++ samples/client/petstore/python/README.md | 6 +- .../python/docs/AdditionalPropertiesClass.md | 9 + .../client/petstore/python/docs/ArrayTest.md | 9 + .../client/petstore/python/docs/FakeApi.md | 4 +- ...dPropertiesAndAdditionalPropertiesClass.md | 11 + .../petstore/python/docs/ReadOnlyFirst.md | 11 + .../python/swagger_client/__init__.py | 4 + .../python/swagger_client/apis/fake_api.py | 4 +- .../python/swagger_client/models/__init__.py | 4 + .../models/additional_properties_class.py | 98 +++++++++ .../swagger_client/models/array_test.py | 98 +++++++++ ...perties_and_additional_properties_class.py | 148 +++++++++++++ .../swagger_client/models/read_only_first.py | 148 +++++++++++++ .../test/test_additional_properties_class.py | 49 +++++ .../petstore/python/test/test_array_test.py | 49 +++++ ...perties_and_additional_properties_class.py | 49 +++++ .../python/test/test_read_only_first.py | 49 +++++ 21 files changed, 1172 insertions(+), 6 deletions(-) create mode 100644 modules/swagger-codegen/src/main/resources/python/LICENSE create mode 100644 samples/client/petstore/python/.swagger-codegen-ignore create mode 100644 samples/client/petstore/python/LICENSE create mode 100644 samples/client/petstore/python/docs/AdditionalPropertiesClass.md create mode 100644 samples/client/petstore/python/docs/ArrayTest.md create mode 100644 samples/client/petstore/python/docs/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/client/petstore/python/docs/ReadOnlyFirst.md create mode 100644 samples/client/petstore/python/swagger_client/models/additional_properties_class.py create mode 100644 samples/client/petstore/python/swagger_client/models/array_test.py create mode 100644 samples/client/petstore/python/swagger_client/models/mixed_properties_and_additional_properties_class.py create mode 100644 samples/client/petstore/python/swagger_client/models/read_only_first.py create mode 100644 samples/client/petstore/python/test/test_additional_properties_class.py create mode 100644 samples/client/petstore/python/test/test_array_test.py create mode 100644 samples/client/petstore/python/test/test_mixed_properties_and_additional_properties_class.py create mode 100644 samples/client/petstore/python/test/test_read_only_first.py diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PythonClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PythonClientCodegen.java index 8bc117120d6..51bd143ba8f 100755 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PythonClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PythonClientCodegen.java @@ -15,7 +15,6 @@ import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; -import java.util.HashSet; import java.util.List; import java.util.Map; @@ -149,6 +148,8 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig apiPackage = swaggerFolder + File.separatorChar + "apis"; supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); + supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE")); + supportingFiles.add(new SupportingFile("setup.mustache", "", "setup.py")); supportingFiles.add(new SupportingFile("tox.mustache", "", "tox.ini")); supportingFiles.add(new SupportingFile("test-requirements.mustache", "", "test-requirements.txt")); diff --git a/modules/swagger-codegen/src/main/resources/python/LICENSE b/modules/swagger-codegen/src/main/resources/python/LICENSE new file mode 100644 index 00000000000..9c8f3ea0871 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/python/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/samples/client/petstore/python/.swagger-codegen-ignore b/samples/client/petstore/python/.swagger-codegen-ignore new file mode 100644 index 00000000000..19d3377182e --- /dev/null +++ b/samples/client/petstore/python/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# Thsi matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/python/LICENSE b/samples/client/petstore/python/LICENSE new file mode 100644 index 00000000000..9c8f3ea0871 --- /dev/null +++ b/samples/client/petstore/python/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/samples/client/petstore/python/README.md b/samples/client/petstore/python/README.md index cc5c7c61f75..b7786c79141 100644 --- a/samples/client/petstore/python/README.md +++ b/samples/client/petstore/python/README.md @@ -5,7 +5,7 @@ This Python package is automatically generated by the [Swagger Codegen](https:// - API version: 1.0.0 - Package version: 1.0.0 -- Build date: 2016-05-17T19:47:06.491+01:00 +- Build date: 2016-05-25T22:17:08.920+01:00 - Build package: class io.swagger.codegen.languages.PythonClientCodegen ## Requirements. @@ -104,20 +104,24 @@ Class | Method | HTTP request | Description ## Documentation For Models + - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - [Animal](docs/Animal.md) - [AnimalFarm](docs/AnimalFarm.md) - [ApiResponse](docs/ApiResponse.md) + - [ArrayTest](docs/ArrayTest.md) - [Cat](docs/Cat.md) - [Category](docs/Category.md) - [Dog](docs/Dog.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) - [FormatTest](docs/FormatTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - [Model200Response](docs/Model200Response.md) - [ModelReturn](docs/ModelReturn.md) - [Name](docs/Name.md) - [Order](docs/Order.md) - [Pet](docs/Pet.md) + - [ReadOnlyFirst](docs/ReadOnlyFirst.md) - [SpecialModelName](docs/SpecialModelName.md) - [Tag](docs/Tag.md) - [User](docs/User.md) diff --git a/samples/client/petstore/python/docs/AdditionalPropertiesClass.md b/samples/client/petstore/python/docs/AdditionalPropertiesClass.md new file mode 100644 index 00000000000..420ac6efe67 --- /dev/null +++ b/samples/client/petstore/python/docs/AdditionalPropertiesClass.md @@ -0,0 +1,9 @@ +# AdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/python/docs/ArrayTest.md b/samples/client/petstore/python/docs/ArrayTest.md new file mode 100644 index 00000000000..9dcc2c97264 --- /dev/null +++ b/samples/client/petstore/python/docs/ArrayTest.md @@ -0,0 +1,9 @@ +# ArrayTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/python/docs/FakeApi.md b/samples/client/petstore/python/docs/FakeApi.md index 81e84f646f2..6853fa0bee9 100644 --- a/samples/client/petstore/python/docs/FakeApi.md +++ b/samples/client/petstore/python/docs/FakeApi.md @@ -70,8 +70,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json + - **Content-Type**: application/xml; charset=utf-8, application/json; charset=utf-8 + - **Accept**: application/xml; charset=utf-8, application/json; charset=utf-8 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/python/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 00000000000..1f8d83427a2 --- /dev/null +++ b/samples/client/petstore/python/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,11 @@ +# MixedPropertiesAndAdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **str** | | [optional] +**date_time** | **datetime** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/python/docs/ReadOnlyFirst.md b/samples/client/petstore/python/docs/ReadOnlyFirst.md new file mode 100644 index 00000000000..93fed253d01 --- /dev/null +++ b/samples/client/petstore/python/docs/ReadOnlyFirst.md @@ -0,0 +1,11 @@ +# ReadOnlyFirst + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **str** | | [optional] +**baz** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/python/swagger_client/__init__.py b/samples/client/petstore/python/swagger_client/__init__.py index f9e10599854..98debbaa778 100644 --- a/samples/client/petstore/python/swagger_client/__init__.py +++ b/samples/client/petstore/python/swagger_client/__init__.py @@ -1,20 +1,24 @@ from __future__ import absolute_import # import models into sdk package +from .models.additional_properties_class import AdditionalPropertiesClass from .models.animal import Animal from .models.animal_farm import AnimalFarm from .models.api_response import ApiResponse +from .models.array_test import ArrayTest from .models.cat import Cat from .models.category import Category from .models.dog import Dog from .models.enum_class import EnumClass from .models.enum_test import EnumTest from .models.format_test import FormatTest +from .models.mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass from .models.model_200_response import Model200Response from .models.model_return import ModelReturn from .models.name import Name from .models.order import Order from .models.pet import Pet +from .models.read_only_first import ReadOnlyFirst from .models.special_model_name import SpecialModelName from .models.tag import Tag from .models.user import User diff --git a/samples/client/petstore/python/swagger_client/apis/fake_api.py b/samples/client/petstore/python/swagger_client/apis/fake_api.py index 9e2b185a5aa..211dc2d5230 100644 --- a/samples/client/petstore/python/swagger_client/apis/fake_api.py +++ b/samples/client/petstore/python/swagger_client/apis/fake_api.py @@ -167,13 +167,13 @@ class FakeApi(object): # HTTP header `Accept` header_params['Accept'] = self.api_client.\ - select_header_accept(['application/xml', 'application/json']) + select_header_accept(['application/xml; charset=utf-8', 'application/json; charset=utf-8']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ - select_header_content_type([]) + select_header_content_type(['application/xml; charset=utf-8', 'application/json; charset=utf-8']) # Authentication setting auth_settings = [] diff --git a/samples/client/petstore/python/swagger_client/models/__init__.py b/samples/client/petstore/python/swagger_client/models/__init__.py index 664ec8471dc..e3ea40f167e 100644 --- a/samples/client/petstore/python/swagger_client/models/__init__.py +++ b/samples/client/petstore/python/swagger_client/models/__init__.py @@ -1,20 +1,24 @@ from __future__ import absolute_import # import models into model package +from .additional_properties_class import AdditionalPropertiesClass from .animal import Animal from .animal_farm import AnimalFarm from .api_response import ApiResponse +from .array_test import ArrayTest from .cat import Cat from .category import Category from .dog import Dog from .enum_class import EnumClass from .enum_test import EnumTest from .format_test import FormatTest +from .mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass from .model_200_response import Model200Response from .model_return import ModelReturn from .name import Name from .order import Order from .pet import Pet +from .read_only_first import ReadOnlyFirst from .special_model_name import SpecialModelName from .tag import Tag from .user import User diff --git a/samples/client/petstore/python/swagger_client/models/additional_properties_class.py b/samples/client/petstore/python/swagger_client/models/additional_properties_class.py new file mode 100644 index 00000000000..52e59c2c193 --- /dev/null +++ b/samples/client/petstore/python/swagger_client/models/additional_properties_class.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" +Copyright 2016 SmartBear Software + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Ref: https://github.com/swagger-api/swagger-codegen +""" + +from pprint import pformat +from six import iteritems +import re + + +class AdditionalPropertiesClass(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + def __init__(self): + """ + AdditionalPropertiesClass - a model defined in Swagger + + :param dict swaggerTypes: The key is attribute name + and the value is attribute type. + :param dict attributeMap: The key is attribute name + and the value is json key in definition. + """ + self.swagger_types = { + + } + + self.attribute_map = { + + } + + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other + diff --git a/samples/client/petstore/python/swagger_client/models/array_test.py b/samples/client/petstore/python/swagger_client/models/array_test.py new file mode 100644 index 00000000000..8de34cb584a --- /dev/null +++ b/samples/client/petstore/python/swagger_client/models/array_test.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" +Copyright 2016 SmartBear Software + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Ref: https://github.com/swagger-api/swagger-codegen +""" + +from pprint import pformat +from six import iteritems +import re + + +class ArrayTest(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + def __init__(self): + """ + ArrayTest - a model defined in Swagger + + :param dict swaggerTypes: The key is attribute name + and the value is attribute type. + :param dict attributeMap: The key is attribute name + and the value is json key in definition. + """ + self.swagger_types = { + + } + + self.attribute_map = { + + } + + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other + diff --git a/samples/client/petstore/python/swagger_client/models/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python/swagger_client/models/mixed_properties_and_additional_properties_class.py new file mode 100644 index 00000000000..b177cc4b05f --- /dev/null +++ b/samples/client/petstore/python/swagger_client/models/mixed_properties_and_additional_properties_class.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" +Copyright 2016 SmartBear Software + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Ref: https://github.com/swagger-api/swagger-codegen +""" + +from pprint import pformat +from six import iteritems +import re + + +class MixedPropertiesAndAdditionalPropertiesClass(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + def __init__(self): + """ + MixedPropertiesAndAdditionalPropertiesClass - a model defined in Swagger + + :param dict swaggerTypes: The key is attribute name + and the value is attribute type. + :param dict attributeMap: The key is attribute name + and the value is json key in definition. + """ + self.swagger_types = { + 'uuid': 'str', + 'date_time': 'datetime' + } + + self.attribute_map = { + 'uuid': 'uuid', + 'date_time': 'dateTime' + } + + self._uuid = None + self._date_time = None + + @property + def uuid(self): + """ + Gets the uuid of this MixedPropertiesAndAdditionalPropertiesClass. + + + :return: The uuid of this MixedPropertiesAndAdditionalPropertiesClass. + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid): + """ + Sets the uuid of this MixedPropertiesAndAdditionalPropertiesClass. + + + :param uuid: The uuid of this MixedPropertiesAndAdditionalPropertiesClass. + :type: str + """ + + self._uuid = uuid + + @property + def date_time(self): + """ + Gets the date_time of this MixedPropertiesAndAdditionalPropertiesClass. + + + :return: The date_time of this MixedPropertiesAndAdditionalPropertiesClass. + :rtype: datetime + """ + return self._date_time + + @date_time.setter + def date_time(self, date_time): + """ + Sets the date_time of this MixedPropertiesAndAdditionalPropertiesClass. + + + :param date_time: The date_time of this MixedPropertiesAndAdditionalPropertiesClass. + :type: datetime + """ + + self._date_time = date_time + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other + diff --git a/samples/client/petstore/python/swagger_client/models/read_only_first.py b/samples/client/petstore/python/swagger_client/models/read_only_first.py new file mode 100644 index 00000000000..f517cb19d71 --- /dev/null +++ b/samples/client/petstore/python/swagger_client/models/read_only_first.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" +Copyright 2016 SmartBear Software + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Ref: https://github.com/swagger-api/swagger-codegen +""" + +from pprint import pformat +from six import iteritems +import re + + +class ReadOnlyFirst(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + def __init__(self): + """ + ReadOnlyFirst - a model defined in Swagger + + :param dict swaggerTypes: The key is attribute name + and the value is attribute type. + :param dict attributeMap: The key is attribute name + and the value is json key in definition. + """ + self.swagger_types = { + 'bar': 'str', + 'baz': 'str' + } + + self.attribute_map = { + 'bar': 'bar', + 'baz': 'baz' + } + + self._bar = None + self._baz = None + + @property + def bar(self): + """ + Gets the bar of this ReadOnlyFirst. + + + :return: The bar of this ReadOnlyFirst. + :rtype: str + """ + return self._bar + + @bar.setter + def bar(self, bar): + """ + Sets the bar of this ReadOnlyFirst. + + + :param bar: The bar of this ReadOnlyFirst. + :type: str + """ + + self._bar = bar + + @property + def baz(self): + """ + Gets the baz of this ReadOnlyFirst. + + + :return: The baz of this ReadOnlyFirst. + :rtype: str + """ + return self._baz + + @baz.setter + def baz(self, baz): + """ + Sets the baz of this ReadOnlyFirst. + + + :param baz: The baz of this ReadOnlyFirst. + :type: str + """ + + self._baz = baz + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other + diff --git a/samples/client/petstore/python/test/test_additional_properties_class.py b/samples/client/petstore/python/test/test_additional_properties_class.py new file mode 100644 index 00000000000..52163f2afec --- /dev/null +++ b/samples/client/petstore/python/test/test_additional_properties_class.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" +Copyright 2016 SmartBear Software + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ref: https://github.com/swagger-api/swagger-codegen +""" + +from __future__ import absolute_import + +import os +import sys +import unittest + +import swagger_client +from swagger_client.rest import ApiException +from swagger_client.models.additional_properties_class import AdditionalPropertiesClass + + +class TestAdditionalPropertiesClass(unittest.TestCase): + """ AdditionalPropertiesClass unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAdditionalPropertiesClass(self): + """ + Test AdditionalPropertiesClass + """ + model = swagger_client.models.additional_properties_class.AdditionalPropertiesClass() + + +if __name__ == '__main__': + unittest.main() \ No newline at end of file diff --git a/samples/client/petstore/python/test/test_array_test.py b/samples/client/petstore/python/test/test_array_test.py new file mode 100644 index 00000000000..494596c842f --- /dev/null +++ b/samples/client/petstore/python/test/test_array_test.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" +Copyright 2016 SmartBear Software + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ref: https://github.com/swagger-api/swagger-codegen +""" + +from __future__ import absolute_import + +import os +import sys +import unittest + +import swagger_client +from swagger_client.rest import ApiException +from swagger_client.models.array_test import ArrayTest + + +class TestArrayTest(unittest.TestCase): + """ ArrayTest unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testArrayTest(self): + """ + Test ArrayTest + """ + model = swagger_client.models.array_test.ArrayTest() + + +if __name__ == '__main__': + unittest.main() \ No newline at end of file diff --git a/samples/client/petstore/python/test/test_mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python/test/test_mixed_properties_and_additional_properties_class.py new file mode 100644 index 00000000000..6cea606481c --- /dev/null +++ b/samples/client/petstore/python/test/test_mixed_properties_and_additional_properties_class.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" +Copyright 2016 SmartBear Software + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ref: https://github.com/swagger-api/swagger-codegen +""" + +from __future__ import absolute_import + +import os +import sys +import unittest + +import swagger_client +from swagger_client.rest import ApiException +from swagger_client.models.mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass + + +class TestMixedPropertiesAndAdditionalPropertiesClass(unittest.TestCase): + """ MixedPropertiesAndAdditionalPropertiesClass unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMixedPropertiesAndAdditionalPropertiesClass(self): + """ + Test MixedPropertiesAndAdditionalPropertiesClass + """ + model = swagger_client.models.mixed_properties_and_additional_properties_class.MixedPropertiesAndAdditionalPropertiesClass() + + +if __name__ == '__main__': + unittest.main() \ No newline at end of file diff --git a/samples/client/petstore/python/test/test_read_only_first.py b/samples/client/petstore/python/test/test_read_only_first.py new file mode 100644 index 00000000000..d7073915dfe --- /dev/null +++ b/samples/client/petstore/python/test/test_read_only_first.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" +Copyright 2016 SmartBear Software + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ref: https://github.com/swagger-api/swagger-codegen +""" + +from __future__ import absolute_import + +import os +import sys +import unittest + +import swagger_client +from swagger_client.rest import ApiException +from swagger_client.models.read_only_first import ReadOnlyFirst + + +class TestReadOnlyFirst(unittest.TestCase): + """ ReadOnlyFirst unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testReadOnlyFirst(self): + """ + Test ReadOnlyFirst + """ + model = swagger_client.models.read_only_first.ReadOnlyFirst() + + +if __name__ == '__main__': + unittest.main() \ No newline at end of file From e0dbb44b37a9a2d085bbb25a5e349dca4347c467 Mon Sep 17 00:00:00 2001 From: Scott Williams Date: Wed, 25 May 2016 22:35:38 +0100 Subject: [PATCH 29/60] Put license header in shared file --- .../resources/python/__init__model.mustache | 4 ++++ .../resources/python/__init__package.mustache | 4 ++++ .../src/main/resources/python/api.mustache | 17 +------------ .../main/resources/python/api_test.mustache | 18 +------------- .../resources/python/configuration.mustache | 18 +------------- .../src/main/resources/python/model.mustache | 18 +------------- .../main/resources/python/model_test.mustache | 18 +------------- .../resources/python/partial_header.mustache | 15 ++++++++++++ .../src/main/resources/python/rest.mustache | 18 +------------- .../src/main/resources/python/setup.mustache | 2 ++ samples/client/petstore/python/README.md | 2 +- samples/client/petstore/python/setup.py | 16 +++++++++++++ .../python/swagger_client/__init__.py | 18 ++++++++++++++ .../python/swagger_client/apis/fake_api.py | 3 +-- .../python/swagger_client/apis/pet_api.py | 3 +-- .../python/swagger_client/apis/store_api.py | 3 +-- .../python/swagger_client/apis/user_api.py | 3 +-- .../python/swagger_client/configuration.py | 4 +--- .../python/swagger_client/models/__init__.py | 18 ++++++++++++++ .../models/additional_properties_class.py | 22 ++++++++--------- .../python/swagger_client/models/animal.py | 22 ++++++++--------- .../swagger_client/models/animal_farm.py | 22 ++++++++--------- .../swagger_client/models/api_response.py | 22 ++++++++--------- .../swagger_client/models/array_test.py | 22 ++++++++--------- .../python/swagger_client/models/cat.py | 22 ++++++++--------- .../python/swagger_client/models/category.py | 22 ++++++++--------- .../python/swagger_client/models/dog.py | 22 ++++++++--------- .../swagger_client/models/enum_class.py | 22 ++++++++--------- .../python/swagger_client/models/enum_test.py | 22 ++++++++--------- .../swagger_client/models/format_test.py | 22 ++++++++--------- ...perties_and_additional_properties_class.py | 22 ++++++++--------- .../models/model_200_response.py | 22 ++++++++--------- .../swagger_client/models/model_return.py | 22 ++++++++--------- .../python/swagger_client/models/name.py | 22 ++++++++--------- .../python/swagger_client/models/order.py | 22 ++++++++--------- .../python/swagger_client/models/pet.py | 22 ++++++++--------- .../swagger_client/models/read_only_first.py | 22 ++++++++--------- .../models/special_model_name.py | 22 ++++++++--------- .../python/swagger_client/models/tag.py | 22 ++++++++--------- .../python/swagger_client/models/user.py | 22 ++++++++--------- .../petstore/python/swagger_client/rest.py | 24 +++++++++---------- 41 files changed, 310 insertions(+), 378 deletions(-) create mode 100644 modules/swagger-codegen/src/main/resources/python/partial_header.mustache diff --git a/modules/swagger-codegen/src/main/resources/python/__init__model.mustache b/modules/swagger-codegen/src/main/resources/python/__init__model.mustache index da086c10873..1a9eaf62794 100644 --- a/modules/swagger-codegen/src/main/resources/python/__init__model.mustache +++ b/modules/swagger-codegen/src/main/resources/python/__init__model.mustache @@ -1,3 +1,7 @@ +# coding: utf-8 + +{{>partial_header}} + from __future__ import absolute_import # import models into model package diff --git a/modules/swagger-codegen/src/main/resources/python/__init__package.mustache b/modules/swagger-codegen/src/main/resources/python/__init__package.mustache index 5265587cfd9..6528c480eed 100644 --- a/modules/swagger-codegen/src/main/resources/python/__init__package.mustache +++ b/modules/swagger-codegen/src/main/resources/python/__init__package.mustache @@ -1,3 +1,7 @@ +# coding: utf-8 + +{{>partial_header}} + from __future__ import absolute_import # import models into sdk package diff --git a/modules/swagger-codegen/src/main/resources/python/api.mustache b/modules/swagger-codegen/src/main/resources/python/api.mustache index c9c94ad3e3e..43962c7f525 100644 --- a/modules/swagger-codegen/src/main/resources/python/api.mustache +++ b/modules/swagger-codegen/src/main/resources/python/api.mustache @@ -1,21 +1,6 @@ # coding: utf-8 -""" -{{classname}}.py -Copyright 2016 SmartBear Software - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -""" +{{>partial_header}} from __future__ import absolute_import diff --git a/modules/swagger-codegen/src/main/resources/python/api_test.mustache b/modules/swagger-codegen/src/main/resources/python/api_test.mustache index 5f0b0ab6ecb..4906d0e0371 100644 --- a/modules/swagger-codegen/src/main/resources/python/api_test.mustache +++ b/modules/swagger-codegen/src/main/resources/python/api_test.mustache @@ -1,22 +1,6 @@ # coding: utf-8 -""" -Copyright 2016 SmartBear Software - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - ref: https://github.com/swagger-api/swagger-codegen -""" +{{>partial_header}} from __future__ import absolute_import diff --git a/modules/swagger-codegen/src/main/resources/python/configuration.mustache b/modules/swagger-codegen/src/main/resources/python/configuration.mustache index 8f878f82318..9ea2ab4a7b5 100644 --- a/modules/swagger-codegen/src/main/resources/python/configuration.mustache +++ b/modules/swagger-codegen/src/main/resources/python/configuration.mustache @@ -1,22 +1,6 @@ # coding: utf-8 -""" -Copyright 2016 SmartBear Software - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - ref: https://github.com/swagger-api/swagger-codegen -""" +{{>partial_header}} from __future__ import absolute_import import base64 diff --git a/modules/swagger-codegen/src/main/resources/python/model.mustache b/modules/swagger-codegen/src/main/resources/python/model.mustache index e62fa2cbf66..781bb37e4e5 100644 --- a/modules/swagger-codegen/src/main/resources/python/model.mustache +++ b/modules/swagger-codegen/src/main/resources/python/model.mustache @@ -1,22 +1,6 @@ # coding: utf-8 -""" -Copyright 2016 SmartBear Software - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen -""" +{{>partial_header}} {{#models}} {{#model}} diff --git a/modules/swagger-codegen/src/main/resources/python/model_test.mustache b/modules/swagger-codegen/src/main/resources/python/model_test.mustache index c00a10a9b51..ffd38a52b49 100644 --- a/modules/swagger-codegen/src/main/resources/python/model_test.mustache +++ b/modules/swagger-codegen/src/main/resources/python/model_test.mustache @@ -1,22 +1,6 @@ # coding: utf-8 -""" -Copyright 2016 SmartBear Software - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - ref: https://github.com/swagger-api/swagger-codegen -""" +{{>partial_header}} from __future__ import absolute_import diff --git a/modules/swagger-codegen/src/main/resources/python/partial_header.mustache b/modules/swagger-codegen/src/main/resources/python/partial_header.mustache new file mode 100644 index 00000000000..84e3d6aad29 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/python/partial_header.mustache @@ -0,0 +1,15 @@ +""" + Copyright 2016 SmartBear Software + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/python/rest.mustache b/modules/swagger-codegen/src/main/resources/python/rest.mustache index 352bb503ac5..e09090a9794 100644 --- a/modules/swagger-codegen/src/main/resources/python/rest.mustache +++ b/modules/swagger-codegen/src/main/resources/python/rest.mustache @@ -1,23 +1,7 @@ # coding: utf-8 -""" -Copyright 2016 SmartBear Software +{{>partial_header}} - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -Credit: this file (rest.py) is modified based on rest.py in Dropbox Python SDK: -https://www.dropbox.com/developers/core/sdks/python -""" from __future__ import absolute_import import sys diff --git a/modules/swagger-codegen/src/main/resources/python/setup.mustache b/modules/swagger-codegen/src/main/resources/python/setup.mustache index f95b1f56a0f..c825911f91a 100644 --- a/modules/swagger-codegen/src/main/resources/python/setup.mustache +++ b/modules/swagger-codegen/src/main/resources/python/setup.mustache @@ -1,5 +1,7 @@ # coding: utf-8 +{{>partial_header}} + import sys from setuptools import setup, find_packages diff --git a/samples/client/petstore/python/README.md b/samples/client/petstore/python/README.md index b7786c79141..57a8ef605d9 100644 --- a/samples/client/petstore/python/README.md +++ b/samples/client/petstore/python/README.md @@ -5,7 +5,7 @@ This Python package is automatically generated by the [Swagger Codegen](https:// - API version: 1.0.0 - Package version: 1.0.0 -- Build date: 2016-05-25T22:17:08.920+01:00 +- Build date: 2016-05-25T22:33:14.808+01:00 - Build package: class io.swagger.codegen.languages.PythonClientCodegen ## Requirements. diff --git a/samples/client/petstore/python/setup.py b/samples/client/petstore/python/setup.py index f8985832d25..e642c3f8c5d 100644 --- a/samples/client/petstore/python/setup.py +++ b/samples/client/petstore/python/setup.py @@ -1,5 +1,21 @@ # coding: utf-8 +""" + Copyright 2016 SmartBear Software + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + import sys from setuptools import setup, find_packages diff --git a/samples/client/petstore/python/swagger_client/__init__.py b/samples/client/petstore/python/swagger_client/__init__.py index 98debbaa778..f0b3188a40c 100644 --- a/samples/client/petstore/python/swagger_client/__init__.py +++ b/samples/client/petstore/python/swagger_client/__init__.py @@ -1,3 +1,21 @@ +# coding: utf-8 + +""" + Copyright 2016 SmartBear Software + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + from __future__ import absolute_import # import models into sdk package diff --git a/samples/client/petstore/python/swagger_client/apis/fake_api.py b/samples/client/petstore/python/swagger_client/apis/fake_api.py index 211dc2d5230..d387abffbea 100644 --- a/samples/client/petstore/python/swagger_client/apis/fake_api.py +++ b/samples/client/petstore/python/swagger_client/apis/fake_api.py @@ -1,8 +1,7 @@ # coding: utf-8 """ -FakeApi.py -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/python/swagger_client/apis/pet_api.py b/samples/client/petstore/python/swagger_client/apis/pet_api.py index 3b6d9ba82fe..ff0249e164f 100644 --- a/samples/client/petstore/python/swagger_client/apis/pet_api.py +++ b/samples/client/petstore/python/swagger_client/apis/pet_api.py @@ -1,8 +1,7 @@ # coding: utf-8 """ -PetApi.py -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/python/swagger_client/apis/store_api.py b/samples/client/petstore/python/swagger_client/apis/store_api.py index 352ab7eae63..5f86edc785e 100644 --- a/samples/client/petstore/python/swagger_client/apis/store_api.py +++ b/samples/client/petstore/python/swagger_client/apis/store_api.py @@ -1,8 +1,7 @@ # coding: utf-8 """ -StoreApi.py -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/python/swagger_client/apis/user_api.py b/samples/client/petstore/python/swagger_client/apis/user_api.py index d5df6f0f541..addb836e4cc 100644 --- a/samples/client/petstore/python/swagger_client/apis/user_api.py +++ b/samples/client/petstore/python/swagger_client/apis/user_api.py @@ -1,8 +1,7 @@ # coding: utf-8 """ -UserApi.py -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/python/swagger_client/configuration.py b/samples/client/petstore/python/swagger_client/configuration.py index fe38630927e..e763bb9bdef 100644 --- a/samples/client/petstore/python/swagger_client/configuration.py +++ b/samples/client/petstore/python/swagger_client/configuration.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,8 +14,6 @@ Copyright 2016 SmartBear Software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - ref: https://github.com/swagger-api/swagger-codegen """ from __future__ import absolute_import diff --git a/samples/client/petstore/python/swagger_client/models/__init__.py b/samples/client/petstore/python/swagger_client/models/__init__.py index e3ea40f167e..5ed7840453d 100644 --- a/samples/client/petstore/python/swagger_client/models/__init__.py +++ b/samples/client/petstore/python/swagger_client/models/__init__.py @@ -1,3 +1,21 @@ +# coding: utf-8 + +""" + Copyright 2016 SmartBear Software + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + from __future__ import absolute_import # import models into model package diff --git a/samples/client/petstore/python/swagger_client/models/additional_properties_class.py b/samples/client/petstore/python/swagger_client/models/additional_properties_class.py index 52e59c2c193..ba1a73854a6 100644 --- a/samples/client/petstore/python/swagger_client/models/additional_properties_class.py +++ b/samples/client/petstore/python/swagger_client/models/additional_properties_class.py @@ -1,21 +1,19 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from pprint import pformat diff --git a/samples/client/petstore/python/swagger_client/models/animal.py b/samples/client/petstore/python/swagger_client/models/animal.py index 90735535086..6da9613c106 100644 --- a/samples/client/petstore/python/swagger_client/models/animal.py +++ b/samples/client/petstore/python/swagger_client/models/animal.py @@ -1,21 +1,19 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from pprint import pformat diff --git a/samples/client/petstore/python/swagger_client/models/animal_farm.py b/samples/client/petstore/python/swagger_client/models/animal_farm.py index 5e362497c8d..39fe6804b4f 100644 --- a/samples/client/petstore/python/swagger_client/models/animal_farm.py +++ b/samples/client/petstore/python/swagger_client/models/animal_farm.py @@ -1,21 +1,19 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from pprint import pformat diff --git a/samples/client/petstore/python/swagger_client/models/api_response.py b/samples/client/petstore/python/swagger_client/models/api_response.py index 918b4a98223..c05cc73c2d5 100644 --- a/samples/client/petstore/python/swagger_client/models/api_response.py +++ b/samples/client/petstore/python/swagger_client/models/api_response.py @@ -1,21 +1,19 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from pprint import pformat diff --git a/samples/client/petstore/python/swagger_client/models/array_test.py b/samples/client/petstore/python/swagger_client/models/array_test.py index 8de34cb584a..f7901a4fda9 100644 --- a/samples/client/petstore/python/swagger_client/models/array_test.py +++ b/samples/client/petstore/python/swagger_client/models/array_test.py @@ -1,21 +1,19 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from pprint import pformat diff --git a/samples/client/petstore/python/swagger_client/models/cat.py b/samples/client/petstore/python/swagger_client/models/cat.py index 80b1e867a94..314ffa8b3c3 100644 --- a/samples/client/petstore/python/swagger_client/models/cat.py +++ b/samples/client/petstore/python/swagger_client/models/cat.py @@ -1,21 +1,19 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from pprint import pformat diff --git a/samples/client/petstore/python/swagger_client/models/category.py b/samples/client/petstore/python/swagger_client/models/category.py index e4f4a993cab..9c182956cf0 100644 --- a/samples/client/petstore/python/swagger_client/models/category.py +++ b/samples/client/petstore/python/swagger_client/models/category.py @@ -1,21 +1,19 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from pprint import pformat diff --git a/samples/client/petstore/python/swagger_client/models/dog.py b/samples/client/petstore/python/swagger_client/models/dog.py index 49fcfee4ca0..c76ce7791bb 100644 --- a/samples/client/petstore/python/swagger_client/models/dog.py +++ b/samples/client/petstore/python/swagger_client/models/dog.py @@ -1,21 +1,19 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from pprint import pformat diff --git a/samples/client/petstore/python/swagger_client/models/enum_class.py b/samples/client/petstore/python/swagger_client/models/enum_class.py index 7973fd0af8f..c595a3a6c85 100644 --- a/samples/client/petstore/python/swagger_client/models/enum_class.py +++ b/samples/client/petstore/python/swagger_client/models/enum_class.py @@ -1,21 +1,19 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from pprint import pformat diff --git a/samples/client/petstore/python/swagger_client/models/enum_test.py b/samples/client/petstore/python/swagger_client/models/enum_test.py index ad81055385c..df13ce10ba2 100644 --- a/samples/client/petstore/python/swagger_client/models/enum_test.py +++ b/samples/client/petstore/python/swagger_client/models/enum_test.py @@ -1,21 +1,19 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from pprint import pformat diff --git a/samples/client/petstore/python/swagger_client/models/format_test.py b/samples/client/petstore/python/swagger_client/models/format_test.py index 7fce3351dd4..8410e3c687a 100644 --- a/samples/client/petstore/python/swagger_client/models/format_test.py +++ b/samples/client/petstore/python/swagger_client/models/format_test.py @@ -1,21 +1,19 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from pprint import pformat diff --git a/samples/client/petstore/python/swagger_client/models/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python/swagger_client/models/mixed_properties_and_additional_properties_class.py index b177cc4b05f..2a1ba5f76d7 100644 --- a/samples/client/petstore/python/swagger_client/models/mixed_properties_and_additional_properties_class.py +++ b/samples/client/petstore/python/swagger_client/models/mixed_properties_and_additional_properties_class.py @@ -1,21 +1,19 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from pprint import pformat diff --git a/samples/client/petstore/python/swagger_client/models/model_200_response.py b/samples/client/petstore/python/swagger_client/models/model_200_response.py index f99847cbdd5..84266a0a2fe 100644 --- a/samples/client/petstore/python/swagger_client/models/model_200_response.py +++ b/samples/client/petstore/python/swagger_client/models/model_200_response.py @@ -1,21 +1,19 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from pprint import pformat diff --git a/samples/client/petstore/python/swagger_client/models/model_return.py b/samples/client/petstore/python/swagger_client/models/model_return.py index 8228f41943c..729b82d5d3c 100644 --- a/samples/client/petstore/python/swagger_client/models/model_return.py +++ b/samples/client/petstore/python/swagger_client/models/model_return.py @@ -1,21 +1,19 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from pprint import pformat diff --git a/samples/client/petstore/python/swagger_client/models/name.py b/samples/client/petstore/python/swagger_client/models/name.py index 21015169ee8..f2f637f125f 100644 --- a/samples/client/petstore/python/swagger_client/models/name.py +++ b/samples/client/petstore/python/swagger_client/models/name.py @@ -1,21 +1,19 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from pprint import pformat diff --git a/samples/client/petstore/python/swagger_client/models/order.py b/samples/client/petstore/python/swagger_client/models/order.py index 07f2c627d91..b4c2cd94845 100644 --- a/samples/client/petstore/python/swagger_client/models/order.py +++ b/samples/client/petstore/python/swagger_client/models/order.py @@ -1,21 +1,19 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from pprint import pformat diff --git a/samples/client/petstore/python/swagger_client/models/pet.py b/samples/client/petstore/python/swagger_client/models/pet.py index 60f762238f3..6da4260c704 100644 --- a/samples/client/petstore/python/swagger_client/models/pet.py +++ b/samples/client/petstore/python/swagger_client/models/pet.py @@ -1,21 +1,19 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from pprint import pformat diff --git a/samples/client/petstore/python/swagger_client/models/read_only_first.py b/samples/client/petstore/python/swagger_client/models/read_only_first.py index f517cb19d71..2fc96e9a0dd 100644 --- a/samples/client/petstore/python/swagger_client/models/read_only_first.py +++ b/samples/client/petstore/python/swagger_client/models/read_only_first.py @@ -1,21 +1,19 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from pprint import pformat diff --git a/samples/client/petstore/python/swagger_client/models/special_model_name.py b/samples/client/petstore/python/swagger_client/models/special_model_name.py index 3e45c0e4496..d2e7e7797e3 100644 --- a/samples/client/petstore/python/swagger_client/models/special_model_name.py +++ b/samples/client/petstore/python/swagger_client/models/special_model_name.py @@ -1,21 +1,19 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from pprint import pformat diff --git a/samples/client/petstore/python/swagger_client/models/tag.py b/samples/client/petstore/python/swagger_client/models/tag.py index f09a4c36df3..58564329cf3 100644 --- a/samples/client/petstore/python/swagger_client/models/tag.py +++ b/samples/client/petstore/python/swagger_client/models/tag.py @@ -1,21 +1,19 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from pprint import pformat diff --git a/samples/client/petstore/python/swagger_client/models/user.py b/samples/client/petstore/python/swagger_client/models/user.py index 87d132a5037..80572965d7e 100644 --- a/samples/client/petstore/python/swagger_client/models/user.py +++ b/samples/client/petstore/python/swagger_client/models/user.py @@ -1,21 +1,19 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ref: https://github.com/swagger-api/swagger-codegen + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ from pprint import pformat diff --git a/samples/client/petstore/python/swagger_client/rest.py b/samples/client/petstore/python/swagger_client/rest.py index 352bb503ac5..ed0a8e47f64 100644 --- a/samples/client/petstore/python/swagger_client/rest.py +++ b/samples/client/petstore/python/swagger_client/rest.py @@ -1,23 +1,21 @@ # coding: utf-8 """ -Copyright 2016 SmartBear Software + Copyright 2016 SmartBear Software - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -Credit: this file (rest.py) is modified based on rest.py in Dropbox Python SDK: -https://www.dropbox.com/developers/core/sdks/python + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. """ + from __future__ import absolute_import import sys From e41019fb2b4f3cd908afd5df62d79d7a06eef3cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20J=C3=B8rgensen?= Date: Thu, 26 May 2016 00:13:45 +0200 Subject: [PATCH 30/60] [PHP] Regenerate petstore sample --- .../petstore/php/SwaggerClient-php/LICENSE | 201 +++++++++++++++++ .../petstore/php/SwaggerClient-php/README.md | 19 +- .../php/SwaggerClient-php/autoload.php | 23 ++ .../php/SwaggerClient-php/docs/Api/FakeApi.md | 30 +-- .../php/SwaggerClient-php/docs/Api/PetApi.md | 26 +-- .../SwaggerClient-php/docs/Api/StoreApi.md | 6 +- .../php/SwaggerClient-php/docs/Api/UserApi.md | 20 +- .../SwaggerClient-php/docs/Model/ArrayTest.md | 9 + .../php/SwaggerClient-php/lib/Api/FakeApi.php | 29 ++- .../php/SwaggerClient-php/lib/Api/PetApi.php | 25 ++- .../SwaggerClient-php/lib/Api/StoreApi.php | 25 ++- .../php/SwaggerClient-php/lib/Api/UserApi.php | 29 ++- .../php/SwaggerClient-php/lib/ApiClient.php | 26 ++- .../SwaggerClient-php/lib/ApiException.php | 26 ++- .../SwaggerClient-php/lib/Configuration.php | 24 +- .../lib/Model/AdditionalPropertiesClass.php | 26 ++- .../SwaggerClient-php/lib/Model/Animal.php | 26 ++- .../lib/Model/AnimalFarm.php | 26 ++- .../lib/Model/ApiResponse.php | 26 ++- .../SwaggerClient-php/lib/Model/ArrayTest.php | 212 ++++++++++++++++++ .../php/SwaggerClient-php/lib/Model/Cat.php | 26 ++- .../SwaggerClient-php/lib/Model/Category.php | 26 ++- .../php/SwaggerClient-php/lib/Model/Dog.php | 26 ++- .../SwaggerClient-php/lib/Model/EnumClass.php | 26 ++- .../SwaggerClient-php/lib/Model/EnumTest.php | 26 ++- .../lib/Model/FormatTest.php | 26 ++- ...PropertiesAndAdditionalPropertiesClass.php | 26 ++- .../lib/Model/Model200Response.php | 26 ++- .../lib/Model/ModelReturn.php | 26 ++- .../php/SwaggerClient-php/lib/Model/Name.php | 26 ++- .../php/SwaggerClient-php/lib/Model/Order.php | 26 ++- .../php/SwaggerClient-php/lib/Model/Pet.php | 26 ++- .../lib/Model/ReadOnlyFirst.php | 26 ++- .../lib/Model/SpecialModelName.php | 26 ++- .../php/SwaggerClient-php/lib/Model/Tag.php | 26 ++- .../php/SwaggerClient-php/lib/Model/User.php | 26 ++- .../lib/ObjectSerializer.php | 28 ++- .../test/Model/ArrayTestTest.php | 80 +++++++ 38 files changed, 1051 insertions(+), 307 deletions(-) create mode 100644 samples/client/petstore/php/SwaggerClient-php/LICENSE create mode 100644 samples/client/petstore/php/SwaggerClient-php/docs/Model/ArrayTest.md create mode 100644 samples/client/petstore/php/SwaggerClient-php/lib/Model/ArrayTest.php create mode 100644 samples/client/petstore/php/SwaggerClient-php/test/Model/ArrayTestTest.php diff --git a/samples/client/petstore/php/SwaggerClient-php/LICENSE b/samples/client/petstore/php/SwaggerClient-php/LICENSE new file mode 100644 index 00000000000..8dada3edaf5 --- /dev/null +++ b/samples/client/petstore/php/SwaggerClient-php/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/samples/client/petstore/php/SwaggerClient-php/README.md b/samples/client/petstore/php/SwaggerClient-php/README.md index cf492be945c..8d69c7da9e4 100644 --- a/samples/client/petstore/php/SwaggerClient-php/README.md +++ b/samples/client/petstore/php/SwaggerClient-php/README.md @@ -1,11 +1,11 @@ # SwaggerClient-php -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 spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - API version: 1.0.0 - Package version: -- Build date: 2016-05-24T14:56:49.287+02:00 +- Build date: 2016-05-25T22:55:19.912+02:00 - Build package: class io.swagger.codegen.languages.PhpClientCodegen ## Requirements @@ -87,7 +87,7 @@ All URIs are relative to *http://petstore.swagger.io/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*FakeApi* | [**testEndpointParameters**](docs/Api/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**testEndpointParameters**](docs/Api/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *PetApi* | [**addPet**](docs/Api/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store *PetApi* | [**deletePet**](docs/Api/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet *PetApi* | [**findPetsByStatus**](docs/Api/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status @@ -116,6 +116,7 @@ Class | Method | HTTP request | Description - [Animal](docs/Model/Animal.md) - [AnimalFarm](docs/Model/AnimalFarm.md) - [ApiResponse](docs/Model/ApiResponse.md) + - [ArrayTest](docs/Model/ArrayTest.md) - [Cat](docs/Model/Cat.md) - [Category](docs/Model/Category.md) - [Dog](docs/Model/Dog.md) @@ -137,12 +138,6 @@ Class | Method | HTTP request | Description ## Documentation For Authorization -## api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - ## petstore_auth - **Type**: OAuth @@ -152,6 +147,12 @@ Class | Method | HTTP request | Description - **write:pets**: modify pets in your account - **read:pets**: read your pets +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + ## Author diff --git a/samples/client/petstore/php/SwaggerClient-php/autoload.php b/samples/client/petstore/php/SwaggerClient-php/autoload.php index 3cbe3df8a21..de411ee498a 100644 --- a/samples/client/petstore/php/SwaggerClient-php/autoload.php +++ b/samples/client/petstore/php/SwaggerClient-php/autoload.php @@ -1,4 +1,27 @@ testEndpointParameters($number, $double, $string, $byte, $integer, $int32, $int64, $float, $binary, $date, $date_time, $password) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example ```php @@ -45,18 +45,18 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **number** | **float**| None | - **double** | **double**| None | - **string** | **string**| None | - **byte** | **string**| None | - **integer** | **int**| None | [optional] - **int32** | **int**| None | [optional] - **int64** | **int**| None | [optional] - **float** | **float**| None | [optional] - **binary** | **string**| None | [optional] - **date** | **\DateTime**| None | [optional] - **date_time** | **\DateTime**| None | [optional] - **password** | **string**| None | [optional] + **number** | **float**| None | + **double** | **double**| None | + **string** | **string**| None | + **byte** | **string**| None | + **integer** | **int**| None | [optional] + **int32** | **int**| None | [optional] + **int64** | **int**| None | [optional] + **float** | **float**| None | [optional] + **binary** | **string**| None | [optional] + **date** | **\DateTime**| None | [optional] + **date_time** | **\DateTime**| None | [optional] + **password** | **string**| None | [optional] ### Return type diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Api/PetApi.md b/samples/client/petstore/php/SwaggerClient-php/docs/Api/PetApi.md index 3d6bbc24a81..d99eea4c925 100644 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Api/PetApi.md +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Api/PetApi.md @@ -44,7 +44,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\Swagger\Client\Model\Pet**](../Model/\Swagger\Client\Model\Pet.md)| Pet object that needs to be added to the store | + **body** | [**\Swagger\Client\Model\Pet**](../Model/\Swagger\Client\Model\Pet.md)| Pet object that needs to be added to the store | ### Return type @@ -92,8 +92,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pet_id** | **int**| Pet id to delete | - **api_key** | **string**| | [optional] + **pet_id** | **int**| Pet id to delete | + **api_key** | **string**| | [optional] ### Return type @@ -141,7 +141,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | [**string[]**](../Model/string.md)| Status values that need to be considered for filter | + **status** | [**string[]**](../Model/string.md)| Status values that need to be considered for filter | ### Return type @@ -189,7 +189,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **tags** | [**string[]**](../Model/string.md)| Tags to filter by | + **tags** | [**string[]**](../Model/string.md)| Tags to filter by | ### Return type @@ -239,7 +239,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pet_id** | **int**| ID of pet to return | + **pet_id** | **int**| ID of pet to return | ### Return type @@ -286,7 +286,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\Swagger\Client\Model\Pet**](../Model/\Swagger\Client\Model\Pet.md)| Pet object that needs to be added to the store | + **body** | [**\Swagger\Client\Model\Pet**](../Model/\Swagger\Client\Model\Pet.md)| Pet object that needs to be added to the store | ### Return type @@ -335,9 +335,9 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pet_id** | **int**| ID of pet that needs to be updated | - **name** | **string**| Updated name of the pet | [optional] - **status** | **string**| Updated status of the pet | [optional] + **pet_id** | **int**| ID of pet that needs to be updated | + **name** | **string**| Updated name of the pet | [optional] + **status** | **string**| Updated status of the pet | [optional] ### Return type @@ -387,9 +387,9 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pet_id** | **int**| ID of pet to update | - **additional_metadata** | **string**| Additional data to pass to server | [optional] - **file** | **\SplFileObject**| file to upload | [optional] + **pet_id** | **int**| ID of pet to update | + **additional_metadata** | **string**| Additional data to pass to server | [optional] + **file** | **\SplFileObject**| file to upload | [optional] ### Return type diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Api/StoreApi.md b/samples/client/petstore/php/SwaggerClient-php/docs/Api/StoreApi.md index 36a3db3bfb2..4ec88f083c7 100644 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Api/StoreApi.md +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Api/StoreApi.md @@ -37,7 +37,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **order_id** | **string**| ID of the order that needs to be deleted | + **order_id** | **string**| ID of the order that needs to be deleted | ### Return type @@ -128,7 +128,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **order_id** | **int**| ID of pet that needs to be fetched | + **order_id** | **int**| ID of pet that needs to be fetched | ### Return type @@ -173,7 +173,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\Swagger\Client\Model\Order**](../Model/\Swagger\Client\Model\Order.md)| order placed for purchasing the pet | + **body** | [**\Swagger\Client\Model\Order**](../Model/\Swagger\Client\Model\Order.md)| order placed for purchasing the pet | ### Return type diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Api/UserApi.md b/samples/client/petstore/php/SwaggerClient-php/docs/Api/UserApi.md index cc7a222b13f..6296b872220 100644 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Api/UserApi.md +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Api/UserApi.md @@ -41,7 +41,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\Swagger\Client\Model\User**](../Model/\Swagger\Client\Model\User.md)| Created user object | + **body** | [**\Swagger\Client\Model\User**](../Model/\Swagger\Client\Model\User.md)| Created user object | ### Return type @@ -85,7 +85,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\Swagger\Client\Model\User[]**](../Model/User.md)| List of user object | + **body** | [**\Swagger\Client\Model\User[]**](../Model/User.md)| List of user object | ### Return type @@ -129,7 +129,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\Swagger\Client\Model\User[]**](../Model/User.md)| List of user object | + **body** | [**\Swagger\Client\Model\User[]**](../Model/User.md)| List of user object | ### Return type @@ -173,7 +173,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **username** | **string**| The name that needs to be deleted | + **username** | **string**| The name that needs to be deleted | ### Return type @@ -203,7 +203,7 @@ Get user by user name require_once(__DIR__ . '/vendor/autoload.php'); $api_instance = new Swagger\Client\Api\UserApi(); -$username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing. +$username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing. try { $result = $api_instance->getUserByName($username); @@ -218,7 +218,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **username** | **string**| The name that needs to be fetched. Use user1 for testing. | + **username** | **string**| The name that needs to be fetched. Use user1 for testing. | ### Return type @@ -264,8 +264,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **username** | **string**| The user name for login | - **password** | **string**| The password for login in clear text | + **username** | **string**| The user name for login | + **password** | **string**| The password for login in clear text | ### Return type @@ -350,8 +350,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **username** | **string**| name that need to be deleted | - **body** | [**\Swagger\Client\Model\User**](../Model/\Swagger\Client\Model\User.md)| Updated user object | + **username** | **string**| name that need to be deleted | + **body** | [**\Swagger\Client\Model\User**](../Model/\Swagger\Client\Model\User.md)| Updated user object | ### Return type diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Model/ArrayTest.md b/samples/client/petstore/php/SwaggerClient-php/docs/Model/ArrayTest.md new file mode 100644 index 00000000000..9dcc2c97264 --- /dev/null +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Model/ArrayTest.md @@ -0,0 +1,9 @@ +# ArrayTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php index b8d5c48f552..d68bf418a00 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php @@ -9,20 +9,27 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ /** @@ -98,7 +105,7 @@ class FakeApi /** * Operation testEndpointParameters * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 . + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트. * * @param float $number None (required) * @param double $double None (required) @@ -126,7 +133,7 @@ class FakeApi /** * Operation testEndpointParametersWithHttpInfo * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 . + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트. * * @param float $number None (required) * @param double $double None (required) diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php index 402d727c5bf..9cca7063a53 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php @@ -9,20 +9,27 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ /** diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php index cfc6ddba361..d19ddb6f8c5 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php @@ -9,20 +9,27 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ /** diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php index 7d3188747a5..d735c083522 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php @@ -9,20 +9,27 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ /** @@ -435,7 +442,7 @@ class UserApi * * Get user by user name. * - * @param string $username The name that needs to be fetched. Use user1 for testing. (required) + * @param string $username The name that needs to be fetched. Use user1 for testing. (required) * * @return \Swagger\Client\Model\User * @throws \Swagger\Client\ApiException on non-2xx response @@ -452,7 +459,7 @@ class UserApi * * Get user by user name. * - * @param string $username The name that needs to be fetched. Use user1 for testing. (required) + * @param string $username The name that needs to be fetched. Use user1 for testing. (required) * * @return Array of \Swagger\Client\Model\User, HTTP status code, HTTP response headers (array of strings) * @throws \Swagger\Client\ApiException on non-2xx response diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/ApiClient.php b/samples/client/petstore/php/SwaggerClient-php/lib/ApiClient.php index da1f438f4da..02fb8729620 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/ApiClient.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/ApiClient.php @@ -10,21 +10,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/ApiException.php b/samples/client/petstore/php/SwaggerClient-php/lib/ApiException.php index 94421bac149..48551429c7f 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/ApiException.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/ApiException.php @@ -9,21 +9,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Configuration.php b/samples/client/petstore/php/SwaggerClient-php/lib/Configuration.php index aed1094c269..30b1b6c2dff 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Configuration.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Configuration.php @@ -11,19 +11,25 @@ */ /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ /** diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/AdditionalPropertiesClass.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/AdditionalPropertiesClass.php index 4999bc62a8d..4b5703134c1 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/AdditionalPropertiesClass.php @@ -10,21 +10,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php index 6b05974a644..33ee60a0b7a 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php @@ -10,21 +10,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/AnimalFarm.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/AnimalFarm.php index a699455bcf9..e9857f27f76 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/AnimalFarm.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/AnimalFarm.php @@ -10,21 +10,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ApiResponse.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ApiResponse.php index 53ced7e8810..fc9c4c2abed 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ApiResponse.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ApiResponse.php @@ -10,21 +10,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ArrayTest.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ArrayTest.php new file mode 100644 index 00000000000..44af1286a6d --- /dev/null +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ArrayTest.php @@ -0,0 +1,212 @@ +container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php index 9eb4de596d8..efabd53cbbc 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php @@ -10,21 +10,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php index 8e3c5e6fb5e..d9ff6aa58e2 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php @@ -10,21 +10,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php index 9212a8c5d3b..081fbd4837d 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php @@ -10,21 +10,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumClass.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumClass.php index 71fb3357d14..4c67a277dde 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumClass.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumClass.php @@ -10,21 +10,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumTest.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumTest.php index 77751f9c43f..673b3ce3624 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumTest.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumTest.php @@ -10,21 +10,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php index 07148e70189..e9b8bc9cf7f 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php @@ -10,21 +10,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php index 86bb4051f0e..fd397440cfc 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -10,21 +10,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php index 88a28981f29..f6d9a4e2e10 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php @@ -10,21 +10,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php index d1b188ff231..f39fbd0bdef 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php @@ -10,21 +10,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php index 294d45dffe3..32dac8410f2 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php @@ -10,21 +10,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php index 3bd377eae71..cf5f61a9640 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php @@ -10,21 +10,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php index 378c979629c..a81e9eb33f9 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php @@ -10,21 +10,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ReadOnlyFirst.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ReadOnlyFirst.php index 1378f043b64..22e534a51e5 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ReadOnlyFirst.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ReadOnlyFirst.php @@ -10,21 +10,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php index 025ee4b7b3b..e7c97a5ef56 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php @@ -10,21 +10,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php index 8fba6e43dd8..6a378c7f349 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php @@ -10,21 +10,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php index 04b4f749437..e61af43c647 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php @@ -10,21 +10,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/SwaggerClient-php/lib/ObjectSerializer.php index af6e87f89fc..ce77aa6c3b3 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/ObjectSerializer.php @@ -10,21 +10,29 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */ + /** - * Copyright 2016 SmartBear Software + * Swagger Petstore * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen @@ -256,7 +264,7 @@ class ObjectSerializer } else { return null; } - } elseif (in_array($class, array('integer', 'int', 'void', 'number', 'object', 'double', 'float', 'byte', 'DateTime', 'string', 'mixed', 'boolean', 'bool'))) { + } elseif (in_array($class, array('void', 'bool', 'string', 'double', 'byte', 'mixed', 'integer', 'float', 'int', 'DateTime', 'number', 'boolean', 'object'))) { settype($data, $class); return $data; } elseif ($class === '\SplFileObject') { diff --git a/samples/client/petstore/php/SwaggerClient-php/test/Model/ArrayTestTest.php b/samples/client/petstore/php/SwaggerClient-php/test/Model/ArrayTestTest.php new file mode 100644 index 00000000000..245abb7641e --- /dev/null +++ b/samples/client/petstore/php/SwaggerClient-php/test/Model/ArrayTestTest.php @@ -0,0 +1,80 @@ + Date: Wed, 25 May 2016 22:51:10 -0400 Subject: [PATCH 31/60] update package.json and fix webpack.html --- .../petstore/typescript-fetch/tests/default/package.json | 2 +- .../typescript-fetch/tests/default/run_tests_via_webpack.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/client/petstore/typescript-fetch/tests/default/package.json b/samples/client/petstore/typescript-fetch/tests/default/package.json index 07a38691ae1..3bab3bdb789 100644 --- a/samples/client/petstore/typescript-fetch/tests/default/package.json +++ b/samples/client/petstore/typescript-fetch/tests/default/package.json @@ -6,7 +6,7 @@ "devDependencies": { "browserify": "^13.0.1", "ts-loader": "^0.8.2", - "tsify": "^0.15.5", + "tsify": "^0.16.0", "typescript": "^1.8.10", "typings": "^0.8.1", "webpack": "^1.13.0" diff --git a/samples/client/petstore/typescript-fetch/tests/default/run_tests_via_webpack.html b/samples/client/petstore/typescript-fetch/tests/default/run_tests_via_webpack.html index 625c8859422..ace737c7ccd 100644 --- a/samples/client/petstore/typescript-fetch/tests/default/run_tests_via_webpack.html +++ b/samples/client/petstore/typescript-fetch/tests/default/run_tests_via_webpack.html @@ -15,8 +15,8 @@ }); - - + +