From 07d145828f33e9e2d9e5be6694bfb1d29db4fe07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A1ndor=20Istv=C3=A1n=20Kr=C3=A1cser?= Date: Mon, 14 Oct 2019 06:16:01 +0200 Subject: [PATCH 001/142] add Banzai Cloud to users list (#4144) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d17a67f6d6b2..5d0874ed82f5 100644 --- a/README.md +++ b/README.md @@ -545,6 +545,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [Angular.Schule](https://angular.schule/) - [ASKUL](https://www.askul.co.jp) - [b<>com](https://b-com.com/en) +- [Banzai Cloud](https://banzaicloud.com) - [BIMData.io](https://bimdata.io) - [Bithost GmbH](https://www.bithost.ch) - [Boxever](https://www.boxever.com/) From e6fcfdf184bea9f49f843b622ff1a386cf2c6d1f Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 14 Oct 2019 21:23:43 +0800 Subject: [PATCH 002/142] Add California State University, Northridge to the list of users (#4147) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5d0874ed82f5..fc9a19dce256 100644 --- a/README.md +++ b/README.md @@ -549,6 +549,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [BIMData.io](https://bimdata.io) - [Bithost GmbH](https://www.bithost.ch) - [Boxever](https://www.boxever.com/) +- [California State University, Northridge](https://www.csun.edu) - [CAM](https://www.cam-inc.co.jp/) - [Camptocamp](https://www.camptocamp.com/en) - [codecentric AG](https://www.codecentric.de/) From ec4ac07dfe0d42beb74afaa91e1972f03ad0ae3d Mon Sep 17 00:00:00 2001 From: gurumeditator Date: Mon, 14 Oct 2019 10:25:50 -0400 Subject: [PATCH 003/142] [Java] fix jackson-databind-nullable version variable due to Gradle Incompatibility (Template Update) (#4148) * Replaced dashes with underscores in build.gradle files. * Updated mustache template files --- .../src/main/resources/Java/build.gradle.mustache | 4 ++-- .../main/resources/Java/libraries/feign/build.gradle.mustache | 4 ++-- .../Java/libraries/google-api-client/build.gradle.mustache | 4 ++-- .../resources/Java/libraries/jersey2/build.gradle.mustache | 4 ++-- .../Java/libraries/rest-assured/build.gradle.mustache | 4 ++-- .../resources/Java/libraries/resteasy/build.gradle.mustache | 4 ++-- .../Java/libraries/resttemplate/build.gradle.mustache | 4 ++-- .../resources/Java/libraries/retrofit2/build.gradle.mustache | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache index 99d255c54db1..70462ccbd8e3 100644 --- a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache @@ -138,7 +138,7 @@ ext { swagger_annotations_version = "1.5.22" jackson_version = "{{^threetenbp}}2.9.10{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}}" jackson_databind_version = "{{^threetenbp}}2.9.10{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}}" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" jersey_version = "1.19.4" jodatime_version = "2.9.9" junit_version = "4.12" @@ -153,7 +153,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" {{#joda}} compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" {{/joda}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache index a92022e83aec..34a2bb98015c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache @@ -122,7 +122,7 @@ ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.10" jackson_databind_version = "2.9.10" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" {{#threetenbp}} threepane_version = "2.6.4" {{/threetenbp}} @@ -142,7 +142,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" {{#joda}} compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" {{/joda}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache index 4471072ec2f1..d42c3e13899a 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache @@ -122,7 +122,7 @@ ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.10" jackson_databind_version = "2.9.10" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" google_api_client_version = "1.23.0" jersey_common_version = "2.25.1" jodatime_version = "2.9.9" @@ -141,7 +141,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" {{#java8}} compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" {{/java8}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache index 588239f5c88f..c86178e7d040 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache @@ -121,7 +121,7 @@ ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.10" jackson_databind_version = "2.9.10" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" {{#supportJava6}} jersey_version = "2.6" commons_io_version=2.5 @@ -145,7 +145,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" {{#joda}} compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" {{/joda}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache index d67815a76aad..726c343301e5 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache @@ -101,7 +101,7 @@ ext { {{#jackson}} jackson_version = "{{^threetenbp}}2.9.9{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}}" jackson_databind_version = "{{^threetenbp}}2.9.9{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}}" - jackson-databind-nullable-version = 0.2.0 + jackson_databind_nullable_version = 0.2.0 {{/jackson}} {{#gson}} gson_version = "2.8.5" @@ -125,7 +125,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" {{/jackson}} {{#gson}} compile "io.gsonfire:gson-fire:$gson_fire_version" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache index 1c133a743537..930ae737fdcb 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache @@ -121,7 +121,7 @@ ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.10" jackson_databind_version = "2.9.10" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" threetenbp_version = "2.6.4" resteasy_version = "3.1.3.Final" {{^java8}} @@ -144,7 +144,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$threetenbp_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" {{#java8}} compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" {{/java8}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache index 1815ab926e11..06700890574c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache @@ -122,7 +122,7 @@ ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.10" jackson_databind_version = "2.9.10" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" spring_web_version = "4.3.9.RELEASE" jodatime_version = "2.9.9" junit_version = "4.12" @@ -139,7 +139,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" {{#java8}} compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" {{/java8}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache index cf02f243950a..85aa12d6cca7 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache @@ -133,7 +133,7 @@ ext { {{#play26}} jackson_version = "2.9.10" jackson_databind_version = "2.9.10" - jackson-databind-nullable-version = "0.2.0" + jackson_databind_nullable_version = "0.2.0" play_version = "2.6.7" {{/play26}} {{/usePlayWS}} @@ -190,7 +190,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" - compile "org.openapitools:jackson-databind-nullable:$jackson-databind-nullable-version" + compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" compile "com.fasterxml.jackson.datatype:jackson-datatype-{{^java8}}joda{{/java8}}{{#java8}}jsr310{{/java8}}:$jackson_version" {{/usePlayWS}} From c231675a0591d0131c081621556446d52e4833cb Mon Sep 17 00:00:00 2001 From: Dec12 | Fujigon Date: Mon, 14 Oct 2019 23:55:30 +0900 Subject: [PATCH 004/142] don't forget to copy the object mapper for serialization, in order to avoid setting affects other serialization (#4093) --- .../org/openapitools/codegen/serializer/SerializerUtils.java | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/serializer/SerializerUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/serializer/SerializerUtils.java index e2837499f403..16a8af68a7e1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/serializer/SerializerUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/serializer/SerializerUtils.java @@ -19,6 +19,7 @@ public static String toYamlString(OpenAPI openAPI) { SimpleModule module = createModule(); try { return Yaml.mapper() + .copy() .registerModule(module) .configure(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY, true) .writeValueAsString(openAPI) From 5a9e5642cbc356cb7669695cc66a5cad2ee49f03 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 15 Oct 2019 00:15:46 +0800 Subject: [PATCH 005/142] Add a link to autopp's blog post (#4152) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index fc9a19dce256..ab1862c14dee 100644 --- a/README.md +++ b/README.md @@ -643,6 +643,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2019-09-22 - [RESTful APIs: Tutorial of OpenAPI Specification](https://medium.com/@amirm.lavasani/restful-apis-tutorial-of-openapi-specification-eeada0e3901d) by [Amir Lavasani](https://medium.com/@amirm.lavasani) - 2019-09-22 - [Redefining SDKs as software diversity kits](https://devrel.net/dev-rel/redefining-sdks-as-software-diversity-kits) by [Sid Maestre (Xero)](https://twitter.com/sidneyallen) at [DevRelCon San Francisco 2019](https://sf2019.devrel.net/) - 2019-09-23 - [swaggerからOpenApi GeneratorでSpringのコードを自動生成](https://qiita.com/littleFeet/items/492df2ad68a0799a5e5e) by [@littleFeet](https://qiita.com/littleFeet) at [Qiita](https://qiita.com/) +- 2019-10-09 - [openapi-generator で生成した Go クライアントで Bearer 認証をする](https://autopp-tech.hatenablog.com/entry/2019/10/09/222039) by [Akira Tanimura](https://github.com/autopp) ## [6 - About Us](#table-of-contents) From 2cab048d41094b80bd283b499750399c228951e5 Mon Sep 17 00:00:00 2001 From: Zbigniew Mandziejewicz Date: Mon, 14 Oct 2019 19:19:47 +0200 Subject: [PATCH 006/142] [go-experimental] export required fields without pointer (#3989) * [go-experimental] export required fields without pointer, only omitempty if type is not required and not nullable * fix: go-experimental sample code * fix: export nullable field as pointer * update samples * feat: nullable types * add getter/setter for required fields, improve docstring --- .../GoClientExperimentalCodegen.java | 27 +- .../resources/go-experimental/model.mustache | 127 +++++---- .../resources/go-experimental/utils.mustache | 215 ++++++++++++++- .../petstore/go-experimental/auth_test.go | 25 +- .../go-petstore/model_200_response.go | 42 +-- .../model_additional_properties_any_type.go | 34 ++- .../model_additional_properties_array.go | 34 ++- .../model_additional_properties_boolean.go | 34 ++- .../model_additional_properties_class.go | 114 +++----- .../model_additional_properties_integer.go | 34 ++- .../model_additional_properties_number.go | 34 ++- .../model_additional_properties_object.go | 34 ++- .../model_additional_properties_string.go | 34 ++- .../go-petstore/model_animal.go | 72 ++--- .../go-petstore/model_api_response.go | 50 ++-- .../model_array_of_array_of_number_only.go | 34 ++- .../go-petstore/model_array_of_number_only.go | 34 ++- .../go-petstore/model_array_test_.go | 50 ++-- .../go-petstore/model_capitalization.go | 74 +++-- .../go-experimental/go-petstore/model_cat.go | 80 +++--- .../go-petstore/model_cat_all_of.go | 34 ++- .../go-petstore/model_category.go | 70 ++--- .../go-petstore/model_class_model.go | 34 ++- .../go-petstore/model_client.go | 34 ++- .../go-experimental/go-petstore/model_dog.go | 80 +++--- .../go-petstore/model_dog_all_of.go | 34 ++- .../go-petstore/model_enum_arrays.go | 42 +-- .../go-petstore/model_enum_class.go | 32 +++ .../go-petstore/model_enum_test_.go | 96 +++---- .../go-experimental/go-petstore/model_file.go | 34 ++- .../model_file_schema_test_class.go | 42 +-- .../go-petstore/model_format_test_.go | 257 +++++------------ .../go-petstore/model_has_only_read_only.go | 42 +-- .../go-experimental/go-petstore/model_list.go | 34 ++- .../go-petstore/model_map_test_.go | 58 ++-- ...perties_and_additional_properties_class.go | 52 ++-- .../go-experimental/go-petstore/model_name.go | 88 +++--- .../go-petstore/model_number_only.go | 34 ++- .../go-petstore/model_order.go | 76 +++--- .../go-petstore/model_outer_composite.go | 50 ++-- .../go-petstore/model_outer_enum.go | 32 +++ .../go-experimental/go-petstore/model_pet.go | 133 +++------ .../go-petstore/model_read_only_first.go | 42 +-- .../go-petstore/model_return.go | 34 ++- .../go-petstore/model_special_model_name.go | 34 ++- .../go-experimental/go-petstore/model_tag.go | 42 +-- .../go-petstore/model_type_holder_default.go | 210 ++++---------- .../go-petstore/model_type_holder_example.go | 247 ++++------------- .../go-experimental/go-petstore/model_user.go | 90 +++--- .../go-petstore/model_xml_item.go | 258 ++++++------------ .../go-experimental/go-petstore/utils.go | 215 ++++++++++++++- .../petstore/go-experimental/pet_api_test.go | 6 +- .../petstore/go-experimental/user_api_test.go | 2 +- 53 files changed, 1958 insertions(+), 1792 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java index e541998cddc2..76d265049693 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java @@ -36,14 +36,12 @@ public GoClientExperimentalCodegen() { outputFolder = "generated-code/go-experimental"; embeddedTemplateDir = templateDir = "go-experimental"; - generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) - .stability(Stability.EXPERIMENTAL) - .build(); + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata).stability(Stability.EXPERIMENTAL).build(); } /** - * Configures a friendly name for the generator. This will be used by the generator - * to select the library with the -g flag. + * Configures a friendly name for the generator. This will be used by the + * generator to select the library with the -g flag. * * @return the friendly name for the generator */ @@ -53,7 +51,7 @@ public String getName() { } /** - * Returns human-friendly help for the generator. Provide the consumer with help + * Returns human-friendly help for the generator. Provide the consumer with help * tips, parameters here * * @return A string value for the help message @@ -70,24 +68,25 @@ public void processOpts() { } @Override - public Map postProcessModels(Map objs) { + public Map postProcessModels(Map objs) { objs = super.postProcessModels(objs); - List> imports = (List>) objs.get("imports"); - boolean addedErrorsImport = false; List> models = (List>) objs.get("models"); for (Map m : models) { Object v = m.get("model"); if (v instanceof CodegenModel) { CodegenModel model = (CodegenModel) v; - if (!model.isEnum) { - imports.add(createMapping("import", "encoding/json")); + if (model.isEnum) { + continue; } + for (CodegenProperty param : model.vars) { - if (!addedErrorsImport && param.required) { - imports.add(createMapping("import", "errors")); - addedErrorsImport = true; + if (!param.isNullable) { + continue; } + + param.dataType = "Nullable" + Character.toUpperCase(param.dataType.charAt(0)) + + param.dataType.substring(1); } } } diff --git a/modules/openapi-generator/src/main/resources/go-experimental/model.mustache b/modules/openapi-generator/src/main/resources/go-experimental/model.mustache index 65267d0e483c..c72fab46a94a 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/model.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/model.mustache @@ -1,15 +1,15 @@ {{>partial_header}} package {{packageName}} + {{#models}} -{{#imports}} -{{#-first}} import ( -{{/-first}} + "bytes" + "encoding/json" +{{#imports}} "{{import}}" -{{#-last}} -) -{{/-last}} {{/imports}} +) + {{#model}} {{#isEnum}} // {{{classname}}} {{#description}}{{{.}}}{{/description}}{{^description}}the model '{{{classname}}}'{{/description}} @@ -25,6 +25,32 @@ const ( {{/enumVars}} {{/allowableValues}} ) + +type Nullable{{{classname}}} struct { + Value {{{classname}}} + ExplicitNull bool +} + +func (v Nullable{{{classname}}}) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != "": + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *Nullable{{{classname}}}) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + {{/isEnum}} {{^isEnum}} // {{classname}}{{#description}} {{{description}}}{{/description}}{{^description}} struct for {{{classname}}}{{/description}} @@ -35,15 +61,32 @@ type {{classname}} struct { {{#description}} // {{{description}}} {{/description}} - {{name}} *{{{dataType}}} `json:"{{baseName}},omitempty"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}` -{{#isNullable}} isExplicitNull{{name}} bool `json:"-"{{#withXml}} xml:"-"{{/withXml}}`{{/isNullable}} + {{name}} {{^required}}*{{/required}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}` {{/vars}} } {{/isEnum}} {{^isEnum}} {{#vars}} -// Get{{name}} returns the {{name}} field if non-nil, zero value otherwise. +{{#required}} +// Get{{name}} returns the {{name}} field value +func (o *{{classname}}) Get{{name}}() {{dataType}} { + if o == nil { + var ret {{dataType}} + return ret + } + + return o.{{name}} +} + +// Set{{name}} sets field value +func (o *{{classname}}) Set{{name}}(v {{dataType}}) { + o.{{name}} = v +} + +{{/required}} +{{^required}} +// Get{{name}} returns the {{name}} field value if set, zero value otherwise. func (o *{{classname}}) Get{{name}}() {{dataType}} { if o == nil || o.{{name}} == nil { var ret {{dataType}} @@ -52,7 +95,7 @@ func (o *{{classname}}) Get{{name}}() {{dataType}} { return *o.{{name}} } -// Get{{name}}Ok returns a tuple with the {{name}} field if it's non-nil, zero value otherwise +// Get{{name}}Ok returns a tuple with the {{name}} field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *{{classname}}) Get{{name}}Ok() ({{dataType}}, bool) { if o == nil || o.{{name}} == nil { @@ -76,54 +119,30 @@ func (o *{{classname}}) Set{{name}}(v {{dataType}}) { o.{{name}} = &v } -{{#isNullable}} -// Set{{name}}ExplicitNull (un)sets {{name}} to be considered as explicit "null" value -// when serializing to JSON (pass true as argument to set this, false to unset) -// The {{name}} value is set to nil even if false is passed -func (o *{{classname}}) Set{{name}}ExplicitNull(b bool) { - o.{{name}} = nil - o.isExplicitNull{{name}} = b -} -{{/isNullable}} +{{/required}} {{/vars}} +type Nullable{{{classname}}} struct { + Value {{{classname}}} + ExplicitNull bool +} -// MarshalJSON returns the JSON representation of the model. -func (o {{classname}}) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - {{#vars}} - {{#required}} - {{! if argument is required and not nullable, it can't be nil}} - {{^isNullable}} - if o.{{name}} == nil { - return nil, errors.New("{{name}} is required and not nullable, but was not set on {{classname}}") - }{{/isNullable}} - {{! if argument is required and nullable, it *must* have isExplicitNull set to true when it's nil}} - {{#isNullable}} - if o.{{name}} == nil && !o.isExplicitNull{{name}} { - return nil, errors.New("{{name}} is required and nullable, but it wasn't set to be explicit null") - } - {{/isNullable}} - {{/required}} - {{! if argument is nullable, only serialize it if it is nil *and* was explicitly set to nil}} - {{#isNullable}} - if o.{{name}} == nil { - if o.isExplicitNull{{name}} { - toSerialize["{{baseName}}"] = o.{{name}} - } - } else { - toSerialize["{{baseName}}"] = o.{{name}} - } - {{/isNullable}} - {{! if argument is not nullable, don't set it if it is nil}} - {{^isNullable}} - if o.{{name}} != nil { - toSerialize["{{baseName}}"] = o.{{name}} - } - {{/isNullable}} - {{/vars}} - return json.Marshal(toSerialize) +func (v Nullable{{{classname}}}) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } } +func (v *Nullable{{{classname}}}) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} {{/isEnum}} {{/model}} diff --git a/modules/openapi-generator/src/main/resources/go-experimental/utils.mustache b/modules/openapi-generator/src/main/resources/go-experimental/utils.mustache index e3598373cb4a..4502401b6ea4 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/utils.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/utils.mustache @@ -1,7 +1,14 @@ {{>partial_header}} package {{packageName}} -import "time" +import ( + "bytes" + "encoding/json" + "errors" + "time" +) + +var ErrInvalidNullable = errors.New("nullable cannot have non-zero Value and ExplicitNull simultaneously") // PtrBool is a helper routine that returns a pointer to given integer value. func PtrBool(v bool) *bool { return &v } @@ -15,9 +22,6 @@ func PtrInt32(v int32) *int32 { return &v } // PtrInt64 is a helper routine that returns a pointer to given integer value. func PtrInt64(v int64) *int64 { return &v } -// PtrFloat is a helper routine that returns a pointer to given float value. -func PtrFloat(v float32) *float32 { return &v } - // PtrFloat32 is a helper routine that returns a pointer to given float value. func PtrFloat32(v float32) *float32 { return &v } @@ -28,4 +32,205 @@ func PtrFloat64(v float64) *float64 { return &v } func PtrString(v string) *string { return &v } // PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } \ No newline at end of file +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + Value bool + ExplicitNull bool +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableInt struct { + Value int + ExplicitNull bool +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != 0: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableInt32 struct { + Value int32 + ExplicitNull bool +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != 0: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableInt64 struct { + Value int64 + ExplicitNull bool +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != 0: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableFloat32 struct { + Value float32 + ExplicitNull bool +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != 0.0: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableFloat64 struct { + Value float64 + ExplicitNull bool +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != 0.0: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableString struct { + Value string + ExplicitNull bool +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != "": + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableTime struct { + Value time.Time + ExplicitNull bool +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && !v.Value.IsZero(): + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return v.Value.MarshalJSON() + } +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} \ No newline at end of file diff --git a/samples/client/petstore/go-experimental/auth_test.go b/samples/client/petstore/go-experimental/auth_test.go index 1bb5d8175635..b788cc1199e3 100644 --- a/samples/client/petstore/go-experimental/auth_test.go +++ b/samples/client/petstore/go-experimental/auth_test.go @@ -37,8 +37,8 @@ func TestOAuth2(t *testing.T) { tokenSource := cfg.TokenSource(createContext(nil), &tok) auth := context.WithValue(context.Background(), sw.ContextOAuth2, tokenSource) - newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: sw.PtrString("gopher"), - PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), + newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", + PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(context.Background(), newPet) @@ -72,8 +72,8 @@ func TestBasicAuth(t *testing.T) { Password: "f4k3p455", }) - newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: sw.PtrString("gopher"), - PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), + newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", + PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(auth, newPet) @@ -102,8 +102,8 @@ func TestBasicAuth(t *testing.T) { func TestAccessToken(t *testing.T) { auth := context.WithValue(context.Background(), sw.ContextAccessToken, "TESTFAKEACCESSTOKENISFAKE") - newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: sw.PtrString("gopher"), - PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), + newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", + PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(nil, newPet) @@ -132,8 +132,8 @@ func TestAccessToken(t *testing.T) { func TestAPIKeyNoPrefix(t *testing.T) { auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": sw.APIKey{Key: "TEST123"}}) - newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: sw.PtrString("gopher"), - PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), + newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", + PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(context.Background(), newPet) @@ -167,8 +167,8 @@ func TestAPIKeyNoPrefix(t *testing.T) { func TestAPIKeyWithPrefix(t *testing.T) { auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": sw.APIKey{Key: "TEST123", Prefix: "Bearer"}}) - newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: sw.PtrString("gopher"), - PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), + newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", + PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(nil, newPet) @@ -200,9 +200,8 @@ func TestAPIKeyWithPrefix(t *testing.T) { } func TestDefaultHeader(t *testing.T) { - - newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: sw.PtrString("gopher"), - PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), + newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", + PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(context.Background(), newPet) diff --git a/samples/client/petstore/go-experimental/go-petstore/model_200_response.go b/samples/client/petstore/go-experimental/go-petstore/model_200_response.go index cebe724d060e..6aa7f9b6a79e 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_200_response.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_200_response.go @@ -8,18 +8,19 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // Model200Response Model for testing model name starting with number type Model200Response struct { Name *int32 `json:"name,omitempty"` - Class *string `json:"class,omitempty"` - } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise. func (o *Model200Response) GetName() int32 { if o == nil || o.Name == nil { var ret int32 @@ -28,7 +29,7 @@ func (o *Model200Response) GetName() int32 { return *o.Name } -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Model200Response) GetNameOk() (int32, bool) { if o == nil || o.Name == nil { @@ -52,7 +53,7 @@ func (o *Model200Response) SetName(v int32) { o.Name = &v } -// GetClass returns the Class field if non-nil, zero value otherwise. +// GetClass returns the Class field value if set, zero value otherwise. func (o *Model200Response) GetClass() string { if o == nil || o.Class == nil { var ret string @@ -61,7 +62,7 @@ func (o *Model200Response) GetClass() string { return *o.Class } -// GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise +// GetClassOk returns a tuple with the Class field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Model200Response) GetClassOk() (string, bool) { if o == nil || o.Class == nil { @@ -85,17 +86,26 @@ func (o *Model200Response) SetClass(v string) { o.Class = &v } +type NullableModel200Response struct { + Value Model200Response + ExplicitNull bool +} + +func (v NullableModel200Response) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o Model200Response) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.Class != nil { - toSerialize["class"] = o.Class +func (v *NullableModel200Response) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go index 586b84f029b6..c6fbcc703b3c 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // AdditionalPropertiesAnyType struct for AdditionalPropertiesAnyType type AdditionalPropertiesAnyType struct { Name *string `json:"name,omitempty"` - } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise. func (o *AdditionalPropertiesAnyType) GetName() string { if o == nil || o.Name == nil { var ret string @@ -26,7 +28,7 @@ func (o *AdditionalPropertiesAnyType) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesAnyType) GetNameOk() (string, bool) { if o == nil || o.Name == nil { @@ -50,14 +52,26 @@ func (o *AdditionalPropertiesAnyType) SetName(v string) { o.Name = &v } +type NullableAdditionalPropertiesAnyType struct { + Value AdditionalPropertiesAnyType + ExplicitNull bool +} + +func (v NullableAdditionalPropertiesAnyType) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o AdditionalPropertiesAnyType) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name +func (v *NullableAdditionalPropertiesAnyType) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go index 8cda0b7d08da..b1bf7f332828 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // AdditionalPropertiesArray struct for AdditionalPropertiesArray type AdditionalPropertiesArray struct { Name *string `json:"name,omitempty"` - } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise. func (o *AdditionalPropertiesArray) GetName() string { if o == nil || o.Name == nil { var ret string @@ -26,7 +28,7 @@ func (o *AdditionalPropertiesArray) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesArray) GetNameOk() (string, bool) { if o == nil || o.Name == nil { @@ -50,14 +52,26 @@ func (o *AdditionalPropertiesArray) SetName(v string) { o.Name = &v } +type NullableAdditionalPropertiesArray struct { + Value AdditionalPropertiesArray + ExplicitNull bool +} + +func (v NullableAdditionalPropertiesArray) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o AdditionalPropertiesArray) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name +func (v *NullableAdditionalPropertiesArray) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go index 0148cce9ab42..c1aacbc1eb51 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // AdditionalPropertiesBoolean struct for AdditionalPropertiesBoolean type AdditionalPropertiesBoolean struct { Name *string `json:"name,omitempty"` - } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise. func (o *AdditionalPropertiesBoolean) GetName() string { if o == nil || o.Name == nil { var ret string @@ -26,7 +28,7 @@ func (o *AdditionalPropertiesBoolean) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesBoolean) GetNameOk() (string, bool) { if o == nil || o.Name == nil { @@ -50,14 +52,26 @@ func (o *AdditionalPropertiesBoolean) SetName(v string) { o.Name = &v } +type NullableAdditionalPropertiesBoolean struct { + Value AdditionalPropertiesBoolean + ExplicitNull bool +} + +func (v NullableAdditionalPropertiesBoolean) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o AdditionalPropertiesBoolean) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name +func (v *NullableAdditionalPropertiesBoolean) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go index 6d9025a8965b..3c1e8db6244f 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go @@ -8,36 +8,28 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // AdditionalPropertiesClass struct for AdditionalPropertiesClass type AdditionalPropertiesClass struct { MapString *map[string]string `json:"map_string,omitempty"` - MapNumber *map[string]float32 `json:"map_number,omitempty"` - MapInteger *map[string]int32 `json:"map_integer,omitempty"` - MapBoolean *map[string]bool `json:"map_boolean,omitempty"` - MapArrayInteger *map[string][]int32 `json:"map_array_integer,omitempty"` - MapArrayAnytype *map[string][]map[string]interface{} `json:"map_array_anytype,omitempty"` - MapMapString *map[string]map[string]string `json:"map_map_string,omitempty"` - MapMapAnytype *map[string]map[string]map[string]interface{} `json:"map_map_anytype,omitempty"` - Anytype1 *map[string]interface{} `json:"anytype_1,omitempty"` - Anytype2 *map[string]interface{} `json:"anytype_2,omitempty"` - Anytype3 *map[string]interface{} `json:"anytype_3,omitempty"` - } -// GetMapString returns the MapString field if non-nil, zero value otherwise. +// GetMapString returns the MapString field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetMapString() map[string]string { if o == nil || o.MapString == nil { var ret map[string]string @@ -46,7 +38,7 @@ func (o *AdditionalPropertiesClass) GetMapString() map[string]string { return *o.MapString } -// GetMapStringOk returns a tuple with the MapString field if it's non-nil, zero value otherwise +// GetMapStringOk returns a tuple with the MapString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesClass) GetMapStringOk() (map[string]string, bool) { if o == nil || o.MapString == nil { @@ -70,7 +62,7 @@ func (o *AdditionalPropertiesClass) SetMapString(v map[string]string) { o.MapString = &v } -// GetMapNumber returns the MapNumber field if non-nil, zero value otherwise. +// GetMapNumber returns the MapNumber field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetMapNumber() map[string]float32 { if o == nil || o.MapNumber == nil { var ret map[string]float32 @@ -79,7 +71,7 @@ func (o *AdditionalPropertiesClass) GetMapNumber() map[string]float32 { return *o.MapNumber } -// GetMapNumberOk returns a tuple with the MapNumber field if it's non-nil, zero value otherwise +// GetMapNumberOk returns a tuple with the MapNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesClass) GetMapNumberOk() (map[string]float32, bool) { if o == nil || o.MapNumber == nil { @@ -103,7 +95,7 @@ func (o *AdditionalPropertiesClass) SetMapNumber(v map[string]float32) { o.MapNumber = &v } -// GetMapInteger returns the MapInteger field if non-nil, zero value otherwise. +// GetMapInteger returns the MapInteger field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetMapInteger() map[string]int32 { if o == nil || o.MapInteger == nil { var ret map[string]int32 @@ -112,7 +104,7 @@ func (o *AdditionalPropertiesClass) GetMapInteger() map[string]int32 { return *o.MapInteger } -// GetMapIntegerOk returns a tuple with the MapInteger field if it's non-nil, zero value otherwise +// GetMapIntegerOk returns a tuple with the MapInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesClass) GetMapIntegerOk() (map[string]int32, bool) { if o == nil || o.MapInteger == nil { @@ -136,7 +128,7 @@ func (o *AdditionalPropertiesClass) SetMapInteger(v map[string]int32) { o.MapInteger = &v } -// GetMapBoolean returns the MapBoolean field if non-nil, zero value otherwise. +// GetMapBoolean returns the MapBoolean field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetMapBoolean() map[string]bool { if o == nil || o.MapBoolean == nil { var ret map[string]bool @@ -145,7 +137,7 @@ func (o *AdditionalPropertiesClass) GetMapBoolean() map[string]bool { return *o.MapBoolean } -// GetMapBooleanOk returns a tuple with the MapBoolean field if it's non-nil, zero value otherwise +// GetMapBooleanOk returns a tuple with the MapBoolean field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesClass) GetMapBooleanOk() (map[string]bool, bool) { if o == nil || o.MapBoolean == nil { @@ -169,7 +161,7 @@ func (o *AdditionalPropertiesClass) SetMapBoolean(v map[string]bool) { o.MapBoolean = &v } -// GetMapArrayInteger returns the MapArrayInteger field if non-nil, zero value otherwise. +// GetMapArrayInteger returns the MapArrayInteger field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetMapArrayInteger() map[string][]int32 { if o == nil || o.MapArrayInteger == nil { var ret map[string][]int32 @@ -178,7 +170,7 @@ func (o *AdditionalPropertiesClass) GetMapArrayInteger() map[string][]int32 { return *o.MapArrayInteger } -// GetMapArrayIntegerOk returns a tuple with the MapArrayInteger field if it's non-nil, zero value otherwise +// GetMapArrayIntegerOk returns a tuple with the MapArrayInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesClass) GetMapArrayIntegerOk() (map[string][]int32, bool) { if o == nil || o.MapArrayInteger == nil { @@ -202,7 +194,7 @@ func (o *AdditionalPropertiesClass) SetMapArrayInteger(v map[string][]int32) { o.MapArrayInteger = &v } -// GetMapArrayAnytype returns the MapArrayAnytype field if non-nil, zero value otherwise. +// GetMapArrayAnytype returns the MapArrayAnytype field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetMapArrayAnytype() map[string][]map[string]interface{} { if o == nil || o.MapArrayAnytype == nil { var ret map[string][]map[string]interface{} @@ -211,7 +203,7 @@ func (o *AdditionalPropertiesClass) GetMapArrayAnytype() map[string][]map[string return *o.MapArrayAnytype } -// GetMapArrayAnytypeOk returns a tuple with the MapArrayAnytype field if it's non-nil, zero value otherwise +// GetMapArrayAnytypeOk returns a tuple with the MapArrayAnytype field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesClass) GetMapArrayAnytypeOk() (map[string][]map[string]interface{}, bool) { if o == nil || o.MapArrayAnytype == nil { @@ -235,7 +227,7 @@ func (o *AdditionalPropertiesClass) SetMapArrayAnytype(v map[string][]map[string o.MapArrayAnytype = &v } -// GetMapMapString returns the MapMapString field if non-nil, zero value otherwise. +// GetMapMapString returns the MapMapString field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetMapMapString() map[string]map[string]string { if o == nil || o.MapMapString == nil { var ret map[string]map[string]string @@ -244,7 +236,7 @@ func (o *AdditionalPropertiesClass) GetMapMapString() map[string]map[string]stri return *o.MapMapString } -// GetMapMapStringOk returns a tuple with the MapMapString field if it's non-nil, zero value otherwise +// GetMapMapStringOk returns a tuple with the MapMapString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesClass) GetMapMapStringOk() (map[string]map[string]string, bool) { if o == nil || o.MapMapString == nil { @@ -268,7 +260,7 @@ func (o *AdditionalPropertiesClass) SetMapMapString(v map[string]map[string]stri o.MapMapString = &v } -// GetMapMapAnytype returns the MapMapAnytype field if non-nil, zero value otherwise. +// GetMapMapAnytype returns the MapMapAnytype field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetMapMapAnytype() map[string]map[string]map[string]interface{} { if o == nil || o.MapMapAnytype == nil { var ret map[string]map[string]map[string]interface{} @@ -277,7 +269,7 @@ func (o *AdditionalPropertiesClass) GetMapMapAnytype() map[string]map[string]map return *o.MapMapAnytype } -// GetMapMapAnytypeOk returns a tuple with the MapMapAnytype field if it's non-nil, zero value otherwise +// GetMapMapAnytypeOk returns a tuple with the MapMapAnytype field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesClass) GetMapMapAnytypeOk() (map[string]map[string]map[string]interface{}, bool) { if o == nil || o.MapMapAnytype == nil { @@ -301,7 +293,7 @@ func (o *AdditionalPropertiesClass) SetMapMapAnytype(v map[string]map[string]map o.MapMapAnytype = &v } -// GetAnytype1 returns the Anytype1 field if non-nil, zero value otherwise. +// GetAnytype1 returns the Anytype1 field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetAnytype1() map[string]interface{} { if o == nil || o.Anytype1 == nil { var ret map[string]interface{} @@ -310,7 +302,7 @@ func (o *AdditionalPropertiesClass) GetAnytype1() map[string]interface{} { return *o.Anytype1 } -// GetAnytype1Ok returns a tuple with the Anytype1 field if it's non-nil, zero value otherwise +// GetAnytype1Ok returns a tuple with the Anytype1 field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesClass) GetAnytype1Ok() (map[string]interface{}, bool) { if o == nil || o.Anytype1 == nil { @@ -334,7 +326,7 @@ func (o *AdditionalPropertiesClass) SetAnytype1(v map[string]interface{}) { o.Anytype1 = &v } -// GetAnytype2 returns the Anytype2 field if non-nil, zero value otherwise. +// GetAnytype2 returns the Anytype2 field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetAnytype2() map[string]interface{} { if o == nil || o.Anytype2 == nil { var ret map[string]interface{} @@ -343,7 +335,7 @@ func (o *AdditionalPropertiesClass) GetAnytype2() map[string]interface{} { return *o.Anytype2 } -// GetAnytype2Ok returns a tuple with the Anytype2 field if it's non-nil, zero value otherwise +// GetAnytype2Ok returns a tuple with the Anytype2 field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesClass) GetAnytype2Ok() (map[string]interface{}, bool) { if o == nil || o.Anytype2 == nil { @@ -367,7 +359,7 @@ func (o *AdditionalPropertiesClass) SetAnytype2(v map[string]interface{}) { o.Anytype2 = &v } -// GetAnytype3 returns the Anytype3 field if non-nil, zero value otherwise. +// GetAnytype3 returns the Anytype3 field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetAnytype3() map[string]interface{} { if o == nil || o.Anytype3 == nil { var ret map[string]interface{} @@ -376,7 +368,7 @@ func (o *AdditionalPropertiesClass) GetAnytype3() map[string]interface{} { return *o.Anytype3 } -// GetAnytype3Ok returns a tuple with the Anytype3 field if it's non-nil, zero value otherwise +// GetAnytype3Ok returns a tuple with the Anytype3 field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesClass) GetAnytype3Ok() (map[string]interface{}, bool) { if o == nil || o.Anytype3 == nil { @@ -400,44 +392,26 @@ func (o *AdditionalPropertiesClass) SetAnytype3(v map[string]interface{}) { o.Anytype3 = &v } +type NullableAdditionalPropertiesClass struct { + Value AdditionalPropertiesClass + ExplicitNull bool +} + +func (v NullableAdditionalPropertiesClass) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o AdditionalPropertiesClass) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.MapString != nil { - toSerialize["map_string"] = o.MapString - } - if o.MapNumber != nil { - toSerialize["map_number"] = o.MapNumber - } - if o.MapInteger != nil { - toSerialize["map_integer"] = o.MapInteger - } - if o.MapBoolean != nil { - toSerialize["map_boolean"] = o.MapBoolean - } - if o.MapArrayInteger != nil { - toSerialize["map_array_integer"] = o.MapArrayInteger - } - if o.MapArrayAnytype != nil { - toSerialize["map_array_anytype"] = o.MapArrayAnytype +func (v *NullableAdditionalPropertiesClass) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - if o.MapMapString != nil { - toSerialize["map_map_string"] = o.MapMapString - } - if o.MapMapAnytype != nil { - toSerialize["map_map_anytype"] = o.MapMapAnytype - } - if o.Anytype1 != nil { - toSerialize["anytype_1"] = o.Anytype1 - } - if o.Anytype2 != nil { - toSerialize["anytype_2"] = o.Anytype2 - } - if o.Anytype3 != nil { - toSerialize["anytype_3"] = o.Anytype3 - } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go index c779aa63676c..07c11d9cdcd0 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // AdditionalPropertiesInteger struct for AdditionalPropertiesInteger type AdditionalPropertiesInteger struct { Name *string `json:"name,omitempty"` - } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise. func (o *AdditionalPropertiesInteger) GetName() string { if o == nil || o.Name == nil { var ret string @@ -26,7 +28,7 @@ func (o *AdditionalPropertiesInteger) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesInteger) GetNameOk() (string, bool) { if o == nil || o.Name == nil { @@ -50,14 +52,26 @@ func (o *AdditionalPropertiesInteger) SetName(v string) { o.Name = &v } +type NullableAdditionalPropertiesInteger struct { + Value AdditionalPropertiesInteger + ExplicitNull bool +} + +func (v NullableAdditionalPropertiesInteger) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o AdditionalPropertiesInteger) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name +func (v *NullableAdditionalPropertiesInteger) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go index c14902300c67..59759fb409ee 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // AdditionalPropertiesNumber struct for AdditionalPropertiesNumber type AdditionalPropertiesNumber struct { Name *string `json:"name,omitempty"` - } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise. func (o *AdditionalPropertiesNumber) GetName() string { if o == nil || o.Name == nil { var ret string @@ -26,7 +28,7 @@ func (o *AdditionalPropertiesNumber) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesNumber) GetNameOk() (string, bool) { if o == nil || o.Name == nil { @@ -50,14 +52,26 @@ func (o *AdditionalPropertiesNumber) SetName(v string) { o.Name = &v } +type NullableAdditionalPropertiesNumber struct { + Value AdditionalPropertiesNumber + ExplicitNull bool +} + +func (v NullableAdditionalPropertiesNumber) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o AdditionalPropertiesNumber) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name +func (v *NullableAdditionalPropertiesNumber) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go index 3fafb78aec03..df2b0305a4d5 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // AdditionalPropertiesObject struct for AdditionalPropertiesObject type AdditionalPropertiesObject struct { Name *string `json:"name,omitempty"` - } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise. func (o *AdditionalPropertiesObject) GetName() string { if o == nil || o.Name == nil { var ret string @@ -26,7 +28,7 @@ func (o *AdditionalPropertiesObject) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesObject) GetNameOk() (string, bool) { if o == nil || o.Name == nil { @@ -50,14 +52,26 @@ func (o *AdditionalPropertiesObject) SetName(v string) { o.Name = &v } +type NullableAdditionalPropertiesObject struct { + Value AdditionalPropertiesObject + ExplicitNull bool +} + +func (v NullableAdditionalPropertiesObject) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o AdditionalPropertiesObject) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name +func (v *NullableAdditionalPropertiesObject) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go index bc75e98add3a..47eb4dd0de5e 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // AdditionalPropertiesString struct for AdditionalPropertiesString type AdditionalPropertiesString struct { Name *string `json:"name,omitempty"` - } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise. func (o *AdditionalPropertiesString) GetName() string { if o == nil || o.Name == nil { var ret string @@ -26,7 +28,7 @@ func (o *AdditionalPropertiesString) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *AdditionalPropertiesString) GetNameOk() (string, bool) { if o == nil || o.Name == nil { @@ -50,14 +52,26 @@ func (o *AdditionalPropertiesString) SetName(v string) { o.Name = &v } +type NullableAdditionalPropertiesString struct { + Value AdditionalPropertiesString + ExplicitNull bool +} + +func (v NullableAdditionalPropertiesString) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o AdditionalPropertiesString) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name +func (v *NullableAdditionalPropertiesString) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_animal.go b/samples/client/petstore/go-experimental/go-petstore/model_animal.go index 877476882ed5..dfae59606ed3 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_animal.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_animal.go @@ -8,52 +8,34 @@ */ package petstore + import ( + "bytes" "encoding/json" - "errors" ) + // Animal struct for Animal type Animal struct { - ClassName *string `json:"className,omitempty"` - + ClassName string `json:"className"` Color *string `json:"color,omitempty"` - } -// GetClassName returns the ClassName field if non-nil, zero value otherwise. +// GetClassName returns the ClassName field value func (o *Animal) GetClassName() string { - if o == nil || o.ClassName == nil { + if o == nil { var ret string return ret } - return *o.ClassName -} - -// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *Animal) GetClassNameOk() (string, bool) { - if o == nil || o.ClassName == nil { - var ret string - return ret, false - } - return *o.ClassName, true -} - -// HasClassName returns a boolean if a field has been set. -func (o *Animal) HasClassName() bool { - if o != nil && o.ClassName != nil { - return true - } - return false + return o.ClassName } -// SetClassName gets a reference to the given string and assigns it to the ClassName field. +// SetClassName sets field value func (o *Animal) SetClassName(v string) { - o.ClassName = &v + o.ClassName = v } -// GetColor returns the Color field if non-nil, zero value otherwise. +// GetColor returns the Color field value if set, zero value otherwise. func (o *Animal) GetColor() string { if o == nil || o.Color == nil { var ret string @@ -62,7 +44,7 @@ func (o *Animal) GetColor() string { return *o.Color } -// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +// GetColorOk returns a tuple with the Color field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Animal) GetColorOk() (string, bool) { if o == nil || o.Color == nil { @@ -86,20 +68,26 @@ func (o *Animal) SetColor(v string) { o.Color = &v } +type NullableAnimal struct { + Value Animal + ExplicitNull bool +} -// MarshalJSON returns the JSON representation of the model. -func (o Animal) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.ClassName == nil { - return nil, errors.New("ClassName is required and not nullable, but was not set on Animal") - } - if o.ClassName != nil { - toSerialize["className"] = o.ClassName - } - if o.Color != nil { - toSerialize["color"] = o.Color - } - return json.Marshal(toSerialize) +func (v NullableAnimal) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } } +func (v *NullableAnimal) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_api_response.go b/samples/client/petstore/go-experimental/go-petstore/model_api_response.go index 358d4d4e569b..e2d80e220741 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_api_response.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_api_response.go @@ -8,20 +8,20 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // ApiResponse struct for ApiResponse type ApiResponse struct { Code *int32 `json:"code,omitempty"` - Type *string `json:"type,omitempty"` - Message *string `json:"message,omitempty"` - } -// GetCode returns the Code field if non-nil, zero value otherwise. +// GetCode returns the Code field value if set, zero value otherwise. func (o *ApiResponse) GetCode() int32 { if o == nil || o.Code == nil { var ret int32 @@ -30,7 +30,7 @@ func (o *ApiResponse) GetCode() int32 { return *o.Code } -// GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +// GetCodeOk returns a tuple with the Code field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *ApiResponse) GetCodeOk() (int32, bool) { if o == nil || o.Code == nil { @@ -54,7 +54,7 @@ func (o *ApiResponse) SetCode(v int32) { o.Code = &v } -// GetType returns the Type field if non-nil, zero value otherwise. +// GetType returns the Type field value if set, zero value otherwise. func (o *ApiResponse) GetType() string { if o == nil || o.Type == nil { var ret string @@ -63,7 +63,7 @@ func (o *ApiResponse) GetType() string { return *o.Type } -// GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +// GetTypeOk returns a tuple with the Type field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *ApiResponse) GetTypeOk() (string, bool) { if o == nil || o.Type == nil { @@ -87,7 +87,7 @@ func (o *ApiResponse) SetType(v string) { o.Type = &v } -// GetMessage returns the Message field if non-nil, zero value otherwise. +// GetMessage returns the Message field value if set, zero value otherwise. func (o *ApiResponse) GetMessage() string { if o == nil || o.Message == nil { var ret string @@ -96,7 +96,7 @@ func (o *ApiResponse) GetMessage() string { return *o.Message } -// GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +// GetMessageOk returns a tuple with the Message field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *ApiResponse) GetMessageOk() (string, bool) { if o == nil || o.Message == nil { @@ -120,20 +120,26 @@ func (o *ApiResponse) SetMessage(v string) { o.Message = &v } +type NullableApiResponse struct { + Value ApiResponse + ExplicitNull bool +} + +func (v NullableApiResponse) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o ApiResponse) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Code != nil { - toSerialize["code"] = o.Code - } - if o.Type != nil { - toSerialize["type"] = o.Type +func (v *NullableApiResponse) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - if o.Message != nil { - toSerialize["message"] = o.Message - } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go b/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go index de619c3fa055..cf5e59622f39 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // ArrayOfArrayOfNumberOnly struct for ArrayOfArrayOfNumberOnly type ArrayOfArrayOfNumberOnly struct { ArrayArrayNumber *[][]float32 `json:"ArrayArrayNumber,omitempty"` - } -// GetArrayArrayNumber returns the ArrayArrayNumber field if non-nil, zero value otherwise. +// GetArrayArrayNumber returns the ArrayArrayNumber field value if set, zero value otherwise. func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32 { if o == nil || o.ArrayArrayNumber == nil { var ret [][]float32 @@ -26,7 +28,7 @@ func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32 { return *o.ArrayArrayNumber } -// GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field if it's non-nil, zero value otherwise +// GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() ([][]float32, bool) { if o == nil || o.ArrayArrayNumber == nil { @@ -50,14 +52,26 @@ func (o *ArrayOfArrayOfNumberOnly) SetArrayArrayNumber(v [][]float32) { o.ArrayArrayNumber = &v } +type NullableArrayOfArrayOfNumberOnly struct { + Value ArrayOfArrayOfNumberOnly + ExplicitNull bool +} + +func (v NullableArrayOfArrayOfNumberOnly) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o ArrayOfArrayOfNumberOnly) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.ArrayArrayNumber != nil { - toSerialize["ArrayArrayNumber"] = o.ArrayArrayNumber +func (v *NullableArrayOfArrayOfNumberOnly) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go b/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go index 4efd5be06039..7495577a4ce5 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // ArrayOfNumberOnly struct for ArrayOfNumberOnly type ArrayOfNumberOnly struct { ArrayNumber *[]float32 `json:"ArrayNumber,omitempty"` - } -// GetArrayNumber returns the ArrayNumber field if non-nil, zero value otherwise. +// GetArrayNumber returns the ArrayNumber field value if set, zero value otherwise. func (o *ArrayOfNumberOnly) GetArrayNumber() []float32 { if o == nil || o.ArrayNumber == nil { var ret []float32 @@ -26,7 +28,7 @@ func (o *ArrayOfNumberOnly) GetArrayNumber() []float32 { return *o.ArrayNumber } -// GetArrayNumberOk returns a tuple with the ArrayNumber field if it's non-nil, zero value otherwise +// GetArrayNumberOk returns a tuple with the ArrayNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *ArrayOfNumberOnly) GetArrayNumberOk() ([]float32, bool) { if o == nil || o.ArrayNumber == nil { @@ -50,14 +52,26 @@ func (o *ArrayOfNumberOnly) SetArrayNumber(v []float32) { o.ArrayNumber = &v } +type NullableArrayOfNumberOnly struct { + Value ArrayOfNumberOnly + ExplicitNull bool +} + +func (v NullableArrayOfNumberOnly) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o ArrayOfNumberOnly) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.ArrayNumber != nil { - toSerialize["ArrayNumber"] = o.ArrayNumber +func (v *NullableArrayOfNumberOnly) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go index 2e1b18949dc2..01d310fd480a 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go @@ -8,20 +8,20 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // ArrayTest struct for ArrayTest type ArrayTest struct { ArrayOfString *[]string `json:"array_of_string,omitempty"` - ArrayArrayOfInteger *[][]int64 `json:"array_array_of_integer,omitempty"` - ArrayArrayOfModel *[][]ReadOnlyFirst `json:"array_array_of_model,omitempty"` - } -// GetArrayOfString returns the ArrayOfString field if non-nil, zero value otherwise. +// GetArrayOfString returns the ArrayOfString field value if set, zero value otherwise. func (o *ArrayTest) GetArrayOfString() []string { if o == nil || o.ArrayOfString == nil { var ret []string @@ -30,7 +30,7 @@ func (o *ArrayTest) GetArrayOfString() []string { return *o.ArrayOfString } -// GetArrayOfStringOk returns a tuple with the ArrayOfString field if it's non-nil, zero value otherwise +// GetArrayOfStringOk returns a tuple with the ArrayOfString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *ArrayTest) GetArrayOfStringOk() ([]string, bool) { if o == nil || o.ArrayOfString == nil { @@ -54,7 +54,7 @@ func (o *ArrayTest) SetArrayOfString(v []string) { o.ArrayOfString = &v } -// GetArrayArrayOfInteger returns the ArrayArrayOfInteger field if non-nil, zero value otherwise. +// GetArrayArrayOfInteger returns the ArrayArrayOfInteger field value if set, zero value otherwise. func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64 { if o == nil || o.ArrayArrayOfInteger == nil { var ret [][]int64 @@ -63,7 +63,7 @@ func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64 { return *o.ArrayArrayOfInteger } -// GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field if it's non-nil, zero value otherwise +// GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *ArrayTest) GetArrayArrayOfIntegerOk() ([][]int64, bool) { if o == nil || o.ArrayArrayOfInteger == nil { @@ -87,7 +87,7 @@ func (o *ArrayTest) SetArrayArrayOfInteger(v [][]int64) { o.ArrayArrayOfInteger = &v } -// GetArrayArrayOfModel returns the ArrayArrayOfModel field if non-nil, zero value otherwise. +// GetArrayArrayOfModel returns the ArrayArrayOfModel field value if set, zero value otherwise. func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst { if o == nil || o.ArrayArrayOfModel == nil { var ret [][]ReadOnlyFirst @@ -96,7 +96,7 @@ func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst { return *o.ArrayArrayOfModel } -// GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field if it's non-nil, zero value otherwise +// GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *ArrayTest) GetArrayArrayOfModelOk() ([][]ReadOnlyFirst, bool) { if o == nil || o.ArrayArrayOfModel == nil { @@ -120,20 +120,26 @@ func (o *ArrayTest) SetArrayArrayOfModel(v [][]ReadOnlyFirst) { o.ArrayArrayOfModel = &v } +type NullableArrayTest struct { + Value ArrayTest + ExplicitNull bool +} + +func (v NullableArrayTest) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o ArrayTest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.ArrayOfString != nil { - toSerialize["array_of_string"] = o.ArrayOfString - } - if o.ArrayArrayOfInteger != nil { - toSerialize["array_array_of_integer"] = o.ArrayArrayOfInteger +func (v *NullableArrayTest) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - if o.ArrayArrayOfModel != nil { - toSerialize["array_array_of_model"] = o.ArrayArrayOfModel - } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go b/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go index 9cd486a70ca6..281f380508c3 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go @@ -8,27 +8,24 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // Capitalization struct for Capitalization type Capitalization struct { SmallCamel *string `json:"smallCamel,omitempty"` - CapitalCamel *string `json:"CapitalCamel,omitempty"` - SmallSnake *string `json:"small_Snake,omitempty"` - CapitalSnake *string `json:"Capital_Snake,omitempty"` - SCAETHFlowPoints *string `json:"SCA_ETH_Flow_Points,omitempty"` - // Name of the pet ATT_NAME *string `json:"ATT_NAME,omitempty"` - } -// GetSmallCamel returns the SmallCamel field if non-nil, zero value otherwise. +// GetSmallCamel returns the SmallCamel field value if set, zero value otherwise. func (o *Capitalization) GetSmallCamel() string { if o == nil || o.SmallCamel == nil { var ret string @@ -37,7 +34,7 @@ func (o *Capitalization) GetSmallCamel() string { return *o.SmallCamel } -// GetSmallCamelOk returns a tuple with the SmallCamel field if it's non-nil, zero value otherwise +// GetSmallCamelOk returns a tuple with the SmallCamel field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Capitalization) GetSmallCamelOk() (string, bool) { if o == nil || o.SmallCamel == nil { @@ -61,7 +58,7 @@ func (o *Capitalization) SetSmallCamel(v string) { o.SmallCamel = &v } -// GetCapitalCamel returns the CapitalCamel field if non-nil, zero value otherwise. +// GetCapitalCamel returns the CapitalCamel field value if set, zero value otherwise. func (o *Capitalization) GetCapitalCamel() string { if o == nil || o.CapitalCamel == nil { var ret string @@ -70,7 +67,7 @@ func (o *Capitalization) GetCapitalCamel() string { return *o.CapitalCamel } -// GetCapitalCamelOk returns a tuple with the CapitalCamel field if it's non-nil, zero value otherwise +// GetCapitalCamelOk returns a tuple with the CapitalCamel field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Capitalization) GetCapitalCamelOk() (string, bool) { if o == nil || o.CapitalCamel == nil { @@ -94,7 +91,7 @@ func (o *Capitalization) SetCapitalCamel(v string) { o.CapitalCamel = &v } -// GetSmallSnake returns the SmallSnake field if non-nil, zero value otherwise. +// GetSmallSnake returns the SmallSnake field value if set, zero value otherwise. func (o *Capitalization) GetSmallSnake() string { if o == nil || o.SmallSnake == nil { var ret string @@ -103,7 +100,7 @@ func (o *Capitalization) GetSmallSnake() string { return *o.SmallSnake } -// GetSmallSnakeOk returns a tuple with the SmallSnake field if it's non-nil, zero value otherwise +// GetSmallSnakeOk returns a tuple with the SmallSnake field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Capitalization) GetSmallSnakeOk() (string, bool) { if o == nil || o.SmallSnake == nil { @@ -127,7 +124,7 @@ func (o *Capitalization) SetSmallSnake(v string) { o.SmallSnake = &v } -// GetCapitalSnake returns the CapitalSnake field if non-nil, zero value otherwise. +// GetCapitalSnake returns the CapitalSnake field value if set, zero value otherwise. func (o *Capitalization) GetCapitalSnake() string { if o == nil || o.CapitalSnake == nil { var ret string @@ -136,7 +133,7 @@ func (o *Capitalization) GetCapitalSnake() string { return *o.CapitalSnake } -// GetCapitalSnakeOk returns a tuple with the CapitalSnake field if it's non-nil, zero value otherwise +// GetCapitalSnakeOk returns a tuple with the CapitalSnake field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Capitalization) GetCapitalSnakeOk() (string, bool) { if o == nil || o.CapitalSnake == nil { @@ -160,7 +157,7 @@ func (o *Capitalization) SetCapitalSnake(v string) { o.CapitalSnake = &v } -// GetSCAETHFlowPoints returns the SCAETHFlowPoints field if non-nil, zero value otherwise. +// GetSCAETHFlowPoints returns the SCAETHFlowPoints field value if set, zero value otherwise. func (o *Capitalization) GetSCAETHFlowPoints() string { if o == nil || o.SCAETHFlowPoints == nil { var ret string @@ -169,7 +166,7 @@ func (o *Capitalization) GetSCAETHFlowPoints() string { return *o.SCAETHFlowPoints } -// GetSCAETHFlowPointsOk returns a tuple with the SCAETHFlowPoints field if it's non-nil, zero value otherwise +// GetSCAETHFlowPointsOk returns a tuple with the SCAETHFlowPoints field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Capitalization) GetSCAETHFlowPointsOk() (string, bool) { if o == nil || o.SCAETHFlowPoints == nil { @@ -193,7 +190,7 @@ func (o *Capitalization) SetSCAETHFlowPoints(v string) { o.SCAETHFlowPoints = &v } -// GetATT_NAME returns the ATT_NAME field if non-nil, zero value otherwise. +// GetATT_NAME returns the ATT_NAME field value if set, zero value otherwise. func (o *Capitalization) GetATT_NAME() string { if o == nil || o.ATT_NAME == nil { var ret string @@ -202,7 +199,7 @@ func (o *Capitalization) GetATT_NAME() string { return *o.ATT_NAME } -// GetATT_NAMEOk returns a tuple with the ATT_NAME field if it's non-nil, zero value otherwise +// GetATT_NAMEOk returns a tuple with the ATT_NAME field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Capitalization) GetATT_NAMEOk() (string, bool) { if o == nil || o.ATT_NAME == nil { @@ -226,29 +223,26 @@ func (o *Capitalization) SetATT_NAME(v string) { o.ATT_NAME = &v } +type NullableCapitalization struct { + Value Capitalization + ExplicitNull bool +} + +func (v NullableCapitalization) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o Capitalization) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.SmallCamel != nil { - toSerialize["smallCamel"] = o.SmallCamel - } - if o.CapitalCamel != nil { - toSerialize["CapitalCamel"] = o.CapitalCamel - } - if o.SmallSnake != nil { - toSerialize["small_Snake"] = o.SmallSnake - } - if o.CapitalSnake != nil { - toSerialize["Capital_Snake"] = o.CapitalSnake +func (v *NullableCapitalization) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - if o.SCAETHFlowPoints != nil { - toSerialize["SCA_ETH_Flow_Points"] = o.SCAETHFlowPoints - } - if o.ATT_NAME != nil { - toSerialize["ATT_NAME"] = o.ATT_NAME - } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_cat.go b/samples/client/petstore/go-experimental/go-petstore/model_cat.go index 07dfafae8b65..a4390348e393 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_cat.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_cat.go @@ -8,54 +8,35 @@ */ package petstore + import ( + "bytes" "encoding/json" - "errors" ) + // Cat struct for Cat type Cat struct { - ClassName *string `json:"className,omitempty"` - + ClassName string `json:"className"` Color *string `json:"color,omitempty"` - Declawed *bool `json:"declawed,omitempty"` - } -// GetClassName returns the ClassName field if non-nil, zero value otherwise. +// GetClassName returns the ClassName field value func (o *Cat) GetClassName() string { - if o == nil || o.ClassName == nil { + if o == nil { var ret string return ret } - return *o.ClassName -} - -// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *Cat) GetClassNameOk() (string, bool) { - if o == nil || o.ClassName == nil { - var ret string - return ret, false - } - return *o.ClassName, true -} - -// HasClassName returns a boolean if a field has been set. -func (o *Cat) HasClassName() bool { - if o != nil && o.ClassName != nil { - return true - } - return false + return o.ClassName } -// SetClassName gets a reference to the given string and assigns it to the ClassName field. +// SetClassName sets field value func (o *Cat) SetClassName(v string) { - o.ClassName = &v + o.ClassName = v } -// GetColor returns the Color field if non-nil, zero value otherwise. +// GetColor returns the Color field value if set, zero value otherwise. func (o *Cat) GetColor() string { if o == nil || o.Color == nil { var ret string @@ -64,7 +45,7 @@ func (o *Cat) GetColor() string { return *o.Color } -// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +// GetColorOk returns a tuple with the Color field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Cat) GetColorOk() (string, bool) { if o == nil || o.Color == nil { @@ -88,7 +69,7 @@ func (o *Cat) SetColor(v string) { o.Color = &v } -// GetDeclawed returns the Declawed field if non-nil, zero value otherwise. +// GetDeclawed returns the Declawed field value if set, zero value otherwise. func (o *Cat) GetDeclawed() bool { if o == nil || o.Declawed == nil { var ret bool @@ -97,7 +78,7 @@ func (o *Cat) GetDeclawed() bool { return *o.Declawed } -// GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise +// GetDeclawedOk returns a tuple with the Declawed field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Cat) GetDeclawedOk() (bool, bool) { if o == nil || o.Declawed == nil { @@ -121,23 +102,26 @@ func (o *Cat) SetDeclawed(v bool) { o.Declawed = &v } +type NullableCat struct { + Value Cat + ExplicitNull bool +} -// MarshalJSON returns the JSON representation of the model. -func (o Cat) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.ClassName == nil { - return nil, errors.New("ClassName is required and not nullable, but was not set on Cat") - } - if o.ClassName != nil { - toSerialize["className"] = o.ClassName - } - if o.Color != nil { - toSerialize["color"] = o.Color - } - if o.Declawed != nil { - toSerialize["declawed"] = o.Declawed - } - return json.Marshal(toSerialize) +func (v NullableCat) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } } +func (v *NullableCat) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go b/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go index db53c7dbbd6b..5fe06820a255 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // CatAllOf struct for CatAllOf type CatAllOf struct { Declawed *bool `json:"declawed,omitempty"` - } -// GetDeclawed returns the Declawed field if non-nil, zero value otherwise. +// GetDeclawed returns the Declawed field value if set, zero value otherwise. func (o *CatAllOf) GetDeclawed() bool { if o == nil || o.Declawed == nil { var ret bool @@ -26,7 +28,7 @@ func (o *CatAllOf) GetDeclawed() bool { return *o.Declawed } -// GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise +// GetDeclawedOk returns a tuple with the Declawed field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *CatAllOf) GetDeclawedOk() (bool, bool) { if o == nil || o.Declawed == nil { @@ -50,14 +52,26 @@ func (o *CatAllOf) SetDeclawed(v bool) { o.Declawed = &v } +type NullableCatAllOf struct { + Value CatAllOf + ExplicitNull bool +} + +func (v NullableCatAllOf) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o CatAllOf) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Declawed != nil { - toSerialize["declawed"] = o.Declawed +func (v *NullableCatAllOf) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_category.go b/samples/client/petstore/go-experimental/go-petstore/model_category.go index eef9caf28f1f..1a4d80c25abf 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_category.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_category.go @@ -8,19 +8,19 @@ */ package petstore + import ( + "bytes" "encoding/json" - "errors" ) + // Category struct for Category type Category struct { Id *int64 `json:"id,omitempty"` - - Name *string `json:"name,omitempty"` - + Name string `json:"name"` } -// GetId returns the Id field if non-nil, zero value otherwise. +// GetId returns the Id field value if set, zero value otherwise. func (o *Category) GetId() int64 { if o == nil || o.Id == nil { var ret int64 @@ -29,7 +29,7 @@ func (o *Category) GetId() int64 { return *o.Id } -// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// GetIdOk returns a tuple with the Id field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Category) GetIdOk() (int64, bool) { if o == nil || o.Id == nil { @@ -53,53 +53,41 @@ func (o *Category) SetId(v int64) { o.Id = &v } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value func (o *Category) GetName() string { - if o == nil || o.Name == nil { + if o == nil { var ret string return ret } - return *o.Name -} -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *Category) GetNameOk() (string, bool) { - if o == nil || o.Name == nil { - var ret string - return ret, false - } - return *o.Name, true + return o.Name } -// HasName returns a boolean if a field has been set. -func (o *Category) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false +// SetName sets field value +func (o *Category) SetName(v string) { + o.Name = v } -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *Category) SetName(v string) { - o.Name = &v +type NullableCategory struct { + Value Category + ExplicitNull bool } +func (v NullableCategory) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o Category) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Name == nil { - return nil, errors.New("Name is required and not nullable, but was not set on Category") - } - if o.Name != nil { - toSerialize["name"] = o.Name +func (v *NullableCategory) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_class_model.go b/samples/client/petstore/go-experimental/go-petstore/model_class_model.go index 8a83ac5698bd..cb217ea0b938 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_class_model.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_class_model.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // ClassModel Model for testing model with \"_class\" property type ClassModel struct { Class *string `json:"_class,omitempty"` - } -// GetClass returns the Class field if non-nil, zero value otherwise. +// GetClass returns the Class field value if set, zero value otherwise. func (o *ClassModel) GetClass() string { if o == nil || o.Class == nil { var ret string @@ -26,7 +28,7 @@ func (o *ClassModel) GetClass() string { return *o.Class } -// GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise +// GetClassOk returns a tuple with the Class field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *ClassModel) GetClassOk() (string, bool) { if o == nil || o.Class == nil { @@ -50,14 +52,26 @@ func (o *ClassModel) SetClass(v string) { o.Class = &v } +type NullableClassModel struct { + Value ClassModel + ExplicitNull bool +} + +func (v NullableClassModel) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o ClassModel) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Class != nil { - toSerialize["_class"] = o.Class +func (v *NullableClassModel) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_client.go b/samples/client/petstore/go-experimental/go-petstore/model_client.go index abead359c737..1c2d82dbaa25 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_client.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_client.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // Client struct for Client type Client struct { Client *string `json:"client,omitempty"` - } -// GetClient returns the Client field if non-nil, zero value otherwise. +// GetClient returns the Client field value if set, zero value otherwise. func (o *Client) GetClient() string { if o == nil || o.Client == nil { var ret string @@ -26,7 +28,7 @@ func (o *Client) GetClient() string { return *o.Client } -// GetClientOk returns a tuple with the Client field if it's non-nil, zero value otherwise +// GetClientOk returns a tuple with the Client field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Client) GetClientOk() (string, bool) { if o == nil || o.Client == nil { @@ -50,14 +52,26 @@ func (o *Client) SetClient(v string) { o.Client = &v } +type NullableClient struct { + Value Client + ExplicitNull bool +} + +func (v NullableClient) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o Client) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Client != nil { - toSerialize["client"] = o.Client +func (v *NullableClient) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_dog.go b/samples/client/petstore/go-experimental/go-petstore/model_dog.go index 2c09989cca72..1e12cf2030e2 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_dog.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_dog.go @@ -8,54 +8,35 @@ */ package petstore + import ( + "bytes" "encoding/json" - "errors" ) + // Dog struct for Dog type Dog struct { - ClassName *string `json:"className,omitempty"` - + ClassName string `json:"className"` Color *string `json:"color,omitempty"` - Breed *string `json:"breed,omitempty"` - } -// GetClassName returns the ClassName field if non-nil, zero value otherwise. +// GetClassName returns the ClassName field value func (o *Dog) GetClassName() string { - if o == nil || o.ClassName == nil { + if o == nil { var ret string return ret } - return *o.ClassName -} - -// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *Dog) GetClassNameOk() (string, bool) { - if o == nil || o.ClassName == nil { - var ret string - return ret, false - } - return *o.ClassName, true -} - -// HasClassName returns a boolean if a field has been set. -func (o *Dog) HasClassName() bool { - if o != nil && o.ClassName != nil { - return true - } - return false + return o.ClassName } -// SetClassName gets a reference to the given string and assigns it to the ClassName field. +// SetClassName sets field value func (o *Dog) SetClassName(v string) { - o.ClassName = &v + o.ClassName = v } -// GetColor returns the Color field if non-nil, zero value otherwise. +// GetColor returns the Color field value if set, zero value otherwise. func (o *Dog) GetColor() string { if o == nil || o.Color == nil { var ret string @@ -64,7 +45,7 @@ func (o *Dog) GetColor() string { return *o.Color } -// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +// GetColorOk returns a tuple with the Color field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Dog) GetColorOk() (string, bool) { if o == nil || o.Color == nil { @@ -88,7 +69,7 @@ func (o *Dog) SetColor(v string) { o.Color = &v } -// GetBreed returns the Breed field if non-nil, zero value otherwise. +// GetBreed returns the Breed field value if set, zero value otherwise. func (o *Dog) GetBreed() string { if o == nil || o.Breed == nil { var ret string @@ -97,7 +78,7 @@ func (o *Dog) GetBreed() string { return *o.Breed } -// GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise +// GetBreedOk returns a tuple with the Breed field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Dog) GetBreedOk() (string, bool) { if o == nil || o.Breed == nil { @@ -121,23 +102,26 @@ func (o *Dog) SetBreed(v string) { o.Breed = &v } +type NullableDog struct { + Value Dog + ExplicitNull bool +} -// MarshalJSON returns the JSON representation of the model. -func (o Dog) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.ClassName == nil { - return nil, errors.New("ClassName is required and not nullable, but was not set on Dog") - } - if o.ClassName != nil { - toSerialize["className"] = o.ClassName - } - if o.Color != nil { - toSerialize["color"] = o.Color - } - if o.Breed != nil { - toSerialize["breed"] = o.Breed - } - return json.Marshal(toSerialize) +func (v NullableDog) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } } +func (v *NullableDog) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go b/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go index abd645b6e72d..0572953d4691 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // DogAllOf struct for DogAllOf type DogAllOf struct { Breed *string `json:"breed,omitempty"` - } -// GetBreed returns the Breed field if non-nil, zero value otherwise. +// GetBreed returns the Breed field value if set, zero value otherwise. func (o *DogAllOf) GetBreed() string { if o == nil || o.Breed == nil { var ret string @@ -26,7 +28,7 @@ func (o *DogAllOf) GetBreed() string { return *o.Breed } -// GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise +// GetBreedOk returns a tuple with the Breed field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *DogAllOf) GetBreedOk() (string, bool) { if o == nil || o.Breed == nil { @@ -50,14 +52,26 @@ func (o *DogAllOf) SetBreed(v string) { o.Breed = &v } +type NullableDogAllOf struct { + Value DogAllOf + ExplicitNull bool +} + +func (v NullableDogAllOf) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o DogAllOf) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Breed != nil { - toSerialize["breed"] = o.Breed +func (v *NullableDogAllOf) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go b/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go index 453848096d14..68b520550b3a 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go @@ -8,18 +8,19 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // EnumArrays struct for EnumArrays type EnumArrays struct { JustSymbol *string `json:"just_symbol,omitempty"` - ArrayEnum *[]string `json:"array_enum,omitempty"` - } -// GetJustSymbol returns the JustSymbol field if non-nil, zero value otherwise. +// GetJustSymbol returns the JustSymbol field value if set, zero value otherwise. func (o *EnumArrays) GetJustSymbol() string { if o == nil || o.JustSymbol == nil { var ret string @@ -28,7 +29,7 @@ func (o *EnumArrays) GetJustSymbol() string { return *o.JustSymbol } -// GetJustSymbolOk returns a tuple with the JustSymbol field if it's non-nil, zero value otherwise +// GetJustSymbolOk returns a tuple with the JustSymbol field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *EnumArrays) GetJustSymbolOk() (string, bool) { if o == nil || o.JustSymbol == nil { @@ -52,7 +53,7 @@ func (o *EnumArrays) SetJustSymbol(v string) { o.JustSymbol = &v } -// GetArrayEnum returns the ArrayEnum field if non-nil, zero value otherwise. +// GetArrayEnum returns the ArrayEnum field value if set, zero value otherwise. func (o *EnumArrays) GetArrayEnum() []string { if o == nil || o.ArrayEnum == nil { var ret []string @@ -61,7 +62,7 @@ func (o *EnumArrays) GetArrayEnum() []string { return *o.ArrayEnum } -// GetArrayEnumOk returns a tuple with the ArrayEnum field if it's non-nil, zero value otherwise +// GetArrayEnumOk returns a tuple with the ArrayEnum field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *EnumArrays) GetArrayEnumOk() ([]string, bool) { if o == nil || o.ArrayEnum == nil { @@ -85,17 +86,26 @@ func (o *EnumArrays) SetArrayEnum(v []string) { o.ArrayEnum = &v } +type NullableEnumArrays struct { + Value EnumArrays + ExplicitNull bool +} + +func (v NullableEnumArrays) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o EnumArrays) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.JustSymbol != nil { - toSerialize["just_symbol"] = o.JustSymbol - } - if o.ArrayEnum != nil { - toSerialize["array_enum"] = o.ArrayEnum +func (v *NullableEnumArrays) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_enum_class.go b/samples/client/petstore/go-experimental/go-petstore/model_enum_class.go index 06f7d5535ded..8864dc38698e 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_enum_class.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_enum_class.go @@ -8,6 +8,12 @@ */ package petstore + +import ( + "bytes" + "encoding/json" +) + // EnumClass the model 'EnumClass' type EnumClass string @@ -18,4 +24,30 @@ const ( XYZ EnumClass = "(xyz)" ) +type NullableEnumClass struct { + Value EnumClass + ExplicitNull bool +} + +func (v NullableEnumClass) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != "": + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableEnumClass) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + + diff --git a/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go index 17a5fc44fd34..8594082a56ae 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go @@ -8,25 +8,22 @@ */ package petstore + import ( + "bytes" "encoding/json" - "errors" ) + // EnumTest struct for EnumTest type EnumTest struct { EnumString *string `json:"enum_string,omitempty"` - - EnumStringRequired *string `json:"enum_string_required,omitempty"` - + EnumStringRequired string `json:"enum_string_required"` EnumInteger *int32 `json:"enum_integer,omitempty"` - EnumNumber *float64 `json:"enum_number,omitempty"` - OuterEnum *OuterEnum `json:"outerEnum,omitempty"` - } -// GetEnumString returns the EnumString field if non-nil, zero value otherwise. +// GetEnumString returns the EnumString field value if set, zero value otherwise. func (o *EnumTest) GetEnumString() string { if o == nil || o.EnumString == nil { var ret string @@ -35,7 +32,7 @@ func (o *EnumTest) GetEnumString() string { return *o.EnumString } -// GetEnumStringOk returns a tuple with the EnumString field if it's non-nil, zero value otherwise +// GetEnumStringOk returns a tuple with the EnumString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *EnumTest) GetEnumStringOk() (string, bool) { if o == nil || o.EnumString == nil { @@ -59,40 +56,22 @@ func (o *EnumTest) SetEnumString(v string) { o.EnumString = &v } -// GetEnumStringRequired returns the EnumStringRequired field if non-nil, zero value otherwise. +// GetEnumStringRequired returns the EnumStringRequired field value func (o *EnumTest) GetEnumStringRequired() string { - if o == nil || o.EnumStringRequired == nil { + if o == nil { var ret string return ret } - return *o.EnumStringRequired -} - -// GetEnumStringRequiredOk returns a tuple with the EnumStringRequired field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *EnumTest) GetEnumStringRequiredOk() (string, bool) { - if o == nil || o.EnumStringRequired == nil { - var ret string - return ret, false - } - return *o.EnumStringRequired, true -} - -// HasEnumStringRequired returns a boolean if a field has been set. -func (o *EnumTest) HasEnumStringRequired() bool { - if o != nil && o.EnumStringRequired != nil { - return true - } - return false + return o.EnumStringRequired } -// SetEnumStringRequired gets a reference to the given string and assigns it to the EnumStringRequired field. +// SetEnumStringRequired sets field value func (o *EnumTest) SetEnumStringRequired(v string) { - o.EnumStringRequired = &v + o.EnumStringRequired = v } -// GetEnumInteger returns the EnumInteger field if non-nil, zero value otherwise. +// GetEnumInteger returns the EnumInteger field value if set, zero value otherwise. func (o *EnumTest) GetEnumInteger() int32 { if o == nil || o.EnumInteger == nil { var ret int32 @@ -101,7 +80,7 @@ func (o *EnumTest) GetEnumInteger() int32 { return *o.EnumInteger } -// GetEnumIntegerOk returns a tuple with the EnumInteger field if it's non-nil, zero value otherwise +// GetEnumIntegerOk returns a tuple with the EnumInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *EnumTest) GetEnumIntegerOk() (int32, bool) { if o == nil || o.EnumInteger == nil { @@ -125,7 +104,7 @@ func (o *EnumTest) SetEnumInteger(v int32) { o.EnumInteger = &v } -// GetEnumNumber returns the EnumNumber field if non-nil, zero value otherwise. +// GetEnumNumber returns the EnumNumber field value if set, zero value otherwise. func (o *EnumTest) GetEnumNumber() float64 { if o == nil || o.EnumNumber == nil { var ret float64 @@ -134,7 +113,7 @@ func (o *EnumTest) GetEnumNumber() float64 { return *o.EnumNumber } -// GetEnumNumberOk returns a tuple with the EnumNumber field if it's non-nil, zero value otherwise +// GetEnumNumberOk returns a tuple with the EnumNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *EnumTest) GetEnumNumberOk() (float64, bool) { if o == nil || o.EnumNumber == nil { @@ -158,7 +137,7 @@ func (o *EnumTest) SetEnumNumber(v float64) { o.EnumNumber = &v } -// GetOuterEnum returns the OuterEnum field if non-nil, zero value otherwise. +// GetOuterEnum returns the OuterEnum field value if set, zero value otherwise. func (o *EnumTest) GetOuterEnum() OuterEnum { if o == nil || o.OuterEnum == nil { var ret OuterEnum @@ -167,7 +146,7 @@ func (o *EnumTest) GetOuterEnum() OuterEnum { return *o.OuterEnum } -// GetOuterEnumOk returns a tuple with the OuterEnum field if it's non-nil, zero value otherwise +// GetOuterEnumOk returns a tuple with the OuterEnum field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *EnumTest) GetOuterEnumOk() (OuterEnum, bool) { if o == nil || o.OuterEnum == nil { @@ -191,29 +170,26 @@ func (o *EnumTest) SetOuterEnum(v OuterEnum) { o.OuterEnum = &v } +type NullableEnumTest struct { + Value EnumTest + ExplicitNull bool +} -// MarshalJSON returns the JSON representation of the model. -func (o EnumTest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.EnumString != nil { - toSerialize["enum_string"] = o.EnumString - } - if o.EnumStringRequired == nil { - return nil, errors.New("EnumStringRequired is required and not nullable, but was not set on EnumTest") - } - if o.EnumStringRequired != nil { - toSerialize["enum_string_required"] = o.EnumStringRequired - } - if o.EnumInteger != nil { - toSerialize["enum_integer"] = o.EnumInteger - } - if o.EnumNumber != nil { - toSerialize["enum_number"] = o.EnumNumber - } - if o.OuterEnum != nil { - toSerialize["outerEnum"] = o.OuterEnum - } - return json.Marshal(toSerialize) +func (v NullableEnumTest) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } } +func (v *NullableEnumTest) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_file.go b/samples/client/petstore/go-experimental/go-petstore/model_file.go index 872952cc14ea..d35f12c08879 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_file.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_file.go @@ -8,17 +8,19 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // File Must be named `File` for test. type File struct { // Test capitalization SourceURI *string `json:"sourceURI,omitempty"` - } -// GetSourceURI returns the SourceURI field if non-nil, zero value otherwise. +// GetSourceURI returns the SourceURI field value if set, zero value otherwise. func (o *File) GetSourceURI() string { if o == nil || o.SourceURI == nil { var ret string @@ -27,7 +29,7 @@ func (o *File) GetSourceURI() string { return *o.SourceURI } -// GetSourceURIOk returns a tuple with the SourceURI field if it's non-nil, zero value otherwise +// GetSourceURIOk returns a tuple with the SourceURI field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *File) GetSourceURIOk() (string, bool) { if o == nil || o.SourceURI == nil { @@ -51,14 +53,26 @@ func (o *File) SetSourceURI(v string) { o.SourceURI = &v } +type NullableFile struct { + Value File + ExplicitNull bool +} + +func (v NullableFile) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o File) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.SourceURI != nil { - toSerialize["sourceURI"] = o.SourceURI +func (v *NullableFile) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go b/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go index 3926d06b2398..5c6a45436bea 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go @@ -8,18 +8,19 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // FileSchemaTestClass struct for FileSchemaTestClass type FileSchemaTestClass struct { File *File `json:"file,omitempty"` - Files *[]File `json:"files,omitempty"` - } -// GetFile returns the File field if non-nil, zero value otherwise. +// GetFile returns the File field value if set, zero value otherwise. func (o *FileSchemaTestClass) GetFile() File { if o == nil || o.File == nil { var ret File @@ -28,7 +29,7 @@ func (o *FileSchemaTestClass) GetFile() File { return *o.File } -// GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise +// GetFileOk returns a tuple with the File field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FileSchemaTestClass) GetFileOk() (File, bool) { if o == nil || o.File == nil { @@ -52,7 +53,7 @@ func (o *FileSchemaTestClass) SetFile(v File) { o.File = &v } -// GetFiles returns the Files field if non-nil, zero value otherwise. +// GetFiles returns the Files field value if set, zero value otherwise. func (o *FileSchemaTestClass) GetFiles() []File { if o == nil || o.Files == nil { var ret []File @@ -61,7 +62,7 @@ func (o *FileSchemaTestClass) GetFiles() []File { return *o.Files } -// GetFilesOk returns a tuple with the Files field if it's non-nil, zero value otherwise +// GetFilesOk returns a tuple with the Files field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FileSchemaTestClass) GetFilesOk() ([]File, bool) { if o == nil || o.Files == nil { @@ -85,17 +86,26 @@ func (o *FileSchemaTestClass) SetFiles(v []File) { o.Files = &v } +type NullableFileSchemaTestClass struct { + Value FileSchemaTestClass + ExplicitNull bool +} + +func (v NullableFileSchemaTestClass) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o FileSchemaTestClass) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.File != nil { - toSerialize["file"] = o.File - } - if o.Files != nil { - toSerialize["files"] = o.Files +func (v *NullableFileSchemaTestClass) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go index c6de468fbfb4..6676cf826fbf 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go @@ -8,45 +8,33 @@ */ package petstore + import ( + "bytes" + "encoding/json" "os" "time" - "encoding/json" - "errors" ) + // FormatTest struct for FormatTest type FormatTest struct { Integer *int32 `json:"integer,omitempty"` - Int32 *int32 `json:"int32,omitempty"` - Int64 *int64 `json:"int64,omitempty"` - - Number *float32 `json:"number,omitempty"` - + Number float32 `json:"number"` Float *float32 `json:"float,omitempty"` - Double *float64 `json:"double,omitempty"` - String *string `json:"string,omitempty"` - - Byte *string `json:"byte,omitempty"` - + Byte string `json:"byte"` Binary **os.File `json:"binary,omitempty"` - - Date *string `json:"date,omitempty"` - + Date string `json:"date"` DateTime *time.Time `json:"dateTime,omitempty"` - Uuid *string `json:"uuid,omitempty"` - - Password *string `json:"password,omitempty"` - + Password string `json:"password"` BigDecimal *float64 `json:"BigDecimal,omitempty"` - } -// GetInteger returns the Integer field if non-nil, zero value otherwise. +// GetInteger returns the Integer field value if set, zero value otherwise. func (o *FormatTest) GetInteger() int32 { if o == nil || o.Integer == nil { var ret int32 @@ -55,7 +43,7 @@ func (o *FormatTest) GetInteger() int32 { return *o.Integer } -// GetIntegerOk returns a tuple with the Integer field if it's non-nil, zero value otherwise +// GetIntegerOk returns a tuple with the Integer field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FormatTest) GetIntegerOk() (int32, bool) { if o == nil || o.Integer == nil { @@ -79,7 +67,7 @@ func (o *FormatTest) SetInteger(v int32) { o.Integer = &v } -// GetInt32 returns the Int32 field if non-nil, zero value otherwise. +// GetInt32 returns the Int32 field value if set, zero value otherwise. func (o *FormatTest) GetInt32() int32 { if o == nil || o.Int32 == nil { var ret int32 @@ -88,7 +76,7 @@ func (o *FormatTest) GetInt32() int32 { return *o.Int32 } -// GetInt32Ok returns a tuple with the Int32 field if it's non-nil, zero value otherwise +// GetInt32Ok returns a tuple with the Int32 field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FormatTest) GetInt32Ok() (int32, bool) { if o == nil || o.Int32 == nil { @@ -112,7 +100,7 @@ func (o *FormatTest) SetInt32(v int32) { o.Int32 = &v } -// GetInt64 returns the Int64 field if non-nil, zero value otherwise. +// GetInt64 returns the Int64 field value if set, zero value otherwise. func (o *FormatTest) GetInt64() int64 { if o == nil || o.Int64 == nil { var ret int64 @@ -121,7 +109,7 @@ func (o *FormatTest) GetInt64() int64 { return *o.Int64 } -// GetInt64Ok returns a tuple with the Int64 field if it's non-nil, zero value otherwise +// GetInt64Ok returns a tuple with the Int64 field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FormatTest) GetInt64Ok() (int64, bool) { if o == nil || o.Int64 == nil { @@ -145,40 +133,22 @@ func (o *FormatTest) SetInt64(v int64) { o.Int64 = &v } -// GetNumber returns the Number field if non-nil, zero value otherwise. +// GetNumber returns the Number field value func (o *FormatTest) GetNumber() float32 { - if o == nil || o.Number == nil { + if o == nil { var ret float32 return ret } - return *o.Number -} - -// GetNumberOk returns a tuple with the Number field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *FormatTest) GetNumberOk() (float32, bool) { - if o == nil || o.Number == nil { - var ret float32 - return ret, false - } - return *o.Number, true -} -// HasNumber returns a boolean if a field has been set. -func (o *FormatTest) HasNumber() bool { - if o != nil && o.Number != nil { - return true - } - - return false + return o.Number } -// SetNumber gets a reference to the given float32 and assigns it to the Number field. +// SetNumber sets field value func (o *FormatTest) SetNumber(v float32) { - o.Number = &v + o.Number = v } -// GetFloat returns the Float field if non-nil, zero value otherwise. +// GetFloat returns the Float field value if set, zero value otherwise. func (o *FormatTest) GetFloat() float32 { if o == nil || o.Float == nil { var ret float32 @@ -187,7 +157,7 @@ func (o *FormatTest) GetFloat() float32 { return *o.Float } -// GetFloatOk returns a tuple with the Float field if it's non-nil, zero value otherwise +// GetFloatOk returns a tuple with the Float field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FormatTest) GetFloatOk() (float32, bool) { if o == nil || o.Float == nil { @@ -211,7 +181,7 @@ func (o *FormatTest) SetFloat(v float32) { o.Float = &v } -// GetDouble returns the Double field if non-nil, zero value otherwise. +// GetDouble returns the Double field value if set, zero value otherwise. func (o *FormatTest) GetDouble() float64 { if o == nil || o.Double == nil { var ret float64 @@ -220,7 +190,7 @@ func (o *FormatTest) GetDouble() float64 { return *o.Double } -// GetDoubleOk returns a tuple with the Double field if it's non-nil, zero value otherwise +// GetDoubleOk returns a tuple with the Double field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FormatTest) GetDoubleOk() (float64, bool) { if o == nil || o.Double == nil { @@ -244,7 +214,7 @@ func (o *FormatTest) SetDouble(v float64) { o.Double = &v } -// GetString returns the String field if non-nil, zero value otherwise. +// GetString returns the String field value if set, zero value otherwise. func (o *FormatTest) GetString() string { if o == nil || o.String == nil { var ret string @@ -253,7 +223,7 @@ func (o *FormatTest) GetString() string { return *o.String } -// GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise +// GetStringOk returns a tuple with the String field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FormatTest) GetStringOk() (string, bool) { if o == nil || o.String == nil { @@ -277,40 +247,22 @@ func (o *FormatTest) SetString(v string) { o.String = &v } -// GetByte returns the Byte field if non-nil, zero value otherwise. +// GetByte returns the Byte field value func (o *FormatTest) GetByte() string { - if o == nil || o.Byte == nil { + if o == nil { var ret string return ret } - return *o.Byte -} -// GetByteOk returns a tuple with the Byte field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *FormatTest) GetByteOk() (string, bool) { - if o == nil || o.Byte == nil { - var ret string - return ret, false - } - return *o.Byte, true -} - -// HasByte returns a boolean if a field has been set. -func (o *FormatTest) HasByte() bool { - if o != nil && o.Byte != nil { - return true - } - - return false + return o.Byte } -// SetByte gets a reference to the given string and assigns it to the Byte field. +// SetByte sets field value func (o *FormatTest) SetByte(v string) { - o.Byte = &v + o.Byte = v } -// GetBinary returns the Binary field if non-nil, zero value otherwise. +// GetBinary returns the Binary field value if set, zero value otherwise. func (o *FormatTest) GetBinary() *os.File { if o == nil || o.Binary == nil { var ret *os.File @@ -319,7 +271,7 @@ func (o *FormatTest) GetBinary() *os.File { return *o.Binary } -// GetBinaryOk returns a tuple with the Binary field if it's non-nil, zero value otherwise +// GetBinaryOk returns a tuple with the Binary field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FormatTest) GetBinaryOk() (*os.File, bool) { if o == nil || o.Binary == nil { @@ -343,40 +295,22 @@ func (o *FormatTest) SetBinary(v *os.File) { o.Binary = &v } -// GetDate returns the Date field if non-nil, zero value otherwise. +// GetDate returns the Date field value func (o *FormatTest) GetDate() string { - if o == nil || o.Date == nil { + if o == nil { var ret string return ret } - return *o.Date -} - -// GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *FormatTest) GetDateOk() (string, bool) { - if o == nil || o.Date == nil { - var ret string - return ret, false - } - return *o.Date, true -} -// HasDate returns a boolean if a field has been set. -func (o *FormatTest) HasDate() bool { - if o != nil && o.Date != nil { - return true - } - - return false + return o.Date } -// SetDate gets a reference to the given string and assigns it to the Date field. +// SetDate sets field value func (o *FormatTest) SetDate(v string) { - o.Date = &v + o.Date = v } -// GetDateTime returns the DateTime field if non-nil, zero value otherwise. +// GetDateTime returns the DateTime field value if set, zero value otherwise. func (o *FormatTest) GetDateTime() time.Time { if o == nil || o.DateTime == nil { var ret time.Time @@ -385,7 +319,7 @@ func (o *FormatTest) GetDateTime() time.Time { return *o.DateTime } -// GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise +// GetDateTimeOk returns a tuple with the DateTime field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FormatTest) GetDateTimeOk() (time.Time, bool) { if o == nil || o.DateTime == nil { @@ -409,7 +343,7 @@ func (o *FormatTest) SetDateTime(v time.Time) { o.DateTime = &v } -// GetUuid returns the Uuid field if non-nil, zero value otherwise. +// GetUuid returns the Uuid field value if set, zero value otherwise. func (o *FormatTest) GetUuid() string { if o == nil || o.Uuid == nil { var ret string @@ -418,7 +352,7 @@ func (o *FormatTest) GetUuid() string { return *o.Uuid } -// GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +// GetUuidOk returns a tuple with the Uuid field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FormatTest) GetUuidOk() (string, bool) { if o == nil || o.Uuid == nil { @@ -442,40 +376,22 @@ func (o *FormatTest) SetUuid(v string) { o.Uuid = &v } -// GetPassword returns the Password field if non-nil, zero value otherwise. +// GetPassword returns the Password field value func (o *FormatTest) GetPassword() string { - if o == nil || o.Password == nil { + if o == nil { var ret string return ret } - return *o.Password -} -// GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *FormatTest) GetPasswordOk() (string, bool) { - if o == nil || o.Password == nil { - var ret string - return ret, false - } - return *o.Password, true -} - -// HasPassword returns a boolean if a field has been set. -func (o *FormatTest) HasPassword() bool { - if o != nil && o.Password != nil { - return true - } - - return false + return o.Password } -// SetPassword gets a reference to the given string and assigns it to the Password field. +// SetPassword sets field value func (o *FormatTest) SetPassword(v string) { - o.Password = &v + o.Password = v } -// GetBigDecimal returns the BigDecimal field if non-nil, zero value otherwise. +// GetBigDecimal returns the BigDecimal field value if set, zero value otherwise. func (o *FormatTest) GetBigDecimal() float64 { if o == nil || o.BigDecimal == nil { var ret float64 @@ -484,7 +400,7 @@ func (o *FormatTest) GetBigDecimal() float64 { return *o.BigDecimal } -// GetBigDecimalOk returns a tuple with the BigDecimal field if it's non-nil, zero value otherwise +// GetBigDecimalOk returns a tuple with the BigDecimal field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *FormatTest) GetBigDecimalOk() (float64, bool) { if o == nil || o.BigDecimal == nil { @@ -508,65 +424,26 @@ func (o *FormatTest) SetBigDecimal(v float64) { o.BigDecimal = &v } +type NullableFormatTest struct { + Value FormatTest + ExplicitNull bool +} + +func (v NullableFormatTest) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o FormatTest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Integer != nil { - toSerialize["integer"] = o.Integer - } - if o.Int32 != nil { - toSerialize["int32"] = o.Int32 - } - if o.Int64 != nil { - toSerialize["int64"] = o.Int64 - } - if o.Number == nil { - return nil, errors.New("Number is required and not nullable, but was not set on FormatTest") - } - if o.Number != nil { - toSerialize["number"] = o.Number - } - if o.Float != nil { - toSerialize["float"] = o.Float - } - if o.Double != nil { - toSerialize["double"] = o.Double - } - if o.String != nil { - toSerialize["string"] = o.String - } - if o.Byte == nil { - return nil, errors.New("Byte is required and not nullable, but was not set on FormatTest") - } - if o.Byte != nil { - toSerialize["byte"] = o.Byte +func (v *NullableFormatTest) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - if o.Binary != nil { - toSerialize["binary"] = o.Binary - } - if o.Date == nil { - return nil, errors.New("Date is required and not nullable, but was not set on FormatTest") - } - if o.Date != nil { - toSerialize["date"] = o.Date - } - if o.DateTime != nil { - toSerialize["dateTime"] = o.DateTime - } - if o.Uuid != nil { - toSerialize["uuid"] = o.Uuid - } - if o.Password == nil { - return nil, errors.New("Password is required and not nullable, but was not set on FormatTest") - } - if o.Password != nil { - toSerialize["password"] = o.Password - } - if o.BigDecimal != nil { - toSerialize["BigDecimal"] = o.BigDecimal - } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go b/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go index a36344fdf8ea..4d6a4ade3bab 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go @@ -8,18 +8,19 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // HasOnlyReadOnly struct for HasOnlyReadOnly type HasOnlyReadOnly struct { Bar *string `json:"bar,omitempty"` - Foo *string `json:"foo,omitempty"` - } -// GetBar returns the Bar field if non-nil, zero value otherwise. +// GetBar returns the Bar field value if set, zero value otherwise. func (o *HasOnlyReadOnly) GetBar() string { if o == nil || o.Bar == nil { var ret string @@ -28,7 +29,7 @@ func (o *HasOnlyReadOnly) GetBar() string { return *o.Bar } -// GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise +// GetBarOk returns a tuple with the Bar field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *HasOnlyReadOnly) GetBarOk() (string, bool) { if o == nil || o.Bar == nil { @@ -52,7 +53,7 @@ func (o *HasOnlyReadOnly) SetBar(v string) { o.Bar = &v } -// GetFoo returns the Foo field if non-nil, zero value otherwise. +// GetFoo returns the Foo field value if set, zero value otherwise. func (o *HasOnlyReadOnly) GetFoo() string { if o == nil || o.Foo == nil { var ret string @@ -61,7 +62,7 @@ func (o *HasOnlyReadOnly) GetFoo() string { return *o.Foo } -// GetFooOk returns a tuple with the Foo field if it's non-nil, zero value otherwise +// GetFooOk returns a tuple with the Foo field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *HasOnlyReadOnly) GetFooOk() (string, bool) { if o == nil || o.Foo == nil { @@ -85,17 +86,26 @@ func (o *HasOnlyReadOnly) SetFoo(v string) { o.Foo = &v } +type NullableHasOnlyReadOnly struct { + Value HasOnlyReadOnly + ExplicitNull bool +} + +func (v NullableHasOnlyReadOnly) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o HasOnlyReadOnly) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Bar != nil { - toSerialize["bar"] = o.Bar - } - if o.Foo != nil { - toSerialize["foo"] = o.Foo +func (v *NullableHasOnlyReadOnly) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_list.go b/samples/client/petstore/go-experimental/go-petstore/model_list.go index 2d1e013e6840..2e341b13fe21 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_list.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_list.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // List struct for List type List struct { Var123List *string `json:"123-list,omitempty"` - } -// GetVar123List returns the Var123List field if non-nil, zero value otherwise. +// GetVar123List returns the Var123List field value if set, zero value otherwise. func (o *List) GetVar123List() string { if o == nil || o.Var123List == nil { var ret string @@ -26,7 +28,7 @@ func (o *List) GetVar123List() string { return *o.Var123List } -// GetVar123ListOk returns a tuple with the Var123List field if it's non-nil, zero value otherwise +// GetVar123ListOk returns a tuple with the Var123List field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *List) GetVar123ListOk() (string, bool) { if o == nil || o.Var123List == nil { @@ -50,14 +52,26 @@ func (o *List) SetVar123List(v string) { o.Var123List = &v } +type NullableList struct { + Value List + ExplicitNull bool +} + +func (v NullableList) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o List) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Var123List != nil { - toSerialize["123-list"] = o.Var123List +func (v *NullableList) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go index 1f5db78738cc..482e2dcaa546 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go @@ -8,22 +8,21 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // MapTest struct for MapTest type MapTest struct { MapMapOfString *map[string]map[string]string `json:"map_map_of_string,omitempty"` - MapOfEnumString *map[string]string `json:"map_of_enum_string,omitempty"` - DirectMap *map[string]bool `json:"direct_map,omitempty"` - IndirectMap *map[string]bool `json:"indirect_map,omitempty"` - } -// GetMapMapOfString returns the MapMapOfString field if non-nil, zero value otherwise. +// GetMapMapOfString returns the MapMapOfString field value if set, zero value otherwise. func (o *MapTest) GetMapMapOfString() map[string]map[string]string { if o == nil || o.MapMapOfString == nil { var ret map[string]map[string]string @@ -32,7 +31,7 @@ func (o *MapTest) GetMapMapOfString() map[string]map[string]string { return *o.MapMapOfString } -// GetMapMapOfStringOk returns a tuple with the MapMapOfString field if it's non-nil, zero value otherwise +// GetMapMapOfStringOk returns a tuple with the MapMapOfString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *MapTest) GetMapMapOfStringOk() (map[string]map[string]string, bool) { if o == nil || o.MapMapOfString == nil { @@ -56,7 +55,7 @@ func (o *MapTest) SetMapMapOfString(v map[string]map[string]string) { o.MapMapOfString = &v } -// GetMapOfEnumString returns the MapOfEnumString field if non-nil, zero value otherwise. +// GetMapOfEnumString returns the MapOfEnumString field value if set, zero value otherwise. func (o *MapTest) GetMapOfEnumString() map[string]string { if o == nil || o.MapOfEnumString == nil { var ret map[string]string @@ -65,7 +64,7 @@ func (o *MapTest) GetMapOfEnumString() map[string]string { return *o.MapOfEnumString } -// GetMapOfEnumStringOk returns a tuple with the MapOfEnumString field if it's non-nil, zero value otherwise +// GetMapOfEnumStringOk returns a tuple with the MapOfEnumString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *MapTest) GetMapOfEnumStringOk() (map[string]string, bool) { if o == nil || o.MapOfEnumString == nil { @@ -89,7 +88,7 @@ func (o *MapTest) SetMapOfEnumString(v map[string]string) { o.MapOfEnumString = &v } -// GetDirectMap returns the DirectMap field if non-nil, zero value otherwise. +// GetDirectMap returns the DirectMap field value if set, zero value otherwise. func (o *MapTest) GetDirectMap() map[string]bool { if o == nil || o.DirectMap == nil { var ret map[string]bool @@ -98,7 +97,7 @@ func (o *MapTest) GetDirectMap() map[string]bool { return *o.DirectMap } -// GetDirectMapOk returns a tuple with the DirectMap field if it's non-nil, zero value otherwise +// GetDirectMapOk returns a tuple with the DirectMap field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *MapTest) GetDirectMapOk() (map[string]bool, bool) { if o == nil || o.DirectMap == nil { @@ -122,7 +121,7 @@ func (o *MapTest) SetDirectMap(v map[string]bool) { o.DirectMap = &v } -// GetIndirectMap returns the IndirectMap field if non-nil, zero value otherwise. +// GetIndirectMap returns the IndirectMap field value if set, zero value otherwise. func (o *MapTest) GetIndirectMap() map[string]bool { if o == nil || o.IndirectMap == nil { var ret map[string]bool @@ -131,7 +130,7 @@ func (o *MapTest) GetIndirectMap() map[string]bool { return *o.IndirectMap } -// GetIndirectMapOk returns a tuple with the IndirectMap field if it's non-nil, zero value otherwise +// GetIndirectMapOk returns a tuple with the IndirectMap field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *MapTest) GetIndirectMapOk() (map[string]bool, bool) { if o == nil || o.IndirectMap == nil { @@ -155,23 +154,26 @@ func (o *MapTest) SetIndirectMap(v map[string]bool) { o.IndirectMap = &v } +type NullableMapTest struct { + Value MapTest + ExplicitNull bool +} + +func (v NullableMapTest) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o MapTest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.MapMapOfString != nil { - toSerialize["map_map_of_string"] = o.MapMapOfString - } - if o.MapOfEnumString != nil { - toSerialize["map_of_enum_string"] = o.MapOfEnumString - } - if o.DirectMap != nil { - toSerialize["direct_map"] = o.DirectMap +func (v *NullableMapTest) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - if o.IndirectMap != nil { - toSerialize["indirect_map"] = o.IndirectMap - } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go b/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go index 8f8d81b2c586..29a15dd4b9bb 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go @@ -8,21 +8,21 @@ */ package petstore + import ( - "time" + "bytes" "encoding/json" + "time" ) + // MixedPropertiesAndAdditionalPropertiesClass struct for MixedPropertiesAndAdditionalPropertiesClass type MixedPropertiesAndAdditionalPropertiesClass struct { Uuid *string `json:"uuid,omitempty"` - DateTime *time.Time `json:"dateTime,omitempty"` - Map *map[string]Animal `json:"map,omitempty"` - } -// GetUuid returns the Uuid field if non-nil, zero value otherwise. +// GetUuid returns the Uuid field value if set, zero value otherwise. func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string { if o == nil || o.Uuid == nil { var ret string @@ -31,7 +31,7 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string { return *o.Uuid } -// GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +// GetUuidOk returns a tuple with the Uuid field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuidOk() (string, bool) { if o == nil || o.Uuid == nil { @@ -55,7 +55,7 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUuid(v string) { o.Uuid = &v } -// GetDateTime returns the DateTime field if non-nil, zero value otherwise. +// GetDateTime returns the DateTime field value if set, zero value otherwise. func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTime() time.Time { if o == nil || o.DateTime == nil { var ret time.Time @@ -64,7 +64,7 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTime() time.Time { return *o.DateTime } -// GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise +// GetDateTimeOk returns a tuple with the DateTime field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTimeOk() (time.Time, bool) { if o == nil || o.DateTime == nil { @@ -88,7 +88,7 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) SetDateTime(v time.Time) { o.DateTime = &v } -// GetMap returns the Map field if non-nil, zero value otherwise. +// GetMap returns the Map field value if set, zero value otherwise. func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMap() map[string]Animal { if o == nil || o.Map == nil { var ret map[string]Animal @@ -97,7 +97,7 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMap() map[string]Animal return *o.Map } -// GetMapOk returns a tuple with the Map field if it's non-nil, zero value otherwise +// GetMapOk returns a tuple with the Map field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMapOk() (map[string]Animal, bool) { if o == nil || o.Map == nil { @@ -121,20 +121,26 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) SetMap(v map[string]Animal o.Map = &v } +type NullableMixedPropertiesAndAdditionalPropertiesClass struct { + Value MixedPropertiesAndAdditionalPropertiesClass + ExplicitNull bool +} -// MarshalJSON returns the JSON representation of the model. -func (o MixedPropertiesAndAdditionalPropertiesClass) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Uuid != nil { - toSerialize["uuid"] = o.Uuid - } - if o.DateTime != nil { - toSerialize["dateTime"] = o.DateTime - } - if o.Map != nil { - toSerialize["map"] = o.Map - } - return json.Marshal(toSerialize) +func (v NullableMixedPropertiesAndAdditionalPropertiesClass) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } } +func (v *NullableMixedPropertiesAndAdditionalPropertiesClass) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_name.go b/samples/client/petstore/go-experimental/go-petstore/model_name.go index ce720badba43..15cb31cf79f0 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_name.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_name.go @@ -8,56 +8,36 @@ */ package petstore + import ( + "bytes" "encoding/json" - "errors" ) + // Name Model for testing model name same as property name type Name struct { - Name *int32 `json:"name,omitempty"` - + Name int32 `json:"name"` SnakeCase *int32 `json:"snake_case,omitempty"` - Property *string `json:"property,omitempty"` - Var123Number *int32 `json:"123Number,omitempty"` - } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value func (o *Name) GetName() int32 { - if o == nil || o.Name == nil { + if o == nil { var ret int32 return ret } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *Name) GetNameOk() (int32, bool) { - if o == nil || o.Name == nil { - var ret int32 - return ret, false - } - return *o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *Name) HasName() bool { - if o != nil && o.Name != nil { - return true - } - return false + return o.Name } -// SetName gets a reference to the given int32 and assigns it to the Name field. +// SetName sets field value func (o *Name) SetName(v int32) { - o.Name = &v + o.Name = v } -// GetSnakeCase returns the SnakeCase field if non-nil, zero value otherwise. +// GetSnakeCase returns the SnakeCase field value if set, zero value otherwise. func (o *Name) GetSnakeCase() int32 { if o == nil || o.SnakeCase == nil { var ret int32 @@ -66,7 +46,7 @@ func (o *Name) GetSnakeCase() int32 { return *o.SnakeCase } -// GetSnakeCaseOk returns a tuple with the SnakeCase field if it's non-nil, zero value otherwise +// GetSnakeCaseOk returns a tuple with the SnakeCase field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Name) GetSnakeCaseOk() (int32, bool) { if o == nil || o.SnakeCase == nil { @@ -90,7 +70,7 @@ func (o *Name) SetSnakeCase(v int32) { o.SnakeCase = &v } -// GetProperty returns the Property field if non-nil, zero value otherwise. +// GetProperty returns the Property field value if set, zero value otherwise. func (o *Name) GetProperty() string { if o == nil || o.Property == nil { var ret string @@ -99,7 +79,7 @@ func (o *Name) GetProperty() string { return *o.Property } -// GetPropertyOk returns a tuple with the Property field if it's non-nil, zero value otherwise +// GetPropertyOk returns a tuple with the Property field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Name) GetPropertyOk() (string, bool) { if o == nil || o.Property == nil { @@ -123,7 +103,7 @@ func (o *Name) SetProperty(v string) { o.Property = &v } -// GetVar123Number returns the Var123Number field if non-nil, zero value otherwise. +// GetVar123Number returns the Var123Number field value if set, zero value otherwise. func (o *Name) GetVar123Number() int32 { if o == nil || o.Var123Number == nil { var ret int32 @@ -132,7 +112,7 @@ func (o *Name) GetVar123Number() int32 { return *o.Var123Number } -// GetVar123NumberOk returns a tuple with the Var123Number field if it's non-nil, zero value otherwise +// GetVar123NumberOk returns a tuple with the Var123Number field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Name) GetVar123NumberOk() (int32, bool) { if o == nil || o.Var123Number == nil { @@ -156,26 +136,26 @@ func (o *Name) SetVar123Number(v int32) { o.Var123Number = &v } +type NullableName struct { + Value Name + ExplicitNull bool +} -// MarshalJSON returns the JSON representation of the model. -func (o Name) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name == nil { - return nil, errors.New("Name is required and not nullable, but was not set on Name") - } - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.SnakeCase != nil { - toSerialize["snake_case"] = o.SnakeCase - } - if o.Property != nil { - toSerialize["property"] = o.Property - } - if o.Var123Number != nil { - toSerialize["123Number"] = o.Var123Number - } - return json.Marshal(toSerialize) +func (v NullableName) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } } +func (v *NullableName) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_number_only.go b/samples/client/petstore/go-experimental/go-petstore/model_number_only.go index 0cc88037cdd4..a844fb8128ab 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_number_only.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_number_only.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // NumberOnly struct for NumberOnly type NumberOnly struct { JustNumber *float32 `json:"JustNumber,omitempty"` - } -// GetJustNumber returns the JustNumber field if non-nil, zero value otherwise. +// GetJustNumber returns the JustNumber field value if set, zero value otherwise. func (o *NumberOnly) GetJustNumber() float32 { if o == nil || o.JustNumber == nil { var ret float32 @@ -26,7 +28,7 @@ func (o *NumberOnly) GetJustNumber() float32 { return *o.JustNumber } -// GetJustNumberOk returns a tuple with the JustNumber field if it's non-nil, zero value otherwise +// GetJustNumberOk returns a tuple with the JustNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *NumberOnly) GetJustNumberOk() (float32, bool) { if o == nil || o.JustNumber == nil { @@ -50,14 +52,26 @@ func (o *NumberOnly) SetJustNumber(v float32) { o.JustNumber = &v } +type NullableNumberOnly struct { + Value NumberOnly + ExplicitNull bool +} + +func (v NullableNumberOnly) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o NumberOnly) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.JustNumber != nil { - toSerialize["JustNumber"] = o.JustNumber +func (v *NullableNumberOnly) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_order.go b/samples/client/petstore/go-experimental/go-petstore/model_order.go index c0aefd904826..d138fa95cbae 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_order.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_order.go @@ -8,28 +8,25 @@ */ package petstore + import ( - "time" + "bytes" "encoding/json" + "time" ) + // Order struct for Order type Order struct { Id *int64 `json:"id,omitempty"` - PetId *int64 `json:"petId,omitempty"` - Quantity *int32 `json:"quantity,omitempty"` - ShipDate *time.Time `json:"shipDate,omitempty"` - // Order Status Status *string `json:"status,omitempty"` - Complete *bool `json:"complete,omitempty"` - } -// GetId returns the Id field if non-nil, zero value otherwise. +// GetId returns the Id field value if set, zero value otherwise. func (o *Order) GetId() int64 { if o == nil || o.Id == nil { var ret int64 @@ -38,7 +35,7 @@ func (o *Order) GetId() int64 { return *o.Id } -// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// GetIdOk returns a tuple with the Id field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Order) GetIdOk() (int64, bool) { if o == nil || o.Id == nil { @@ -62,7 +59,7 @@ func (o *Order) SetId(v int64) { o.Id = &v } -// GetPetId returns the PetId field if non-nil, zero value otherwise. +// GetPetId returns the PetId field value if set, zero value otherwise. func (o *Order) GetPetId() int64 { if o == nil || o.PetId == nil { var ret int64 @@ -71,7 +68,7 @@ func (o *Order) GetPetId() int64 { return *o.PetId } -// GetPetIdOk returns a tuple with the PetId field if it's non-nil, zero value otherwise +// GetPetIdOk returns a tuple with the PetId field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Order) GetPetIdOk() (int64, bool) { if o == nil || o.PetId == nil { @@ -95,7 +92,7 @@ func (o *Order) SetPetId(v int64) { o.PetId = &v } -// GetQuantity returns the Quantity field if non-nil, zero value otherwise. +// GetQuantity returns the Quantity field value if set, zero value otherwise. func (o *Order) GetQuantity() int32 { if o == nil || o.Quantity == nil { var ret int32 @@ -104,7 +101,7 @@ func (o *Order) GetQuantity() int32 { return *o.Quantity } -// GetQuantityOk returns a tuple with the Quantity field if it's non-nil, zero value otherwise +// GetQuantityOk returns a tuple with the Quantity field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Order) GetQuantityOk() (int32, bool) { if o == nil || o.Quantity == nil { @@ -128,7 +125,7 @@ func (o *Order) SetQuantity(v int32) { o.Quantity = &v } -// GetShipDate returns the ShipDate field if non-nil, zero value otherwise. +// GetShipDate returns the ShipDate field value if set, zero value otherwise. func (o *Order) GetShipDate() time.Time { if o == nil || o.ShipDate == nil { var ret time.Time @@ -137,7 +134,7 @@ func (o *Order) GetShipDate() time.Time { return *o.ShipDate } -// GetShipDateOk returns a tuple with the ShipDate field if it's non-nil, zero value otherwise +// GetShipDateOk returns a tuple with the ShipDate field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Order) GetShipDateOk() (time.Time, bool) { if o == nil || o.ShipDate == nil { @@ -161,7 +158,7 @@ func (o *Order) SetShipDate(v time.Time) { o.ShipDate = &v } -// GetStatus returns the Status field if non-nil, zero value otherwise. +// GetStatus returns the Status field value if set, zero value otherwise. func (o *Order) GetStatus() string { if o == nil || o.Status == nil { var ret string @@ -170,7 +167,7 @@ func (o *Order) GetStatus() string { return *o.Status } -// GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +// GetStatusOk returns a tuple with the Status field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Order) GetStatusOk() (string, bool) { if o == nil || o.Status == nil { @@ -194,7 +191,7 @@ func (o *Order) SetStatus(v string) { o.Status = &v } -// GetComplete returns the Complete field if non-nil, zero value otherwise. +// GetComplete returns the Complete field value if set, zero value otherwise. func (o *Order) GetComplete() bool { if o == nil || o.Complete == nil { var ret bool @@ -203,7 +200,7 @@ func (o *Order) GetComplete() bool { return *o.Complete } -// GetCompleteOk returns a tuple with the Complete field if it's non-nil, zero value otherwise +// GetCompleteOk returns a tuple with the Complete field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Order) GetCompleteOk() (bool, bool) { if o == nil || o.Complete == nil { @@ -227,29 +224,26 @@ func (o *Order) SetComplete(v bool) { o.Complete = &v } +type NullableOrder struct { + Value Order + ExplicitNull bool +} -// MarshalJSON returns the JSON representation of the model. -func (o Order) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.PetId != nil { - toSerialize["petId"] = o.PetId - } - if o.Quantity != nil { - toSerialize["quantity"] = o.Quantity - } - if o.ShipDate != nil { - toSerialize["shipDate"] = o.ShipDate - } - if o.Status != nil { - toSerialize["status"] = o.Status - } - if o.Complete != nil { - toSerialize["complete"] = o.Complete - } - return json.Marshal(toSerialize) +func (v NullableOrder) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } } +func (v *NullableOrder) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go b/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go index 1fe5d4103461..b22599eb6722 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go @@ -8,20 +8,20 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // OuterComposite struct for OuterComposite type OuterComposite struct { MyNumber *float32 `json:"my_number,omitempty"` - MyString *string `json:"my_string,omitempty"` - MyBoolean *bool `json:"my_boolean,omitempty"` - } -// GetMyNumber returns the MyNumber field if non-nil, zero value otherwise. +// GetMyNumber returns the MyNumber field value if set, zero value otherwise. func (o *OuterComposite) GetMyNumber() float32 { if o == nil || o.MyNumber == nil { var ret float32 @@ -30,7 +30,7 @@ func (o *OuterComposite) GetMyNumber() float32 { return *o.MyNumber } -// GetMyNumberOk returns a tuple with the MyNumber field if it's non-nil, zero value otherwise +// GetMyNumberOk returns a tuple with the MyNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *OuterComposite) GetMyNumberOk() (float32, bool) { if o == nil || o.MyNumber == nil { @@ -54,7 +54,7 @@ func (o *OuterComposite) SetMyNumber(v float32) { o.MyNumber = &v } -// GetMyString returns the MyString field if non-nil, zero value otherwise. +// GetMyString returns the MyString field value if set, zero value otherwise. func (o *OuterComposite) GetMyString() string { if o == nil || o.MyString == nil { var ret string @@ -63,7 +63,7 @@ func (o *OuterComposite) GetMyString() string { return *o.MyString } -// GetMyStringOk returns a tuple with the MyString field if it's non-nil, zero value otherwise +// GetMyStringOk returns a tuple with the MyString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *OuterComposite) GetMyStringOk() (string, bool) { if o == nil || o.MyString == nil { @@ -87,7 +87,7 @@ func (o *OuterComposite) SetMyString(v string) { o.MyString = &v } -// GetMyBoolean returns the MyBoolean field if non-nil, zero value otherwise. +// GetMyBoolean returns the MyBoolean field value if set, zero value otherwise. func (o *OuterComposite) GetMyBoolean() bool { if o == nil || o.MyBoolean == nil { var ret bool @@ -96,7 +96,7 @@ func (o *OuterComposite) GetMyBoolean() bool { return *o.MyBoolean } -// GetMyBooleanOk returns a tuple with the MyBoolean field if it's non-nil, zero value otherwise +// GetMyBooleanOk returns a tuple with the MyBoolean field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *OuterComposite) GetMyBooleanOk() (bool, bool) { if o == nil || o.MyBoolean == nil { @@ -120,20 +120,26 @@ func (o *OuterComposite) SetMyBoolean(v bool) { o.MyBoolean = &v } +type NullableOuterComposite struct { + Value OuterComposite + ExplicitNull bool +} + +func (v NullableOuterComposite) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o OuterComposite) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.MyNumber != nil { - toSerialize["my_number"] = o.MyNumber - } - if o.MyString != nil { - toSerialize["my_string"] = o.MyString +func (v *NullableOuterComposite) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - if o.MyBoolean != nil { - toSerialize["my_boolean"] = o.MyBoolean - } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_outer_enum.go b/samples/client/petstore/go-experimental/go-petstore/model_outer_enum.go index f133b6fc890c..b6385fcb5630 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_outer_enum.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_outer_enum.go @@ -8,6 +8,12 @@ */ package petstore + +import ( + "bytes" + "encoding/json" +) + // OuterEnum the model 'OuterEnum' type OuterEnum string @@ -18,4 +24,30 @@ const ( DELIVERED OuterEnum = "delivered" ) +type NullableOuterEnum struct { + Value OuterEnum + ExplicitNull bool +} + +func (v NullableOuterEnum) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != "": + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableOuterEnum) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + + diff --git a/samples/client/petstore/go-experimental/go-petstore/model_pet.go b/samples/client/petstore/go-experimental/go-petstore/model_pet.go index 110a21e094e4..405a179218b7 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_pet.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_pet.go @@ -8,28 +8,24 @@ */ package petstore + import ( + "bytes" "encoding/json" - "errors" ) + // Pet struct for Pet type Pet struct { Id *int64 `json:"id,omitempty"` - Category *Category `json:"category,omitempty"` - - Name *string `json:"name,omitempty"` - - PhotoUrls *[]string `json:"photoUrls,omitempty"` - + Name string `json:"name"` + PhotoUrls []string `json:"photoUrls"` Tags *[]Tag `json:"tags,omitempty"` - // pet status in the store Status *string `json:"status,omitempty"` - } -// GetId returns the Id field if non-nil, zero value otherwise. +// GetId returns the Id field value if set, zero value otherwise. func (o *Pet) GetId() int64 { if o == nil || o.Id == nil { var ret int64 @@ -38,7 +34,7 @@ func (o *Pet) GetId() int64 { return *o.Id } -// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// GetIdOk returns a tuple with the Id field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Pet) GetIdOk() (int64, bool) { if o == nil || o.Id == nil { @@ -62,7 +58,7 @@ func (o *Pet) SetId(v int64) { o.Id = &v } -// GetCategory returns the Category field if non-nil, zero value otherwise. +// GetCategory returns the Category field value if set, zero value otherwise. func (o *Pet) GetCategory() Category { if o == nil || o.Category == nil { var ret Category @@ -71,7 +67,7 @@ func (o *Pet) GetCategory() Category { return *o.Category } -// GetCategoryOk returns a tuple with the Category field if it's non-nil, zero value otherwise +// GetCategoryOk returns a tuple with the Category field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Pet) GetCategoryOk() (Category, bool) { if o == nil || o.Category == nil { @@ -95,73 +91,37 @@ func (o *Pet) SetCategory(v Category) { o.Category = &v } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value func (o *Pet) GetName() string { - if o == nil || o.Name == nil { + if o == nil { var ret string return ret } - return *o.Name -} -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *Pet) GetNameOk() (string, bool) { - if o == nil || o.Name == nil { - var ret string - return ret, false - } - return *o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *Pet) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false + return o.Name } -// SetName gets a reference to the given string and assigns it to the Name field. +// SetName sets field value func (o *Pet) SetName(v string) { - o.Name = &v + o.Name = v } -// GetPhotoUrls returns the PhotoUrls field if non-nil, zero value otherwise. +// GetPhotoUrls returns the PhotoUrls field value func (o *Pet) GetPhotoUrls() []string { - if o == nil || o.PhotoUrls == nil { + if o == nil { var ret []string return ret } - return *o.PhotoUrls -} - -// GetPhotoUrlsOk returns a tuple with the PhotoUrls field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *Pet) GetPhotoUrlsOk() ([]string, bool) { - if o == nil || o.PhotoUrls == nil { - var ret []string - return ret, false - } - return *o.PhotoUrls, true -} -// HasPhotoUrls returns a boolean if a field has been set. -func (o *Pet) HasPhotoUrls() bool { - if o != nil && o.PhotoUrls != nil { - return true - } - - return false + return o.PhotoUrls } -// SetPhotoUrls gets a reference to the given []string and assigns it to the PhotoUrls field. +// SetPhotoUrls sets field value func (o *Pet) SetPhotoUrls(v []string) { - o.PhotoUrls = &v + o.PhotoUrls = v } -// GetTags returns the Tags field if non-nil, zero value otherwise. +// GetTags returns the Tags field value if set, zero value otherwise. func (o *Pet) GetTags() []Tag { if o == nil || o.Tags == nil { var ret []Tag @@ -170,7 +130,7 @@ func (o *Pet) GetTags() []Tag { return *o.Tags } -// GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +// GetTagsOk returns a tuple with the Tags field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Pet) GetTagsOk() ([]Tag, bool) { if o == nil || o.Tags == nil { @@ -194,7 +154,7 @@ func (o *Pet) SetTags(v []Tag) { o.Tags = &v } -// GetStatus returns the Status field if non-nil, zero value otherwise. +// GetStatus returns the Status field value if set, zero value otherwise. func (o *Pet) GetStatus() string { if o == nil || o.Status == nil { var ret string @@ -203,7 +163,7 @@ func (o *Pet) GetStatus() string { return *o.Status } -// GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +// GetStatusOk returns a tuple with the Status field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Pet) GetStatusOk() (string, bool) { if o == nil || o.Status == nil { @@ -227,35 +187,26 @@ func (o *Pet) SetStatus(v string) { o.Status = &v } +type NullablePet struct { + Value Pet + ExplicitNull bool +} -// MarshalJSON returns the JSON representation of the model. -func (o Pet) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Category != nil { - toSerialize["category"] = o.Category - } - if o.Name == nil { - return nil, errors.New("Name is required and not nullable, but was not set on Pet") - } - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.PhotoUrls == nil { - return nil, errors.New("PhotoUrls is required and not nullable, but was not set on Pet") - } - if o.PhotoUrls != nil { - toSerialize["photoUrls"] = o.PhotoUrls - } - if o.Tags != nil { - toSerialize["tags"] = o.Tags - } - if o.Status != nil { - toSerialize["status"] = o.Status - } - return json.Marshal(toSerialize) +func (v NullablePet) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } } +func (v *NullablePet) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go b/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go index 4ed8a2571764..bdd9807ca899 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go @@ -8,18 +8,19 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // ReadOnlyFirst struct for ReadOnlyFirst type ReadOnlyFirst struct { Bar *string `json:"bar,omitempty"` - Baz *string `json:"baz,omitempty"` - } -// GetBar returns the Bar field if non-nil, zero value otherwise. +// GetBar returns the Bar field value if set, zero value otherwise. func (o *ReadOnlyFirst) GetBar() string { if o == nil || o.Bar == nil { var ret string @@ -28,7 +29,7 @@ func (o *ReadOnlyFirst) GetBar() string { return *o.Bar } -// GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise +// GetBarOk returns a tuple with the Bar field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *ReadOnlyFirst) GetBarOk() (string, bool) { if o == nil || o.Bar == nil { @@ -52,7 +53,7 @@ func (o *ReadOnlyFirst) SetBar(v string) { o.Bar = &v } -// GetBaz returns the Baz field if non-nil, zero value otherwise. +// GetBaz returns the Baz field value if set, zero value otherwise. func (o *ReadOnlyFirst) GetBaz() string { if o == nil || o.Baz == nil { var ret string @@ -61,7 +62,7 @@ func (o *ReadOnlyFirst) GetBaz() string { return *o.Baz } -// GetBazOk returns a tuple with the Baz field if it's non-nil, zero value otherwise +// GetBazOk returns a tuple with the Baz field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *ReadOnlyFirst) GetBazOk() (string, bool) { if o == nil || o.Baz == nil { @@ -85,17 +86,26 @@ func (o *ReadOnlyFirst) SetBaz(v string) { o.Baz = &v } +type NullableReadOnlyFirst struct { + Value ReadOnlyFirst + ExplicitNull bool +} + +func (v NullableReadOnlyFirst) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o ReadOnlyFirst) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Bar != nil { - toSerialize["bar"] = o.Bar - } - if o.Baz != nil { - toSerialize["baz"] = o.Baz +func (v *NullableReadOnlyFirst) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_return.go b/samples/client/petstore/go-experimental/go-petstore/model_return.go index c694495fdac8..14821a5ca747 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_return.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_return.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // Return Model for testing reserved words type Return struct { Return *int32 `json:"return,omitempty"` - } -// GetReturn returns the Return field if non-nil, zero value otherwise. +// GetReturn returns the Return field value if set, zero value otherwise. func (o *Return) GetReturn() int32 { if o == nil || o.Return == nil { var ret int32 @@ -26,7 +28,7 @@ func (o *Return) GetReturn() int32 { return *o.Return } -// GetReturnOk returns a tuple with the Return field if it's non-nil, zero value otherwise +// GetReturnOk returns a tuple with the Return field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Return) GetReturnOk() (int32, bool) { if o == nil || o.Return == nil { @@ -50,14 +52,26 @@ func (o *Return) SetReturn(v int32) { o.Return = &v } +type NullableReturn struct { + Value Return + ExplicitNull bool +} + +func (v NullableReturn) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o Return) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Return != nil { - toSerialize["return"] = o.Return +func (v *NullableReturn) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go b/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go index 5568361e1d5f..abafacb4e4dd 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go @@ -8,16 +8,18 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // SpecialModelName struct for SpecialModelName type SpecialModelName struct { SpecialPropertyName *int64 `json:"$special[property.name],omitempty"` - } -// GetSpecialPropertyName returns the SpecialPropertyName field if non-nil, zero value otherwise. +// GetSpecialPropertyName returns the SpecialPropertyName field value if set, zero value otherwise. func (o *SpecialModelName) GetSpecialPropertyName() int64 { if o == nil || o.SpecialPropertyName == nil { var ret int64 @@ -26,7 +28,7 @@ func (o *SpecialModelName) GetSpecialPropertyName() int64 { return *o.SpecialPropertyName } -// GetSpecialPropertyNameOk returns a tuple with the SpecialPropertyName field if it's non-nil, zero value otherwise +// GetSpecialPropertyNameOk returns a tuple with the SpecialPropertyName field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *SpecialModelName) GetSpecialPropertyNameOk() (int64, bool) { if o == nil || o.SpecialPropertyName == nil { @@ -50,14 +52,26 @@ func (o *SpecialModelName) SetSpecialPropertyName(v int64) { o.SpecialPropertyName = &v } +type NullableSpecialModelName struct { + Value SpecialModelName + ExplicitNull bool +} + +func (v NullableSpecialModelName) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o SpecialModelName) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.SpecialPropertyName != nil { - toSerialize["$special[property.name]"] = o.SpecialPropertyName +func (v *NullableSpecialModelName) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_tag.go b/samples/client/petstore/go-experimental/go-petstore/model_tag.go index 063283820e92..a702f37f0939 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_tag.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_tag.go @@ -8,18 +8,19 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // Tag struct for Tag type Tag struct { Id *int64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - } -// GetId returns the Id field if non-nil, zero value otherwise. +// GetId returns the Id field value if set, zero value otherwise. func (o *Tag) GetId() int64 { if o == nil || o.Id == nil { var ret int64 @@ -28,7 +29,7 @@ func (o *Tag) GetId() int64 { return *o.Id } -// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// GetIdOk returns a tuple with the Id field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Tag) GetIdOk() (int64, bool) { if o == nil || o.Id == nil { @@ -52,7 +53,7 @@ func (o *Tag) SetId(v int64) { o.Id = &v } -// GetName returns the Name field if non-nil, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise. func (o *Tag) GetName() string { if o == nil || o.Name == nil { var ret string @@ -61,7 +62,7 @@ func (o *Tag) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *Tag) GetNameOk() (string, bool) { if o == nil || o.Name == nil { @@ -85,17 +86,26 @@ func (o *Tag) SetName(v string) { o.Name = &v } +type NullableTag struct { + Value Tag + ExplicitNull bool +} + +func (v NullableTag) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o Tag) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Name != nil { - toSerialize["name"] = o.Name +func (v *NullableTag) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go index 7022b082547d..173bd1c1b98e 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go @@ -8,224 +8,116 @@ */ package petstore + import ( + "bytes" "encoding/json" - "errors" ) + // TypeHolderDefault struct for TypeHolderDefault type TypeHolderDefault struct { - StringItem *string `json:"string_item,omitempty"` - - NumberItem *float32 `json:"number_item,omitempty"` - - IntegerItem *int32 `json:"integer_item,omitempty"` - - BoolItem *bool `json:"bool_item,omitempty"` - - ArrayItem *[]int32 `json:"array_item,omitempty"` - + StringItem string `json:"string_item"` + NumberItem float32 `json:"number_item"` + IntegerItem int32 `json:"integer_item"` + BoolItem bool `json:"bool_item"` + ArrayItem []int32 `json:"array_item"` } -// GetStringItem returns the StringItem field if non-nil, zero value otherwise. +// GetStringItem returns the StringItem field value func (o *TypeHolderDefault) GetStringItem() string { - if o == nil || o.StringItem == nil { + if o == nil { var ret string return ret } - return *o.StringItem -} - -// GetStringItemOk returns a tuple with the StringItem field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *TypeHolderDefault) GetStringItemOk() (string, bool) { - if o == nil || o.StringItem == nil { - var ret string - return ret, false - } - return *o.StringItem, true -} - -// HasStringItem returns a boolean if a field has been set. -func (o *TypeHolderDefault) HasStringItem() bool { - if o != nil && o.StringItem != nil { - return true - } - return false + return o.StringItem } -// SetStringItem gets a reference to the given string and assigns it to the StringItem field. +// SetStringItem sets field value func (o *TypeHolderDefault) SetStringItem(v string) { - o.StringItem = &v + o.StringItem = v } -// GetNumberItem returns the NumberItem field if non-nil, zero value otherwise. +// GetNumberItem returns the NumberItem field value func (o *TypeHolderDefault) GetNumberItem() float32 { - if o == nil || o.NumberItem == nil { + if o == nil { var ret float32 return ret } - return *o.NumberItem -} - -// GetNumberItemOk returns a tuple with the NumberItem field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *TypeHolderDefault) GetNumberItemOk() (float32, bool) { - if o == nil || o.NumberItem == nil { - var ret float32 - return ret, false - } - return *o.NumberItem, true -} - -// HasNumberItem returns a boolean if a field has been set. -func (o *TypeHolderDefault) HasNumberItem() bool { - if o != nil && o.NumberItem != nil { - return true - } - return false + return o.NumberItem } -// SetNumberItem gets a reference to the given float32 and assigns it to the NumberItem field. +// SetNumberItem sets field value func (o *TypeHolderDefault) SetNumberItem(v float32) { - o.NumberItem = &v + o.NumberItem = v } -// GetIntegerItem returns the IntegerItem field if non-nil, zero value otherwise. +// GetIntegerItem returns the IntegerItem field value func (o *TypeHolderDefault) GetIntegerItem() int32 { - if o == nil || o.IntegerItem == nil { + if o == nil { var ret int32 return ret } - return *o.IntegerItem -} - -// GetIntegerItemOk returns a tuple with the IntegerItem field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *TypeHolderDefault) GetIntegerItemOk() (int32, bool) { - if o == nil || o.IntegerItem == nil { - var ret int32 - return ret, false - } - return *o.IntegerItem, true -} - -// HasIntegerItem returns a boolean if a field has been set. -func (o *TypeHolderDefault) HasIntegerItem() bool { - if o != nil && o.IntegerItem != nil { - return true - } - return false + return o.IntegerItem } -// SetIntegerItem gets a reference to the given int32 and assigns it to the IntegerItem field. +// SetIntegerItem sets field value func (o *TypeHolderDefault) SetIntegerItem(v int32) { - o.IntegerItem = &v + o.IntegerItem = v } -// GetBoolItem returns the BoolItem field if non-nil, zero value otherwise. +// GetBoolItem returns the BoolItem field value func (o *TypeHolderDefault) GetBoolItem() bool { - if o == nil || o.BoolItem == nil { + if o == nil { var ret bool return ret } - return *o.BoolItem -} - -// GetBoolItemOk returns a tuple with the BoolItem field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *TypeHolderDefault) GetBoolItemOk() (bool, bool) { - if o == nil || o.BoolItem == nil { - var ret bool - return ret, false - } - return *o.BoolItem, true -} - -// HasBoolItem returns a boolean if a field has been set. -func (o *TypeHolderDefault) HasBoolItem() bool { - if o != nil && o.BoolItem != nil { - return true - } - return false + return o.BoolItem } -// SetBoolItem gets a reference to the given bool and assigns it to the BoolItem field. +// SetBoolItem sets field value func (o *TypeHolderDefault) SetBoolItem(v bool) { - o.BoolItem = &v + o.BoolItem = v } -// GetArrayItem returns the ArrayItem field if non-nil, zero value otherwise. +// GetArrayItem returns the ArrayItem field value func (o *TypeHolderDefault) GetArrayItem() []int32 { - if o == nil || o.ArrayItem == nil { + if o == nil { var ret []int32 return ret } - return *o.ArrayItem -} -// GetArrayItemOk returns a tuple with the ArrayItem field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *TypeHolderDefault) GetArrayItemOk() ([]int32, bool) { - if o == nil || o.ArrayItem == nil { - var ret []int32 - return ret, false - } - return *o.ArrayItem, true + return o.ArrayItem } -// HasArrayItem returns a boolean if a field has been set. -func (o *TypeHolderDefault) HasArrayItem() bool { - if o != nil && o.ArrayItem != nil { - return true - } - - return false +// SetArrayItem sets field value +func (o *TypeHolderDefault) SetArrayItem(v []int32) { + o.ArrayItem = v } -// SetArrayItem gets a reference to the given []int32 and assigns it to the ArrayItem field. -func (o *TypeHolderDefault) SetArrayItem(v []int32) { - o.ArrayItem = &v +type NullableTypeHolderDefault struct { + Value TypeHolderDefault + ExplicitNull bool } +func (v NullableTypeHolderDefault) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o TypeHolderDefault) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.StringItem == nil { - return nil, errors.New("StringItem is required and not nullable, but was not set on TypeHolderDefault") - } - if o.StringItem != nil { - toSerialize["string_item"] = o.StringItem - } - if o.NumberItem == nil { - return nil, errors.New("NumberItem is required and not nullable, but was not set on TypeHolderDefault") - } - if o.NumberItem != nil { - toSerialize["number_item"] = o.NumberItem - } - if o.IntegerItem == nil { - return nil, errors.New("IntegerItem is required and not nullable, but was not set on TypeHolderDefault") - } - if o.IntegerItem != nil { - toSerialize["integer_item"] = o.IntegerItem +func (v *NullableTypeHolderDefault) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - if o.BoolItem == nil { - return nil, errors.New("BoolItem is required and not nullable, but was not set on TypeHolderDefault") - } - if o.BoolItem != nil { - toSerialize["bool_item"] = o.BoolItem - } - if o.ArrayItem == nil { - return nil, errors.New("ArrayItem is required and not nullable, but was not set on TypeHolderDefault") - } - if o.ArrayItem != nil { - toSerialize["array_item"] = o.ArrayItem - } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go index e51025fcb74b..6cd9a0867caf 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go @@ -8,265 +8,132 @@ */ package petstore + import ( + "bytes" "encoding/json" - "errors" ) + // TypeHolderExample struct for TypeHolderExample type TypeHolderExample struct { - StringItem *string `json:"string_item,omitempty"` - - NumberItem *float32 `json:"number_item,omitempty"` - - FloatItem *float32 `json:"float_item,omitempty"` - - IntegerItem *int32 `json:"integer_item,omitempty"` - - BoolItem *bool `json:"bool_item,omitempty"` - - ArrayItem *[]int32 `json:"array_item,omitempty"` - + StringItem string `json:"string_item"` + NumberItem float32 `json:"number_item"` + FloatItem float32 `json:"float_item"` + IntegerItem int32 `json:"integer_item"` + BoolItem bool `json:"bool_item"` + ArrayItem []int32 `json:"array_item"` } -// GetStringItem returns the StringItem field if non-nil, zero value otherwise. +// GetStringItem returns the StringItem field value func (o *TypeHolderExample) GetStringItem() string { - if o == nil || o.StringItem == nil { + if o == nil { var ret string return ret } - return *o.StringItem -} - -// GetStringItemOk returns a tuple with the StringItem field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *TypeHolderExample) GetStringItemOk() (string, bool) { - if o == nil || o.StringItem == nil { - var ret string - return ret, false - } - return *o.StringItem, true -} - -// HasStringItem returns a boolean if a field has been set. -func (o *TypeHolderExample) HasStringItem() bool { - if o != nil && o.StringItem != nil { - return true - } - return false + return o.StringItem } -// SetStringItem gets a reference to the given string and assigns it to the StringItem field. +// SetStringItem sets field value func (o *TypeHolderExample) SetStringItem(v string) { - o.StringItem = &v + o.StringItem = v } -// GetNumberItem returns the NumberItem field if non-nil, zero value otherwise. +// GetNumberItem returns the NumberItem field value func (o *TypeHolderExample) GetNumberItem() float32 { - if o == nil || o.NumberItem == nil { + if o == nil { var ret float32 return ret } - return *o.NumberItem -} - -// GetNumberItemOk returns a tuple with the NumberItem field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *TypeHolderExample) GetNumberItemOk() (float32, bool) { - if o == nil || o.NumberItem == nil { - var ret float32 - return ret, false - } - return *o.NumberItem, true -} - -// HasNumberItem returns a boolean if a field has been set. -func (o *TypeHolderExample) HasNumberItem() bool { - if o != nil && o.NumberItem != nil { - return true - } - return false + return o.NumberItem } -// SetNumberItem gets a reference to the given float32 and assigns it to the NumberItem field. +// SetNumberItem sets field value func (o *TypeHolderExample) SetNumberItem(v float32) { - o.NumberItem = &v + o.NumberItem = v } -// GetFloatItem returns the FloatItem field if non-nil, zero value otherwise. +// GetFloatItem returns the FloatItem field value func (o *TypeHolderExample) GetFloatItem() float32 { - if o == nil || o.FloatItem == nil { + if o == nil { var ret float32 return ret } - return *o.FloatItem -} - -// GetFloatItemOk returns a tuple with the FloatItem field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *TypeHolderExample) GetFloatItemOk() (float32, bool) { - if o == nil || o.FloatItem == nil { - var ret float32 - return ret, false - } - return *o.FloatItem, true -} - -// HasFloatItem returns a boolean if a field has been set. -func (o *TypeHolderExample) HasFloatItem() bool { - if o != nil && o.FloatItem != nil { - return true - } - return false + return o.FloatItem } -// SetFloatItem gets a reference to the given float32 and assigns it to the FloatItem field. +// SetFloatItem sets field value func (o *TypeHolderExample) SetFloatItem(v float32) { - o.FloatItem = &v + o.FloatItem = v } -// GetIntegerItem returns the IntegerItem field if non-nil, zero value otherwise. +// GetIntegerItem returns the IntegerItem field value func (o *TypeHolderExample) GetIntegerItem() int32 { - if o == nil || o.IntegerItem == nil { + if o == nil { var ret int32 return ret } - return *o.IntegerItem -} - -// GetIntegerItemOk returns a tuple with the IntegerItem field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *TypeHolderExample) GetIntegerItemOk() (int32, bool) { - if o == nil || o.IntegerItem == nil { - var ret int32 - return ret, false - } - return *o.IntegerItem, true -} - -// HasIntegerItem returns a boolean if a field has been set. -func (o *TypeHolderExample) HasIntegerItem() bool { - if o != nil && o.IntegerItem != nil { - return true - } - return false + return o.IntegerItem } -// SetIntegerItem gets a reference to the given int32 and assigns it to the IntegerItem field. +// SetIntegerItem sets field value func (o *TypeHolderExample) SetIntegerItem(v int32) { - o.IntegerItem = &v + o.IntegerItem = v } -// GetBoolItem returns the BoolItem field if non-nil, zero value otherwise. +// GetBoolItem returns the BoolItem field value func (o *TypeHolderExample) GetBoolItem() bool { - if o == nil || o.BoolItem == nil { + if o == nil { var ret bool return ret } - return *o.BoolItem -} - -// GetBoolItemOk returns a tuple with the BoolItem field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *TypeHolderExample) GetBoolItemOk() (bool, bool) { - if o == nil || o.BoolItem == nil { - var ret bool - return ret, false - } - return *o.BoolItem, true -} - -// HasBoolItem returns a boolean if a field has been set. -func (o *TypeHolderExample) HasBoolItem() bool { - if o != nil && o.BoolItem != nil { - return true - } - return false + return o.BoolItem } -// SetBoolItem gets a reference to the given bool and assigns it to the BoolItem field. +// SetBoolItem sets field value func (o *TypeHolderExample) SetBoolItem(v bool) { - o.BoolItem = &v + o.BoolItem = v } -// GetArrayItem returns the ArrayItem field if non-nil, zero value otherwise. +// GetArrayItem returns the ArrayItem field value func (o *TypeHolderExample) GetArrayItem() []int32 { - if o == nil || o.ArrayItem == nil { + if o == nil { var ret []int32 return ret } - return *o.ArrayItem -} -// GetArrayItemOk returns a tuple with the ArrayItem field if it's non-nil, zero value otherwise -// and a boolean to check if the value has been set. -func (o *TypeHolderExample) GetArrayItemOk() ([]int32, bool) { - if o == nil || o.ArrayItem == nil { - var ret []int32 - return ret, false - } - return *o.ArrayItem, true + return o.ArrayItem } -// HasArrayItem returns a boolean if a field has been set. -func (o *TypeHolderExample) HasArrayItem() bool { - if o != nil && o.ArrayItem != nil { - return true - } - - return false +// SetArrayItem sets field value +func (o *TypeHolderExample) SetArrayItem(v []int32) { + o.ArrayItem = v } -// SetArrayItem gets a reference to the given []int32 and assigns it to the ArrayItem field. -func (o *TypeHolderExample) SetArrayItem(v []int32) { - o.ArrayItem = &v +type NullableTypeHolderExample struct { + Value TypeHolderExample + ExplicitNull bool } +func (v NullableTypeHolderExample) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o TypeHolderExample) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.StringItem == nil { - return nil, errors.New("StringItem is required and not nullable, but was not set on TypeHolderExample") - } - if o.StringItem != nil { - toSerialize["string_item"] = o.StringItem - } - if o.NumberItem == nil { - return nil, errors.New("NumberItem is required and not nullable, but was not set on TypeHolderExample") - } - if o.NumberItem != nil { - toSerialize["number_item"] = o.NumberItem - } - if o.FloatItem == nil { - return nil, errors.New("FloatItem is required and not nullable, but was not set on TypeHolderExample") - } - if o.FloatItem != nil { - toSerialize["float_item"] = o.FloatItem +func (v *NullableTypeHolderExample) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - if o.IntegerItem == nil { - return nil, errors.New("IntegerItem is required and not nullable, but was not set on TypeHolderExample") - } - if o.IntegerItem != nil { - toSerialize["integer_item"] = o.IntegerItem - } - if o.BoolItem == nil { - return nil, errors.New("BoolItem is required and not nullable, but was not set on TypeHolderExample") - } - if o.BoolItem != nil { - toSerialize["bool_item"] = o.BoolItem - } - if o.ArrayItem == nil { - return nil, errors.New("ArrayItem is required and not nullable, but was not set on TypeHolderExample") - } - if o.ArrayItem != nil { - toSerialize["array_item"] = o.ArrayItem - } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_user.go b/samples/client/petstore/go-experimental/go-petstore/model_user.go index 174a791aa728..4411c284794d 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_user.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_user.go @@ -8,31 +8,26 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // User struct for User type User struct { Id *int64 `json:"id,omitempty"` - Username *string `json:"username,omitempty"` - FirstName *string `json:"firstName,omitempty"` - LastName *string `json:"lastName,omitempty"` - Email *string `json:"email,omitempty"` - Password *string `json:"password,omitempty"` - Phone *string `json:"phone,omitempty"` - // User Status UserStatus *int32 `json:"userStatus,omitempty"` - } -// GetId returns the Id field if non-nil, zero value otherwise. +// GetId returns the Id field value if set, zero value otherwise. func (o *User) GetId() int64 { if o == nil || o.Id == nil { var ret int64 @@ -41,7 +36,7 @@ func (o *User) GetId() int64 { return *o.Id } -// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// GetIdOk returns a tuple with the Id field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *User) GetIdOk() (int64, bool) { if o == nil || o.Id == nil { @@ -65,7 +60,7 @@ func (o *User) SetId(v int64) { o.Id = &v } -// GetUsername returns the Username field if non-nil, zero value otherwise. +// GetUsername returns the Username field value if set, zero value otherwise. func (o *User) GetUsername() string { if o == nil || o.Username == nil { var ret string @@ -74,7 +69,7 @@ func (o *User) GetUsername() string { return *o.Username } -// GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +// GetUsernameOk returns a tuple with the Username field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *User) GetUsernameOk() (string, bool) { if o == nil || o.Username == nil { @@ -98,7 +93,7 @@ func (o *User) SetUsername(v string) { o.Username = &v } -// GetFirstName returns the FirstName field if non-nil, zero value otherwise. +// GetFirstName returns the FirstName field value if set, zero value otherwise. func (o *User) GetFirstName() string { if o == nil || o.FirstName == nil { var ret string @@ -107,7 +102,7 @@ func (o *User) GetFirstName() string { return *o.FirstName } -// GetFirstNameOk returns a tuple with the FirstName field if it's non-nil, zero value otherwise +// GetFirstNameOk returns a tuple with the FirstName field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *User) GetFirstNameOk() (string, bool) { if o == nil || o.FirstName == nil { @@ -131,7 +126,7 @@ func (o *User) SetFirstName(v string) { o.FirstName = &v } -// GetLastName returns the LastName field if non-nil, zero value otherwise. +// GetLastName returns the LastName field value if set, zero value otherwise. func (o *User) GetLastName() string { if o == nil || o.LastName == nil { var ret string @@ -140,7 +135,7 @@ func (o *User) GetLastName() string { return *o.LastName } -// GetLastNameOk returns a tuple with the LastName field if it's non-nil, zero value otherwise +// GetLastNameOk returns a tuple with the LastName field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *User) GetLastNameOk() (string, bool) { if o == nil || o.LastName == nil { @@ -164,7 +159,7 @@ func (o *User) SetLastName(v string) { o.LastName = &v } -// GetEmail returns the Email field if non-nil, zero value otherwise. +// GetEmail returns the Email field value if set, zero value otherwise. func (o *User) GetEmail() string { if o == nil || o.Email == nil { var ret string @@ -173,7 +168,7 @@ func (o *User) GetEmail() string { return *o.Email } -// GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +// GetEmailOk returns a tuple with the Email field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *User) GetEmailOk() (string, bool) { if o == nil || o.Email == nil { @@ -197,7 +192,7 @@ func (o *User) SetEmail(v string) { o.Email = &v } -// GetPassword returns the Password field if non-nil, zero value otherwise. +// GetPassword returns the Password field value if set, zero value otherwise. func (o *User) GetPassword() string { if o == nil || o.Password == nil { var ret string @@ -206,7 +201,7 @@ func (o *User) GetPassword() string { return *o.Password } -// GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +// GetPasswordOk returns a tuple with the Password field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *User) GetPasswordOk() (string, bool) { if o == nil || o.Password == nil { @@ -230,7 +225,7 @@ func (o *User) SetPassword(v string) { o.Password = &v } -// GetPhone returns the Phone field if non-nil, zero value otherwise. +// GetPhone returns the Phone field value if set, zero value otherwise. func (o *User) GetPhone() string { if o == nil || o.Phone == nil { var ret string @@ -239,7 +234,7 @@ func (o *User) GetPhone() string { return *o.Phone } -// GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise +// GetPhoneOk returns a tuple with the Phone field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *User) GetPhoneOk() (string, bool) { if o == nil || o.Phone == nil { @@ -263,7 +258,7 @@ func (o *User) SetPhone(v string) { o.Phone = &v } -// GetUserStatus returns the UserStatus field if non-nil, zero value otherwise. +// GetUserStatus returns the UserStatus field value if set, zero value otherwise. func (o *User) GetUserStatus() int32 { if o == nil || o.UserStatus == nil { var ret int32 @@ -272,7 +267,7 @@ func (o *User) GetUserStatus() int32 { return *o.UserStatus } -// GetUserStatusOk returns a tuple with the UserStatus field if it's non-nil, zero value otherwise +// GetUserStatusOk returns a tuple with the UserStatus field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *User) GetUserStatusOk() (int32, bool) { if o == nil || o.UserStatus == nil { @@ -296,35 +291,26 @@ func (o *User) SetUserStatus(v int32) { o.UserStatus = &v } +type NullableUser struct { + Value User + ExplicitNull bool +} + +func (v NullableUser) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o User) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Username != nil { - toSerialize["username"] = o.Username - } - if o.FirstName != nil { - toSerialize["firstName"] = o.FirstName - } - if o.LastName != nil { - toSerialize["lastName"] = o.LastName - } - if o.Email != nil { - toSerialize["email"] = o.Email +func (v *NullableUser) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - if o.Password != nil { - toSerialize["password"] = o.Password - } - if o.Phone != nil { - toSerialize["phone"] = o.Phone - } - if o.UserStatus != nil { - toSerialize["userStatus"] = o.UserStatus - } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go b/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go index e1b9efa8e0b9..ddf16b84247f 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go @@ -8,72 +8,46 @@ */ package petstore + import ( + "bytes" "encoding/json" ) + // XmlItem struct for XmlItem type XmlItem struct { AttributeString *string `json:"attribute_string,omitempty"` - AttributeNumber *float32 `json:"attribute_number,omitempty"` - AttributeInteger *int32 `json:"attribute_integer,omitempty"` - AttributeBoolean *bool `json:"attribute_boolean,omitempty"` - WrappedArray *[]int32 `json:"wrapped_array,omitempty"` - NameString *string `json:"name_string,omitempty"` - NameNumber *float32 `json:"name_number,omitempty"` - NameInteger *int32 `json:"name_integer,omitempty"` - NameBoolean *bool `json:"name_boolean,omitempty"` - NameArray *[]int32 `json:"name_array,omitempty"` - NameWrappedArray *[]int32 `json:"name_wrapped_array,omitempty"` - PrefixString *string `json:"prefix_string,omitempty"` - PrefixNumber *float32 `json:"prefix_number,omitempty"` - PrefixInteger *int32 `json:"prefix_integer,omitempty"` - PrefixBoolean *bool `json:"prefix_boolean,omitempty"` - PrefixArray *[]int32 `json:"prefix_array,omitempty"` - PrefixWrappedArray *[]int32 `json:"prefix_wrapped_array,omitempty"` - NamespaceString *string `json:"namespace_string,omitempty"` - NamespaceNumber *float32 `json:"namespace_number,omitempty"` - NamespaceInteger *int32 `json:"namespace_integer,omitempty"` - NamespaceBoolean *bool `json:"namespace_boolean,omitempty"` - NamespaceArray *[]int32 `json:"namespace_array,omitempty"` - NamespaceWrappedArray *[]int32 `json:"namespace_wrapped_array,omitempty"` - PrefixNsString *string `json:"prefix_ns_string,omitempty"` - PrefixNsNumber *float32 `json:"prefix_ns_number,omitempty"` - PrefixNsInteger *int32 `json:"prefix_ns_integer,omitempty"` - PrefixNsBoolean *bool `json:"prefix_ns_boolean,omitempty"` - PrefixNsArray *[]int32 `json:"prefix_ns_array,omitempty"` - PrefixNsWrappedArray *[]int32 `json:"prefix_ns_wrapped_array,omitempty"` - } -// GetAttributeString returns the AttributeString field if non-nil, zero value otherwise. +// GetAttributeString returns the AttributeString field value if set, zero value otherwise. func (o *XmlItem) GetAttributeString() string { if o == nil || o.AttributeString == nil { var ret string @@ -82,7 +56,7 @@ func (o *XmlItem) GetAttributeString() string { return *o.AttributeString } -// GetAttributeStringOk returns a tuple with the AttributeString field if it's non-nil, zero value otherwise +// GetAttributeStringOk returns a tuple with the AttributeString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetAttributeStringOk() (string, bool) { if o == nil || o.AttributeString == nil { @@ -106,7 +80,7 @@ func (o *XmlItem) SetAttributeString(v string) { o.AttributeString = &v } -// GetAttributeNumber returns the AttributeNumber field if non-nil, zero value otherwise. +// GetAttributeNumber returns the AttributeNumber field value if set, zero value otherwise. func (o *XmlItem) GetAttributeNumber() float32 { if o == nil || o.AttributeNumber == nil { var ret float32 @@ -115,7 +89,7 @@ func (o *XmlItem) GetAttributeNumber() float32 { return *o.AttributeNumber } -// GetAttributeNumberOk returns a tuple with the AttributeNumber field if it's non-nil, zero value otherwise +// GetAttributeNumberOk returns a tuple with the AttributeNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetAttributeNumberOk() (float32, bool) { if o == nil || o.AttributeNumber == nil { @@ -139,7 +113,7 @@ func (o *XmlItem) SetAttributeNumber(v float32) { o.AttributeNumber = &v } -// GetAttributeInteger returns the AttributeInteger field if non-nil, zero value otherwise. +// GetAttributeInteger returns the AttributeInteger field value if set, zero value otherwise. func (o *XmlItem) GetAttributeInteger() int32 { if o == nil || o.AttributeInteger == nil { var ret int32 @@ -148,7 +122,7 @@ func (o *XmlItem) GetAttributeInteger() int32 { return *o.AttributeInteger } -// GetAttributeIntegerOk returns a tuple with the AttributeInteger field if it's non-nil, zero value otherwise +// GetAttributeIntegerOk returns a tuple with the AttributeInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetAttributeIntegerOk() (int32, bool) { if o == nil || o.AttributeInteger == nil { @@ -172,7 +146,7 @@ func (o *XmlItem) SetAttributeInteger(v int32) { o.AttributeInteger = &v } -// GetAttributeBoolean returns the AttributeBoolean field if non-nil, zero value otherwise. +// GetAttributeBoolean returns the AttributeBoolean field value if set, zero value otherwise. func (o *XmlItem) GetAttributeBoolean() bool { if o == nil || o.AttributeBoolean == nil { var ret bool @@ -181,7 +155,7 @@ func (o *XmlItem) GetAttributeBoolean() bool { return *o.AttributeBoolean } -// GetAttributeBooleanOk returns a tuple with the AttributeBoolean field if it's non-nil, zero value otherwise +// GetAttributeBooleanOk returns a tuple with the AttributeBoolean field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetAttributeBooleanOk() (bool, bool) { if o == nil || o.AttributeBoolean == nil { @@ -205,7 +179,7 @@ func (o *XmlItem) SetAttributeBoolean(v bool) { o.AttributeBoolean = &v } -// GetWrappedArray returns the WrappedArray field if non-nil, zero value otherwise. +// GetWrappedArray returns the WrappedArray field value if set, zero value otherwise. func (o *XmlItem) GetWrappedArray() []int32 { if o == nil || o.WrappedArray == nil { var ret []int32 @@ -214,7 +188,7 @@ func (o *XmlItem) GetWrappedArray() []int32 { return *o.WrappedArray } -// GetWrappedArrayOk returns a tuple with the WrappedArray field if it's non-nil, zero value otherwise +// GetWrappedArrayOk returns a tuple with the WrappedArray field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetWrappedArrayOk() ([]int32, bool) { if o == nil || o.WrappedArray == nil { @@ -238,7 +212,7 @@ func (o *XmlItem) SetWrappedArray(v []int32) { o.WrappedArray = &v } -// GetNameString returns the NameString field if non-nil, zero value otherwise. +// GetNameString returns the NameString field value if set, zero value otherwise. func (o *XmlItem) GetNameString() string { if o == nil || o.NameString == nil { var ret string @@ -247,7 +221,7 @@ func (o *XmlItem) GetNameString() string { return *o.NameString } -// GetNameStringOk returns a tuple with the NameString field if it's non-nil, zero value otherwise +// GetNameStringOk returns a tuple with the NameString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNameStringOk() (string, bool) { if o == nil || o.NameString == nil { @@ -271,7 +245,7 @@ func (o *XmlItem) SetNameString(v string) { o.NameString = &v } -// GetNameNumber returns the NameNumber field if non-nil, zero value otherwise. +// GetNameNumber returns the NameNumber field value if set, zero value otherwise. func (o *XmlItem) GetNameNumber() float32 { if o == nil || o.NameNumber == nil { var ret float32 @@ -280,7 +254,7 @@ func (o *XmlItem) GetNameNumber() float32 { return *o.NameNumber } -// GetNameNumberOk returns a tuple with the NameNumber field if it's non-nil, zero value otherwise +// GetNameNumberOk returns a tuple with the NameNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNameNumberOk() (float32, bool) { if o == nil || o.NameNumber == nil { @@ -304,7 +278,7 @@ func (o *XmlItem) SetNameNumber(v float32) { o.NameNumber = &v } -// GetNameInteger returns the NameInteger field if non-nil, zero value otherwise. +// GetNameInteger returns the NameInteger field value if set, zero value otherwise. func (o *XmlItem) GetNameInteger() int32 { if o == nil || o.NameInteger == nil { var ret int32 @@ -313,7 +287,7 @@ func (o *XmlItem) GetNameInteger() int32 { return *o.NameInteger } -// GetNameIntegerOk returns a tuple with the NameInteger field if it's non-nil, zero value otherwise +// GetNameIntegerOk returns a tuple with the NameInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNameIntegerOk() (int32, bool) { if o == nil || o.NameInteger == nil { @@ -337,7 +311,7 @@ func (o *XmlItem) SetNameInteger(v int32) { o.NameInteger = &v } -// GetNameBoolean returns the NameBoolean field if non-nil, zero value otherwise. +// GetNameBoolean returns the NameBoolean field value if set, zero value otherwise. func (o *XmlItem) GetNameBoolean() bool { if o == nil || o.NameBoolean == nil { var ret bool @@ -346,7 +320,7 @@ func (o *XmlItem) GetNameBoolean() bool { return *o.NameBoolean } -// GetNameBooleanOk returns a tuple with the NameBoolean field if it's non-nil, zero value otherwise +// GetNameBooleanOk returns a tuple with the NameBoolean field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNameBooleanOk() (bool, bool) { if o == nil || o.NameBoolean == nil { @@ -370,7 +344,7 @@ func (o *XmlItem) SetNameBoolean(v bool) { o.NameBoolean = &v } -// GetNameArray returns the NameArray field if non-nil, zero value otherwise. +// GetNameArray returns the NameArray field value if set, zero value otherwise. func (o *XmlItem) GetNameArray() []int32 { if o == nil || o.NameArray == nil { var ret []int32 @@ -379,7 +353,7 @@ func (o *XmlItem) GetNameArray() []int32 { return *o.NameArray } -// GetNameArrayOk returns a tuple with the NameArray field if it's non-nil, zero value otherwise +// GetNameArrayOk returns a tuple with the NameArray field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNameArrayOk() ([]int32, bool) { if o == nil || o.NameArray == nil { @@ -403,7 +377,7 @@ func (o *XmlItem) SetNameArray(v []int32) { o.NameArray = &v } -// GetNameWrappedArray returns the NameWrappedArray field if non-nil, zero value otherwise. +// GetNameWrappedArray returns the NameWrappedArray field value if set, zero value otherwise. func (o *XmlItem) GetNameWrappedArray() []int32 { if o == nil || o.NameWrappedArray == nil { var ret []int32 @@ -412,7 +386,7 @@ func (o *XmlItem) GetNameWrappedArray() []int32 { return *o.NameWrappedArray } -// GetNameWrappedArrayOk returns a tuple with the NameWrappedArray field if it's non-nil, zero value otherwise +// GetNameWrappedArrayOk returns a tuple with the NameWrappedArray field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNameWrappedArrayOk() ([]int32, bool) { if o == nil || o.NameWrappedArray == nil { @@ -436,7 +410,7 @@ func (o *XmlItem) SetNameWrappedArray(v []int32) { o.NameWrappedArray = &v } -// GetPrefixString returns the PrefixString field if non-nil, zero value otherwise. +// GetPrefixString returns the PrefixString field value if set, zero value otherwise. func (o *XmlItem) GetPrefixString() string { if o == nil || o.PrefixString == nil { var ret string @@ -445,7 +419,7 @@ func (o *XmlItem) GetPrefixString() string { return *o.PrefixString } -// GetPrefixStringOk returns a tuple with the PrefixString field if it's non-nil, zero value otherwise +// GetPrefixStringOk returns a tuple with the PrefixString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixStringOk() (string, bool) { if o == nil || o.PrefixString == nil { @@ -469,7 +443,7 @@ func (o *XmlItem) SetPrefixString(v string) { o.PrefixString = &v } -// GetPrefixNumber returns the PrefixNumber field if non-nil, zero value otherwise. +// GetPrefixNumber returns the PrefixNumber field value if set, zero value otherwise. func (o *XmlItem) GetPrefixNumber() float32 { if o == nil || o.PrefixNumber == nil { var ret float32 @@ -478,7 +452,7 @@ func (o *XmlItem) GetPrefixNumber() float32 { return *o.PrefixNumber } -// GetPrefixNumberOk returns a tuple with the PrefixNumber field if it's non-nil, zero value otherwise +// GetPrefixNumberOk returns a tuple with the PrefixNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixNumberOk() (float32, bool) { if o == nil || o.PrefixNumber == nil { @@ -502,7 +476,7 @@ func (o *XmlItem) SetPrefixNumber(v float32) { o.PrefixNumber = &v } -// GetPrefixInteger returns the PrefixInteger field if non-nil, zero value otherwise. +// GetPrefixInteger returns the PrefixInteger field value if set, zero value otherwise. func (o *XmlItem) GetPrefixInteger() int32 { if o == nil || o.PrefixInteger == nil { var ret int32 @@ -511,7 +485,7 @@ func (o *XmlItem) GetPrefixInteger() int32 { return *o.PrefixInteger } -// GetPrefixIntegerOk returns a tuple with the PrefixInteger field if it's non-nil, zero value otherwise +// GetPrefixIntegerOk returns a tuple with the PrefixInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixIntegerOk() (int32, bool) { if o == nil || o.PrefixInteger == nil { @@ -535,7 +509,7 @@ func (o *XmlItem) SetPrefixInteger(v int32) { o.PrefixInteger = &v } -// GetPrefixBoolean returns the PrefixBoolean field if non-nil, zero value otherwise. +// GetPrefixBoolean returns the PrefixBoolean field value if set, zero value otherwise. func (o *XmlItem) GetPrefixBoolean() bool { if o == nil || o.PrefixBoolean == nil { var ret bool @@ -544,7 +518,7 @@ func (o *XmlItem) GetPrefixBoolean() bool { return *o.PrefixBoolean } -// GetPrefixBooleanOk returns a tuple with the PrefixBoolean field if it's non-nil, zero value otherwise +// GetPrefixBooleanOk returns a tuple with the PrefixBoolean field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixBooleanOk() (bool, bool) { if o == nil || o.PrefixBoolean == nil { @@ -568,7 +542,7 @@ func (o *XmlItem) SetPrefixBoolean(v bool) { o.PrefixBoolean = &v } -// GetPrefixArray returns the PrefixArray field if non-nil, zero value otherwise. +// GetPrefixArray returns the PrefixArray field value if set, zero value otherwise. func (o *XmlItem) GetPrefixArray() []int32 { if o == nil || o.PrefixArray == nil { var ret []int32 @@ -577,7 +551,7 @@ func (o *XmlItem) GetPrefixArray() []int32 { return *o.PrefixArray } -// GetPrefixArrayOk returns a tuple with the PrefixArray field if it's non-nil, zero value otherwise +// GetPrefixArrayOk returns a tuple with the PrefixArray field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixArrayOk() ([]int32, bool) { if o == nil || o.PrefixArray == nil { @@ -601,7 +575,7 @@ func (o *XmlItem) SetPrefixArray(v []int32) { o.PrefixArray = &v } -// GetPrefixWrappedArray returns the PrefixWrappedArray field if non-nil, zero value otherwise. +// GetPrefixWrappedArray returns the PrefixWrappedArray field value if set, zero value otherwise. func (o *XmlItem) GetPrefixWrappedArray() []int32 { if o == nil || o.PrefixWrappedArray == nil { var ret []int32 @@ -610,7 +584,7 @@ func (o *XmlItem) GetPrefixWrappedArray() []int32 { return *o.PrefixWrappedArray } -// GetPrefixWrappedArrayOk returns a tuple with the PrefixWrappedArray field if it's non-nil, zero value otherwise +// GetPrefixWrappedArrayOk returns a tuple with the PrefixWrappedArray field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixWrappedArrayOk() ([]int32, bool) { if o == nil || o.PrefixWrappedArray == nil { @@ -634,7 +608,7 @@ func (o *XmlItem) SetPrefixWrappedArray(v []int32) { o.PrefixWrappedArray = &v } -// GetNamespaceString returns the NamespaceString field if non-nil, zero value otherwise. +// GetNamespaceString returns the NamespaceString field value if set, zero value otherwise. func (o *XmlItem) GetNamespaceString() string { if o == nil || o.NamespaceString == nil { var ret string @@ -643,7 +617,7 @@ func (o *XmlItem) GetNamespaceString() string { return *o.NamespaceString } -// GetNamespaceStringOk returns a tuple with the NamespaceString field if it's non-nil, zero value otherwise +// GetNamespaceStringOk returns a tuple with the NamespaceString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNamespaceStringOk() (string, bool) { if o == nil || o.NamespaceString == nil { @@ -667,7 +641,7 @@ func (o *XmlItem) SetNamespaceString(v string) { o.NamespaceString = &v } -// GetNamespaceNumber returns the NamespaceNumber field if non-nil, zero value otherwise. +// GetNamespaceNumber returns the NamespaceNumber field value if set, zero value otherwise. func (o *XmlItem) GetNamespaceNumber() float32 { if o == nil || o.NamespaceNumber == nil { var ret float32 @@ -676,7 +650,7 @@ func (o *XmlItem) GetNamespaceNumber() float32 { return *o.NamespaceNumber } -// GetNamespaceNumberOk returns a tuple with the NamespaceNumber field if it's non-nil, zero value otherwise +// GetNamespaceNumberOk returns a tuple with the NamespaceNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNamespaceNumberOk() (float32, bool) { if o == nil || o.NamespaceNumber == nil { @@ -700,7 +674,7 @@ func (o *XmlItem) SetNamespaceNumber(v float32) { o.NamespaceNumber = &v } -// GetNamespaceInteger returns the NamespaceInteger field if non-nil, zero value otherwise. +// GetNamespaceInteger returns the NamespaceInteger field value if set, zero value otherwise. func (o *XmlItem) GetNamespaceInteger() int32 { if o == nil || o.NamespaceInteger == nil { var ret int32 @@ -709,7 +683,7 @@ func (o *XmlItem) GetNamespaceInteger() int32 { return *o.NamespaceInteger } -// GetNamespaceIntegerOk returns a tuple with the NamespaceInteger field if it's non-nil, zero value otherwise +// GetNamespaceIntegerOk returns a tuple with the NamespaceInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNamespaceIntegerOk() (int32, bool) { if o == nil || o.NamespaceInteger == nil { @@ -733,7 +707,7 @@ func (o *XmlItem) SetNamespaceInteger(v int32) { o.NamespaceInteger = &v } -// GetNamespaceBoolean returns the NamespaceBoolean field if non-nil, zero value otherwise. +// GetNamespaceBoolean returns the NamespaceBoolean field value if set, zero value otherwise. func (o *XmlItem) GetNamespaceBoolean() bool { if o == nil || o.NamespaceBoolean == nil { var ret bool @@ -742,7 +716,7 @@ func (o *XmlItem) GetNamespaceBoolean() bool { return *o.NamespaceBoolean } -// GetNamespaceBooleanOk returns a tuple with the NamespaceBoolean field if it's non-nil, zero value otherwise +// GetNamespaceBooleanOk returns a tuple with the NamespaceBoolean field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNamespaceBooleanOk() (bool, bool) { if o == nil || o.NamespaceBoolean == nil { @@ -766,7 +740,7 @@ func (o *XmlItem) SetNamespaceBoolean(v bool) { o.NamespaceBoolean = &v } -// GetNamespaceArray returns the NamespaceArray field if non-nil, zero value otherwise. +// GetNamespaceArray returns the NamespaceArray field value if set, zero value otherwise. func (o *XmlItem) GetNamespaceArray() []int32 { if o == nil || o.NamespaceArray == nil { var ret []int32 @@ -775,7 +749,7 @@ func (o *XmlItem) GetNamespaceArray() []int32 { return *o.NamespaceArray } -// GetNamespaceArrayOk returns a tuple with the NamespaceArray field if it's non-nil, zero value otherwise +// GetNamespaceArrayOk returns a tuple with the NamespaceArray field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNamespaceArrayOk() ([]int32, bool) { if o == nil || o.NamespaceArray == nil { @@ -799,7 +773,7 @@ func (o *XmlItem) SetNamespaceArray(v []int32) { o.NamespaceArray = &v } -// GetNamespaceWrappedArray returns the NamespaceWrappedArray field if non-nil, zero value otherwise. +// GetNamespaceWrappedArray returns the NamespaceWrappedArray field value if set, zero value otherwise. func (o *XmlItem) GetNamespaceWrappedArray() []int32 { if o == nil || o.NamespaceWrappedArray == nil { var ret []int32 @@ -808,7 +782,7 @@ func (o *XmlItem) GetNamespaceWrappedArray() []int32 { return *o.NamespaceWrappedArray } -// GetNamespaceWrappedArrayOk returns a tuple with the NamespaceWrappedArray field if it's non-nil, zero value otherwise +// GetNamespaceWrappedArrayOk returns a tuple with the NamespaceWrappedArray field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetNamespaceWrappedArrayOk() ([]int32, bool) { if o == nil || o.NamespaceWrappedArray == nil { @@ -832,7 +806,7 @@ func (o *XmlItem) SetNamespaceWrappedArray(v []int32) { o.NamespaceWrappedArray = &v } -// GetPrefixNsString returns the PrefixNsString field if non-nil, zero value otherwise. +// GetPrefixNsString returns the PrefixNsString field value if set, zero value otherwise. func (o *XmlItem) GetPrefixNsString() string { if o == nil || o.PrefixNsString == nil { var ret string @@ -841,7 +815,7 @@ func (o *XmlItem) GetPrefixNsString() string { return *o.PrefixNsString } -// GetPrefixNsStringOk returns a tuple with the PrefixNsString field if it's non-nil, zero value otherwise +// GetPrefixNsStringOk returns a tuple with the PrefixNsString field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixNsStringOk() (string, bool) { if o == nil || o.PrefixNsString == nil { @@ -865,7 +839,7 @@ func (o *XmlItem) SetPrefixNsString(v string) { o.PrefixNsString = &v } -// GetPrefixNsNumber returns the PrefixNsNumber field if non-nil, zero value otherwise. +// GetPrefixNsNumber returns the PrefixNsNumber field value if set, zero value otherwise. func (o *XmlItem) GetPrefixNsNumber() float32 { if o == nil || o.PrefixNsNumber == nil { var ret float32 @@ -874,7 +848,7 @@ func (o *XmlItem) GetPrefixNsNumber() float32 { return *o.PrefixNsNumber } -// GetPrefixNsNumberOk returns a tuple with the PrefixNsNumber field if it's non-nil, zero value otherwise +// GetPrefixNsNumberOk returns a tuple with the PrefixNsNumber field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixNsNumberOk() (float32, bool) { if o == nil || o.PrefixNsNumber == nil { @@ -898,7 +872,7 @@ func (o *XmlItem) SetPrefixNsNumber(v float32) { o.PrefixNsNumber = &v } -// GetPrefixNsInteger returns the PrefixNsInteger field if non-nil, zero value otherwise. +// GetPrefixNsInteger returns the PrefixNsInteger field value if set, zero value otherwise. func (o *XmlItem) GetPrefixNsInteger() int32 { if o == nil || o.PrefixNsInteger == nil { var ret int32 @@ -907,7 +881,7 @@ func (o *XmlItem) GetPrefixNsInteger() int32 { return *o.PrefixNsInteger } -// GetPrefixNsIntegerOk returns a tuple with the PrefixNsInteger field if it's non-nil, zero value otherwise +// GetPrefixNsIntegerOk returns a tuple with the PrefixNsInteger field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixNsIntegerOk() (int32, bool) { if o == nil || o.PrefixNsInteger == nil { @@ -931,7 +905,7 @@ func (o *XmlItem) SetPrefixNsInteger(v int32) { o.PrefixNsInteger = &v } -// GetPrefixNsBoolean returns the PrefixNsBoolean field if non-nil, zero value otherwise. +// GetPrefixNsBoolean returns the PrefixNsBoolean field value if set, zero value otherwise. func (o *XmlItem) GetPrefixNsBoolean() bool { if o == nil || o.PrefixNsBoolean == nil { var ret bool @@ -940,7 +914,7 @@ func (o *XmlItem) GetPrefixNsBoolean() bool { return *o.PrefixNsBoolean } -// GetPrefixNsBooleanOk returns a tuple with the PrefixNsBoolean field if it's non-nil, zero value otherwise +// GetPrefixNsBooleanOk returns a tuple with the PrefixNsBoolean field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixNsBooleanOk() (bool, bool) { if o == nil || o.PrefixNsBoolean == nil { @@ -964,7 +938,7 @@ func (o *XmlItem) SetPrefixNsBoolean(v bool) { o.PrefixNsBoolean = &v } -// GetPrefixNsArray returns the PrefixNsArray field if non-nil, zero value otherwise. +// GetPrefixNsArray returns the PrefixNsArray field value if set, zero value otherwise. func (o *XmlItem) GetPrefixNsArray() []int32 { if o == nil || o.PrefixNsArray == nil { var ret []int32 @@ -973,7 +947,7 @@ func (o *XmlItem) GetPrefixNsArray() []int32 { return *o.PrefixNsArray } -// GetPrefixNsArrayOk returns a tuple with the PrefixNsArray field if it's non-nil, zero value otherwise +// GetPrefixNsArrayOk returns a tuple with the PrefixNsArray field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixNsArrayOk() ([]int32, bool) { if o == nil || o.PrefixNsArray == nil { @@ -997,7 +971,7 @@ func (o *XmlItem) SetPrefixNsArray(v []int32) { o.PrefixNsArray = &v } -// GetPrefixNsWrappedArray returns the PrefixNsWrappedArray field if non-nil, zero value otherwise. +// GetPrefixNsWrappedArray returns the PrefixNsWrappedArray field value if set, zero value otherwise. func (o *XmlItem) GetPrefixNsWrappedArray() []int32 { if o == nil || o.PrefixNsWrappedArray == nil { var ret []int32 @@ -1006,7 +980,7 @@ func (o *XmlItem) GetPrefixNsWrappedArray() []int32 { return *o.PrefixNsWrappedArray } -// GetPrefixNsWrappedArrayOk returns a tuple with the PrefixNsWrappedArray field if it's non-nil, zero value otherwise +// GetPrefixNsWrappedArrayOk returns a tuple with the PrefixNsWrappedArray field value if set, zero value otherwise // and a boolean to check if the value has been set. func (o *XmlItem) GetPrefixNsWrappedArrayOk() ([]int32, bool) { if o == nil || o.PrefixNsWrappedArray == nil { @@ -1030,98 +1004,26 @@ func (o *XmlItem) SetPrefixNsWrappedArray(v []int32) { o.PrefixNsWrappedArray = &v } +type NullableXmlItem struct { + Value XmlItem + ExplicitNull bool +} + +func (v NullableXmlItem) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} -// MarshalJSON returns the JSON representation of the model. -func (o XmlItem) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.AttributeString != nil { - toSerialize["attribute_string"] = o.AttributeString - } - if o.AttributeNumber != nil { - toSerialize["attribute_number"] = o.AttributeNumber - } - if o.AttributeInteger != nil { - toSerialize["attribute_integer"] = o.AttributeInteger - } - if o.AttributeBoolean != nil { - toSerialize["attribute_boolean"] = o.AttributeBoolean - } - if o.WrappedArray != nil { - toSerialize["wrapped_array"] = o.WrappedArray - } - if o.NameString != nil { - toSerialize["name_string"] = o.NameString - } - if o.NameNumber != nil { - toSerialize["name_number"] = o.NameNumber - } - if o.NameInteger != nil { - toSerialize["name_integer"] = o.NameInteger - } - if o.NameBoolean != nil { - toSerialize["name_boolean"] = o.NameBoolean - } - if o.NameArray != nil { - toSerialize["name_array"] = o.NameArray - } - if o.NameWrappedArray != nil { - toSerialize["name_wrapped_array"] = o.NameWrappedArray - } - if o.PrefixString != nil { - toSerialize["prefix_string"] = o.PrefixString - } - if o.PrefixNumber != nil { - toSerialize["prefix_number"] = o.PrefixNumber - } - if o.PrefixInteger != nil { - toSerialize["prefix_integer"] = o.PrefixInteger - } - if o.PrefixBoolean != nil { - toSerialize["prefix_boolean"] = o.PrefixBoolean +func (v *NullableXmlItem) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil } - if o.PrefixArray != nil { - toSerialize["prefix_array"] = o.PrefixArray - } - if o.PrefixWrappedArray != nil { - toSerialize["prefix_wrapped_array"] = o.PrefixWrappedArray - } - if o.NamespaceString != nil { - toSerialize["namespace_string"] = o.NamespaceString - } - if o.NamespaceNumber != nil { - toSerialize["namespace_number"] = o.NamespaceNumber - } - if o.NamespaceInteger != nil { - toSerialize["namespace_integer"] = o.NamespaceInteger - } - if o.NamespaceBoolean != nil { - toSerialize["namespace_boolean"] = o.NamespaceBoolean - } - if o.NamespaceArray != nil { - toSerialize["namespace_array"] = o.NamespaceArray - } - if o.NamespaceWrappedArray != nil { - toSerialize["namespace_wrapped_array"] = o.NamespaceWrappedArray - } - if o.PrefixNsString != nil { - toSerialize["prefix_ns_string"] = o.PrefixNsString - } - if o.PrefixNsNumber != nil { - toSerialize["prefix_ns_number"] = o.PrefixNsNumber - } - if o.PrefixNsInteger != nil { - toSerialize["prefix_ns_integer"] = o.PrefixNsInteger - } - if o.PrefixNsBoolean != nil { - toSerialize["prefix_ns_boolean"] = o.PrefixNsBoolean - } - if o.PrefixNsArray != nil { - toSerialize["prefix_ns_array"] = o.PrefixNsArray - } - if o.PrefixNsWrappedArray != nil { - toSerialize["prefix_ns_wrapped_array"] = o.PrefixNsWrappedArray - } - return json.Marshal(toSerialize) -} + return json.Unmarshal(src, &v.Value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/utils.go b/samples/client/petstore/go-experimental/go-petstore/utils.go index 8d2130be3f47..3a3303b24451 100644 --- a/samples/client/petstore/go-experimental/go-petstore/utils.go +++ b/samples/client/petstore/go-experimental/go-petstore/utils.go @@ -9,7 +9,14 @@ package petstore -import "time" +import ( + "bytes" + "encoding/json" + "errors" + "time" +) + +var ErrInvalidNullable = errors.New("nullable cannot have non-zero Value and ExplicitNull simultaneously") // PtrBool is a helper routine that returns a pointer to given integer value. func PtrBool(v bool) *bool { return &v } @@ -23,9 +30,6 @@ func PtrInt32(v int32) *int32 { return &v } // PtrInt64 is a helper routine that returns a pointer to given integer value. func PtrInt64(v int64) *int64 { return &v } -// PtrFloat is a helper routine that returns a pointer to given float value. -func PtrFloat(v float32) *float32 { return &v } - // PtrFloat32 is a helper routine that returns a pointer to given float value. func PtrFloat32(v float32) *float32 { return &v } @@ -36,4 +40,205 @@ func PtrFloat64(v float64) *float64 { return &v } func PtrString(v string) *string { return &v } // PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } \ No newline at end of file +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + Value bool + ExplicitNull bool +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableInt struct { + Value int + ExplicitNull bool +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != 0: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableInt32 struct { + Value int32 + ExplicitNull bool +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != 0: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableInt64 struct { + Value int64 + ExplicitNull bool +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != 0: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableFloat32 struct { + Value float32 + ExplicitNull bool +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != 0.0: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableFloat64 struct { + Value float64 + ExplicitNull bool +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != 0.0: + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableString struct { + Value string + ExplicitNull bool +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && v.Value != "": + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} + +type NullableTime struct { + Value time.Time + ExplicitNull bool +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull && !v.Value.IsZero(): + return nil, ErrInvalidNullable + case v.ExplicitNull: + return []byte("null"), nil + default: + return v.Value.MarshalJSON() + } +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} \ No newline at end of file diff --git a/samples/client/petstore/go-experimental/pet_api_test.go b/samples/client/petstore/go-experimental/pet_api_test.go index c1e8006bb0cf..847aa517af19 100644 --- a/samples/client/petstore/go-experimental/pet_api_test.go +++ b/samples/client/petstore/go-experimental/pet_api_test.go @@ -28,8 +28,8 @@ func TestMain(m *testing.M) { } func TestAddPet(t *testing.T) { - newPet := (sw.Pet{Id: sw.PtrInt64(12830), Name: sw.PtrString("gopher"), - PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), + newPet := (sw.Pet{Id: sw.PtrInt64(12830), Name: "gopher", + PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) r, err := client.PetApi.AddPet(context.Background(), newPet) @@ -286,7 +286,7 @@ func isPetCorrect(t *testing.T, id int64, name string, status string) { t.Fatalf("Error while getting pet by id: %v", err) } else { assert.Equal(*resp.Id, int64(id), "Pet id should be equal") - assert.Equal(*resp.Name, name, fmt.Sprintf("Pet name should be %s", name)) + assert.Equal(resp.Name, name, fmt.Sprintf("Pet name should be %s", name)) assert.Equal(*resp.Status, status, fmt.Sprintf("Pet status should be %s", status)) //t.Log(resp) diff --git a/samples/client/petstore/go-experimental/user_api_test.go b/samples/client/petstore/go-experimental/user_api_test.go index 07b82ebb9757..882608702097 100644 --- a/samples/client/petstore/go-experimental/user_api_test.go +++ b/samples/client/petstore/go-experimental/user_api_test.go @@ -14,7 +14,7 @@ func TestCreateUser(t *testing.T) { Id: sw.PtrInt64(1000), FirstName: sw.PtrString("gopher"), LastName: sw.PtrString("lang"), - Username: sw.PtrString("gopher"), + Username: sw.PtrString("gopher"), Password: sw.PtrString("lang"), Email: sw.PtrString("lang@test.com"), Phone: sw.PtrString("5101112222"), From cb2bf4d2bfb203aed29d671f0a8d331fcdf8ba3f Mon Sep 17 00:00:00 2001 From: Thiago Arrais Date: Mon, 14 Oct 2019 14:29:46 -0300 Subject: [PATCH 007/142] Do not check status code for default response (#3322) * Do not check status code for default response * Updated generated code/docs Because Circle CI said > Please run 'bin/utils/ensure-up-to-date' locally and commit > changes (UNCOMMITTED CHANGES ERROR) --- .../openapitools/codegen/DefaultCodegen.java | 5 + .../resources/go-experimental/api.mustache | 7 ++ .../src/main/resources/go/api.mustache | 6 + .../codegen/DefaultCodegenTest.java | 19 ++++ .../elm-0.18/src/Data/ApiResponse.elm | 13 ++- .../petstore/elm-0.18/src/Data/Category.elm | 11 +- .../petstore/elm-0.18/src/Data/Order_.elm | 23 +++- .../client/petstore/elm-0.18/src/Data/Pet.elm | 21 +++- .../client/petstore/elm-0.18/src/Data/Tag.elm | 11 +- .../petstore/elm-0.18/src/Data/User.elm | 23 ++-- .../client/petstore/elm-0.18/src/DateTime.elm | 2 +- .../petstore/elm-0.18/src/Request/Pet.elm | 10 +- .../petstore/elm-0.18/src/Request/Store.elm | 4 +- .../petstore/elm-0.18/src/Request/User.elm | 6 +- .../petstore/elm/src/Data/ApiResponse.elm | 13 ++- .../client/petstore/elm/src/Data/Category.elm | 11 +- .../client/petstore/elm/src/Data/Order_.elm | 23 +++- samples/client/petstore/elm/src/Data/Pet.elm | 23 +++- samples/client/petstore/elm/src/Data/Tag.elm | 11 +- samples/client/petstore/elm/src/Data/User.elm | 23 ++-- samples/client/petstore/elm/src/DateTime.elm | 2 +- .../client/petstore/elm/src/Request/Pet.elm | 107 +++++++++++------- .../client/petstore/elm/src/Request/Store.elm | 47 +++++--- .../client/petstore/elm/src/Request/User.elm | 93 +++++++++------ .../go-petstore/api_another_fake.go | 1 - .../go-experimental/go-petstore/api_fake.go | 5 - .../go-petstore/api_fake_classname_tags123.go | 1 - .../go-experimental/go-petstore/api_pet.go | 5 +- .../go-experimental/go-petstore/api_store.go | 3 +- .../go-experimental/go-petstore/api_user.go | 2 + .../go-petstore-withXml/api_another_fake.go | 1 - .../go/go-petstore-withXml/api_fake.go | 5 - .../api_fake_classname_tags123.go | 1 - .../go/go-petstore-withXml/api_pet.go | 2 - .../go/go-petstore-withXml/api_store.go | 1 - .../go/go-petstore/api_another_fake.go | 1 - .../petstore/go/go-petstore/api_fake.go | 5 - .../go-petstore/api_fake_classname_tags123.go | 1 - .../client/petstore/go/go-petstore/api_pet.go | 2 - .../petstore/go/go-petstore/api_store.go | 1 - .../go-petstore/api_another_fake.go | 1 - .../go-petstore/api_default.go | 3 - .../go-experimental/go-petstore/api_fake.go | 6 - .../go-petstore/api_fake_classname_tags123.go | 1 - .../go-experimental/go-petstore/api_pet.go | 5 +- .../go-experimental/go-petstore/api_store.go | 3 +- .../go-experimental/go-petstore/api_user.go | 2 + .../go-petstore/docs/HasOnlyReadOnly.md | 4 +- .../go-experimental/go-petstore/docs/Name.md | 4 +- .../go-petstore/docs/ReadOnlyFirst.md | 2 +- .../go/go-petstore/api_another_fake.go | 1 - .../petstore/go/go-petstore/api_default.go | 3 - .../petstore/go/go-petstore/api_fake.go | 6 - .../go-petstore/api_fake_classname_tags123.go | 1 - .../client/petstore/go/go-petstore/api_pet.go | 2 - .../petstore/go/go-petstore/api_store.go | 1 - 56 files changed, 377 insertions(+), 219 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index a66e42b05c97..ab3ef8b418e3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -2665,6 +2665,11 @@ public CodegenOperation fromOperation(String path, op.isResponseFile = Boolean.TRUE; } } + op.responses.sort((a, b) -> { + int aDefault = "0".equals(a.code) ? 1 : 0; + int bDefault = "0".equals(b.code) ? 1 : 0; + return aDefault - bDefault; + }); op.responses.get(op.responses.size() - 1).hasMore = false; if (methodResponse != null) { diff --git a/modules/openapi-generator/src/main/resources/go-experimental/api.mustache b/modules/openapi-generator/src/main/resources/go-experimental/api.mustache index 41a990f9e50c..c0f9962ec7cb 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/api.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/api.mustache @@ -319,7 +319,9 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams } {{#responses}} {{#dataType}} + {{^wildcard}} if localVarHTTPResponse.StatusCode == {{{code}}} { + {{/wildcard}} var v {{{dataType}}} err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -327,8 +329,13 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr } newErr.model = v + {{#hasMore}} return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr + return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr + {{/hasMore}} + {{^wildcard}} } + {{/wildcard}} {{/dataType}} {{/responses}} return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr diff --git a/modules/openapi-generator/src/main/resources/go/api.mustache b/modules/openapi-generator/src/main/resources/go/api.mustache index dc0a2f4dc8b1..dab8df661ab2 100644 --- a/modules/openapi-generator/src/main/resources/go/api.mustache +++ b/modules/openapi-generator/src/main/resources/go/api.mustache @@ -317,7 +317,9 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams } {{#responses}} {{#dataType}} + {{^wildcard}} if localVarHTTPResponse.StatusCode == {{{code}}} { + {{/wildcard}} var v {{{dataType}}} err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -325,8 +327,12 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr } newErr.model = v + {{#hasMore}} return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr + {{/hasMore}} + {{^wildcard}} } + {{/wildcard}} {{/dataType}} {{/responses}} return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index 8c00cbc28115..e9965da17446 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -595,6 +595,25 @@ public void testLeadingSlashIsAddedIfMissing() { Assert.assertEquals(co2.path, "/some/path"); } + @Test + public void testDefaultResponseShouldBeLast() { + OpenAPI openAPI = TestUtils.createOpenAPI(); + Operation myOperation = new Operation().operationId("myOperation").responses( + new ApiResponses() + .addApiResponse( + "default", new ApiResponse().description("Default")) + .addApiResponse( + "422", new ApiResponse().description("Error")) + ); + openAPI.path("/here", new PathItem().get(myOperation)); + final DefaultCodegen codegen = new DefaultCodegen(); + codegen.setOpenAPI(openAPI); + + CodegenOperation co = codegen.fromOperation("/here", "get", myOperation, null); + Assert.assertEquals(co.responses.get(0).message, "Error"); + Assert.assertEquals(co.responses.get(1).message, "Default"); + } + @Test public void testResponseWithNoSchemaInHeaders() { OpenAPI openAPI = TestUtils.createOpenAPI(); diff --git a/samples/client/petstore/elm-0.18/src/Data/ApiResponse.elm b/samples/client/petstore/elm-0.18/src/Data/ApiResponse.elm index 1e5d44b79417..3d5fb6f318b4 100644 --- a/samples/client/petstore/elm-0.18/src/Data/ApiResponse.elm +++ b/samples/client/petstore/elm-0.18/src/Data/ApiResponse.elm @@ -21,9 +21,9 @@ import Json.Encode as Encode {-| Describes the result of uploading an image resource -} type alias ApiResponse = - { code : Maybe Int - , type_ : Maybe String - , message : Maybe String + { code : Maybe (Int) + , type_ : Maybe (String) + , message : Maybe (String) } @@ -35,15 +35,22 @@ decoder = |> optional "message" (Decode.nullable Decode.string) Nothing + encode : ApiResponse -> Encode.Value encode model = Encode.object [ ( "code", Maybe.withDefault Encode.null (Maybe.map Encode.int model.code) ) , ( "type", Maybe.withDefault Encode.null (Maybe.map Encode.string model.type_) ) , ( "message", Maybe.withDefault Encode.null (Maybe.map Encode.string model.message) ) + ] + toString : ApiResponse -> String toString = Encode.encode 0 << encode + + + + diff --git a/samples/client/petstore/elm-0.18/src/Data/Category.elm b/samples/client/petstore/elm-0.18/src/Data/Category.elm index f8e5a7fb31d6..432caee0d413 100644 --- a/samples/client/petstore/elm-0.18/src/Data/Category.elm +++ b/samples/client/petstore/elm-0.18/src/Data/Category.elm @@ -21,8 +21,8 @@ import Json.Encode as Encode {-| A category for a pet -} type alias Category = - { id : Maybe Int - , name : Maybe String + { id : Maybe (Int) + , name : Maybe (String) } @@ -33,14 +33,21 @@ decoder = |> optional "name" (Decode.nullable Decode.string) Nothing + encode : Category -> Encode.Value encode model = Encode.object [ ( "id", Maybe.withDefault Encode.null (Maybe.map Encode.int model.id) ) , ( "name", Maybe.withDefault Encode.null (Maybe.map Encode.string model.name) ) + ] + toString : Category -> String toString = Encode.encode 0 << encode + + + + diff --git a/samples/client/petstore/elm-0.18/src/Data/Order_.elm b/samples/client/petstore/elm-0.18/src/Data/Order_.elm index 0d8e87810983..dd2955a7d15d 100644 --- a/samples/client/petstore/elm-0.18/src/Data/Order_.elm +++ b/samples/client/petstore/elm-0.18/src/Data/Order_.elm @@ -22,12 +22,12 @@ import Json.Encode as Encode {-| An order for a pets from the pet store -} type alias Order_ = - { id : Maybe Int - , petId : Maybe Int - , quantity : Maybe Int - , shipDate : Maybe DateTime - , status : Maybe Status - , complete : Maybe Bool + { id : Maybe (Int) + , petId : Maybe (Int) + , quantity : Maybe (Int) + , shipDate : Maybe (DateTime) + , status : Maybe (Status) + , complete : Maybe (Bool) } @@ -37,6 +37,7 @@ type Status | Delivered + decoder : Decoder Order_ decoder = decode Order_ @@ -48,6 +49,7 @@ decoder = |> optional "complete" (Decode.nullable Decode.bool) (Just False) + encode : Order_ -> Encode.Value encode model = Encode.object @@ -57,14 +59,18 @@ encode model = , ( "shipDate", Maybe.withDefault Encode.null (Maybe.map DateTime.encode model.shipDate) ) , ( "status", Maybe.withDefault Encode.null (Maybe.map encodeStatus model.status) ) , ( "complete", Maybe.withDefault Encode.null (Maybe.map Encode.bool model.complete) ) + ] + toString : Order_ -> String toString = Encode.encode 0 << encode + + statusDecoder : Decoder Status statusDecoder = Decode.string @@ -85,6 +91,7 @@ statusDecoder = ) + encodeStatus : Status -> Encode.Value encodeStatus model = case model of @@ -96,3 +103,7 @@ encodeStatus model = Delivered -> Encode.string "delivered" + + + + diff --git a/samples/client/petstore/elm-0.18/src/Data/Pet.elm b/samples/client/petstore/elm-0.18/src/Data/Pet.elm index 50f39279e10e..900d2678294d 100644 --- a/samples/client/petstore/elm-0.18/src/Data/Pet.elm +++ b/samples/client/petstore/elm-0.18/src/Data/Pet.elm @@ -23,12 +23,12 @@ import Json.Encode as Encode {-| A pet for sale in the pet store -} type alias Pet = - { id : Maybe Int - , category : Maybe Category + { id : Maybe (Int) + , category : Maybe (Category) , name : String - , photoUrls : List String - , tags : Maybe (List Tag) - , status : Maybe Status + , photoUrls : (List String) + , tags : Maybe ((List Tag)) + , status : Maybe (Status) } @@ -38,6 +38,7 @@ type Status | Sold + decoder : Decoder Pet decoder = decode Pet @@ -49,6 +50,7 @@ decoder = |> optional "status" (Decode.nullable statusDecoder) Nothing + encode : Pet -> Encode.Value encode model = Encode.object @@ -58,14 +60,18 @@ encode model = , ( "photoUrls", (Encode.list << List.map Encode.string) model.photoUrls ) , ( "tags", Maybe.withDefault Encode.null (Maybe.map (Encode.list << List.map Tag.encode) model.tags) ) , ( "status", Maybe.withDefault Encode.null (Maybe.map encodeStatus model.status) ) + ] + toString : Pet -> String toString = Encode.encode 0 << encode + + statusDecoder : Decoder Status statusDecoder = Decode.string @@ -86,6 +92,7 @@ statusDecoder = ) + encodeStatus : Status -> Encode.Value encodeStatus model = case model of @@ -97,3 +104,7 @@ encodeStatus model = Sold -> Encode.string "sold" + + + + diff --git a/samples/client/petstore/elm-0.18/src/Data/Tag.elm b/samples/client/petstore/elm-0.18/src/Data/Tag.elm index 81b9407409ba..6c448df13575 100644 --- a/samples/client/petstore/elm-0.18/src/Data/Tag.elm +++ b/samples/client/petstore/elm-0.18/src/Data/Tag.elm @@ -21,8 +21,8 @@ import Json.Encode as Encode {-| A tag for a pet -} type alias Tag = - { id : Maybe Int - , name : Maybe String + { id : Maybe (Int) + , name : Maybe (String) } @@ -33,14 +33,21 @@ decoder = |> optional "name" (Decode.nullable Decode.string) Nothing + encode : Tag -> Encode.Value encode model = Encode.object [ ( "id", Maybe.withDefault Encode.null (Maybe.map Encode.int model.id) ) , ( "name", Maybe.withDefault Encode.null (Maybe.map Encode.string model.name) ) + ] + toString : Tag -> String toString = Encode.encode 0 << encode + + + + diff --git a/samples/client/petstore/elm-0.18/src/Data/User.elm b/samples/client/petstore/elm-0.18/src/Data/User.elm index 5b27dc8e183b..d777b7369955 100644 --- a/samples/client/petstore/elm-0.18/src/Data/User.elm +++ b/samples/client/petstore/elm-0.18/src/Data/User.elm @@ -21,14 +21,14 @@ import Json.Encode as Encode {-| A User who is purchasing from the pet store -} type alias User = - { id : Maybe Int - , username : Maybe String - , firstName : Maybe String - , lastName : Maybe String - , email : Maybe String - , password : Maybe String - , phone : Maybe String - , userStatus : Maybe Int + { id : Maybe (Int) + , username : Maybe (String) + , firstName : Maybe (String) + , lastName : Maybe (String) + , email : Maybe (String) + , password : Maybe (String) + , phone : Maybe (String) + , userStatus : Maybe (Int) } @@ -45,6 +45,7 @@ decoder = |> optional "userStatus" (Decode.nullable Decode.int) Nothing + encode : User -> Encode.Value encode model = Encode.object @@ -56,9 +57,15 @@ encode model = , ( "password", Maybe.withDefault Encode.null (Maybe.map Encode.string model.password) ) , ( "phone", Maybe.withDefault Encode.null (Maybe.map Encode.string model.phone) ) , ( "userStatus", Maybe.withDefault Encode.null (Maybe.map Encode.int model.userStatus) ) + ] + toString : User -> String toString = Encode.encode 0 << encode + + + + diff --git a/samples/client/petstore/elm-0.18/src/DateTime.elm b/samples/client/petstore/elm-0.18/src/DateTime.elm index 7e07312468c6..6a20f0482a1c 100644 --- a/samples/client/petstore/elm-0.18/src/DateTime.elm +++ b/samples/client/petstore/elm-0.18/src/DateTime.elm @@ -34,4 +34,4 @@ decodeIsoString str = toString : DateTime -> String toString = - toIsoString + toIsoString \ No newline at end of file diff --git a/samples/client/petstore/elm-0.18/src/Request/Pet.elm b/samples/client/petstore/elm-0.18/src/Request/Pet.elm index a1117a57d5c4..5b1e3444d3a0 100644 --- a/samples/client/petstore/elm-0.18/src/Request/Pet.elm +++ b/samples/client/petstore/elm-0.18/src/Request/Pet.elm @@ -12,8 +12,8 @@ module Request.Pet exposing (addPet, deletePet, findPetsByStatus, findPetsByTags, getPetById, updatePet, updatePetWithForm, uploadFile) -import Data.ApiResponse as ApiResponse exposing (ApiResponse) import Data.Pet as Pet exposing (Pet) +import Data.ApiResponse as ApiResponse exposing (ApiResponse) import Dict import Http import Json.Decode as Decode @@ -40,7 +40,7 @@ addPet model = deletePet : Int -> Http.Request () deletePet petId = { method = "DELETE" - , url = basePath ++ "/pet/" ++ toString petId + , url = basePath ++ "/pet/" ++ toString petId , headers = [] , body = Http.emptyBody , expect = Http.expectStringResponse (\_ -> Ok ()) @@ -85,7 +85,7 @@ findPetsByTags = getPetById : Int -> Http.Request Pet getPetById petId = { method = "GET" - , url = basePath ++ "/pet/" ++ toString petId + , url = basePath ++ "/pet/" ++ toString petId , headers = [] , body = Http.emptyBody , expect = Http.expectJson Pet.decoder @@ -111,7 +111,7 @@ updatePet model = updatePetWithForm : Int -> Http.Request () updatePetWithForm petId = { method = "POST" - , url = basePath ++ "/pet/" ++ toString petId + , url = basePath ++ "/pet/" ++ toString petId , headers = [] , body = Http.emptyBody , expect = Http.expectStringResponse (\_ -> Ok ()) @@ -124,7 +124,7 @@ updatePetWithForm petId = uploadFile : Int -> Http.Request ApiResponse uploadFile petId = { method = "POST" - , url = basePath ++ "/pet/" ++ toString petId ++ "/uploadImage" + , url = basePath ++ "/pet/" ++ toString petId ++ "/uploadImage" , headers = [] , body = Http.emptyBody , expect = Http.expectJson ApiResponse.decoder diff --git a/samples/client/petstore/elm-0.18/src/Request/Store.elm b/samples/client/petstore/elm-0.18/src/Request/Store.elm index 2f44d25c42a9..d8f70f4177c3 100644 --- a/samples/client/petstore/elm-0.18/src/Request/Store.elm +++ b/samples/client/petstore/elm-0.18/src/Request/Store.elm @@ -28,7 +28,7 @@ basePath = deleteOrder : String -> Http.Request () deleteOrder orderId = { method = "DELETE" - , url = basePath ++ "/store/order/" ++ orderId + , url = basePath ++ "/store/order/" ++ orderId , headers = [] , body = Http.emptyBody , expect = Http.expectStringResponse (\_ -> Ok ()) @@ -58,7 +58,7 @@ getInventory = getOrderById : Int -> Http.Request Order_ getOrderById orderId = { method = "GET" - , url = basePath ++ "/store/order/" ++ toString orderId + , url = basePath ++ "/store/order/" ++ toString orderId , headers = [] , body = Http.emptyBody , expect = Http.expectJson Order_.decoder diff --git a/samples/client/petstore/elm-0.18/src/Request/User.elm b/samples/client/petstore/elm-0.18/src/Request/User.elm index a7d142cfc0c3..ce6b79ca6309 100644 --- a/samples/client/petstore/elm-0.18/src/Request/User.elm +++ b/samples/client/petstore/elm-0.18/src/Request/User.elm @@ -69,7 +69,7 @@ createUsersWithListInput model = deleteUser : String -> Http.Request () deleteUser username = { method = "DELETE" - , url = basePath ++ "/user/" ++ username + , url = basePath ++ "/user/" ++ username , headers = [] , body = Http.emptyBody , expect = Http.expectStringResponse (\_ -> Ok ()) @@ -82,7 +82,7 @@ deleteUser username = getUserByName : String -> Http.Request User getUserByName username = { method = "GET" - , url = basePath ++ "/user/" ++ username + , url = basePath ++ "/user/" ++ username , headers = [] , body = Http.emptyBody , expect = Http.expectJson User.decoder @@ -123,7 +123,7 @@ logoutUser = updateUser : String -> User -> Http.Request () updateUser username model = { method = "PUT" - , url = basePath ++ "/user/" ++ username + , url = basePath ++ "/user/" ++ username , headers = [] , body = Http.jsonBody <| User.encode model , expect = Http.expectStringResponse (\_ -> Ok ()) diff --git a/samples/client/petstore/elm/src/Data/ApiResponse.elm b/samples/client/petstore/elm/src/Data/ApiResponse.elm index 08199cab32f7..0ae1cebf2e1f 100644 --- a/samples/client/petstore/elm/src/Data/ApiResponse.elm +++ b/samples/client/petstore/elm/src/Data/ApiResponse.elm @@ -21,9 +21,9 @@ import Json.Encode as Encode {-| Describes the result of uploading an image resource -} type alias ApiResponse = - { code : Maybe Int - , type_ : Maybe String - , message : Maybe String + { code : Maybe (Int) + , type_ : Maybe (String) + , message : Maybe (String) } @@ -35,15 +35,22 @@ decoder = |> optional "message" (Decode.nullable Decode.string) Nothing + encode : ApiResponse -> Encode.Value encode model = Encode.object [ ( "code", Maybe.withDefault Encode.null (Maybe.map Encode.int model.code) ) , ( "type", Maybe.withDefault Encode.null (Maybe.map Encode.string model.type_) ) , ( "message", Maybe.withDefault Encode.null (Maybe.map Encode.string model.message) ) + ] + toString : ApiResponse -> String toString = Encode.encode 0 << encode + + + + diff --git a/samples/client/petstore/elm/src/Data/Category.elm b/samples/client/petstore/elm/src/Data/Category.elm index cd1778b8703e..7360502a7e72 100644 --- a/samples/client/petstore/elm/src/Data/Category.elm +++ b/samples/client/petstore/elm/src/Data/Category.elm @@ -21,8 +21,8 @@ import Json.Encode as Encode {-| A category for a pet -} type alias Category = - { id : Maybe Int - , name : Maybe String + { id : Maybe (Int) + , name : Maybe (String) } @@ -33,14 +33,21 @@ decoder = |> optional "name" (Decode.nullable Decode.string) Nothing + encode : Category -> Encode.Value encode model = Encode.object [ ( "id", Maybe.withDefault Encode.null (Maybe.map Encode.int model.id) ) , ( "name", Maybe.withDefault Encode.null (Maybe.map Encode.string model.name) ) + ] + toString : Category -> String toString = Encode.encode 0 << encode + + + + diff --git a/samples/client/petstore/elm/src/Data/Order_.elm b/samples/client/petstore/elm/src/Data/Order_.elm index aff082a6f677..1a5e64c608dc 100644 --- a/samples/client/petstore/elm/src/Data/Order_.elm +++ b/samples/client/petstore/elm/src/Data/Order_.elm @@ -22,12 +22,12 @@ import Json.Encode as Encode {-| An order for a pets from the pet store -} type alias Order_ = - { id : Maybe Int - , petId : Maybe Int - , quantity : Maybe Int - , shipDate : Maybe DateTime - , status : Maybe Status - , complete : Maybe Bool + { id : Maybe (Int) + , petId : Maybe (Int) + , quantity : Maybe (Int) + , shipDate : Maybe (DateTime) + , status : Maybe (Status) + , complete : Maybe (Bool) } @@ -37,6 +37,7 @@ type Status | Delivered + decoder : Decoder Order_ decoder = Decode.succeed Order_ @@ -48,6 +49,7 @@ decoder = |> optional "complete" (Decode.nullable Decode.bool) (Just False) + encode : Order_ -> Encode.Value encode model = Encode.object @@ -57,14 +59,18 @@ encode model = , ( "shipDate", Maybe.withDefault Encode.null (Maybe.map DateTime.encode model.shipDate) ) , ( "status", Maybe.withDefault Encode.null (Maybe.map encodeStatus model.status) ) , ( "complete", Maybe.withDefault Encode.null (Maybe.map Encode.bool model.complete) ) + ] + toString : Order_ -> String toString = Encode.encode 0 << encode + + statusDecoder : Decoder Status statusDecoder = Decode.string @@ -85,6 +91,7 @@ statusDecoder = ) + encodeStatus : Status -> Encode.Value encodeStatus model = case model of @@ -96,3 +103,7 @@ encodeStatus model = Delivered -> Encode.string "delivered" + + + + diff --git a/samples/client/petstore/elm/src/Data/Pet.elm b/samples/client/petstore/elm/src/Data/Pet.elm index f024b79c80f6..5a542e6188e6 100644 --- a/samples/client/petstore/elm/src/Data/Pet.elm +++ b/samples/client/petstore/elm/src/Data/Pet.elm @@ -23,12 +23,12 @@ import Json.Encode as Encode {-| A pet for sale in the pet store -} type alias Pet = - { id : Maybe Int - , category : Maybe Category + { id : Maybe (Int) + , category : Maybe (Category) , name : String - , photoUrls : List String - , tags : Maybe (List Tag) - , status : Maybe Status + , photoUrls : (List String) + , tags : Maybe ((List Tag)) + , status : Maybe (Status) } @@ -38,6 +38,7 @@ type Status | Sold + decoder : Decoder Pet decoder = Decode.succeed Pet @@ -49,23 +50,28 @@ decoder = |> optional "status" (Decode.nullable statusDecoder) Nothing + encode : Pet -> Encode.Value encode model = Encode.object [ ( "id", Maybe.withDefault Encode.null (Maybe.map Encode.int model.id) ) , ( "category", Maybe.withDefault Encode.null (Maybe.map Category.encode model.category) ) , ( "name", Encode.string model.name ) - , ( "photoUrls", Encode.list Encode.string model.photoUrls ) + , ( "photoUrls", (Encode.list Encode.string) model.photoUrls ) , ( "tags", Maybe.withDefault Encode.null (Maybe.map (Encode.list Tag.encode) model.tags) ) , ( "status", Maybe.withDefault Encode.null (Maybe.map encodeStatus model.status) ) + ] + toString : Pet -> String toString = Encode.encode 0 << encode + + statusDecoder : Decoder Status statusDecoder = Decode.string @@ -86,6 +92,7 @@ statusDecoder = ) + encodeStatus : Status -> Encode.Value encodeStatus model = case model of @@ -97,3 +104,7 @@ encodeStatus model = Sold -> Encode.string "sold" + + + + diff --git a/samples/client/petstore/elm/src/Data/Tag.elm b/samples/client/petstore/elm/src/Data/Tag.elm index 052a4197b282..601e91ecc155 100644 --- a/samples/client/petstore/elm/src/Data/Tag.elm +++ b/samples/client/petstore/elm/src/Data/Tag.elm @@ -21,8 +21,8 @@ import Json.Encode as Encode {-| A tag for a pet -} type alias Tag = - { id : Maybe Int - , name : Maybe String + { id : Maybe (Int) + , name : Maybe (String) } @@ -33,14 +33,21 @@ decoder = |> optional "name" (Decode.nullable Decode.string) Nothing + encode : Tag -> Encode.Value encode model = Encode.object [ ( "id", Maybe.withDefault Encode.null (Maybe.map Encode.int model.id) ) , ( "name", Maybe.withDefault Encode.null (Maybe.map Encode.string model.name) ) + ] + toString : Tag -> String toString = Encode.encode 0 << encode + + + + diff --git a/samples/client/petstore/elm/src/Data/User.elm b/samples/client/petstore/elm/src/Data/User.elm index c4b2e3db9cc3..b0ae12253ebf 100644 --- a/samples/client/petstore/elm/src/Data/User.elm +++ b/samples/client/petstore/elm/src/Data/User.elm @@ -21,14 +21,14 @@ import Json.Encode as Encode {-| A User who is purchasing from the pet store -} type alias User = - { id : Maybe Int - , username : Maybe String - , firstName : Maybe String - , lastName : Maybe String - , email : Maybe String - , password : Maybe String - , phone : Maybe String - , userStatus : Maybe Int + { id : Maybe (Int) + , username : Maybe (String) + , firstName : Maybe (String) + , lastName : Maybe (String) + , email : Maybe (String) + , password : Maybe (String) + , phone : Maybe (String) + , userStatus : Maybe (Int) } @@ -45,6 +45,7 @@ decoder = |> optional "userStatus" (Decode.nullable Decode.int) Nothing + encode : User -> Encode.Value encode model = Encode.object @@ -56,9 +57,15 @@ encode model = , ( "password", Maybe.withDefault Encode.null (Maybe.map Encode.string model.password) ) , ( "phone", Maybe.withDefault Encode.null (Maybe.map Encode.string model.phone) ) , ( "userStatus", Maybe.withDefault Encode.null (Maybe.map Encode.int model.userStatus) ) + ] + toString : User -> String toString = Encode.encode 0 << encode + + + + diff --git a/samples/client/petstore/elm/src/DateTime.elm b/samples/client/petstore/elm/src/DateTime.elm index 80b62fb7decb..7d4a5c642c13 100644 --- a/samples/client/petstore/elm/src/DateTime.elm +++ b/samples/client/petstore/elm/src/DateTime.elm @@ -34,4 +34,4 @@ decodeIsoString str = toString : DateTime -> String toString = - Iso8601.fromTime + Iso8601.fromTime \ No newline at end of file diff --git a/samples/client/petstore/elm/src/Request/Pet.elm b/samples/client/petstore/elm/src/Request/Pet.elm index accf33f896f6..a7fd8ba37a87 100644 --- a/samples/client/petstore/elm/src/Request/Pet.elm +++ b/samples/client/petstore/elm/src/Request/Pet.elm @@ -10,10 +10,10 @@ -} -module Request.Pet exposing (Status(..), addPet, deletePet, findPetsByStatus, findPetsByTags, getPetById, updatePet, updatePetWithForm, uploadFile) +module Request.Pet exposing (addPet, deletePet, findPetsByStatus, Status(..), findPetsByTags, getPetById, updatePet, updatePetWithForm, uploadFile) -import Data.ApiResponse as ApiResponse exposing (ApiResponse) import Data.Pet as Pet exposing (Pet) +import Data.ApiResponse as ApiResponse exposing (ApiResponse) import Dict import Http import Json.Decode as Decode @@ -25,7 +25,6 @@ type Status | Pending | Sold - stringifyStatus : Status -> String stringifyStatus value = case value of @@ -39,6 +38,9 @@ stringifyStatus value = "sold" + + + basePath : String basePath = "http://petstore.swagger.io/v2" @@ -46,17 +48,20 @@ basePath = addPet : { onSend : Result Http.Error () -> msg + + , body : Pet + + } -> Cmd msg addPet params = Http.request { method = "POST" , headers = List.filterMap identity [] - , url = - Url.crossOrigin basePath - [ "pet" ] - (List.filterMap identity []) + , url = Url.crossOrigin basePath + ["pet"] + (List.filterMap identity []) , body = Http.jsonBody <| Pet.encode params.body , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -65,21 +70,23 @@ addPet params = deletePet : - { apiKey : Maybe String + { apiKey : Maybe (String) + } -> + { onSend : Result Http.Error () -> msg + + + + , petId : Int + } - -> - { onSend : Result Http.Error () -> msg - , petId : Int - } -> Cmd msg deletePet headers params = Http.request { method = "DELETE" - , headers = List.filterMap identity [ Maybe.map (Http.header "api_key" << identity) headers.apiKey ] - , url = - Url.crossOrigin basePath - [ "pet", String.fromInt params.petId ] - (List.filterMap identity []) + , headers = List.filterMap identity [Maybe.map (Http.header "api_key" << identity) headers.apiKey] + , url = Url.crossOrigin basePath + ["pet", String.fromInt params.petId] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -91,6 +98,10 @@ deletePet headers params = -} findPetsByStatus : { onSend : Result Http.Error (List Pet) -> msg + + + + , status : List Status } -> Cmd msg @@ -98,10 +109,9 @@ findPetsByStatus params = Http.request { method = "GET" , headers = List.filterMap identity [] - , url = - Url.crossOrigin basePath - [ "pet", "findByStatus" ] - (List.filterMap identity [ (Just << Url.string "status" << String.join "," << List.map stringifyStatus) params.status ]) + , url = Url.crossOrigin basePath + ["pet", "findByStatus"] + (List.filterMap identity [(Just << Url.string "status" << String.join "," << List.map stringifyStatus) params.status]) , body = Http.emptyBody , expect = Http.expectJson params.onSend (Decode.list Pet.decoder) , timeout = Just 30000 @@ -113,6 +123,10 @@ findPetsByStatus params = -} findPetsByTags : { onSend : Result Http.Error (List Pet) -> msg + + + + , tags : List String } -> Cmd msg @@ -120,10 +134,9 @@ findPetsByTags params = Http.request { method = "GET" , headers = List.filterMap identity [] - , url = - Url.crossOrigin basePath - [ "pet", "findByTags" ] - (List.filterMap identity [ (Just << Url.string "tags" << String.join "," << List.map identity) params.tags ]) + , url = Url.crossOrigin basePath + ["pet", "findByTags"] + (List.filterMap identity [(Just << Url.string "tags" << String.join "," << List.map identity) params.tags]) , body = Http.emptyBody , expect = Http.expectJson params.onSend (Decode.list Pet.decoder) , timeout = Just 30000 @@ -135,17 +148,20 @@ findPetsByTags params = -} getPetById : { onSend : Result Http.Error Pet -> msg + + + , petId : Int + } -> Cmd msg getPetById params = Http.request { method = "GET" , headers = List.filterMap identity [] - , url = - Url.crossOrigin basePath - [ "pet", String.fromInt params.petId ] - (List.filterMap identity []) + , url = Url.crossOrigin basePath + ["pet", String.fromInt params.petId] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectJson params.onSend Pet.decoder , timeout = Just 30000 @@ -155,17 +171,20 @@ getPetById params = updatePet : { onSend : Result Http.Error () -> msg + + , body : Pet + + } -> Cmd msg updatePet params = Http.request { method = "PUT" , headers = List.filterMap identity [] - , url = - Url.crossOrigin basePath - [ "pet" ] - (List.filterMap identity []) + , url = Url.crossOrigin basePath + ["pet"] + (List.filterMap identity []) , body = Http.jsonBody <| Pet.encode params.body , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -175,17 +194,20 @@ updatePet params = updatePetWithForm : { onSend : Result Http.Error () -> msg + + + , petId : Int + } -> Cmd msg updatePetWithForm params = Http.request { method = "POST" , headers = List.filterMap identity [] - , url = - Url.crossOrigin basePath - [ "pet", String.fromInt params.petId ] - (List.filterMap identity []) + , url = Url.crossOrigin basePath + ["pet", String.fromInt params.petId] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -195,17 +217,20 @@ updatePetWithForm params = uploadFile : { onSend : Result Http.Error ApiResponse -> msg + + + , petId : Int + } -> Cmd msg uploadFile params = Http.request { method = "POST" , headers = List.filterMap identity [] - , url = - Url.crossOrigin basePath - [ "pet", String.fromInt params.petId, "uploadImage" ] - (List.filterMap identity []) + , url = Url.crossOrigin basePath + ["pet", String.fromInt params.petId, "uploadImage"] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectJson params.onSend ApiResponse.decoder , timeout = Just 30000 diff --git a/samples/client/petstore/elm/src/Request/Store.elm b/samples/client/petstore/elm/src/Request/Store.elm index 3800147a77a4..e2a40d41938e 100644 --- a/samples/client/petstore/elm/src/Request/Store.elm +++ b/samples/client/petstore/elm/src/Request/Store.elm @@ -19,6 +19,8 @@ import Json.Decode as Decode import Url.Builder as Url + + basePath : String basePath = "http://petstore.swagger.io/v2" @@ -28,17 +30,20 @@ basePath = -} deleteOrder : { onSend : Result Http.Error () -> msg + + + , orderId : String + } -> Cmd msg deleteOrder params = Http.request { method = "DELETE" , headers = List.filterMap identity [] - , url = - Url.crossOrigin basePath - [ "store", "order", identity params.orderId ] - (List.filterMap identity []) + , url = Url.crossOrigin basePath + ["store", "order", identity params.orderId] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -50,16 +55,20 @@ deleteOrder params = -} getInventory : { onSend : Result Http.Error (Dict.Dict String Int) -> msg + + + + + } -> Cmd msg getInventory params = Http.request { method = "GET" , headers = List.filterMap identity [] - , url = - Url.crossOrigin basePath - [ "store", "inventory" ] - (List.filterMap identity []) + , url = Url.crossOrigin basePath + ["store", "inventory"] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectJson params.onSend (Decode.dict Decode.int) , timeout = Just 30000 @@ -71,17 +80,20 @@ getInventory params = -} getOrderById : { onSend : Result Http.Error Order_ -> msg + + + , orderId : Int + } -> Cmd msg getOrderById params = Http.request { method = "GET" , headers = List.filterMap identity [] - , url = - Url.crossOrigin basePath - [ "store", "order", String.fromInt params.orderId ] - (List.filterMap identity []) + , url = Url.crossOrigin basePath + ["store", "order", String.fromInt params.orderId] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectJson params.onSend Order_.decoder , timeout = Just 30000 @@ -91,17 +103,20 @@ getOrderById params = placeOrder : { onSend : Result Http.Error Order_ -> msg + + , body : Order_ + + } -> Cmd msg placeOrder params = Http.request { method = "POST" , headers = List.filterMap identity [] - , url = - Url.crossOrigin basePath - [ "store", "order" ] - (List.filterMap identity []) + , url = Url.crossOrigin basePath + ["store", "order"] + (List.filterMap identity []) , body = Http.jsonBody <| Order_.encode params.body , expect = Http.expectJson params.onSend Order_.decoder , timeout = Just 30000 diff --git a/samples/client/petstore/elm/src/Request/User.elm b/samples/client/petstore/elm/src/Request/User.elm index 74bbe8213c0f..0bb8411573b6 100644 --- a/samples/client/petstore/elm/src/Request/User.elm +++ b/samples/client/petstore/elm/src/Request/User.elm @@ -19,6 +19,8 @@ import Json.Decode as Decode import Url.Builder as Url + + basePath : String basePath = "http://petstore.swagger.io/v2" @@ -28,17 +30,20 @@ basePath = -} createUser : { onSend : Result Http.Error () -> msg + + , body : User + + } -> Cmd msg createUser params = Http.request { method = "POST" , headers = List.filterMap identity [] - , url = - Url.crossOrigin basePath - [ "user" ] - (List.filterMap identity []) + , url = Url.crossOrigin basePath + ["user"] + (List.filterMap identity []) , body = Http.jsonBody <| User.encode params.body , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -48,17 +53,20 @@ createUser params = createUsersWithArrayInput : { onSend : Result Http.Error () -> msg + + , body : User + + } -> Cmd msg createUsersWithArrayInput params = Http.request { method = "POST" , headers = List.filterMap identity [] - , url = - Url.crossOrigin basePath - [ "user", "createWithArray" ] - (List.filterMap identity []) + , url = Url.crossOrigin basePath + ["user", "createWithArray"] + (List.filterMap identity []) , body = Http.jsonBody <| User.encode params.body , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -68,17 +76,20 @@ createUsersWithArrayInput params = createUsersWithListInput : { onSend : Result Http.Error () -> msg + + , body : User + + } -> Cmd msg createUsersWithListInput params = Http.request { method = "POST" , headers = List.filterMap identity [] - , url = - Url.crossOrigin basePath - [ "user", "createWithList" ] - (List.filterMap identity []) + , url = Url.crossOrigin basePath + ["user", "createWithList"] + (List.filterMap identity []) , body = Http.jsonBody <| User.encode params.body , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -90,17 +101,20 @@ createUsersWithListInput params = -} deleteUser : { onSend : Result Http.Error () -> msg + + + , username : String + } -> Cmd msg deleteUser params = Http.request { method = "DELETE" , headers = List.filterMap identity [] - , url = - Url.crossOrigin basePath - [ "user", identity params.username ] - (List.filterMap identity []) + , url = Url.crossOrigin basePath + ["user", identity params.username] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -110,17 +124,20 @@ deleteUser params = getUserByName : { onSend : Result Http.Error User -> msg + + + , username : String + } -> Cmd msg getUserByName params = Http.request { method = "GET" , headers = List.filterMap identity [] - , url = - Url.crossOrigin basePath - [ "user", identity params.username ] - (List.filterMap identity []) + , url = Url.crossOrigin basePath + ["user", identity params.username] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectJson params.onSend User.decoder , timeout = Just 30000 @@ -130,18 +147,20 @@ getUserByName params = loginUser : { onSend : Result Http.Error String -> msg - , username : String - , password : String + + + + + , username : String , password : String } -> Cmd msg loginUser params = Http.request { method = "GET" , headers = List.filterMap identity [] - , url = - Url.crossOrigin basePath - [ "user", "login" ] - (List.filterMap identity [ (Just << Url.string "username" << identity) params.username, (Just << Url.string "password" << identity) params.password ]) + , url = Url.crossOrigin basePath + ["user", "login"] + (List.filterMap identity [(Just << Url.string "username" << identity) params.username, (Just << Url.string "password" << identity) params.password]) , body = Http.emptyBody , expect = Http.expectJson params.onSend Decode.string , timeout = Just 30000 @@ -151,16 +170,20 @@ loginUser params = logoutUser : { onSend : Result Http.Error () -> msg + + + + + } -> Cmd msg logoutUser params = Http.request { method = "GET" , headers = List.filterMap identity [] - , url = - Url.crossOrigin basePath - [ "user", "logout" ] - (List.filterMap identity []) + , url = Url.crossOrigin basePath + ["user", "logout"] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -172,18 +195,20 @@ logoutUser params = -} updateUser : { onSend : Result Http.Error () -> msg + + , body : User , username : String + } -> Cmd msg updateUser params = Http.request { method = "PUT" , headers = List.filterMap identity [] - , url = - Url.crossOrigin basePath - [ "user", identity params.username ] - (List.filterMap identity []) + , url = Url.crossOrigin basePath + ["user", identity params.username] + (List.filterMap identity []) , body = Http.jsonBody <| User.encode params.body , expect = Http.expectWhatever params.onSend , timeout = Just 30000 diff --git a/samples/client/petstore/go-experimental/go-petstore/api_another_fake.go b/samples/client/petstore/go-experimental/go-petstore/api_another_fake.go index 8d1b78ba00b1..8128bba97c00 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_another_fake.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_another_fake.go @@ -96,7 +96,6 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, bod return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go-experimental/go-petstore/api_fake.go b/samples/client/petstore/go-experimental/go-petstore/api_fake.go index 731d5c00f421..db0a5d09f2ea 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_fake.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_fake.go @@ -176,7 +176,6 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -278,7 +277,6 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -376,7 +374,6 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -474,7 +471,6 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -700,7 +696,6 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Cli return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go b/samples/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go index fcae0074e6c3..b729b05ba400 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go @@ -110,7 +110,6 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, bod return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go-experimental/go-petstore/api_pet.go b/samples/client/petstore/go-experimental/go-petstore/api_pet.go index b3fd6a6e669f..ba752fcff276 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_pet.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_pet.go @@ -243,6 +243,7 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) } newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -331,6 +332,7 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P } newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -433,6 +435,7 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne } newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -694,7 +697,6 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -800,7 +802,6 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go-experimental/go-petstore/api_store.go b/samples/client/petstore/go-experimental/go-petstore/api_store.go index 27fa46576c28..af866af40c7b 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_store.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_store.go @@ -176,7 +176,6 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -271,6 +270,7 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Ord } newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -359,6 +359,7 @@ func (a *StoreApiService) PlaceOrder(ctx _context.Context, body Order) (Order, * } newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go-experimental/go-petstore/api_user.go b/samples/client/petstore/go-experimental/go-petstore/api_user.go index 5eb1a3ced9af..f4946e475289 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_user.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_user.go @@ -366,6 +366,7 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (U } newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -455,6 +456,7 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo } newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go b/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go index 8402309be60f..a18998d72135 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go @@ -97,7 +97,6 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, bod return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go/go-petstore-withXml/api_fake.go b/samples/client/petstore/go/go-petstore-withXml/api_fake.go index c08e9e995e90..5a634ae80618 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_fake.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_fake.go @@ -177,7 +177,6 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -279,7 +278,6 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -377,7 +375,6 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -475,7 +472,6 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -701,7 +697,6 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Cli return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go b/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go index 9db5a88cd3ca..590326d22392 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go @@ -109,7 +109,6 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, bod return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go/go-petstore-withXml/api_pet.go b/samples/client/petstore/go/go-petstore-withXml/api_pet.go index 940991f0b617..07d9ab7765cb 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_pet.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_pet.go @@ -693,7 +693,6 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -799,7 +798,6 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go/go-petstore-withXml/api_store.go b/samples/client/petstore/go/go-petstore-withXml/api_store.go index f633003003c2..00ec8cb99c6a 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_store.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_store.go @@ -175,7 +175,6 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go/go-petstore/api_another_fake.go b/samples/client/petstore/go/go-petstore/api_another_fake.go index 8d1b78ba00b1..8128bba97c00 100644 --- a/samples/client/petstore/go/go-petstore/api_another_fake.go +++ b/samples/client/petstore/go/go-petstore/api_another_fake.go @@ -96,7 +96,6 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, bod return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go/go-petstore/api_fake.go b/samples/client/petstore/go/go-petstore/api_fake.go index 731d5c00f421..db0a5d09f2ea 100644 --- a/samples/client/petstore/go/go-petstore/api_fake.go +++ b/samples/client/petstore/go/go-petstore/api_fake.go @@ -176,7 +176,6 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -278,7 +277,6 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -376,7 +374,6 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -474,7 +471,6 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -700,7 +696,6 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Cli return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go b/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go index be67cb585ed1..1ff9eccc0fb1 100644 --- a/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go +++ b/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go @@ -108,7 +108,6 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, bod return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go/go-petstore/api_pet.go b/samples/client/petstore/go/go-petstore/api_pet.go index 77dccc27684f..2eac738d41a9 100644 --- a/samples/client/petstore/go/go-petstore/api_pet.go +++ b/samples/client/petstore/go/go-petstore/api_pet.go @@ -692,7 +692,6 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -798,7 +797,6 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/client/petstore/go/go-petstore/api_store.go b/samples/client/petstore/go/go-petstore/api_store.go index e17fc1816ee4..504862856647 100644 --- a/samples/client/petstore/go/go-petstore/api_store.go +++ b/samples/client/petstore/go/go-petstore/api_store.go @@ -174,7 +174,6 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_another_fake.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_another_fake.go index 0ec159f0ea95..acc143f53a31 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_another_fake.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_another_fake.go @@ -96,7 +96,6 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, cli return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_default.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_default.go index b5f16d1020b5..6dfb9613dfab 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_default.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_default.go @@ -84,7 +84,6 @@ func (a *DefaultApiService) FooGet(ctx _context.Context) (InlineResponseDefault, body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 0 { var v InlineResponseDefault err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -92,8 +91,6 @@ func (a *DefaultApiService) FooGet(ctx _context.Context) (InlineResponseDefault, return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake.go index 7e7c0f3a54f3..53964c30b0de 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake.go @@ -95,7 +95,6 @@ func (a *FakeApiService) FakeHealthGet(ctx _context.Context) (HealthCheckResult, return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -193,7 +192,6 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -295,7 +293,6 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -393,7 +390,6 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -491,7 +487,6 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -717,7 +712,6 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, client Client) (C return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go index 6d5f3c3bc2cc..e64fa111ce73 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go @@ -110,7 +110,6 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, cli return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_pet.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_pet.go index 16f7ff7ae6af..a96faf2bac89 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_pet.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_pet.go @@ -243,6 +243,7 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) } newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -331,6 +332,7 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P } newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -433,6 +435,7 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne } newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -694,7 +697,6 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -800,7 +802,6 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_store.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_store.go index 5c23d72825d1..826647ff7445 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_store.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_store.go @@ -176,7 +176,6 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -271,6 +270,7 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Ord } newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -359,6 +359,7 @@ func (a *StoreApiService) PlaceOrder(ctx _context.Context, order Order) (Order, } newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_user.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_user.go index 852bf6da2e1c..a5510a407d56 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_user.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_user.go @@ -366,6 +366,7 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (U } newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -455,6 +456,7 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo } newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md index 78f67041d33a..b5502272ce36 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | Pointer to **string** | | [optional] -**Foo** | Pointer to **string** | | [optional] +**Bar** | Pointer to **string** | | [optional] [readonly] +**Foo** | Pointer to **string** | | [optional] [readonly] ## Methods diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Name.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Name.md index 7cc6fd6a3a43..6104c42bebdb 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Name.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Name.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | Pointer to **int32** | | -**SnakeCase** | Pointer to **int32** | | [optional] +**SnakeCase** | Pointer to **int32** | | [optional] [readonly] **Property** | Pointer to **string** | | [optional] -**Var123Number** | Pointer to **int32** | | [optional] +**Var123Number** | Pointer to **int32** | | [optional] [readonly] ## Methods diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md index 552f0170bd85..ce2ff23bc61e 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | Pointer to **string** | | [optional] +**Bar** | Pointer to **string** | | [optional] [readonly] **Baz** | Pointer to **string** | | [optional] ## Methods diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go b/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go index ea8783779c65..4325ac24ee26 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go @@ -96,7 +96,6 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, cli return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_default.go b/samples/openapi3/client/petstore/go/go-petstore/api_default.go index f3b325dbd4c2..8bdd8baefc68 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_default.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_default.go @@ -84,7 +84,6 @@ func (a *DefaultApiService) FooGet(ctx _context.Context) (InlineResponseDefault, body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 0 { var v InlineResponseDefault err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -92,8 +91,6 @@ func (a *DefaultApiService) FooGet(ctx _context.Context) (InlineResponseDefault, return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_fake.go b/samples/openapi3/client/petstore/go/go-petstore/api_fake.go index 7035339127ba..90b0090b2bb5 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_fake.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_fake.go @@ -95,7 +95,6 @@ func (a *FakeApiService) FakeHealthGet(ctx _context.Context) (HealthCheckResult, return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -193,7 +192,6 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -295,7 +293,6 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -393,7 +390,6 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -491,7 +487,6 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -717,7 +712,6 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, client Client) (C return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go b/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go index d98adc297295..e8fa7e3fd9a6 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go @@ -108,7 +108,6 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, cli return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_pet.go b/samples/openapi3/client/petstore/go/go-petstore/api_pet.go index d32003b6c422..9ee468bc78c0 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_pet.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_pet.go @@ -692,7 +692,6 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -798,7 +797,6 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_store.go b/samples/openapi3/client/petstore/go/go-petstore/api_store.go index 654f5e89aa3d..b1080ac6d3fa 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_store.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_store.go @@ -174,7 +174,6 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } return localVarReturnValue, localVarHTTPResponse, newErr } From 9c6b94c29246b6c94ce86a4a5d8e523a395afdae Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 15 Oct 2019 02:00:10 +0800 Subject: [PATCH 008/142] update samples --- docs/contributing.md | 2 +- .../elm-0.18/src/Data/ApiResponse.elm | 13 +-- .../petstore/elm-0.18/src/Data/Category.elm | 11 +- .../petstore/elm-0.18/src/Data/Order_.elm | 23 +--- .../client/petstore/elm-0.18/src/Data/Pet.elm | 21 +--- .../client/petstore/elm-0.18/src/Data/Tag.elm | 11 +- .../petstore/elm-0.18/src/Data/User.elm | 23 ++-- .../client/petstore/elm-0.18/src/DateTime.elm | 2 +- .../petstore/elm-0.18/src/Request/Pet.elm | 10 +- .../petstore/elm-0.18/src/Request/Store.elm | 4 +- .../petstore/elm-0.18/src/Request/User.elm | 6 +- .../petstore/elm/src/Data/ApiResponse.elm | 13 +-- .../client/petstore/elm/src/Data/Category.elm | 11 +- .../client/petstore/elm/src/Data/Order_.elm | 23 +--- samples/client/petstore/elm/src/Data/Pet.elm | 23 +--- samples/client/petstore/elm/src/Data/Tag.elm | 11 +- samples/client/petstore/elm/src/Data/User.elm | 23 ++-- samples/client/petstore/elm/src/DateTime.elm | 2 +- .../client/petstore/elm/src/Request/Pet.elm | 107 +++++++----------- .../client/petstore/elm/src/Request/Store.elm | 47 +++----- .../client/petstore/elm/src/Request/User.elm | 93 ++++++--------- .../gen/java/org/openapitools/api/PetApi.java | 2 +- 22 files changed, 158 insertions(+), 323 deletions(-) diff --git a/docs/contributing.md b/docs/contributing.md index 1544d4b197f5..dee52bd40dbc 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -89,7 +89,7 @@ For [Vendor Extensions](https://github.com/OAI/OpenAPI-Specification/blob/master To add test cases (optional) covering the change in the code generator, please refer to [modules/openapi-generator/src/test/java/org/openapitools/codegen](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/test/java/org/openapitools/codegen) To test the templates, please perform the following: -- Update the Petstore sample by running the shell scripts under `bin` and `bin/openapi3` folder. For example, run `./bin/python-client-petstore.sh` and `./bin/openapi3/python-client-petstore.sh` to update the Python PetStore API client under [`samples/client/petstore/python`](https://github.com/openapitools/openapi-generator/tree/master/samples/client/petstore/python) and [`samples/openapi3/client/petstore/python`](https://github.com/openapitools/openapi-generator/tree/master/samples/openapi3/client/petstore/python). For Windows, the batch files can be found under `bin\windows` folder. (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion) +- Update the Petstore sample by running the shell scripts under `bin` and `bin/openapi3` folder. For example, run `./bin/python-petstore.sh` and `./bin/openapi3/python-petstore.sh` to update the Python PetStore API client under [`samples/client/petstore/python`](https://github.com/openapitools/openapi-generator/tree/master/samples/client/petstore/python) and [`samples/openapi3/client/petstore/python`](https://github.com/openapitools/openapi-generator/tree/master/samples/openapi3/client/petstore/python). For Windows, the batch files can be found under `bin\windows` folder. (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion) - Run the tests in the sample folder using maven `mvn integration-test -rf :`, e.g. open a shell in `samples/client/petstore/python`, run `mvn integration-test -rf :PythonPetstoreClientTests`. The artifactId of the project can be found in the pom.xml file. (some languages may not contain unit testing for Petstore and we're looking for contribution from the community to implement those tests) - Finally, git commit the updated samples files: `git commit -a` (`git add -A` if added files with new test cases) diff --git a/samples/client/petstore/elm-0.18/src/Data/ApiResponse.elm b/samples/client/petstore/elm-0.18/src/Data/ApiResponse.elm index 3d5fb6f318b4..1e5d44b79417 100644 --- a/samples/client/petstore/elm-0.18/src/Data/ApiResponse.elm +++ b/samples/client/petstore/elm-0.18/src/Data/ApiResponse.elm @@ -21,9 +21,9 @@ import Json.Encode as Encode {-| Describes the result of uploading an image resource -} type alias ApiResponse = - { code : Maybe (Int) - , type_ : Maybe (String) - , message : Maybe (String) + { code : Maybe Int + , type_ : Maybe String + , message : Maybe String } @@ -35,22 +35,15 @@ decoder = |> optional "message" (Decode.nullable Decode.string) Nothing - encode : ApiResponse -> Encode.Value encode model = Encode.object [ ( "code", Maybe.withDefault Encode.null (Maybe.map Encode.int model.code) ) , ( "type", Maybe.withDefault Encode.null (Maybe.map Encode.string model.type_) ) , ( "message", Maybe.withDefault Encode.null (Maybe.map Encode.string model.message) ) - ] - toString : ApiResponse -> String toString = Encode.encode 0 << encode - - - - diff --git a/samples/client/petstore/elm-0.18/src/Data/Category.elm b/samples/client/petstore/elm-0.18/src/Data/Category.elm index 432caee0d413..f8e5a7fb31d6 100644 --- a/samples/client/petstore/elm-0.18/src/Data/Category.elm +++ b/samples/client/petstore/elm-0.18/src/Data/Category.elm @@ -21,8 +21,8 @@ import Json.Encode as Encode {-| A category for a pet -} type alias Category = - { id : Maybe (Int) - , name : Maybe (String) + { id : Maybe Int + , name : Maybe String } @@ -33,21 +33,14 @@ decoder = |> optional "name" (Decode.nullable Decode.string) Nothing - encode : Category -> Encode.Value encode model = Encode.object [ ( "id", Maybe.withDefault Encode.null (Maybe.map Encode.int model.id) ) , ( "name", Maybe.withDefault Encode.null (Maybe.map Encode.string model.name) ) - ] - toString : Category -> String toString = Encode.encode 0 << encode - - - - diff --git a/samples/client/petstore/elm-0.18/src/Data/Order_.elm b/samples/client/petstore/elm-0.18/src/Data/Order_.elm index dd2955a7d15d..0d8e87810983 100644 --- a/samples/client/petstore/elm-0.18/src/Data/Order_.elm +++ b/samples/client/petstore/elm-0.18/src/Data/Order_.elm @@ -22,12 +22,12 @@ import Json.Encode as Encode {-| An order for a pets from the pet store -} type alias Order_ = - { id : Maybe (Int) - , petId : Maybe (Int) - , quantity : Maybe (Int) - , shipDate : Maybe (DateTime) - , status : Maybe (Status) - , complete : Maybe (Bool) + { id : Maybe Int + , petId : Maybe Int + , quantity : Maybe Int + , shipDate : Maybe DateTime + , status : Maybe Status + , complete : Maybe Bool } @@ -37,7 +37,6 @@ type Status | Delivered - decoder : Decoder Order_ decoder = decode Order_ @@ -49,7 +48,6 @@ decoder = |> optional "complete" (Decode.nullable Decode.bool) (Just False) - encode : Order_ -> Encode.Value encode model = Encode.object @@ -59,18 +57,14 @@ encode model = , ( "shipDate", Maybe.withDefault Encode.null (Maybe.map DateTime.encode model.shipDate) ) , ( "status", Maybe.withDefault Encode.null (Maybe.map encodeStatus model.status) ) , ( "complete", Maybe.withDefault Encode.null (Maybe.map Encode.bool model.complete) ) - ] - toString : Order_ -> String toString = Encode.encode 0 << encode - - statusDecoder : Decoder Status statusDecoder = Decode.string @@ -91,7 +85,6 @@ statusDecoder = ) - encodeStatus : Status -> Encode.Value encodeStatus model = case model of @@ -103,7 +96,3 @@ encodeStatus model = Delivered -> Encode.string "delivered" - - - - diff --git a/samples/client/petstore/elm-0.18/src/Data/Pet.elm b/samples/client/petstore/elm-0.18/src/Data/Pet.elm index 900d2678294d..50f39279e10e 100644 --- a/samples/client/petstore/elm-0.18/src/Data/Pet.elm +++ b/samples/client/petstore/elm-0.18/src/Data/Pet.elm @@ -23,12 +23,12 @@ import Json.Encode as Encode {-| A pet for sale in the pet store -} type alias Pet = - { id : Maybe (Int) - , category : Maybe (Category) + { id : Maybe Int + , category : Maybe Category , name : String - , photoUrls : (List String) - , tags : Maybe ((List Tag)) - , status : Maybe (Status) + , photoUrls : List String + , tags : Maybe (List Tag) + , status : Maybe Status } @@ -38,7 +38,6 @@ type Status | Sold - decoder : Decoder Pet decoder = decode Pet @@ -50,7 +49,6 @@ decoder = |> optional "status" (Decode.nullable statusDecoder) Nothing - encode : Pet -> Encode.Value encode model = Encode.object @@ -60,18 +58,14 @@ encode model = , ( "photoUrls", (Encode.list << List.map Encode.string) model.photoUrls ) , ( "tags", Maybe.withDefault Encode.null (Maybe.map (Encode.list << List.map Tag.encode) model.tags) ) , ( "status", Maybe.withDefault Encode.null (Maybe.map encodeStatus model.status) ) - ] - toString : Pet -> String toString = Encode.encode 0 << encode - - statusDecoder : Decoder Status statusDecoder = Decode.string @@ -92,7 +86,6 @@ statusDecoder = ) - encodeStatus : Status -> Encode.Value encodeStatus model = case model of @@ -104,7 +97,3 @@ encodeStatus model = Sold -> Encode.string "sold" - - - - diff --git a/samples/client/petstore/elm-0.18/src/Data/Tag.elm b/samples/client/petstore/elm-0.18/src/Data/Tag.elm index 6c448df13575..81b9407409ba 100644 --- a/samples/client/petstore/elm-0.18/src/Data/Tag.elm +++ b/samples/client/petstore/elm-0.18/src/Data/Tag.elm @@ -21,8 +21,8 @@ import Json.Encode as Encode {-| A tag for a pet -} type alias Tag = - { id : Maybe (Int) - , name : Maybe (String) + { id : Maybe Int + , name : Maybe String } @@ -33,21 +33,14 @@ decoder = |> optional "name" (Decode.nullable Decode.string) Nothing - encode : Tag -> Encode.Value encode model = Encode.object [ ( "id", Maybe.withDefault Encode.null (Maybe.map Encode.int model.id) ) , ( "name", Maybe.withDefault Encode.null (Maybe.map Encode.string model.name) ) - ] - toString : Tag -> String toString = Encode.encode 0 << encode - - - - diff --git a/samples/client/petstore/elm-0.18/src/Data/User.elm b/samples/client/petstore/elm-0.18/src/Data/User.elm index d777b7369955..5b27dc8e183b 100644 --- a/samples/client/petstore/elm-0.18/src/Data/User.elm +++ b/samples/client/petstore/elm-0.18/src/Data/User.elm @@ -21,14 +21,14 @@ import Json.Encode as Encode {-| A User who is purchasing from the pet store -} type alias User = - { id : Maybe (Int) - , username : Maybe (String) - , firstName : Maybe (String) - , lastName : Maybe (String) - , email : Maybe (String) - , password : Maybe (String) - , phone : Maybe (String) - , userStatus : Maybe (Int) + { id : Maybe Int + , username : Maybe String + , firstName : Maybe String + , lastName : Maybe String + , email : Maybe String + , password : Maybe String + , phone : Maybe String + , userStatus : Maybe Int } @@ -45,7 +45,6 @@ decoder = |> optional "userStatus" (Decode.nullable Decode.int) Nothing - encode : User -> Encode.Value encode model = Encode.object @@ -57,15 +56,9 @@ encode model = , ( "password", Maybe.withDefault Encode.null (Maybe.map Encode.string model.password) ) , ( "phone", Maybe.withDefault Encode.null (Maybe.map Encode.string model.phone) ) , ( "userStatus", Maybe.withDefault Encode.null (Maybe.map Encode.int model.userStatus) ) - ] - toString : User -> String toString = Encode.encode 0 << encode - - - - diff --git a/samples/client/petstore/elm-0.18/src/DateTime.elm b/samples/client/petstore/elm-0.18/src/DateTime.elm index 6a20f0482a1c..7e07312468c6 100644 --- a/samples/client/petstore/elm-0.18/src/DateTime.elm +++ b/samples/client/petstore/elm-0.18/src/DateTime.elm @@ -34,4 +34,4 @@ decodeIsoString str = toString : DateTime -> String toString = - toIsoString \ No newline at end of file + toIsoString diff --git a/samples/client/petstore/elm-0.18/src/Request/Pet.elm b/samples/client/petstore/elm-0.18/src/Request/Pet.elm index 5b1e3444d3a0..a1117a57d5c4 100644 --- a/samples/client/petstore/elm-0.18/src/Request/Pet.elm +++ b/samples/client/petstore/elm-0.18/src/Request/Pet.elm @@ -12,8 +12,8 @@ module Request.Pet exposing (addPet, deletePet, findPetsByStatus, findPetsByTags, getPetById, updatePet, updatePetWithForm, uploadFile) -import Data.Pet as Pet exposing (Pet) import Data.ApiResponse as ApiResponse exposing (ApiResponse) +import Data.Pet as Pet exposing (Pet) import Dict import Http import Json.Decode as Decode @@ -40,7 +40,7 @@ addPet model = deletePet : Int -> Http.Request () deletePet petId = { method = "DELETE" - , url = basePath ++ "/pet/" ++ toString petId + , url = basePath ++ "/pet/" ++ toString petId , headers = [] , body = Http.emptyBody , expect = Http.expectStringResponse (\_ -> Ok ()) @@ -85,7 +85,7 @@ findPetsByTags = getPetById : Int -> Http.Request Pet getPetById petId = { method = "GET" - , url = basePath ++ "/pet/" ++ toString petId + , url = basePath ++ "/pet/" ++ toString petId , headers = [] , body = Http.emptyBody , expect = Http.expectJson Pet.decoder @@ -111,7 +111,7 @@ updatePet model = updatePetWithForm : Int -> Http.Request () updatePetWithForm petId = { method = "POST" - , url = basePath ++ "/pet/" ++ toString petId + , url = basePath ++ "/pet/" ++ toString petId , headers = [] , body = Http.emptyBody , expect = Http.expectStringResponse (\_ -> Ok ()) @@ -124,7 +124,7 @@ updatePetWithForm petId = uploadFile : Int -> Http.Request ApiResponse uploadFile petId = { method = "POST" - , url = basePath ++ "/pet/" ++ toString petId ++ "/uploadImage" + , url = basePath ++ "/pet/" ++ toString petId ++ "/uploadImage" , headers = [] , body = Http.emptyBody , expect = Http.expectJson ApiResponse.decoder diff --git a/samples/client/petstore/elm-0.18/src/Request/Store.elm b/samples/client/petstore/elm-0.18/src/Request/Store.elm index d8f70f4177c3..2f44d25c42a9 100644 --- a/samples/client/petstore/elm-0.18/src/Request/Store.elm +++ b/samples/client/petstore/elm-0.18/src/Request/Store.elm @@ -28,7 +28,7 @@ basePath = deleteOrder : String -> Http.Request () deleteOrder orderId = { method = "DELETE" - , url = basePath ++ "/store/order/" ++ orderId + , url = basePath ++ "/store/order/" ++ orderId , headers = [] , body = Http.emptyBody , expect = Http.expectStringResponse (\_ -> Ok ()) @@ -58,7 +58,7 @@ getInventory = getOrderById : Int -> Http.Request Order_ getOrderById orderId = { method = "GET" - , url = basePath ++ "/store/order/" ++ toString orderId + , url = basePath ++ "/store/order/" ++ toString orderId , headers = [] , body = Http.emptyBody , expect = Http.expectJson Order_.decoder diff --git a/samples/client/petstore/elm-0.18/src/Request/User.elm b/samples/client/petstore/elm-0.18/src/Request/User.elm index ce6b79ca6309..a7d142cfc0c3 100644 --- a/samples/client/petstore/elm-0.18/src/Request/User.elm +++ b/samples/client/petstore/elm-0.18/src/Request/User.elm @@ -69,7 +69,7 @@ createUsersWithListInput model = deleteUser : String -> Http.Request () deleteUser username = { method = "DELETE" - , url = basePath ++ "/user/" ++ username + , url = basePath ++ "/user/" ++ username , headers = [] , body = Http.emptyBody , expect = Http.expectStringResponse (\_ -> Ok ()) @@ -82,7 +82,7 @@ deleteUser username = getUserByName : String -> Http.Request User getUserByName username = { method = "GET" - , url = basePath ++ "/user/" ++ username + , url = basePath ++ "/user/" ++ username , headers = [] , body = Http.emptyBody , expect = Http.expectJson User.decoder @@ -123,7 +123,7 @@ logoutUser = updateUser : String -> User -> Http.Request () updateUser username model = { method = "PUT" - , url = basePath ++ "/user/" ++ username + , url = basePath ++ "/user/" ++ username , headers = [] , body = Http.jsonBody <| User.encode model , expect = Http.expectStringResponse (\_ -> Ok ()) diff --git a/samples/client/petstore/elm/src/Data/ApiResponse.elm b/samples/client/petstore/elm/src/Data/ApiResponse.elm index 0ae1cebf2e1f..08199cab32f7 100644 --- a/samples/client/petstore/elm/src/Data/ApiResponse.elm +++ b/samples/client/petstore/elm/src/Data/ApiResponse.elm @@ -21,9 +21,9 @@ import Json.Encode as Encode {-| Describes the result of uploading an image resource -} type alias ApiResponse = - { code : Maybe (Int) - , type_ : Maybe (String) - , message : Maybe (String) + { code : Maybe Int + , type_ : Maybe String + , message : Maybe String } @@ -35,22 +35,15 @@ decoder = |> optional "message" (Decode.nullable Decode.string) Nothing - encode : ApiResponse -> Encode.Value encode model = Encode.object [ ( "code", Maybe.withDefault Encode.null (Maybe.map Encode.int model.code) ) , ( "type", Maybe.withDefault Encode.null (Maybe.map Encode.string model.type_) ) , ( "message", Maybe.withDefault Encode.null (Maybe.map Encode.string model.message) ) - ] - toString : ApiResponse -> String toString = Encode.encode 0 << encode - - - - diff --git a/samples/client/petstore/elm/src/Data/Category.elm b/samples/client/petstore/elm/src/Data/Category.elm index 7360502a7e72..cd1778b8703e 100644 --- a/samples/client/petstore/elm/src/Data/Category.elm +++ b/samples/client/petstore/elm/src/Data/Category.elm @@ -21,8 +21,8 @@ import Json.Encode as Encode {-| A category for a pet -} type alias Category = - { id : Maybe (Int) - , name : Maybe (String) + { id : Maybe Int + , name : Maybe String } @@ -33,21 +33,14 @@ decoder = |> optional "name" (Decode.nullable Decode.string) Nothing - encode : Category -> Encode.Value encode model = Encode.object [ ( "id", Maybe.withDefault Encode.null (Maybe.map Encode.int model.id) ) , ( "name", Maybe.withDefault Encode.null (Maybe.map Encode.string model.name) ) - ] - toString : Category -> String toString = Encode.encode 0 << encode - - - - diff --git a/samples/client/petstore/elm/src/Data/Order_.elm b/samples/client/petstore/elm/src/Data/Order_.elm index 1a5e64c608dc..aff082a6f677 100644 --- a/samples/client/petstore/elm/src/Data/Order_.elm +++ b/samples/client/petstore/elm/src/Data/Order_.elm @@ -22,12 +22,12 @@ import Json.Encode as Encode {-| An order for a pets from the pet store -} type alias Order_ = - { id : Maybe (Int) - , petId : Maybe (Int) - , quantity : Maybe (Int) - , shipDate : Maybe (DateTime) - , status : Maybe (Status) - , complete : Maybe (Bool) + { id : Maybe Int + , petId : Maybe Int + , quantity : Maybe Int + , shipDate : Maybe DateTime + , status : Maybe Status + , complete : Maybe Bool } @@ -37,7 +37,6 @@ type Status | Delivered - decoder : Decoder Order_ decoder = Decode.succeed Order_ @@ -49,7 +48,6 @@ decoder = |> optional "complete" (Decode.nullable Decode.bool) (Just False) - encode : Order_ -> Encode.Value encode model = Encode.object @@ -59,18 +57,14 @@ encode model = , ( "shipDate", Maybe.withDefault Encode.null (Maybe.map DateTime.encode model.shipDate) ) , ( "status", Maybe.withDefault Encode.null (Maybe.map encodeStatus model.status) ) , ( "complete", Maybe.withDefault Encode.null (Maybe.map Encode.bool model.complete) ) - ] - toString : Order_ -> String toString = Encode.encode 0 << encode - - statusDecoder : Decoder Status statusDecoder = Decode.string @@ -91,7 +85,6 @@ statusDecoder = ) - encodeStatus : Status -> Encode.Value encodeStatus model = case model of @@ -103,7 +96,3 @@ encodeStatus model = Delivered -> Encode.string "delivered" - - - - diff --git a/samples/client/petstore/elm/src/Data/Pet.elm b/samples/client/petstore/elm/src/Data/Pet.elm index 5a542e6188e6..f024b79c80f6 100644 --- a/samples/client/petstore/elm/src/Data/Pet.elm +++ b/samples/client/petstore/elm/src/Data/Pet.elm @@ -23,12 +23,12 @@ import Json.Encode as Encode {-| A pet for sale in the pet store -} type alias Pet = - { id : Maybe (Int) - , category : Maybe (Category) + { id : Maybe Int + , category : Maybe Category , name : String - , photoUrls : (List String) - , tags : Maybe ((List Tag)) - , status : Maybe (Status) + , photoUrls : List String + , tags : Maybe (List Tag) + , status : Maybe Status } @@ -38,7 +38,6 @@ type Status | Sold - decoder : Decoder Pet decoder = Decode.succeed Pet @@ -50,28 +49,23 @@ decoder = |> optional "status" (Decode.nullable statusDecoder) Nothing - encode : Pet -> Encode.Value encode model = Encode.object [ ( "id", Maybe.withDefault Encode.null (Maybe.map Encode.int model.id) ) , ( "category", Maybe.withDefault Encode.null (Maybe.map Category.encode model.category) ) , ( "name", Encode.string model.name ) - , ( "photoUrls", (Encode.list Encode.string) model.photoUrls ) + , ( "photoUrls", Encode.list Encode.string model.photoUrls ) , ( "tags", Maybe.withDefault Encode.null (Maybe.map (Encode.list Tag.encode) model.tags) ) , ( "status", Maybe.withDefault Encode.null (Maybe.map encodeStatus model.status) ) - ] - toString : Pet -> String toString = Encode.encode 0 << encode - - statusDecoder : Decoder Status statusDecoder = Decode.string @@ -92,7 +86,6 @@ statusDecoder = ) - encodeStatus : Status -> Encode.Value encodeStatus model = case model of @@ -104,7 +97,3 @@ encodeStatus model = Sold -> Encode.string "sold" - - - - diff --git a/samples/client/petstore/elm/src/Data/Tag.elm b/samples/client/petstore/elm/src/Data/Tag.elm index 601e91ecc155..052a4197b282 100644 --- a/samples/client/petstore/elm/src/Data/Tag.elm +++ b/samples/client/petstore/elm/src/Data/Tag.elm @@ -21,8 +21,8 @@ import Json.Encode as Encode {-| A tag for a pet -} type alias Tag = - { id : Maybe (Int) - , name : Maybe (String) + { id : Maybe Int + , name : Maybe String } @@ -33,21 +33,14 @@ decoder = |> optional "name" (Decode.nullable Decode.string) Nothing - encode : Tag -> Encode.Value encode model = Encode.object [ ( "id", Maybe.withDefault Encode.null (Maybe.map Encode.int model.id) ) , ( "name", Maybe.withDefault Encode.null (Maybe.map Encode.string model.name) ) - ] - toString : Tag -> String toString = Encode.encode 0 << encode - - - - diff --git a/samples/client/petstore/elm/src/Data/User.elm b/samples/client/petstore/elm/src/Data/User.elm index b0ae12253ebf..c4b2e3db9cc3 100644 --- a/samples/client/petstore/elm/src/Data/User.elm +++ b/samples/client/petstore/elm/src/Data/User.elm @@ -21,14 +21,14 @@ import Json.Encode as Encode {-| A User who is purchasing from the pet store -} type alias User = - { id : Maybe (Int) - , username : Maybe (String) - , firstName : Maybe (String) - , lastName : Maybe (String) - , email : Maybe (String) - , password : Maybe (String) - , phone : Maybe (String) - , userStatus : Maybe (Int) + { id : Maybe Int + , username : Maybe String + , firstName : Maybe String + , lastName : Maybe String + , email : Maybe String + , password : Maybe String + , phone : Maybe String + , userStatus : Maybe Int } @@ -45,7 +45,6 @@ decoder = |> optional "userStatus" (Decode.nullable Decode.int) Nothing - encode : User -> Encode.Value encode model = Encode.object @@ -57,15 +56,9 @@ encode model = , ( "password", Maybe.withDefault Encode.null (Maybe.map Encode.string model.password) ) , ( "phone", Maybe.withDefault Encode.null (Maybe.map Encode.string model.phone) ) , ( "userStatus", Maybe.withDefault Encode.null (Maybe.map Encode.int model.userStatus) ) - ] - toString : User -> String toString = Encode.encode 0 << encode - - - - diff --git a/samples/client/petstore/elm/src/DateTime.elm b/samples/client/petstore/elm/src/DateTime.elm index 7d4a5c642c13..80b62fb7decb 100644 --- a/samples/client/petstore/elm/src/DateTime.elm +++ b/samples/client/petstore/elm/src/DateTime.elm @@ -34,4 +34,4 @@ decodeIsoString str = toString : DateTime -> String toString = - Iso8601.fromTime \ No newline at end of file + Iso8601.fromTime diff --git a/samples/client/petstore/elm/src/Request/Pet.elm b/samples/client/petstore/elm/src/Request/Pet.elm index a7fd8ba37a87..accf33f896f6 100644 --- a/samples/client/petstore/elm/src/Request/Pet.elm +++ b/samples/client/petstore/elm/src/Request/Pet.elm @@ -10,10 +10,10 @@ -} -module Request.Pet exposing (addPet, deletePet, findPetsByStatus, Status(..), findPetsByTags, getPetById, updatePet, updatePetWithForm, uploadFile) +module Request.Pet exposing (Status(..), addPet, deletePet, findPetsByStatus, findPetsByTags, getPetById, updatePet, updatePetWithForm, uploadFile) -import Data.Pet as Pet exposing (Pet) import Data.ApiResponse as ApiResponse exposing (ApiResponse) +import Data.Pet as Pet exposing (Pet) import Dict import Http import Json.Decode as Decode @@ -25,6 +25,7 @@ type Status | Pending | Sold + stringifyStatus : Status -> String stringifyStatus value = case value of @@ -38,9 +39,6 @@ stringifyStatus value = "sold" - - - basePath : String basePath = "http://petstore.swagger.io/v2" @@ -48,20 +46,17 @@ basePath = addPet : { onSend : Result Http.Error () -> msg - - , body : Pet - - } -> Cmd msg addPet params = Http.request { method = "POST" , headers = List.filterMap identity [] - , url = Url.crossOrigin basePath - ["pet"] - (List.filterMap identity []) + , url = + Url.crossOrigin basePath + [ "pet" ] + (List.filterMap identity []) , body = Http.jsonBody <| Pet.encode params.body , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -70,23 +65,21 @@ addPet params = deletePet : - { apiKey : Maybe (String) - } -> - { onSend : Result Http.Error () -> msg - - - - , petId : Int - + { apiKey : Maybe String } + -> + { onSend : Result Http.Error () -> msg + , petId : Int + } -> Cmd msg deletePet headers params = Http.request { method = "DELETE" - , headers = List.filterMap identity [Maybe.map (Http.header "api_key" << identity) headers.apiKey] - , url = Url.crossOrigin basePath - ["pet", String.fromInt params.petId] - (List.filterMap identity []) + , headers = List.filterMap identity [ Maybe.map (Http.header "api_key" << identity) headers.apiKey ] + , url = + Url.crossOrigin basePath + [ "pet", String.fromInt params.petId ] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -98,10 +91,6 @@ deletePet headers params = -} findPetsByStatus : { onSend : Result Http.Error (List Pet) -> msg - - - - , status : List Status } -> Cmd msg @@ -109,9 +98,10 @@ findPetsByStatus params = Http.request { method = "GET" , headers = List.filterMap identity [] - , url = Url.crossOrigin basePath - ["pet", "findByStatus"] - (List.filterMap identity [(Just << Url.string "status" << String.join "," << List.map stringifyStatus) params.status]) + , url = + Url.crossOrigin basePath + [ "pet", "findByStatus" ] + (List.filterMap identity [ (Just << Url.string "status" << String.join "," << List.map stringifyStatus) params.status ]) , body = Http.emptyBody , expect = Http.expectJson params.onSend (Decode.list Pet.decoder) , timeout = Just 30000 @@ -123,10 +113,6 @@ findPetsByStatus params = -} findPetsByTags : { onSend : Result Http.Error (List Pet) -> msg - - - - , tags : List String } -> Cmd msg @@ -134,9 +120,10 @@ findPetsByTags params = Http.request { method = "GET" , headers = List.filterMap identity [] - , url = Url.crossOrigin basePath - ["pet", "findByTags"] - (List.filterMap identity [(Just << Url.string "tags" << String.join "," << List.map identity) params.tags]) + , url = + Url.crossOrigin basePath + [ "pet", "findByTags" ] + (List.filterMap identity [ (Just << Url.string "tags" << String.join "," << List.map identity) params.tags ]) , body = Http.emptyBody , expect = Http.expectJson params.onSend (Decode.list Pet.decoder) , timeout = Just 30000 @@ -148,20 +135,17 @@ findPetsByTags params = -} getPetById : { onSend : Result Http.Error Pet -> msg - - - , petId : Int - } -> Cmd msg getPetById params = Http.request { method = "GET" , headers = List.filterMap identity [] - , url = Url.crossOrigin basePath - ["pet", String.fromInt params.petId] - (List.filterMap identity []) + , url = + Url.crossOrigin basePath + [ "pet", String.fromInt params.petId ] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectJson params.onSend Pet.decoder , timeout = Just 30000 @@ -171,20 +155,17 @@ getPetById params = updatePet : { onSend : Result Http.Error () -> msg - - , body : Pet - - } -> Cmd msg updatePet params = Http.request { method = "PUT" , headers = List.filterMap identity [] - , url = Url.crossOrigin basePath - ["pet"] - (List.filterMap identity []) + , url = + Url.crossOrigin basePath + [ "pet" ] + (List.filterMap identity []) , body = Http.jsonBody <| Pet.encode params.body , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -194,20 +175,17 @@ updatePet params = updatePetWithForm : { onSend : Result Http.Error () -> msg - - - , petId : Int - } -> Cmd msg updatePetWithForm params = Http.request { method = "POST" , headers = List.filterMap identity [] - , url = Url.crossOrigin basePath - ["pet", String.fromInt params.petId] - (List.filterMap identity []) + , url = + Url.crossOrigin basePath + [ "pet", String.fromInt params.petId ] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -217,20 +195,17 @@ updatePetWithForm params = uploadFile : { onSend : Result Http.Error ApiResponse -> msg - - - , petId : Int - } -> Cmd msg uploadFile params = Http.request { method = "POST" , headers = List.filterMap identity [] - , url = Url.crossOrigin basePath - ["pet", String.fromInt params.petId, "uploadImage"] - (List.filterMap identity []) + , url = + Url.crossOrigin basePath + [ "pet", String.fromInt params.petId, "uploadImage" ] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectJson params.onSend ApiResponse.decoder , timeout = Just 30000 diff --git a/samples/client/petstore/elm/src/Request/Store.elm b/samples/client/petstore/elm/src/Request/Store.elm index e2a40d41938e..3800147a77a4 100644 --- a/samples/client/petstore/elm/src/Request/Store.elm +++ b/samples/client/petstore/elm/src/Request/Store.elm @@ -19,8 +19,6 @@ import Json.Decode as Decode import Url.Builder as Url - - basePath : String basePath = "http://petstore.swagger.io/v2" @@ -30,20 +28,17 @@ basePath = -} deleteOrder : { onSend : Result Http.Error () -> msg - - - , orderId : String - } -> Cmd msg deleteOrder params = Http.request { method = "DELETE" , headers = List.filterMap identity [] - , url = Url.crossOrigin basePath - ["store", "order", identity params.orderId] - (List.filterMap identity []) + , url = + Url.crossOrigin basePath + [ "store", "order", identity params.orderId ] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -55,20 +50,16 @@ deleteOrder params = -} getInventory : { onSend : Result Http.Error (Dict.Dict String Int) -> msg - - - - - } -> Cmd msg getInventory params = Http.request { method = "GET" , headers = List.filterMap identity [] - , url = Url.crossOrigin basePath - ["store", "inventory"] - (List.filterMap identity []) + , url = + Url.crossOrigin basePath + [ "store", "inventory" ] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectJson params.onSend (Decode.dict Decode.int) , timeout = Just 30000 @@ -80,20 +71,17 @@ getInventory params = -} getOrderById : { onSend : Result Http.Error Order_ -> msg - - - , orderId : Int - } -> Cmd msg getOrderById params = Http.request { method = "GET" , headers = List.filterMap identity [] - , url = Url.crossOrigin basePath - ["store", "order", String.fromInt params.orderId] - (List.filterMap identity []) + , url = + Url.crossOrigin basePath + [ "store", "order", String.fromInt params.orderId ] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectJson params.onSend Order_.decoder , timeout = Just 30000 @@ -103,20 +91,17 @@ getOrderById params = placeOrder : { onSend : Result Http.Error Order_ -> msg - - , body : Order_ - - } -> Cmd msg placeOrder params = Http.request { method = "POST" , headers = List.filterMap identity [] - , url = Url.crossOrigin basePath - ["store", "order"] - (List.filterMap identity []) + , url = + Url.crossOrigin basePath + [ "store", "order" ] + (List.filterMap identity []) , body = Http.jsonBody <| Order_.encode params.body , expect = Http.expectJson params.onSend Order_.decoder , timeout = Just 30000 diff --git a/samples/client/petstore/elm/src/Request/User.elm b/samples/client/petstore/elm/src/Request/User.elm index 0bb8411573b6..74bbe8213c0f 100644 --- a/samples/client/petstore/elm/src/Request/User.elm +++ b/samples/client/petstore/elm/src/Request/User.elm @@ -19,8 +19,6 @@ import Json.Decode as Decode import Url.Builder as Url - - basePath : String basePath = "http://petstore.swagger.io/v2" @@ -30,20 +28,17 @@ basePath = -} createUser : { onSend : Result Http.Error () -> msg - - , body : User - - } -> Cmd msg createUser params = Http.request { method = "POST" , headers = List.filterMap identity [] - , url = Url.crossOrigin basePath - ["user"] - (List.filterMap identity []) + , url = + Url.crossOrigin basePath + [ "user" ] + (List.filterMap identity []) , body = Http.jsonBody <| User.encode params.body , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -53,20 +48,17 @@ createUser params = createUsersWithArrayInput : { onSend : Result Http.Error () -> msg - - , body : User - - } -> Cmd msg createUsersWithArrayInput params = Http.request { method = "POST" , headers = List.filterMap identity [] - , url = Url.crossOrigin basePath - ["user", "createWithArray"] - (List.filterMap identity []) + , url = + Url.crossOrigin basePath + [ "user", "createWithArray" ] + (List.filterMap identity []) , body = Http.jsonBody <| User.encode params.body , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -76,20 +68,17 @@ createUsersWithArrayInput params = createUsersWithListInput : { onSend : Result Http.Error () -> msg - - , body : User - - } -> Cmd msg createUsersWithListInput params = Http.request { method = "POST" , headers = List.filterMap identity [] - , url = Url.crossOrigin basePath - ["user", "createWithList"] - (List.filterMap identity []) + , url = + Url.crossOrigin basePath + [ "user", "createWithList" ] + (List.filterMap identity []) , body = Http.jsonBody <| User.encode params.body , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -101,20 +90,17 @@ createUsersWithListInput params = -} deleteUser : { onSend : Result Http.Error () -> msg - - - , username : String - } -> Cmd msg deleteUser params = Http.request { method = "DELETE" , headers = List.filterMap identity [] - , url = Url.crossOrigin basePath - ["user", identity params.username] - (List.filterMap identity []) + , url = + Url.crossOrigin basePath + [ "user", identity params.username ] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -124,20 +110,17 @@ deleteUser params = getUserByName : { onSend : Result Http.Error User -> msg - - - , username : String - } -> Cmd msg getUserByName params = Http.request { method = "GET" , headers = List.filterMap identity [] - , url = Url.crossOrigin basePath - ["user", identity params.username] - (List.filterMap identity []) + , url = + Url.crossOrigin basePath + [ "user", identity params.username ] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectJson params.onSend User.decoder , timeout = Just 30000 @@ -147,20 +130,18 @@ getUserByName params = loginUser : { onSend : Result Http.Error String -> msg - - - - - , username : String , password : String + , username : String + , password : String } -> Cmd msg loginUser params = Http.request { method = "GET" , headers = List.filterMap identity [] - , url = Url.crossOrigin basePath - ["user", "login"] - (List.filterMap identity [(Just << Url.string "username" << identity) params.username, (Just << Url.string "password" << identity) params.password]) + , url = + Url.crossOrigin basePath + [ "user", "login" ] + (List.filterMap identity [ (Just << Url.string "username" << identity) params.username, (Just << Url.string "password" << identity) params.password ]) , body = Http.emptyBody , expect = Http.expectJson params.onSend Decode.string , timeout = Just 30000 @@ -170,20 +151,16 @@ loginUser params = logoutUser : { onSend : Result Http.Error () -> msg - - - - - } -> Cmd msg logoutUser params = Http.request { method = "GET" , headers = List.filterMap identity [] - , url = Url.crossOrigin basePath - ["user", "logout"] - (List.filterMap identity []) + , url = + Url.crossOrigin basePath + [ "user", "logout" ] + (List.filterMap identity []) , body = Http.emptyBody , expect = Http.expectWhatever params.onSend , timeout = Just 30000 @@ -195,20 +172,18 @@ logoutUser params = -} updateUser : { onSend : Result Http.Error () -> msg - - , body : User , username : String - } -> Cmd msg updateUser params = Http.request { method = "PUT" , headers = List.filterMap identity [] - , url = Url.crossOrigin basePath - ["user", identity params.username] - (List.filterMap identity []) + , url = + Url.crossOrigin basePath + [ "user", identity params.username ] + (List.filterMap identity []) , body = Http.jsonBody <| User.encode params.body , expect = Http.expectWhatever params.onSend , timeout = Just 30000 diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/PetApi.java index efb3cbcbfbe2..e3c3887af616 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/PetApi.java @@ -147,7 +147,7 @@ public Response updatePet(@ApiParam(value = "Pet object that needs to be added t }, tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) { + public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId, @FormParam(value = "name") String name, @FormParam(value = "status") String status) { return delegate.updatePetWithForm(petId, name, status, securityContext); } From dfabb1503a70275af5e8ecbcb284f2399dec8b05 Mon Sep 17 00:00:00 2001 From: Arun Date: Tue, 15 Oct 2019 11:03:13 +0530 Subject: [PATCH 009/142] Add missing keywords in swift (#4153) --- .../openapitools/codegen/languages/SwiftClientCodegen.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java index d4e06cc01a9d..7f3b52998876 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java @@ -136,6 +136,7 @@ public SwiftClientCodegen() { "ErrorResponse", // swift keywords + // https://docs.swift.org/swift-book/ReferenceManual/LexicalStructure.html Section: Keywords and Punctuation "Int", "Int32", "Int64", "Int64", "Float", "Double", "Bool", "Void", "String", "Character", "AnyObject", "class", "Class", "break", "as", "associativity", "deinit", "case", "dynamicType", "convenience", "enum", "continue", "false", "dynamic", "extension", "default", "is", "didSet", "func", "do", "nil", "final", "import", "else", @@ -143,7 +144,8 @@ public SwiftClientCodegen() { "true", "lazy", "operator", "in", "COLUMN", "left", "private", "return", "FILE", "mutating", "protocol", "switch", "FUNCTION", "none", "public", "where", "LINE", "nonmutating", "static", "while", "optional", "struct", "override", "subscript", "postfix", "typealias", "precedence", "var", "prefix", "Protocol", - "required", "right", "set", "Type", "unowned", "weak", "Data") + "required", "right", "set", "Type", "unowned", "weak", "Data","fileprivate", "open", "rethrows", "defer", + "guard", "repeat", "Any", "catch", "throw", "throws", "try", "indirect", "willSet") ); typeMapping = new HashMap(); From fead3eef76b80e3da089780c29ad6d4aea46f827 Mon Sep 17 00:00:00 2001 From: Kevin Mahoney Date: Tue, 15 Oct 2019 07:33:48 +0100 Subject: [PATCH 010/142] [elm] fix code generation for nullable types (#4136) --- .../src/main/resources/elm/recordFieldEncoder.mustache | 2 +- .../src/main/resources/elm/recordFieldValueDecoder.mustache | 2 +- .../src/main/resources/elm/recordFieldValueEncoder.mustache | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/elm/recordFieldEncoder.mustache b/modules/openapi-generator/src/main/resources/elm/recordFieldEncoder.mustache index 4bfef791c487..2a48bbc31b4e 100644 --- a/modules/openapi-generator/src/main/resources/elm/recordFieldEncoder.mustache +++ b/modules/openapi-generator/src/main/resources/elm/recordFieldEncoder.mustache @@ -1 +1 @@ -( "{{baseName}}", {{#discriminatorValue}}Encode.string "{{discriminatorValue}}"{{/discriminatorValue}}{{^discriminatorValue}}{{^required}}{{^isNullable}}Maybe.withDefault Encode.null (Maybe.map {{/isNullable}}{{/required}}{{>recordFieldValueEncoder}} model.{{name}}{{^required}}{{^isNullable}}){{/isNullable}}{{/required}}{{/discriminatorValue}} ) \ No newline at end of file +( "{{baseName}}", {{#discriminatorValue}}Encode.string "{{discriminatorValue}}"{{/discriminatorValue}}{{^discriminatorValue}}{{^required}}{{^isNullable}}Maybe.withDefault Encode.null (Maybe.map {{/isNullable}}{{/required}}{{>recordFieldValueEncoder}} model.{{name}}{{#isNullable}}){{/isNullable}}{{^required}}{{^isNullable}}){{/isNullable}}{{/required}}{{/discriminatorValue}} ) \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/elm/recordFieldValueDecoder.mustache b/modules/openapi-generator/src/main/resources/elm/recordFieldValueDecoder.mustache index 03a57989f134..f461987d5c15 100644 --- a/modules/openapi-generator/src/main/resources/elm/recordFieldValueDecoder.mustache +++ b/modules/openapi-generator/src/main/resources/elm/recordFieldValueDecoder.mustache @@ -1 +1 @@ -{{#isNullable}}(Decode.nullable {{/isNullable}}{{#isContainer}}({{#isListContainer}}Decode.list{{/isListContainer}}{{#isMapContainer}}Decode.dict{{/isMapContainer}} {{#items}}{{>recordFieldValueDecoder}}{{/items}}){{/isContainer}}{{^isContainer}}{{vendorExtensions.elmDecoder}}{{/isContainer}}{{#isNullable}}) {{{defaultValue}}}{{/isNullable}} \ No newline at end of file +{{#isNullable}}(Decode.nullable {{/isNullable}}{{#isContainer}}({{#isListContainer}}Decode.list{{/isListContainer}}{{#isMapContainer}}Decode.dict{{/isMapContainer}} {{#items}}{{>recordFieldValueDecoder}}{{/items}}){{/isContainer}}{{^isContainer}}{{vendorExtensions.elmDecoder}}{{/isContainer}}{{#isNullable}}){{^required}} {{{defaultValue}}}{{/required}}{{/isNullable}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/elm/recordFieldValueEncoder.mustache b/modules/openapi-generator/src/main/resources/elm/recordFieldValueEncoder.mustache index 88a3d811a032..ecd856a1a7f6 100644 --- a/modules/openapi-generator/src/main/resources/elm/recordFieldValueEncoder.mustache +++ b/modules/openapi-generator/src/main/resources/elm/recordFieldValueEncoder.mustache @@ -1 +1 @@ -{{#isNullable}}Maybe.withDefault Encode.null (Maybe.map {{/isNullable}}{{#isContainer}}({{#isListContainer}}Encode.list{{#isElm018}} << List.map{{/isElm018}}{{/isListContainer}}{{#isMapContainer}}Encode.dict identity{{/isMapContainer}} {{#items}}{{>recordFieldValueEncoder}}{{/items}}{{/isContainer}}{{^isContainer}}{{vendorExtensions.elmEncoder}}{{/isContainer}}{{#isContainer}}){{/isContainer}}{{#isNullable}}){{/isNullable}} \ No newline at end of file +{{#isNullable}}Maybe.withDefault Encode.null (Maybe.map {{/isNullable}}{{#isContainer}}({{#isListContainer}}Encode.list{{#isElm018}} << List.map{{/isElm018}}{{/isListContainer}}{{#isMapContainer}}Encode.dict identity{{/isMapContainer}} {{#items}}{{>recordFieldValueEncoder}}{{/items}}{{/isContainer}}{{^isContainer}}{{vendorExtensions.elmEncoder}}{{/isContainer}}{{#isContainer}}){{/isContainer}} \ No newline at end of file From 5de0f0115036c02c173846633cd988d394c5f377 Mon Sep 17 00:00:00 2001 From: snebjorn Date: Tue, 15 Oct 2019 08:35:58 +0200 Subject: [PATCH 011/142] sanitizes model names so they're valid class/interface names fixes #4097 (#4127) --- .../codegen/InlineModelResolver.java | 55 +++++++++++-------- .../codegen/InlineModelResolverTest.java | 29 ++++++++++ 2 files changed, 60 insertions(+), 24 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java index 8910c16f8a49..8201a27b040e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java @@ -426,17 +426,22 @@ private void fixStringModel(Schema m) { * Generates a unique model name. Non-alphanumeric characters will be replaced * with underscores * + * e.g. io.schema.User_name => io_schema_User_name + * * @param title String title field in the schema if present * @param key String model name + * + * @return if provided the sanitized {@code title}, else the sanitized {@code key} */ private String resolveModelName(String title, String key) { if (title == null) { - // for auto-generated schema name, replace non-alphanumeric characters with underscore - // to avoid bugs with schema look up with inline schema created on the fly - // e.g. io.schema.User_name => io_schema_User_name - return uniqueName(key).replaceAll("[^A-Za-z0-9]", "_"); + if (key == null) { + LOGGER.warn("Found an inline schema without the `title` attribute. Default the model name to InlineObject instead. To have better control of the model naming, define the model separately so that it can be reused throughout the spec."); + return uniqueName("InlineObject"); + } + return uniqueName(sanitizeName(key)); } else { - return uniqueName(title); + return uniqueName(sanitizeName(title)); } } @@ -452,29 +457,31 @@ private void addGenerated(String name, Schema model) { generatedSignature.put(Json.pretty(model), name); } - private String uniqueName(String key) { - if (key == null) { - key = "InlineObject"; - LOGGER.warn("Found an inline schema without the `title` attribute. Default the model name to InlineObject instead. To have better control of the model naming, define the model separately so that it can be reused throughout the spec."); + /** + * Sanitizes the input so that it's valid name for a class or interface + * + * e.g. 12.schema.User name => _2_schema_User_name + */ + private String sanitizeName(final String name) { + return name + .replaceAll("^[0-9]", "_") // e.g. 12object => _2object + .replaceAll("[^A-Za-z0-9]", "_"); // e.g. io.schema.User name => io_schema_User_name + } + + private String uniqueName(final String name) { + if (openapi.getComponents().getSchemas() == null) { + return name; } + + String uniqueName = name; int count = 0; - boolean done = false; - key = key.replaceAll("/", "_"); // e.g. /me/videos => _me_videos - key = key.replaceAll("[^a-z_\\.A-Z0-9 ]", ""); // FIXME: a parameter - // should not be assigned. Also declare the methods parameters as 'final'. - while (!done) { - String name = key; - if (count > 0) { - name = key + "_" + count; - } - if (openapi.getComponents().getSchemas() == null) { - return name; - } else if (!openapi.getComponents().getSchemas().containsKey(name)) { - return name; + while (true) { + if (!openapi.getComponents().getSchemas().containsKey(uniqueName)) { + return uniqueName; } - count += 1; + uniqueName = name + "_" + ++count; } - return key; + // TODO it would probably be a good idea to check against a list of used uniqueNames to make sure there are no collisions } private void flattenProperties(Map properties, String path) { diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/InlineModelResolverTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/InlineModelResolverTest.java index fec2422d7f48..227a75f71b6d 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/InlineModelResolverTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/InlineModelResolverTest.java @@ -100,6 +100,35 @@ public void resolveInlineModelTestWithTitle() { assertNotNull(address.getProperties().get("street")); } + @Test + public void resolveInlineModelTestWithTitleWithSpaces() { + OpenAPI openapi = new OpenAPI(); + openapi.setComponents(new Components()); + openapi.getComponents().addSchemas("User", new ObjectSchema() + .name("user") + .description("a common user") + .addProperties("name", new StringSchema()) + .addProperties("address", new ObjectSchema() + .title("User Address Title") + .readOnly(false) + .description("description") + .name("name") + .addProperties("street", new StringSchema()) + .addProperties("city", new StringSchema()))); + + new InlineModelResolver().flatten(openapi); + + Schema user = openapi.getComponents().getSchemas().get("User"); + + assertNotNull(user); + assertTrue(user.getProperties().get("address") instanceof Schema); + + Schema address = openapi.getComponents().getSchemas().get("User_Address_Title"); + assertNotNull(address); + assertNotNull(address.getProperties().get("city")); + assertNotNull(address.getProperties().get("street")); + } + @Test public void resolveInlineModel2EqualInnerModels() { OpenAPI openapi = new OpenAPI(); From 450153d4e00a770df067d189a794881a80cf716f Mon Sep 17 00:00:00 2001 From: sunn <33183834+etherealjoy@users.noreply.github.com> Date: Tue, 15 Oct 2019 08:45:08 +0200 Subject: [PATCH 012/142] Add missing supporting files when prefix is provided (#4132) --- .../org/openapitools/codegen/languages/CppQt5ClientCodegen.java | 2 ++ .../src/main/resources/cpp-qt5-client/helpers-body.mustache | 2 +- .../resources/cpp-qt5-qhttpengine-server/helpers-body.mustache | 2 +- samples/client/petstore/cpp-qt5/.openapi-generator/VERSION | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java index 73897d8cf74d..29beb10a50c1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java @@ -103,6 +103,8 @@ public void processOpts() { supportingFiles.add(new SupportingFile("helpers-body.mustache", sourceFolder, modelNamePrefix + "Helpers.cpp")); supportingFiles.add(new SupportingFile("HttpRequest.h.mustache", sourceFolder, modelNamePrefix + "HttpRequest.h")); supportingFiles.add(new SupportingFile("HttpRequest.cpp.mustache", sourceFolder, modelNamePrefix + "HttpRequest.cpp")); + supportingFiles.add(new SupportingFile("HttpFileElement.h.mustache", sourceFolder, modelNamePrefix + "HttpFileElement.h")); + supportingFiles.add(new SupportingFile("HttpFileElement.cpp.mustache", sourceFolder, modelNamePrefix + "HttpFileElement.cpp")); supportingFiles.add(new SupportingFile("object.mustache", sourceFolder, modelNamePrefix + "Object.h")); supportingFiles.add(new SupportingFile("enum.mustache", sourceFolder, modelNamePrefix + "Enum.h")); diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/helpers-body.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/helpers-body.mustache index 9b97b53e52c9..b6a8ee4b2dc1 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/helpers-body.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/helpers-body.mustache @@ -228,7 +228,7 @@ fromStringValue(const QString &inStr, {{prefix}}Enum &value){ } bool -fromStringValue(const QString &inStr, OAIHttpFileElement &value){ +fromStringValue(const QString &inStr, {{prefix}}HttpFileElement &value){ return value.fromStringValue(inStr); } diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/helpers-body.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/helpers-body.mustache index 9b97b53e52c9..b6a8ee4b2dc1 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/helpers-body.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/helpers-body.mustache @@ -228,7 +228,7 @@ fromStringValue(const QString &inStr, {{prefix}}Enum &value){ } bool -fromStringValue(const QString &inStr, OAIHttpFileElement &value){ +fromStringValue(const QString &inStr, {{prefix}}HttpFileElement &value){ return value.fromStringValue(inStr); } diff --git a/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION b/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION index d1a8f58b3884..c3a2c7076fa8 100644 --- a/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.2-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file From 3693d608403c2bf5c01d2a25db2da4b26e2e78b8 Mon Sep 17 00:00:00 2001 From: Hippolyte HENRY Date: Tue, 15 Oct 2019 08:46:45 +0200 Subject: [PATCH 013/142] Add newline between function signature of operation and summary of operation (#4112) * Add newline after function signature * update Petstore * [go] Add newline after function signature * update petstore --- .../resources/go-experimental/api_doc.mustache | 1 + .../src/main/resources/go/api_doc.mustache | 1 + .../go-petstore/docs/AnotherFakeApi.md | 1 + .../go-experimental/go-petstore/docs/FakeApi.md | 14 ++++++++++++++ .../go-petstore/docs/FakeClassnameTags123Api.md | 1 + .../go-experimental/go-petstore/docs/PetApi.md | 9 +++++++++ .../go-experimental/go-petstore/docs/StoreApi.md | 4 ++++ .../go-experimental/go-petstore/docs/UserApi.md | 8 ++++++++ .../petstore/go/go-petstore/docs/AnotherFakeApi.md | 1 + .../client/petstore/go/go-petstore/docs/FakeApi.md | 14 ++++++++++++++ .../go/go-petstore/docs/FakeClassnameTags123Api.md | 1 + .../client/petstore/go/go-petstore/docs/PetApi.md | 9 +++++++++ .../petstore/go/go-petstore/docs/StoreApi.md | 4 ++++ .../client/petstore/go/go-petstore/docs/UserApi.md | 8 ++++++++ .../go-petstore/docs/AnotherFakeApi.md | 1 + .../go-experimental/go-petstore/docs/DefaultApi.md | 1 + .../go-experimental/go-petstore/docs/FakeApi.md | 14 ++++++++++++++ .../go-petstore/docs/FakeClassnameTags123Api.md | 1 + .../go-experimental/go-petstore/docs/PetApi.md | 9 +++++++++ .../go-experimental/go-petstore/docs/StoreApi.md | 4 ++++ .../go-experimental/go-petstore/docs/UserApi.md | 8 ++++++++ .../petstore/go/go-petstore/docs/AnotherFakeApi.md | 1 + .../petstore/go/go-petstore/docs/DefaultApi.md | 1 + .../client/petstore/go/go-petstore/docs/FakeApi.md | 14 ++++++++++++++ .../go/go-petstore/docs/FakeClassnameTags123Api.md | 1 + .../client/petstore/go/go-petstore/docs/PetApi.md | 9 +++++++++ .../petstore/go/go-petstore/docs/StoreApi.md | 4 ++++ .../client/petstore/go/go-petstore/docs/UserApi.md | 8 ++++++++ 28 files changed, 152 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/go-experimental/api_doc.mustache b/modules/openapi-generator/src/main/resources/go-experimental/api_doc.mustache index 2ac67bb22210..d7eda37d714e 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/api_doc.mustache @@ -15,6 +15,7 @@ Method | HTTP request | Description ## {{{operationId}}} > {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}(ctx, {{#allParams}}{{#required}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}}optional{{/hasOptionalParams}}) + {{{summary}}}{{#notes}} {{{notes}}}{{/notes}} diff --git a/modules/openapi-generator/src/main/resources/go/api_doc.mustache b/modules/openapi-generator/src/main/resources/go/api_doc.mustache index 2ac67bb22210..d7eda37d714e 100644 --- a/modules/openapi-generator/src/main/resources/go/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/go/api_doc.mustache @@ -15,6 +15,7 @@ Method | HTTP request | Description ## {{{operationId}}} > {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}(ctx, {{#allParams}}{{#required}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}}optional{{/hasOptionalParams}}) + {{{summary}}}{{#notes}} {{{notes}}}{{/notes}} diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md b/samples/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md index 0b9deb0c58a5..2c22f8f1b307 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md @@ -11,6 +11,7 @@ Method | HTTP request | Description ## Call123TestSpecialTags > Client Call123TestSpecialTags(ctx, body) + To test special tags To test special tags and operation ID starting with number diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md b/samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md index 9aaf2e63a96f..1d85fdf9d313 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md @@ -24,6 +24,7 @@ Method | HTTP request | Description ## CreateXmlItem > CreateXmlItem(ctx, xmlItem) + creates an XmlItem this route creates an XmlItem @@ -59,6 +60,7 @@ No authorization required > bool FakeOuterBooleanSerialize(ctx, optional) + Test serialization of outer boolean types ### Required Parameters @@ -101,6 +103,7 @@ No authorization required > OuterComposite FakeOuterCompositeSerialize(ctx, optional) + Test serialization of object with outer number type ### Required Parameters @@ -143,6 +146,7 @@ No authorization required > float32 FakeOuterNumberSerialize(ctx, optional) + Test serialization of outer number types ### Required Parameters @@ -185,6 +189,7 @@ No authorization required > string FakeOuterStringSerialize(ctx, optional) + Test serialization of outer string types ### Required Parameters @@ -227,6 +232,7 @@ No authorization required > TestBodyWithFileSchema(ctx, body) + For this test, the body for this request much reference a schema named `File`. ### Required Parameters @@ -260,6 +266,7 @@ No authorization required > TestBodyWithQueryParams(ctx, query, body) + ### Required Parameters @@ -290,6 +297,7 @@ No authorization required ## TestClientModel > Client TestClientModel(ctx, body) + To test \"client\" model To test \"client\" model @@ -323,6 +331,7 @@ No authorization required ## TestEndpointParameters > TestEndpointParameters(ctx, number, double, patternWithoutDelimiter, byte_, optional) + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -382,6 +391,7 @@ Name | Type | Description | Notes ## TestEnumParameters > TestEnumParameters(ctx, optional) + To test enum parameters To test enum parameters @@ -431,6 +441,7 @@ No authorization required ## TestGroupParameters > TestGroupParameters(ctx, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, optional) + Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) @@ -481,6 +492,7 @@ No authorization required ## TestInlineAdditionalProperties > TestInlineAdditionalProperties(ctx, param) + test inline additionalProperties ### Required Parameters @@ -512,6 +524,7 @@ No authorization required ## TestJsonFormData > TestJsonFormData(ctx, param, param2) + test json serialization of form data ### Required Parameters @@ -546,6 +559,7 @@ No authorization required > TestQueryParameterCollectionFormat(ctx, pipe, ioutil, http, url, context) + To test the collection format in query parameters ### Required Parameters diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md b/samples/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md index b3cbcc2c06e1..224542b70517 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md @@ -11,6 +11,7 @@ Method | HTTP request | Description ## TestClassname > Client TestClassname(ctx, body) + To test class name in snake case To test class name in snake case diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/PetApi.md b/samples/client/petstore/go-experimental/go-petstore/docs/PetApi.md index de48d4b6763c..6ee9afef754b 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/PetApi.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/PetApi.md @@ -19,6 +19,7 @@ Method | HTTP request | Description ## AddPet > AddPet(ctx, body) + Add a new pet to the store ### Required Parameters @@ -50,6 +51,7 @@ Name | Type | Description | Notes ## DeletePet > DeletePet(ctx, petId, optional) + Deletes a pet ### Required Parameters @@ -92,6 +94,7 @@ Name | Type | Description | Notes ## FindPetsByStatus > []Pet FindPetsByStatus(ctx, status) + Finds Pets by status Multiple status values can be provided with comma separated strings @@ -125,6 +128,7 @@ Name | Type | Description | Notes ## FindPetsByTags > []Pet FindPetsByTags(ctx, tags) + Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -158,6 +162,7 @@ Name | Type | Description | Notes ## GetPetById > Pet GetPetById(ctx, petId) + Find pet by ID Returns a single pet @@ -191,6 +196,7 @@ Name | Type | Description | Notes ## UpdatePet > UpdatePet(ctx, body) + Update an existing pet ### Required Parameters @@ -222,6 +228,7 @@ Name | Type | Description | Notes ## UpdatePetWithForm > UpdatePetWithForm(ctx, petId, optional) + Updates a pet in the store with form data ### Required Parameters @@ -265,6 +272,7 @@ Name | Type | Description | Notes ## UploadFile > ApiResponse UploadFile(ctx, petId, optional) + uploads an image ### Required Parameters @@ -308,6 +316,7 @@ Name | Type | Description | Notes ## UploadFileWithRequiredFile > ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional) + uploads an image (required) ### Required Parameters diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/StoreApi.md b/samples/client/petstore/go-experimental/go-petstore/docs/StoreApi.md index 083ed777590f..531ab09ff688 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/StoreApi.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/StoreApi.md @@ -14,6 +14,7 @@ Method | HTTP request | Description ## DeleteOrder > DeleteOrder(ctx, orderId) + Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -47,6 +48,7 @@ No authorization required ## GetInventory > map[string]int32 GetInventory(ctx, ) + Returns pet inventories by status Returns a map of status codes to quantities @@ -76,6 +78,7 @@ This endpoint does not need any parameter. ## GetOrderById > Order GetOrderById(ctx, orderId) + Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -109,6 +112,7 @@ No authorization required ## PlaceOrder > Order PlaceOrder(ctx, body) + Place an order for a pet ### Required Parameters diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/UserApi.md b/samples/client/petstore/go-experimental/go-petstore/docs/UserApi.md index 3201e1771dc8..d9f16bb5fb0e 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/UserApi.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/UserApi.md @@ -18,6 +18,7 @@ Method | HTTP request | Description ## CreateUser > CreateUser(ctx, body) + Create user This can only be done by the logged in user. @@ -51,6 +52,7 @@ No authorization required ## CreateUsersWithArrayInput > CreateUsersWithArrayInput(ctx, body) + Creates list of users with given input array ### Required Parameters @@ -82,6 +84,7 @@ No authorization required ## CreateUsersWithListInput > CreateUsersWithListInput(ctx, body) + Creates list of users with given input array ### Required Parameters @@ -113,6 +116,7 @@ No authorization required ## DeleteUser > DeleteUser(ctx, username) + Delete user This can only be done by the logged in user. @@ -146,6 +150,7 @@ No authorization required ## GetUserByName > User GetUserByName(ctx, username) + Get user by user name ### Required Parameters @@ -177,6 +182,7 @@ No authorization required ## LoginUser > string LoginUser(ctx, username, password) + Logs user into the system ### Required Parameters @@ -209,6 +215,7 @@ No authorization required ## LogoutUser > LogoutUser(ctx, ) + Logs out current logged in user session ### Required Parameters @@ -236,6 +243,7 @@ No authorization required ## UpdateUser > UpdateUser(ctx, username, body) + Updated user This can only be done by the logged in user. diff --git a/samples/client/petstore/go/go-petstore/docs/AnotherFakeApi.md b/samples/client/petstore/go/go-petstore/docs/AnotherFakeApi.md index 0b9deb0c58a5..2c22f8f1b307 100644 --- a/samples/client/petstore/go/go-petstore/docs/AnotherFakeApi.md +++ b/samples/client/petstore/go/go-petstore/docs/AnotherFakeApi.md @@ -11,6 +11,7 @@ Method | HTTP request | Description ## Call123TestSpecialTags > Client Call123TestSpecialTags(ctx, body) + To test special tags To test special tags and operation ID starting with number diff --git a/samples/client/petstore/go/go-petstore/docs/FakeApi.md b/samples/client/petstore/go/go-petstore/docs/FakeApi.md index 9aaf2e63a96f..1d85fdf9d313 100644 --- a/samples/client/petstore/go/go-petstore/docs/FakeApi.md +++ b/samples/client/petstore/go/go-petstore/docs/FakeApi.md @@ -24,6 +24,7 @@ Method | HTTP request | Description ## CreateXmlItem > CreateXmlItem(ctx, xmlItem) + creates an XmlItem this route creates an XmlItem @@ -59,6 +60,7 @@ No authorization required > bool FakeOuterBooleanSerialize(ctx, optional) + Test serialization of outer boolean types ### Required Parameters @@ -101,6 +103,7 @@ No authorization required > OuterComposite FakeOuterCompositeSerialize(ctx, optional) + Test serialization of object with outer number type ### Required Parameters @@ -143,6 +146,7 @@ No authorization required > float32 FakeOuterNumberSerialize(ctx, optional) + Test serialization of outer number types ### Required Parameters @@ -185,6 +189,7 @@ No authorization required > string FakeOuterStringSerialize(ctx, optional) + Test serialization of outer string types ### Required Parameters @@ -227,6 +232,7 @@ No authorization required > TestBodyWithFileSchema(ctx, body) + For this test, the body for this request much reference a schema named `File`. ### Required Parameters @@ -260,6 +266,7 @@ No authorization required > TestBodyWithQueryParams(ctx, query, body) + ### Required Parameters @@ -290,6 +297,7 @@ No authorization required ## TestClientModel > Client TestClientModel(ctx, body) + To test \"client\" model To test \"client\" model @@ -323,6 +331,7 @@ No authorization required ## TestEndpointParameters > TestEndpointParameters(ctx, number, double, patternWithoutDelimiter, byte_, optional) + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -382,6 +391,7 @@ Name | Type | Description | Notes ## TestEnumParameters > TestEnumParameters(ctx, optional) + To test enum parameters To test enum parameters @@ -431,6 +441,7 @@ No authorization required ## TestGroupParameters > TestGroupParameters(ctx, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, optional) + Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) @@ -481,6 +492,7 @@ No authorization required ## TestInlineAdditionalProperties > TestInlineAdditionalProperties(ctx, param) + test inline additionalProperties ### Required Parameters @@ -512,6 +524,7 @@ No authorization required ## TestJsonFormData > TestJsonFormData(ctx, param, param2) + test json serialization of form data ### Required Parameters @@ -546,6 +559,7 @@ No authorization required > TestQueryParameterCollectionFormat(ctx, pipe, ioutil, http, url, context) + To test the collection format in query parameters ### Required Parameters diff --git a/samples/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md b/samples/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md index b3cbcc2c06e1..224542b70517 100644 --- a/samples/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md @@ -11,6 +11,7 @@ Method | HTTP request | Description ## TestClassname > Client TestClassname(ctx, body) + To test class name in snake case To test class name in snake case diff --git a/samples/client/petstore/go/go-petstore/docs/PetApi.md b/samples/client/petstore/go/go-petstore/docs/PetApi.md index de48d4b6763c..6ee9afef754b 100644 --- a/samples/client/petstore/go/go-petstore/docs/PetApi.md +++ b/samples/client/petstore/go/go-petstore/docs/PetApi.md @@ -19,6 +19,7 @@ Method | HTTP request | Description ## AddPet > AddPet(ctx, body) + Add a new pet to the store ### Required Parameters @@ -50,6 +51,7 @@ Name | Type | Description | Notes ## DeletePet > DeletePet(ctx, petId, optional) + Deletes a pet ### Required Parameters @@ -92,6 +94,7 @@ Name | Type | Description | Notes ## FindPetsByStatus > []Pet FindPetsByStatus(ctx, status) + Finds Pets by status Multiple status values can be provided with comma separated strings @@ -125,6 +128,7 @@ Name | Type | Description | Notes ## FindPetsByTags > []Pet FindPetsByTags(ctx, tags) + Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -158,6 +162,7 @@ Name | Type | Description | Notes ## GetPetById > Pet GetPetById(ctx, petId) + Find pet by ID Returns a single pet @@ -191,6 +196,7 @@ Name | Type | Description | Notes ## UpdatePet > UpdatePet(ctx, body) + Update an existing pet ### Required Parameters @@ -222,6 +228,7 @@ Name | Type | Description | Notes ## UpdatePetWithForm > UpdatePetWithForm(ctx, petId, optional) + Updates a pet in the store with form data ### Required Parameters @@ -265,6 +272,7 @@ Name | Type | Description | Notes ## UploadFile > ApiResponse UploadFile(ctx, petId, optional) + uploads an image ### Required Parameters @@ -308,6 +316,7 @@ Name | Type | Description | Notes ## UploadFileWithRequiredFile > ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional) + uploads an image (required) ### Required Parameters diff --git a/samples/client/petstore/go/go-petstore/docs/StoreApi.md b/samples/client/petstore/go/go-petstore/docs/StoreApi.md index 083ed777590f..531ab09ff688 100644 --- a/samples/client/petstore/go/go-petstore/docs/StoreApi.md +++ b/samples/client/petstore/go/go-petstore/docs/StoreApi.md @@ -14,6 +14,7 @@ Method | HTTP request | Description ## DeleteOrder > DeleteOrder(ctx, orderId) + Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -47,6 +48,7 @@ No authorization required ## GetInventory > map[string]int32 GetInventory(ctx, ) + Returns pet inventories by status Returns a map of status codes to quantities @@ -76,6 +78,7 @@ This endpoint does not need any parameter. ## GetOrderById > Order GetOrderById(ctx, orderId) + Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -109,6 +112,7 @@ No authorization required ## PlaceOrder > Order PlaceOrder(ctx, body) + Place an order for a pet ### Required Parameters diff --git a/samples/client/petstore/go/go-petstore/docs/UserApi.md b/samples/client/petstore/go/go-petstore/docs/UserApi.md index 3201e1771dc8..d9f16bb5fb0e 100644 --- a/samples/client/petstore/go/go-petstore/docs/UserApi.md +++ b/samples/client/petstore/go/go-petstore/docs/UserApi.md @@ -18,6 +18,7 @@ Method | HTTP request | Description ## CreateUser > CreateUser(ctx, body) + Create user This can only be done by the logged in user. @@ -51,6 +52,7 @@ No authorization required ## CreateUsersWithArrayInput > CreateUsersWithArrayInput(ctx, body) + Creates list of users with given input array ### Required Parameters @@ -82,6 +84,7 @@ No authorization required ## CreateUsersWithListInput > CreateUsersWithListInput(ctx, body) + Creates list of users with given input array ### Required Parameters @@ -113,6 +116,7 @@ No authorization required ## DeleteUser > DeleteUser(ctx, username) + Delete user This can only be done by the logged in user. @@ -146,6 +150,7 @@ No authorization required ## GetUserByName > User GetUserByName(ctx, username) + Get user by user name ### Required Parameters @@ -177,6 +182,7 @@ No authorization required ## LoginUser > string LoginUser(ctx, username, password) + Logs user into the system ### Required Parameters @@ -209,6 +215,7 @@ No authorization required ## LogoutUser > LogoutUser(ctx, ) + Logs out current logged in user session ### Required Parameters @@ -236,6 +243,7 @@ No authorization required ## UpdateUser > UpdateUser(ctx, username, body) + Updated user This can only be done by the logged in user. diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md index 9c6ce64e293b..fb674f202e19 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md @@ -11,6 +11,7 @@ Method | HTTP request | Description ## Call123TestSpecialTags > Client Call123TestSpecialTags(ctx, client) + To test special tags To test special tags and operation ID starting with number diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DefaultApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DefaultApi.md index 4fd0ab987209..daf779c8e3e7 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DefaultApi.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DefaultApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description > InlineResponseDefault FooGet(ctx, ) + ### Required Parameters This endpoint does not need any parameter. diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeApi.md index 0c11da8d7728..3634a8771e29 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeApi.md @@ -24,6 +24,7 @@ Method | HTTP request | Description ## FakeHealthGet > HealthCheckResult FakeHealthGet(ctx, ) + Health check endpoint ### Required Parameters @@ -53,6 +54,7 @@ No authorization required > bool FakeOuterBooleanSerialize(ctx, optional) + Test serialization of outer boolean types ### Required Parameters @@ -95,6 +97,7 @@ No authorization required > OuterComposite FakeOuterCompositeSerialize(ctx, optional) + Test serialization of object with outer number type ### Required Parameters @@ -137,6 +140,7 @@ No authorization required > float32 FakeOuterNumberSerialize(ctx, optional) + Test serialization of outer number types ### Required Parameters @@ -179,6 +183,7 @@ No authorization required > string FakeOuterStringSerialize(ctx, optional) + Test serialization of outer string types ### Required Parameters @@ -221,6 +226,7 @@ No authorization required > TestBodyWithFileSchema(ctx, fileSchemaTestClass) + For this test, the body for this request much reference a schema named `File`. ### Required Parameters @@ -254,6 +260,7 @@ No authorization required > TestBodyWithQueryParams(ctx, query, user) + ### Required Parameters @@ -284,6 +291,7 @@ No authorization required ## TestClientModel > Client TestClientModel(ctx, client) + To test \"client\" model To test \"client\" model @@ -317,6 +325,7 @@ No authorization required ## TestEndpointParameters > TestEndpointParameters(ctx, number, double, patternWithoutDelimiter, byte_, optional) + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -376,6 +385,7 @@ Name | Type | Description | Notes ## TestEnumParameters > TestEnumParameters(ctx, optional) + To test enum parameters To test enum parameters @@ -425,6 +435,7 @@ No authorization required ## TestGroupParameters > TestGroupParameters(ctx, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, optional) + Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) @@ -475,6 +486,7 @@ Name | Type | Description | Notes ## TestInlineAdditionalProperties > TestInlineAdditionalProperties(ctx, requestBody) + test inline additionalProperties ### Required Parameters @@ -506,6 +518,7 @@ No authorization required ## TestJsonFormData > TestJsonFormData(ctx, param, param2) + test json serialization of form data ### Required Parameters @@ -540,6 +553,7 @@ No authorization required > TestQueryParameterCollectionFormat(ctx, pipe, ioutil, http, url, context) + To test the collection format in query parameters ### Required Parameters diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md index 5bf7b3bcc991..b070326cc328 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md @@ -11,6 +11,7 @@ Method | HTTP request | Description ## TestClassname > Client TestClassname(ctx, client) + To test class name in snake case To test class name in snake case diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/PetApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/PetApi.md index c4f37589f0c2..8118df7009bc 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/PetApi.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/PetApi.md @@ -19,6 +19,7 @@ Method | HTTP request | Description ## AddPet > AddPet(ctx, pet) + Add a new pet to the store ### Required Parameters @@ -50,6 +51,7 @@ Name | Type | Description | Notes ## DeletePet > DeletePet(ctx, petId, optional) + Deletes a pet ### Required Parameters @@ -92,6 +94,7 @@ Name | Type | Description | Notes ## FindPetsByStatus > []Pet FindPetsByStatus(ctx, status) + Finds Pets by status Multiple status values can be provided with comma separated strings @@ -125,6 +128,7 @@ Name | Type | Description | Notes ## FindPetsByTags > []Pet FindPetsByTags(ctx, tags) + Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -158,6 +162,7 @@ Name | Type | Description | Notes ## GetPetById > Pet GetPetById(ctx, petId) + Find pet by ID Returns a single pet @@ -191,6 +196,7 @@ Name | Type | Description | Notes ## UpdatePet > UpdatePet(ctx, pet) + Update an existing pet ### Required Parameters @@ -222,6 +228,7 @@ Name | Type | Description | Notes ## UpdatePetWithForm > UpdatePetWithForm(ctx, petId, optional) + Updates a pet in the store with form data ### Required Parameters @@ -265,6 +272,7 @@ Name | Type | Description | Notes ## UploadFile > ApiResponse UploadFile(ctx, petId, optional) + uploads an image ### Required Parameters @@ -308,6 +316,7 @@ Name | Type | Description | Notes ## UploadFileWithRequiredFile > ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional) + uploads an image (required) ### Required Parameters diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/StoreApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/StoreApi.md index c7f9bbcee082..c24d87bbfd68 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/StoreApi.md @@ -14,6 +14,7 @@ Method | HTTP request | Description ## DeleteOrder > DeleteOrder(ctx, orderId) + Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -47,6 +48,7 @@ No authorization required ## GetInventory > map[string]int32 GetInventory(ctx, ) + Returns pet inventories by status Returns a map of status codes to quantities @@ -76,6 +78,7 @@ This endpoint does not need any parameter. ## GetOrderById > Order GetOrderById(ctx, orderId) + Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -109,6 +112,7 @@ No authorization required ## PlaceOrder > Order PlaceOrder(ctx, order) + Place an order for a pet ### Required Parameters diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/UserApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/UserApi.md index 6c443592e53f..01d05d555cf2 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/UserApi.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/UserApi.md @@ -18,6 +18,7 @@ Method | HTTP request | Description ## CreateUser > CreateUser(ctx, user) + Create user This can only be done by the logged in user. @@ -51,6 +52,7 @@ No authorization required ## CreateUsersWithArrayInput > CreateUsersWithArrayInput(ctx, user) + Creates list of users with given input array ### Required Parameters @@ -82,6 +84,7 @@ No authorization required ## CreateUsersWithListInput > CreateUsersWithListInput(ctx, user) + Creates list of users with given input array ### Required Parameters @@ -113,6 +116,7 @@ No authorization required ## DeleteUser > DeleteUser(ctx, username) + Delete user This can only be done by the logged in user. @@ -146,6 +150,7 @@ No authorization required ## GetUserByName > User GetUserByName(ctx, username) + Get user by user name ### Required Parameters @@ -177,6 +182,7 @@ No authorization required ## LoginUser > string LoginUser(ctx, username, password) + Logs user into the system ### Required Parameters @@ -209,6 +215,7 @@ No authorization required ## LogoutUser > LogoutUser(ctx, ) + Logs out current logged in user session ### Required Parameters @@ -236,6 +243,7 @@ No authorization required ## UpdateUser > UpdateUser(ctx, username, user) + Updated user This can only be done by the logged in user. diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md index 9c6ce64e293b..fb674f202e19 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md @@ -11,6 +11,7 @@ Method | HTTP request | Description ## Call123TestSpecialTags > Client Call123TestSpecialTags(ctx, client) + To test special tags To test special tags and operation ID starting with number diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md index 4fd0ab987209..daf779c8e3e7 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description > InlineResponseDefault FooGet(ctx, ) + ### Required Parameters This endpoint does not need any parameter. diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md index 0c11da8d7728..3634a8771e29 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md @@ -24,6 +24,7 @@ Method | HTTP request | Description ## FakeHealthGet > HealthCheckResult FakeHealthGet(ctx, ) + Health check endpoint ### Required Parameters @@ -53,6 +54,7 @@ No authorization required > bool FakeOuterBooleanSerialize(ctx, optional) + Test serialization of outer boolean types ### Required Parameters @@ -95,6 +97,7 @@ No authorization required > OuterComposite FakeOuterCompositeSerialize(ctx, optional) + Test serialization of object with outer number type ### Required Parameters @@ -137,6 +140,7 @@ No authorization required > float32 FakeOuterNumberSerialize(ctx, optional) + Test serialization of outer number types ### Required Parameters @@ -179,6 +183,7 @@ No authorization required > string FakeOuterStringSerialize(ctx, optional) + Test serialization of outer string types ### Required Parameters @@ -221,6 +226,7 @@ No authorization required > TestBodyWithFileSchema(ctx, fileSchemaTestClass) + For this test, the body for this request much reference a schema named `File`. ### Required Parameters @@ -254,6 +260,7 @@ No authorization required > TestBodyWithQueryParams(ctx, query, user) + ### Required Parameters @@ -284,6 +291,7 @@ No authorization required ## TestClientModel > Client TestClientModel(ctx, client) + To test \"client\" model To test \"client\" model @@ -317,6 +325,7 @@ No authorization required ## TestEndpointParameters > TestEndpointParameters(ctx, number, double, patternWithoutDelimiter, byte_, optional) + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -376,6 +385,7 @@ Name | Type | Description | Notes ## TestEnumParameters > TestEnumParameters(ctx, optional) + To test enum parameters To test enum parameters @@ -425,6 +435,7 @@ No authorization required ## TestGroupParameters > TestGroupParameters(ctx, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, optional) + Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) @@ -475,6 +486,7 @@ Name | Type | Description | Notes ## TestInlineAdditionalProperties > TestInlineAdditionalProperties(ctx, requestBody) + test inline additionalProperties ### Required Parameters @@ -506,6 +518,7 @@ No authorization required ## TestJsonFormData > TestJsonFormData(ctx, param, param2) + test json serialization of form data ### Required Parameters @@ -540,6 +553,7 @@ No authorization required > TestQueryParameterCollectionFormat(ctx, pipe, ioutil, http, url, context) + To test the collection format in query parameters ### Required Parameters diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md index 5bf7b3bcc991..b070326cc328 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md @@ -11,6 +11,7 @@ Method | HTTP request | Description ## TestClassname > Client TestClassname(ctx, client) + To test class name in snake case To test class name in snake case diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md index c4f37589f0c2..8118df7009bc 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md @@ -19,6 +19,7 @@ Method | HTTP request | Description ## AddPet > AddPet(ctx, pet) + Add a new pet to the store ### Required Parameters @@ -50,6 +51,7 @@ Name | Type | Description | Notes ## DeletePet > DeletePet(ctx, petId, optional) + Deletes a pet ### Required Parameters @@ -92,6 +94,7 @@ Name | Type | Description | Notes ## FindPetsByStatus > []Pet FindPetsByStatus(ctx, status) + Finds Pets by status Multiple status values can be provided with comma separated strings @@ -125,6 +128,7 @@ Name | Type | Description | Notes ## FindPetsByTags > []Pet FindPetsByTags(ctx, tags) + Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -158,6 +162,7 @@ Name | Type | Description | Notes ## GetPetById > Pet GetPetById(ctx, petId) + Find pet by ID Returns a single pet @@ -191,6 +196,7 @@ Name | Type | Description | Notes ## UpdatePet > UpdatePet(ctx, pet) + Update an existing pet ### Required Parameters @@ -222,6 +228,7 @@ Name | Type | Description | Notes ## UpdatePetWithForm > UpdatePetWithForm(ctx, petId, optional) + Updates a pet in the store with form data ### Required Parameters @@ -265,6 +272,7 @@ Name | Type | Description | Notes ## UploadFile > ApiResponse UploadFile(ctx, petId, optional) + uploads an image ### Required Parameters @@ -308,6 +316,7 @@ Name | Type | Description | Notes ## UploadFileWithRequiredFile > ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional) + uploads an image (required) ### Required Parameters diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md index c7f9bbcee082..c24d87bbfd68 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md @@ -14,6 +14,7 @@ Method | HTTP request | Description ## DeleteOrder > DeleteOrder(ctx, orderId) + Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -47,6 +48,7 @@ No authorization required ## GetInventory > map[string]int32 GetInventory(ctx, ) + Returns pet inventories by status Returns a map of status codes to quantities @@ -76,6 +78,7 @@ This endpoint does not need any parameter. ## GetOrderById > Order GetOrderById(ctx, orderId) + Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -109,6 +112,7 @@ No authorization required ## PlaceOrder > Order PlaceOrder(ctx, order) + Place an order for a pet ### Required Parameters diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md index 6c443592e53f..01d05d555cf2 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md @@ -18,6 +18,7 @@ Method | HTTP request | Description ## CreateUser > CreateUser(ctx, user) + Create user This can only be done by the logged in user. @@ -51,6 +52,7 @@ No authorization required ## CreateUsersWithArrayInput > CreateUsersWithArrayInput(ctx, user) + Creates list of users with given input array ### Required Parameters @@ -82,6 +84,7 @@ No authorization required ## CreateUsersWithListInput > CreateUsersWithListInput(ctx, user) + Creates list of users with given input array ### Required Parameters @@ -113,6 +116,7 @@ No authorization required ## DeleteUser > DeleteUser(ctx, username) + Delete user This can only be done by the logged in user. @@ -146,6 +150,7 @@ No authorization required ## GetUserByName > User GetUserByName(ctx, username) + Get user by user name ### Required Parameters @@ -177,6 +182,7 @@ No authorization required ## LoginUser > string LoginUser(ctx, username, password) + Logs user into the system ### Required Parameters @@ -209,6 +215,7 @@ No authorization required ## LogoutUser > LogoutUser(ctx, ) + Logs out current logged in user session ### Required Parameters @@ -236,6 +243,7 @@ No authorization required ## UpdateUser > UpdateUser(ctx, username, user) + Updated user This can only be done by the logged in user. From c1d5fe0c771f13f71f21fbb0a63a5ecb09a4bf71 Mon Sep 17 00:00:00 2001 From: Arun Date: Tue, 15 Oct 2019 12:24:24 +0530 Subject: [PATCH 014/142] Run all test cases against petstore server (#4150) --- samples/client/petstore/python/tests/test_api_client.py | 1 - samples/client/petstore/python/tests/test_pet_api.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/samples/client/petstore/python/tests/test_api_client.py b/samples/client/petstore/python/tests/test_api_client.py index a41dbaba9c9f..c9b9edd86c44 100644 --- a/samples/client/petstore/python/tests/test_api_client.py +++ b/samples/client/petstore/python/tests/test_api_client.py @@ -27,7 +27,6 @@ def setUp(self): def test_configuration(self): config = petstore_api.Configuration() - config.host = 'http://localhost/' config.api_key['api_key'] = '123456' config.api_key_prefix['api_key'] = 'PREFIX' diff --git a/samples/client/petstore/python/tests/test_pet_api.py b/samples/client/petstore/python/tests/test_pet_api.py index 4f38fbd6e176..80d34f6b5f21 100644 --- a/samples/client/petstore/python/tests/test_pet_api.py +++ b/samples/client/petstore/python/tests/test_pet_api.py @@ -24,7 +24,7 @@ import urllib3 -HOST = 'http://localhost/v2' +HOST = 'http://petstore.swagger.io/v2' class TimeoutWithEqual(urllib3.Timeout): @@ -104,13 +104,13 @@ def test_timeout(self): mock_pool = MockPoolManager(self) self.api_client.rest_client.pool_manager = mock_pool - mock_pool.expect_request('POST', 'http://localhost/v2/pet', + mock_pool.expect_request('POST', HOST + '/pet', body=json.dumps(self.api_client.sanitize_for_serialization(self.pet)), headers={'Content-Type': 'application/json', 'Authorization': 'Bearer ', 'User-Agent': 'OpenAPI-Generator/1.0.0/python'}, preload_content=True, timeout=TimeoutWithEqual(total=5)) - mock_pool.expect_request('POST', 'http://localhost/v2/pet', + mock_pool.expect_request('POST', HOST + '/pet', body=json.dumps(self.api_client.sanitize_for_serialization(self.pet)), headers={'Content-Type': 'application/json', 'Authorization': 'Bearer ', From dd08ea7a6b59492eabb0cd8bd410ec45c9235023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Courtine?= Date: Tue, 15 Oct 2019 14:59:37 +0200 Subject: [PATCH 015/142] [Rust] [Fix #3052] Handle optional and nullable parameters (#4016) This PR includes theses changes: - Handling "optional" parameters is not optional anymore. Handling an additional parameter for it makes templates more complicated, and IMO, it is not worth it (as discussed in issue, it is an "acceptable" breaking change). - Optional parameters are handled everywhere: path params, query params, form params... Generated sample code compiles (both hyper and reqwest libraries). --- .../src/main/resources/rust/api_doc.mustache | 2 +- .../main/resources/rust/hyper/api.mustache | 102 +++++++++++++++-- .../main/resources/rust/model_doc.mustache | 2 +- .../main/resources/rust/reqwest/api.mustache | 96 +++++++++++++++- .../rust-reqwest/.openapi-generator/VERSION | 1 + .../petstore/rust/.openapi-generator/VERSION | 1 + .../.openapi-generator/VERSION | 2 +- .../fileResponseTest/src/apis/default_api.rs | 9 +- .../hyper/petstore/.openapi-generator/VERSION | 2 +- .../rust/hyper/petstore/docs/ApiResponse.md | 6 +- .../rust/hyper/petstore/docs/Category.md | 4 +- .../rust/hyper/petstore/docs/Order.md | 12 +- .../petstore/rust/hyper/petstore/docs/Pet.md | 8 +- .../rust/hyper/petstore/docs/PetApi.md | 26 ++--- .../rust/hyper/petstore/docs/StoreApi.md | 6 +- .../petstore/rust/hyper/petstore/docs/Tag.md | 4 +- .../petstore/rust/hyper/petstore/docs/User.md | 16 +-- .../rust/hyper/petstore/docs/UserApi.md | 18 +-- .../rust/hyper/petstore/src/apis/pet_api.rs | 107 +++++++++++------- .../rust/hyper/petstore/src/apis/store_api.rs | 35 +++--- .../rust/hyper/petstore/src/apis/user_api.rs | 81 +++++++------ .../rust-test/.openapi-generator/VERSION | 2 +- .../rust/hyper/rust-test/docs/TypeTesting.md | 12 +- .../hyper/rust-test/src/apis/default_api.rs | 11 +- .../.openapi-generator/VERSION | 2 +- .../fileResponseTest/src/apis/default_api.rs | 2 + .../petstore/.openapi-generator/VERSION | 2 +- .../rust/reqwest/petstore/docs/ApiResponse.md | 6 +- .../rust/reqwest/petstore/docs/Category.md | 4 +- .../rust/reqwest/petstore/docs/Order.md | 12 +- .../rust/reqwest/petstore/docs/Pet.md | 8 +- .../rust/reqwest/petstore/docs/PetApi.md | 26 ++--- .../rust/reqwest/petstore/docs/StoreApi.md | 6 +- .../rust/reqwest/petstore/docs/Tag.md | 4 +- .../rust/reqwest/petstore/docs/User.md | 16 +-- .../rust/reqwest/petstore/docs/UserApi.md | 18 +-- .../rust/reqwest/petstore/src/apis/pet_api.rs | 36 ++++-- .../reqwest/petstore/src/apis/store_api.rs | 2 + .../reqwest/petstore/src/apis/user_api.rs | 2 + .../rust-test/.openapi-generator/VERSION | 2 +- .../reqwest/rust-test/docs/TypeTesting.md | 12 +- .../reqwest/rust-test/src/apis/default_api.rs | 2 + 42 files changed, 485 insertions(+), 242 deletions(-) create mode 100644 samples/client/petstore/rust-reqwest/.openapi-generator/VERSION create mode 100644 samples/client/petstore/rust/.openapi-generator/VERSION diff --git a/modules/openapi-generator/src/main/resources/rust/api_doc.mustache b/modules/openapi-generator/src/main/resources/rust/api_doc.mustache index df4b7d7f1499..87ae9d1e9e6f 100644 --- a/modules/openapi-generator/src/main/resources/rust/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/rust/api_doc.mustache @@ -25,7 +25,7 @@ Method | HTTP request | Description Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} {{#allParams}} -**{{{paramName}}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{{baseType}}}.md){{/isPrimitiveType}} | {{{description}}} | {{#required}}Required{{/required}} | {{#defaultValue}}[default to {{{defaultValue}}}]{{/defaultValue}} +**{{{paramName}}}** | {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{{baseType}}}.md){{/isPrimitiveType}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}} | {{{description}}} | {{#required}}[required]{{/required}} |{{#defaultValue}}[default to {{{defaultValue}}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache b/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache index d6974271fa86..c7a228ecebc8 100644 --- a/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache +++ b/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache @@ -1,6 +1,8 @@ {{>partial_header}} use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use hyper; use serde_json; @@ -24,17 +26,16 @@ impl {{{classname}}}Client { pub trait {{{classname}}} { {{#operations}} {{#operation}} - fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Box>>; + fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Box>>; {{/operation}} {{/operations}} } - impl{{{classname}}} for {{{classname}}}Client { {{#operations}} {{#operation}} - fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Box>> { - __internal_request::Request::new(hyper::Method::{{{httpMethod}}}, "{{{path}}}".to_string()) + fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::{{{httpMethod}}}, "{{{path}}}".to_string()) {{#hasAuthMethods}} {{#authMethods}} {{#isApiKey}} @@ -52,36 +53,113 @@ impl{{{classname}}} for {{{classname}}}Client { {{/isOAuth}} {{/authMethods}} {{/hasAuthMethods}} + ; {{#queryParams}} - .with_query_param("{{{baseName}}}".to_string(), {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()) + {{#required}} + {{^isNullable}} + req = req.with_query_param("{{{baseName}}}".to_string(), {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + {{/isNullable}} + {{#isNullable}} + match {{{paramName}}} { + Some(param_value) => { req = req.with_query_param("{{{baseName}}}".to_string(), param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); }, + None => { req = req.with_query_param("{{{baseName}}}".to_string(), "".to_string()); }, + } + {{/isNullable}} + {{/required}} + {{^required}} + if let Some(ref s) = {{{paramName}}} { + req = req.with_query_param("{{{baseName}}}".to_string(), s{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + } + {{/required}} {{/queryParams}} {{#pathParams}} - .with_path_param("{{{baseName}}}".to_string(), {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()) + {{#required}} + {{^isNullable}} + req = req.with_path_param("{{{baseName}}}".to_string(), {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + {{/isNullable}} + {{#isNullable}} + match {{{paramName}}} { + Some(param_value) => { req = req.with_path_param("{{{baseName}}}".to_string(), param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); }, + None => { req = req.with_path_param("{{{baseName}}}".to_string(), "".to_string()); }, + } + {{/isNullable}} + {{/required}} + {{^required}} + if let Some(param_value) = {{{paramName}}} { + req = req.with_path_param("{{{baseName}}}".to_string(), param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + } + {{/required}} {{/pathParams}} {{#hasHeaderParams}} {{#headerParams}} - .with_header_param("{{{baseName}}}".to_string(), {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()) + {{#required}} + {{^isNullable}} + req = req.with_header_param("{{{baseName}}}".to_string(), {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + {{/isNullable}} + {{#isNullable}} + match {{{paramName}}} { + Some(param_value) => { req = req.with_header_param("{{{baseName}}}".to_string(), param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); }, + None => { req = req.with_header_param("{{{baseName}}}".to_string(), "".to_string()); }, + } + {{/isNullable}} + {{/required}} + {{^required}} + if let Some(param_value) = {{{paramName}}} { + req = req.with_header_param("{{{baseName}}}".to_string(), param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + } + {{/required}} {{/headerParams}} {{/hasHeaderParams}} {{#hasFormParams}} {{#formParams}} {{#isFile}} - .with_form_param("{{{baseName}}}".to_string(), unimplemented!()) + {{#required}} + {{^isNullable}} + req = req.with_form_param("{{{baseName}}}".to_string(), unimplemented!()); + {{/isNullable}} + {{#isNullable}} + match {{{paramName}}} { + Some(param_value) => { req = req.with_form_param("{{{baseName}}}".to_string(), unimplemented!()); }, + None => { req = req.with_form_param("{{{baseName}}}".to_string(), unimplemented!()); }, + } + {{/isNullable}} + {{/required}} + {{^required}} + if let Some(param_value) = {{{paramName}}} { + req = req.with_form_param("{{{baseName}}}".to_string(), unimplemented!()); + } + {{/required}} {{/isFile}} {{^isFile}} - .with_form_param("{{{baseName}}}".to_string(), {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()) + {{#required}} + {{^isNullable}} + req = req.with_form_param("{{{baseName}}}".to_string(), {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + {{/isNullable}} + {{#isNullable}} + match {{{paramName}}} { + Some(param_value) => { req = req.with_form_param("{{{baseName}}}".to_string(), param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); }, + None => { req = req.with_form_param("{{{baseName}}}".to_string(), "".to_string()); }, + } + {{/isNullable}} + {{/required}} + {{^required}} + if let Some(param_value) = {{{paramName}}} { + req = req.with_form_param("{{{baseName}}}".to_string(), param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + } + {{/required}} {{/isFile}} {{/formParams}} {{/hasFormParams}} {{#hasBodyParam}} {{#bodyParams}} - .with_body_param({{{paramName}}}) + req = req.with_body_param({{{paramName}}}); {{/bodyParams}} {{/hasBodyParam}} {{^returnType}} - .returns_nothing() + req = req.returns_nothing(); {{/returnType}} - .execute(self.configuration.borrow()) + + req.execute(self.configuration.borrow()) } {{/operation}} diff --git a/modules/openapi-generator/src/main/resources/rust/model_doc.mustache b/modules/openapi-generator/src/main/resources/rust/model_doc.mustache index 9ba6b7d6a3aa..7c1230e4268f 100644 --- a/modules/openapi-generator/src/main/resources/rust/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/rust/model_doc.mustache @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{{name}}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{{dataType}}}**]({{{complexType}}}.md){{/isPrimitiveType}} | {{{description}}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{{name}}}** | {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{{complexType}}}.md){{/isPrimitiveType}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}} | {{{description}}} | {{^required}}[optional]{{/required}}{{#isReadOnly}}[readonly]{{/isReadOnly}}{{#defaultValue}}[default to {{{defaultValue}}}]{{/defaultValue}} {{/vars}} [[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/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache index ee8359f6bc26..448f6c302c98 100644 --- a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache +++ b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache @@ -1,6 +1,8 @@ {{>partial_header}} use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use reqwest; @@ -21,7 +23,7 @@ impl {{{classname}}}Client { pub trait {{{classname}}} { {{#operations}} {{#operation}} - fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Result<{{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}, Error>; + fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Result<{{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}, Error>; {{/operation}} {{/operations}} } @@ -29,15 +31,22 @@ pub trait {{{classname}}} { impl {{{classname}}} for {{{classname}}}Client { {{#operations}} {{#operation}} - fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Result<{{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}, Error> { + fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Result<{{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}, Error> { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; - let uri_str = format!("{}{{{path}}}", configuration.base_path{{#pathParams}}, {{{baseName}}}={{#isString}}crate::apis::urlencode({{/isString}}{{{paramName}}}{{#isListContainer}}.join(",").as_ref(){{/isListContainer}}{{#isString}}){{/isString}}{{/pathParams}}); + let uri_str = format!("{}{{{path}}}", configuration.base_path{{#pathParams}}, {{{baseName}}}={{#isString}}crate::apis::urlencode({{/isString}}{{{paramName}}}{{^required}}.unwrap(){{/required}}{{#required}}{{#isNullable}}.unwrap(){{/isNullable}}{{/required}}{{#isListContainer}}.join(",").as_ref(){{/isListContainer}}{{#isString}}){{/isString}}{{/pathParams}}); let mut req_builder = client.{{{httpMethod}}}(uri_str.as_str()); {{#queryParams}} + {{#required}} req_builder = req_builder.query(&[("{{{baseName}}}", &{{{paramName}}}{{#isListContainer}}.into_iter().map(|p| p.to_string()).collect::>().join(","){{/isListContainer}}.to_string())]); + {{/required}} + {{^required}} + if let Some(ref s) = {{{paramName}}} { + req_builder = req_builder.query(&[("{{{baseName}}}", &s{{#isListContainer}}.into_iter().map(|p| p.to_string()).collect::>().join(","){{/isListContainer}}.to_string())]); + } + {{/required}} {{/queryParams}} {{#hasAuthMethods}} {{#authMethods}} @@ -60,7 +69,22 @@ impl {{{classname}}} for {{{classname}}}Client { } {{#hasHeaderParams}} {{#headerParams}} + {{#required}} + {{^isNullable}} req_builder = req_builder.header("{{{baseName}}}", {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + {{/isNullable}} + {{#isNullable}} + match {{{paramName}}} { + Some(param_value) => { req_builder = req_builder.header("{{{baseName}}}", param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); }, + None => { req_builder = req_builder.header("{{{baseName}}}", ""); }, + } + {{/isNullable}} + {{/required}} + {{^required}} + if let Some(param_value) = {{{paramName}}} { + req_builder = req_builder.header("{{{baseName}}}", param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + } + {{/required}} {{/headerParams}} {{/hasHeaderParams}} {{#hasAuthMethods}} @@ -98,13 +122,43 @@ impl {{{classname}}} for {{{classname}}}Client { {{/hasAuthMethods}} {{#isMultipart}} {{#hasFormParams}} - let form = reqwest::multipart::Form::new() + let mut form = reqwest::multipart::Form::new(); {{#formParams}} {{#isFile}} - .file("{{{baseName}}}", {{{paramName}}})?{{#-last}};{{/-last}} + {{#required}} + {{^isNullable}} + form = form.file("{{{baseName}}}", {{{paramName}}})?; + {{/isNullable}} + {{#isNullable}} + match {{{paramName}}} { + Some(param_value) => { form = form.file("{{{baseName}}}", param_value)?; }, + None => { unimplemented!("Required nullable form file param not supported"); }, + } + {{/isNullable}} + {{/required}} + {{^required}} + if let Some(param_value) = {{{paramName}}} { + form = form.file("{{{baseName}}}", param_value)?; + } + {{/required}} {{/isFile}} {{^isFile}} - .text("{{{baseName}}}", {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()){{#-last}};{{/-last}} + {{#required}} + {{^isNullable}} + form = form.text("{{{baseName}}}", {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + {{/isNullable}} + {{#isNullable}} + match {{{paramName}}} { + Some(param_value) => { form = form.text("{{{baseName}}}", param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); }, + None => { form = form.text("{{{baseName}}}", ""); }, + } + {{/isNullable}} + {{/required}} + {{^required}} + if let Some(param_value) = {{{paramName}}} { + form = form.text("{{{baseName}}}", param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + } + {{/required}} {{/isFile}} {{/formParams}} req_builder = req_builder.multipart(form); @@ -115,10 +169,40 @@ impl {{{classname}}} for {{{classname}}}Client { let mut form_params = std::collections::HashMap::new(); {{#formParams}} {{#isFile}} + {{#required}} + {{^isNullable}} form_params.insert("{{{baseName}}}", unimplemented!("File form param not supported with x-www-form-urlencoded content")); + {{/isNullable}} + {{#isNullable}} + match {{{paramName}}} { + Some(param_value) => { form_params.insert("{{{baseName}}}", unimplemented!("File form param not supported with x-www-form-urlencoded content")); }, + None => { unimplemented!("Required nullable file form param not supported with x-www-form-urlencoded content"); }, + } + {{/isNullable}} + {{/required}} + {{^required}} + if let Some(param_value) = {{{paramName}}} { + form_params.insert("{{{baseName}}}", unimplemented!("File form param not supported with x-www-form-urlencoded content")); + } + {{/required}} {{/isFile}} {{^isFile}} + {{#required}} + {{^isNullable}} form_params.insert("{{{baseName}}}", {{{paramName}}}{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + {{/isNullable}} + {{#isNullable}} + match {{{paramName}}} { + Some(param_value) => { form_params.insert("{{{baseName}}}", param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); }, + None => { form_params.insert("{{{baseName}}}", ""); }, + } + {{/isNullable}} + {{/required}} + {{^required}} + if let Some(param_value) = {{{paramName}}} { + form_params.insert("{{{baseName}}}", param_value{{#isListContainer}}.join(","){{/isListContainer}}.to_string()); + } + {{/required}} {{/isFile}} {{/formParams}} req_builder = req_builder.form(&form_params); diff --git a/samples/client/petstore/rust-reqwest/.openapi-generator/VERSION b/samples/client/petstore/rust-reqwest/.openapi-generator/VERSION new file mode 100644 index 000000000000..479c313e87b9 --- /dev/null +++ b/samples/client/petstore/rust-reqwest/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/.openapi-generator/VERSION b/samples/client/petstore/rust/.openapi-generator/VERSION new file mode 100644 index 000000000000..479c313e87b9 --- /dev/null +++ b/samples/client/petstore/rust/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/hyper/fileResponseTest/.openapi-generator/VERSION b/samples/client/petstore/rust/hyper/fileResponseTest/.openapi-generator/VERSION index 0e97bd19efbf..c3a2c7076fa8 100644 --- a/samples/client/petstore/rust/hyper/fileResponseTest/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/hyper/fileResponseTest/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/hyper/fileResponseTest/src/apis/default_api.rs b/samples/client/petstore/rust/hyper/fileResponseTest/src/apis/default_api.rs index 7f807e2f81bf..fb52b3cc52c4 100644 --- a/samples/client/petstore/rust/hyper/fileResponseTest/src/apis/default_api.rs +++ b/samples/client/petstore/rust/hyper/fileResponseTest/src/apis/default_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use hyper; use serde_json; @@ -34,11 +36,12 @@ pub trait DefaultApi { fn fileresponsetest(&self, ) -> Box>>; } - implDefaultApi for DefaultApiClient { fn fileresponsetest(&self, ) -> Box>> { - __internal_request::Request::new(hyper::Method::Get, "/tests/fileResponse".to_string()) - .execute(self.configuration.borrow()) + let mut req = __internal_request::Request::new(hyper::Method::Get, "/tests/fileResponse".to_string()) + ; + + req.execute(self.configuration.borrow()) } } diff --git a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION index 0e97bd19efbf..c3a2c7076fa8 100644 --- a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/hyper/petstore/docs/ApiResponse.md b/samples/client/petstore/rust/hyper/petstore/docs/ApiResponse.md index fe896d1a86d1..97128a87d97b 100644 --- a/samples/client/petstore/rust/hyper/petstore/docs/ApiResponse.md +++ b/samples/client/petstore/rust/hyper/petstore/docs/ApiResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**code** | **i32** | | [optional] -**_type** | **String** | | [optional] -**message** | **String** | | [optional] +**code** | Option<**i32**> | | [optional] +**_type** | Option<**String**> | | [optional] +**message** | Option<**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/rust/hyper/petstore/docs/Category.md b/samples/client/petstore/rust/hyper/petstore/docs/Category.md index 5890848827dc..1cf67347c057 100644 --- a/samples/client/petstore/rust/hyper/petstore/docs/Category.md +++ b/samples/client/petstore/rust/hyper/petstore/docs/Category.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **i64** | | [optional] -**name** | **String** | | [optional] +**id** | Option<**i64**> | | [optional] +**name** | Option<**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/rust/hyper/petstore/docs/Order.md b/samples/client/petstore/rust/hyper/petstore/docs/Order.md index 6d27453a76b8..d9a09c397432 100644 --- a/samples/client/petstore/rust/hyper/petstore/docs/Order.md +++ b/samples/client/petstore/rust/hyper/petstore/docs/Order.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **i64** | | [optional] -**pet_id** | **i64** | | [optional] -**quantity** | **i32** | | [optional] -**ship_date** | **String** | | [optional] -**status** | **String** | Order Status | [optional] -**complete** | **bool** | | [optional] [default to false] +**id** | Option<**i64**> | | [optional] +**pet_id** | Option<**i64**> | | [optional] +**quantity** | Option<**i32**> | | [optional] +**ship_date** | Option<**String**> | | [optional] +**status** | Option<**String**> | Order Status | [optional] +**complete** | Option<**bool**> | | [optional][default to false] [[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/rust/hyper/petstore/docs/Pet.md b/samples/client/petstore/rust/hyper/petstore/docs/Pet.md index 2c8ea36dd913..27886889d1d4 100644 --- a/samples/client/petstore/rust/hyper/petstore/docs/Pet.md +++ b/samples/client/petstore/rust/hyper/petstore/docs/Pet.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **i64** | | [optional] -**category** | [***crate::models::Category**](Category.md) | | [optional] +**id** | Option<**i64**> | | [optional] +**category** | Option<[**crate::models::Category**](Category.md)> | | [optional] **name** | **String** | | **photo_urls** | **Vec** | | -**tags** | [**Vec**](Tag.md) | | [optional] -**status** | **String** | pet status in the store | [optional] +**tags** | Option<[**Vec**](Tag.md)> | | [optional] +**status** | Option<**String**> | pet status in the store | [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/rust/hyper/petstore/docs/PetApi.md b/samples/client/petstore/rust/hyper/petstore/docs/PetApi.md index f6f1929b427a..6ac82abc9d4a 100644 --- a/samples/client/petstore/rust/hyper/petstore/docs/PetApi.md +++ b/samples/client/petstore/rust/hyper/petstore/docs/PetApi.md @@ -25,7 +25,7 @@ Add a new pet to the store Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | Required | +**body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | [required] | ### Return type @@ -53,8 +53,8 @@ Deletes a pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | Pet id to delete | Required | -**api_key** | **String** | | | +**pet_id** | **i64** | Pet id to delete | [required] | +**api_key** | Option<**String**> | | | ### Return type @@ -84,7 +84,7 @@ Multiple status values can be provided with comma separated strings Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**status** | [**Vec**](String.md) | Status values that need to be considered for filter | Required | +**status** | [**Vec**](String.md) | Status values that need to be considered for filter | [required] | ### Return type @@ -114,7 +114,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**tags** | [**Vec**](String.md) | Tags to filter by | Required | +**tags** | [**Vec**](String.md) | Tags to filter by | [required] | ### Return type @@ -144,7 +144,7 @@ Returns a single pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet to return | Required | +**pet_id** | **i64** | ID of pet to return | [required] | ### Return type @@ -172,7 +172,7 @@ Update an existing pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | Required | +**body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | [required] | ### Return type @@ -200,9 +200,9 @@ Updates a pet in the store with form data Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet that needs to be updated | Required | -**name** | **String** | Updated name of the pet | | -**status** | **String** | Updated status of the pet | | +**pet_id** | **i64** | ID of pet that needs to be updated | [required] | +**name** | Option<**String**> | Updated name of the pet | | +**status** | Option<**String**> | Updated status of the pet | | ### Return type @@ -230,9 +230,9 @@ uploads an image Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet to update | Required | -**additional_metadata** | **String** | Additional data to pass to server | | -**file** | **std::path::PathBuf** | file to upload | | +**pet_id** | **i64** | ID of pet to update | [required] | +**additional_metadata** | Option<**String**> | Additional data to pass to server | | +**file** | Option<**std::path::PathBuf**> | file to upload | | ### Return type diff --git a/samples/client/petstore/rust/hyper/petstore/docs/StoreApi.md b/samples/client/petstore/rust/hyper/petstore/docs/StoreApi.md index 44aa5e83a37c..7a7b9498d16a 100644 --- a/samples/client/petstore/rust/hyper/petstore/docs/StoreApi.md +++ b/samples/client/petstore/rust/hyper/petstore/docs/StoreApi.md @@ -23,7 +23,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**order_id** | **String** | ID of the order that needs to be deleted | Required | +**order_id** | **String** | ID of the order that needs to be deleted | [required] | ### Return type @@ -80,7 +80,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**order_id** | **i64** | ID of pet that needs to be fetched | Required | +**order_id** | **i64** | ID of pet that needs to be fetched | [required] | ### Return type @@ -108,7 +108,7 @@ Place an order for a pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**Order**](Order.md) | order placed for purchasing the pet | Required | +**body** | [**Order**](Order.md) | order placed for purchasing the pet | [required] | ### Return type diff --git a/samples/client/petstore/rust/hyper/petstore/docs/Tag.md b/samples/client/petstore/rust/hyper/petstore/docs/Tag.md index cc377c0ef4b9..7bf71ab0e9d8 100644 --- a/samples/client/petstore/rust/hyper/petstore/docs/Tag.md +++ b/samples/client/petstore/rust/hyper/petstore/docs/Tag.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **i64** | | [optional] -**name** | **String** | | [optional] +**id** | Option<**i64**> | | [optional] +**name** | Option<**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/rust/hyper/petstore/docs/User.md b/samples/client/petstore/rust/hyper/petstore/docs/User.md index 8f0a63847cce..2e6abda42b32 100644 --- a/samples/client/petstore/rust/hyper/petstore/docs/User.md +++ b/samples/client/petstore/rust/hyper/petstore/docs/User.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **i64** | | [optional] -**username** | **String** | | [optional] -**first_name** | **String** | | [optional] -**last_name** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**user_status** | **i32** | User Status | [optional] +**id** | Option<**i64**> | | [optional] +**username** | Option<**String**> | | [optional] +**first_name** | Option<**String**> | | [optional] +**last_name** | Option<**String**> | | [optional] +**email** | Option<**String**> | | [optional] +**password** | Option<**String**> | | [optional] +**phone** | Option<**String**> | | [optional] +**user_status** | Option<**i32**> | User Status | [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/rust/hyper/petstore/docs/UserApi.md b/samples/client/petstore/rust/hyper/petstore/docs/UserApi.md index 051a6a15ff42..f3fce53b66da 100644 --- a/samples/client/petstore/rust/hyper/petstore/docs/UserApi.md +++ b/samples/client/petstore/rust/hyper/petstore/docs/UserApi.md @@ -27,7 +27,7 @@ This can only be done by the logged in user. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**User**](User.md) | Created user object | Required | +**body** | [**User**](User.md) | Created user object | [required] | ### Return type @@ -55,7 +55,7 @@ Creates list of users with given input array Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**Vec**](User.md) | List of user object | Required | +**body** | [**Vec**](User.md) | List of user object | [required] | ### Return type @@ -83,7 +83,7 @@ Creates list of users with given input array Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**Vec**](User.md) | List of user object | Required | +**body** | [**Vec**](User.md) | List of user object | [required] | ### Return type @@ -113,7 +113,7 @@ This can only be done by the logged in user. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | The name that needs to be deleted | Required | +**username** | **String** | The name that needs to be deleted | [required] | ### Return type @@ -141,7 +141,7 @@ Get user by user name Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | The name that needs to be fetched. Use user1 for testing. | Required | +**username** | **String** | The name that needs to be fetched. Use user1 for testing. | [required] | ### Return type @@ -169,8 +169,8 @@ Logs user into the system Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | The user name for login | Required | -**password** | **String** | The password for login in clear text | Required | +**username** | **String** | The user name for login | [required] | +**password** | **String** | The password for login in clear text | [required] | ### Return type @@ -225,8 +225,8 @@ This can only be done by the logged in user. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | name that need to be deleted | Required | -**body** | [**User**](User.md) | Updated user object | Required | +**username** | **String** | name that need to be deleted | [required] | +**body** | [**User**](User.md) | Updated user object | [required] | ### Return type diff --git a/samples/client/petstore/rust/hyper/petstore/src/apis/pet_api.rs b/samples/client/petstore/rust/hyper/petstore/src/apis/pet_api.rs index 9adfde81aa75..6ecaee91037f 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/apis/pet_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use hyper; use serde_json; @@ -32,84 +34,109 @@ impl PetApiClient { pub trait PetApi { fn add_pet(&self, body: crate::models::Pet) -> Box>>; - fn delete_pet(&self, pet_id: i64, api_key: &str) -> Box>>; + fn delete_pet(&self, pet_id: i64, api_key: Option<&str>) -> Box>>; fn find_pets_by_status(&self, status: Vec) -> Box, Error = Error>>; fn find_pets_by_tags(&self, tags: Vec) -> Box, Error = Error>>; fn get_pet_by_id(&self, pet_id: i64) -> Box>>; fn update_pet(&self, body: crate::models::Pet) -> Box>>; - fn update_pet_with_form(&self, pet_id: i64, name: &str, status: &str) -> Box>>; - fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: std::path::PathBuf) -> Box>>; + fn update_pet_with_form(&self, pet_id: i64, name: Option<&str>, status: Option<&str>) -> Box>>; + fn upload_file(&self, pet_id: i64, additional_metadata: Option<&str>, file: Option) -> Box>>; } - implPetApi for PetApiClient { fn add_pet(&self, body: crate::models::Pet) -> Box>> { - __internal_request::Request::new(hyper::Method::Post, "/pet".to_string()) + let mut req = __internal_request::Request::new(hyper::Method::Post, "/pet".to_string()) .with_auth(__internal_request::Auth::Oauth) - .with_body_param(body) - .returns_nothing() - .execute(self.configuration.borrow()) + ; + req = req.with_body_param(body); + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } - fn delete_pet(&self, pet_id: i64, api_key: &str) -> Box>> { - __internal_request::Request::new(hyper::Method::Delete, "/pet/{petId}".to_string()) + fn delete_pet(&self, pet_id: i64, api_key: Option<&str>) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::Delete, "/pet/{petId}".to_string()) .with_auth(__internal_request::Auth::Oauth) - .with_path_param("petId".to_string(), pet_id.to_string()) - .with_header_param("api_key".to_string(), api_key.to_string()) - .returns_nothing() - .execute(self.configuration.borrow()) + ; + req = req.with_path_param("petId".to_string(), pet_id.to_string()); + if let Some(param_value) = api_key { + req = req.with_header_param("api_key".to_string(), param_value.to_string()); + } + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } fn find_pets_by_status(&self, status: Vec) -> Box, Error = Error>> { - __internal_request::Request::new(hyper::Method::Get, "/pet/findByStatus".to_string()) + let mut req = __internal_request::Request::new(hyper::Method::Get, "/pet/findByStatus".to_string()) .with_auth(__internal_request::Auth::Oauth) - .with_query_param("status".to_string(), status.join(",").to_string()) - .execute(self.configuration.borrow()) + ; + req = req.with_query_param("status".to_string(), status.join(",").to_string()); + + req.execute(self.configuration.borrow()) } fn find_pets_by_tags(&self, tags: Vec) -> Box, Error = Error>> { - __internal_request::Request::new(hyper::Method::Get, "/pet/findByTags".to_string()) + let mut req = __internal_request::Request::new(hyper::Method::Get, "/pet/findByTags".to_string()) .with_auth(__internal_request::Auth::Oauth) - .with_query_param("tags".to_string(), tags.join(",").to_string()) - .execute(self.configuration.borrow()) + ; + req = req.with_query_param("tags".to_string(), tags.join(",").to_string()); + + req.execute(self.configuration.borrow()) } fn get_pet_by_id(&self, pet_id: i64) -> Box>> { - __internal_request::Request::new(hyper::Method::Get, "/pet/{petId}".to_string()) + let mut req = __internal_request::Request::new(hyper::Method::Get, "/pet/{petId}".to_string()) .with_auth(__internal_request::Auth::ApiKey(__internal_request::ApiKey{ in_header: true, in_query: false, param_name: "api_key".to_owned(), })) - .with_path_param("petId".to_string(), pet_id.to_string()) - .execute(self.configuration.borrow()) + ; + req = req.with_path_param("petId".to_string(), pet_id.to_string()); + + req.execute(self.configuration.borrow()) } fn update_pet(&self, body: crate::models::Pet) -> Box>> { - __internal_request::Request::new(hyper::Method::Put, "/pet".to_string()) + let mut req = __internal_request::Request::new(hyper::Method::Put, "/pet".to_string()) .with_auth(__internal_request::Auth::Oauth) - .with_body_param(body) - .returns_nothing() - .execute(self.configuration.borrow()) + ; + req = req.with_body_param(body); + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } - fn update_pet_with_form(&self, pet_id: i64, name: &str, status: &str) -> Box>> { - __internal_request::Request::new(hyper::Method::Post, "/pet/{petId}".to_string()) + fn update_pet_with_form(&self, pet_id: i64, name: Option<&str>, status: Option<&str>) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::Post, "/pet/{petId}".to_string()) .with_auth(__internal_request::Auth::Oauth) - .with_path_param("petId".to_string(), pet_id.to_string()) - .with_form_param("name".to_string(), name.to_string()) - .with_form_param("status".to_string(), status.to_string()) - .returns_nothing() - .execute(self.configuration.borrow()) + ; + req = req.with_path_param("petId".to_string(), pet_id.to_string()); + if let Some(param_value) = name { + req = req.with_form_param("name".to_string(), param_value.to_string()); + } + if let Some(param_value) = status { + req = req.with_form_param("status".to_string(), param_value.to_string()); + } + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } - fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: std::path::PathBuf) -> Box>> { - __internal_request::Request::new(hyper::Method::Post, "/pet/{petId}/uploadImage".to_string()) + fn upload_file(&self, pet_id: i64, additional_metadata: Option<&str>, file: Option) -> Box>> { + let mut req = __internal_request::Request::new(hyper::Method::Post, "/pet/{petId}/uploadImage".to_string()) .with_auth(__internal_request::Auth::Oauth) - .with_path_param("petId".to_string(), pet_id.to_string()) - .with_form_param("additionalMetadata".to_string(), additional_metadata.to_string()) - .with_form_param("file".to_string(), unimplemented!()) - .execute(self.configuration.borrow()) + ; + req = req.with_path_param("petId".to_string(), pet_id.to_string()); + if let Some(param_value) = additional_metadata { + req = req.with_form_param("additionalMetadata".to_string(), param_value.to_string()); + } + if let Some(param_value) = file { + req = req.with_form_param("file".to_string(), unimplemented!()); + } + + req.execute(self.configuration.borrow()) } } diff --git a/samples/client/petstore/rust/hyper/petstore/src/apis/store_api.rs b/samples/client/petstore/rust/hyper/petstore/src/apis/store_api.rs index 5b4c3dc233c1..a72554307e15 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/apis/store_api.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/apis/store_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use hyper; use serde_json; @@ -37,35 +39,42 @@ pub trait StoreApi { fn place_order(&self, body: crate::models::Order) -> Box>>; } - implStoreApi for StoreApiClient { fn delete_order(&self, order_id: &str) -> Box>> { - __internal_request::Request::new(hyper::Method::Delete, "/store/order/{orderId}".to_string()) - .with_path_param("orderId".to_string(), order_id.to_string()) - .returns_nothing() - .execute(self.configuration.borrow()) + let mut req = __internal_request::Request::new(hyper::Method::Delete, "/store/order/{orderId}".to_string()) + ; + req = req.with_path_param("orderId".to_string(), order_id.to_string()); + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } fn get_inventory(&self, ) -> Box, Error = Error>> { - __internal_request::Request::new(hyper::Method::Get, "/store/inventory".to_string()) + let mut req = __internal_request::Request::new(hyper::Method::Get, "/store/inventory".to_string()) .with_auth(__internal_request::Auth::ApiKey(__internal_request::ApiKey{ in_header: true, in_query: false, param_name: "api_key".to_owned(), })) - .execute(self.configuration.borrow()) + ; + + req.execute(self.configuration.borrow()) } fn get_order_by_id(&self, order_id: i64) -> Box>> { - __internal_request::Request::new(hyper::Method::Get, "/store/order/{orderId}".to_string()) - .with_path_param("orderId".to_string(), order_id.to_string()) - .execute(self.configuration.borrow()) + let mut req = __internal_request::Request::new(hyper::Method::Get, "/store/order/{orderId}".to_string()) + ; + req = req.with_path_param("orderId".to_string(), order_id.to_string()); + + req.execute(self.configuration.borrow()) } fn place_order(&self, body: crate::models::Order) -> Box>> { - __internal_request::Request::new(hyper::Method::Post, "/store/order".to_string()) - .with_body_param(body) - .execute(self.configuration.borrow()) + let mut req = __internal_request::Request::new(hyper::Method::Post, "/store/order".to_string()) + ; + req = req.with_body_param(body); + + req.execute(self.configuration.borrow()) } } diff --git a/samples/client/petstore/rust/hyper/petstore/src/apis/user_api.rs b/samples/client/petstore/rust/hyper/petstore/src/apis/user_api.rs index d6131520db18..70f2ab5ae3e9 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/apis/user_api.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/apis/user_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use hyper; use serde_json; @@ -41,61 +43,76 @@ pub trait UserApi { fn update_user(&self, username: &str, body: crate::models::User) -> Box>>; } - implUserApi for UserApiClient { fn create_user(&self, body: crate::models::User) -> Box>> { - __internal_request::Request::new(hyper::Method::Post, "/user".to_string()) - .with_body_param(body) - .returns_nothing() - .execute(self.configuration.borrow()) + let mut req = __internal_request::Request::new(hyper::Method::Post, "/user".to_string()) + ; + req = req.with_body_param(body); + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } fn create_users_with_array_input(&self, body: Vec) -> Box>> { - __internal_request::Request::new(hyper::Method::Post, "/user/createWithArray".to_string()) - .with_body_param(body) - .returns_nothing() - .execute(self.configuration.borrow()) + let mut req = __internal_request::Request::new(hyper::Method::Post, "/user/createWithArray".to_string()) + ; + req = req.with_body_param(body); + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } fn create_users_with_list_input(&self, body: Vec) -> Box>> { - __internal_request::Request::new(hyper::Method::Post, "/user/createWithList".to_string()) - .with_body_param(body) - .returns_nothing() - .execute(self.configuration.borrow()) + let mut req = __internal_request::Request::new(hyper::Method::Post, "/user/createWithList".to_string()) + ; + req = req.with_body_param(body); + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } fn delete_user(&self, username: &str) -> Box>> { - __internal_request::Request::new(hyper::Method::Delete, "/user/{username}".to_string()) - .with_path_param("username".to_string(), username.to_string()) - .returns_nothing() - .execute(self.configuration.borrow()) + let mut req = __internal_request::Request::new(hyper::Method::Delete, "/user/{username}".to_string()) + ; + req = req.with_path_param("username".to_string(), username.to_string()); + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } fn get_user_by_name(&self, username: &str) -> Box>> { - __internal_request::Request::new(hyper::Method::Get, "/user/{username}".to_string()) - .with_path_param("username".to_string(), username.to_string()) - .execute(self.configuration.borrow()) + let mut req = __internal_request::Request::new(hyper::Method::Get, "/user/{username}".to_string()) + ; + req = req.with_path_param("username".to_string(), username.to_string()); + + req.execute(self.configuration.borrow()) } fn login_user(&self, username: &str, password: &str) -> Box>> { - __internal_request::Request::new(hyper::Method::Get, "/user/login".to_string()) - .with_query_param("username".to_string(), username.to_string()) - .with_query_param("password".to_string(), password.to_string()) - .execute(self.configuration.borrow()) + let mut req = __internal_request::Request::new(hyper::Method::Get, "/user/login".to_string()) + ; + req = req.with_query_param("username".to_string(), username.to_string()); + req = req.with_query_param("password".to_string(), password.to_string()); + + req.execute(self.configuration.borrow()) } fn logout_user(&self, ) -> Box>> { - __internal_request::Request::new(hyper::Method::Get, "/user/logout".to_string()) - .returns_nothing() - .execute(self.configuration.borrow()) + let mut req = __internal_request::Request::new(hyper::Method::Get, "/user/logout".to_string()) + ; + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } fn update_user(&self, username: &str, body: crate::models::User) -> Box>> { - __internal_request::Request::new(hyper::Method::Put, "/user/{username}".to_string()) - .with_path_param("username".to_string(), username.to_string()) - .with_body_param(body) - .returns_nothing() - .execute(self.configuration.borrow()) + let mut req = __internal_request::Request::new(hyper::Method::Put, "/user/{username}".to_string()) + ; + req = req.with_path_param("username".to_string(), username.to_string()); + req = req.with_body_param(body); + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } } diff --git a/samples/client/petstore/rust/hyper/rust-test/.openapi-generator/VERSION b/samples/client/petstore/rust/hyper/rust-test/.openapi-generator/VERSION index 0e97bd19efbf..c3a2c7076fa8 100644 --- a/samples/client/petstore/rust/hyper/rust-test/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/hyper/rust-test/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/hyper/rust-test/docs/TypeTesting.md b/samples/client/petstore/rust/hyper/rust-test/docs/TypeTesting.md index e84136389e9b..7b05cee280a8 100644 --- a/samples/client/petstore/rust/hyper/rust-test/docs/TypeTesting.md +++ b/samples/client/petstore/rust/hyper/rust-test/docs/TypeTesting.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**integer** | **i32** | | [optional] -**long** | **i64** | | [optional] -**number** | **f32** | | [optional] -**float** | **f32** | | [optional] -**double** | **f64** | | [optional] -**uuid** | **String** | | [optional] +**integer** | Option<**i32**> | | [optional] +**long** | Option<**i64**> | | [optional] +**number** | Option<**f32**> | | [optional] +**float** | Option<**f32**> | | [optional] +**double** | Option<**f64**> | | [optional] +**uuid** | Option<**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/rust/hyper/rust-test/src/apis/default_api.rs b/samples/client/petstore/rust/hyper/rust-test/src/apis/default_api.rs index 9f9873715cbd..5ebb6a09dd37 100644 --- a/samples/client/petstore/rust/hyper/rust-test/src/apis/default_api.rs +++ b/samples/client/petstore/rust/hyper/rust-test/src/apis/default_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use hyper; use serde_json; @@ -34,12 +36,13 @@ pub trait DefaultApi { fn dummy_get(&self, ) -> Box>>; } - implDefaultApi for DefaultApiClient { fn dummy_get(&self, ) -> Box>> { - __internal_request::Request::new(hyper::Method::Get, "/dummy".to_string()) - .returns_nothing() - .execute(self.configuration.borrow()) + let mut req = __internal_request::Request::new(hyper::Method::Get, "/dummy".to_string()) + ; + req = req.returns_nothing(); + + req.execute(self.configuration.borrow()) } } diff --git a/samples/client/petstore/rust/reqwest/fileResponseTest/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/fileResponseTest/.openapi-generator/VERSION index 0e97bd19efbf..c3a2c7076fa8 100644 --- a/samples/client/petstore/rust/reqwest/fileResponseTest/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/reqwest/fileResponseTest/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/reqwest/fileResponseTest/src/apis/default_api.rs b/samples/client/petstore/rust/reqwest/fileResponseTest/src/apis/default_api.rs index 13bc9939aef4..b12bf1e49857 100644 --- a/samples/client/petstore/rust/reqwest/fileResponseTest/src/apis/default_api.rs +++ b/samples/client/petstore/rust/reqwest/fileResponseTest/src/apis/default_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use reqwest; diff --git a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION index 0e97bd19efbf..c3a2c7076fa8 100644 --- a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/reqwest/petstore/docs/ApiResponse.md b/samples/client/petstore/rust/reqwest/petstore/docs/ApiResponse.md index fe896d1a86d1..97128a87d97b 100644 --- a/samples/client/petstore/rust/reqwest/petstore/docs/ApiResponse.md +++ b/samples/client/petstore/rust/reqwest/petstore/docs/ApiResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**code** | **i32** | | [optional] -**_type** | **String** | | [optional] -**message** | **String** | | [optional] +**code** | Option<**i32**> | | [optional] +**_type** | Option<**String**> | | [optional] +**message** | Option<**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/rust/reqwest/petstore/docs/Category.md b/samples/client/petstore/rust/reqwest/petstore/docs/Category.md index 5890848827dc..1cf67347c057 100644 --- a/samples/client/petstore/rust/reqwest/petstore/docs/Category.md +++ b/samples/client/petstore/rust/reqwest/petstore/docs/Category.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **i64** | | [optional] -**name** | **String** | | [optional] +**id** | Option<**i64**> | | [optional] +**name** | Option<**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/rust/reqwest/petstore/docs/Order.md b/samples/client/petstore/rust/reqwest/petstore/docs/Order.md index 6d27453a76b8..d9a09c397432 100644 --- a/samples/client/petstore/rust/reqwest/petstore/docs/Order.md +++ b/samples/client/petstore/rust/reqwest/petstore/docs/Order.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **i64** | | [optional] -**pet_id** | **i64** | | [optional] -**quantity** | **i32** | | [optional] -**ship_date** | **String** | | [optional] -**status** | **String** | Order Status | [optional] -**complete** | **bool** | | [optional] [default to false] +**id** | Option<**i64**> | | [optional] +**pet_id** | Option<**i64**> | | [optional] +**quantity** | Option<**i32**> | | [optional] +**ship_date** | Option<**String**> | | [optional] +**status** | Option<**String**> | Order Status | [optional] +**complete** | Option<**bool**> | | [optional][default to false] [[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/rust/reqwest/petstore/docs/Pet.md b/samples/client/petstore/rust/reqwest/petstore/docs/Pet.md index 2c8ea36dd913..27886889d1d4 100644 --- a/samples/client/petstore/rust/reqwest/petstore/docs/Pet.md +++ b/samples/client/petstore/rust/reqwest/petstore/docs/Pet.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **i64** | | [optional] -**category** | [***crate::models::Category**](Category.md) | | [optional] +**id** | Option<**i64**> | | [optional] +**category** | Option<[**crate::models::Category**](Category.md)> | | [optional] **name** | **String** | | **photo_urls** | **Vec** | | -**tags** | [**Vec**](Tag.md) | | [optional] -**status** | **String** | pet status in the store | [optional] +**tags** | Option<[**Vec**](Tag.md)> | | [optional] +**status** | Option<**String**> | pet status in the store | [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/rust/reqwest/petstore/docs/PetApi.md b/samples/client/petstore/rust/reqwest/petstore/docs/PetApi.md index b97fb9e15670..4716e752b666 100644 --- a/samples/client/petstore/rust/reqwest/petstore/docs/PetApi.md +++ b/samples/client/petstore/rust/reqwest/petstore/docs/PetApi.md @@ -25,7 +25,7 @@ Add a new pet to the store Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | Required | +**body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | [required] | ### Return type @@ -53,8 +53,8 @@ Deletes a pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | Pet id to delete | Required | -**api_key** | **String** | | | +**pet_id** | **i64** | Pet id to delete | [required] | +**api_key** | Option<**String**> | | | ### Return type @@ -84,7 +84,7 @@ Multiple status values can be provided with comma separated strings Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**status** | [**Vec**](String.md) | Status values that need to be considered for filter | Required | +**status** | [**Vec**](String.md) | Status values that need to be considered for filter | [required] | ### Return type @@ -114,7 +114,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**tags** | [**Vec**](String.md) | Tags to filter by | Required | +**tags** | [**Vec**](String.md) | Tags to filter by | [required] | ### Return type @@ -144,7 +144,7 @@ Returns a single pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet to return | Required | +**pet_id** | **i64** | ID of pet to return | [required] | ### Return type @@ -172,7 +172,7 @@ Update an existing pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | Required | +**body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | [required] | ### Return type @@ -200,9 +200,9 @@ Updates a pet in the store with form data Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet that needs to be updated | Required | -**name** | **String** | Updated name of the pet | | -**status** | **String** | Updated status of the pet | | +**pet_id** | **i64** | ID of pet that needs to be updated | [required] | +**name** | Option<**String**> | Updated name of the pet | | +**status** | Option<**String**> | Updated status of the pet | | ### Return type @@ -230,9 +230,9 @@ uploads an image Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet to update | Required | -**additional_metadata** | **String** | Additional data to pass to server | | -**file** | **std::path::PathBuf** | file to upload | | +**pet_id** | **i64** | ID of pet to update | [required] | +**additional_metadata** | Option<**String**> | Additional data to pass to server | | +**file** | Option<**std::path::PathBuf**> | file to upload | | ### Return type diff --git a/samples/client/petstore/rust/reqwest/petstore/docs/StoreApi.md b/samples/client/petstore/rust/reqwest/petstore/docs/StoreApi.md index 02b0edbdfd75..a310b5383154 100644 --- a/samples/client/petstore/rust/reqwest/petstore/docs/StoreApi.md +++ b/samples/client/petstore/rust/reqwest/petstore/docs/StoreApi.md @@ -23,7 +23,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**order_id** | **String** | ID of the order that needs to be deleted | Required | +**order_id** | **String** | ID of the order that needs to be deleted | [required] | ### Return type @@ -80,7 +80,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**order_id** | **i64** | ID of pet that needs to be fetched | Required | +**order_id** | **i64** | ID of pet that needs to be fetched | [required] | ### Return type @@ -108,7 +108,7 @@ Place an order for a pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**Order**](Order.md) | order placed for purchasing the pet | Required | +**body** | [**Order**](Order.md) | order placed for purchasing the pet | [required] | ### Return type diff --git a/samples/client/petstore/rust/reqwest/petstore/docs/Tag.md b/samples/client/petstore/rust/reqwest/petstore/docs/Tag.md index cc377c0ef4b9..7bf71ab0e9d8 100644 --- a/samples/client/petstore/rust/reqwest/petstore/docs/Tag.md +++ b/samples/client/petstore/rust/reqwest/petstore/docs/Tag.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **i64** | | [optional] -**name** | **String** | | [optional] +**id** | Option<**i64**> | | [optional] +**name** | Option<**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/rust/reqwest/petstore/docs/User.md b/samples/client/petstore/rust/reqwest/petstore/docs/User.md index 8f0a63847cce..2e6abda42b32 100644 --- a/samples/client/petstore/rust/reqwest/petstore/docs/User.md +++ b/samples/client/petstore/rust/reqwest/petstore/docs/User.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **i64** | | [optional] -**username** | **String** | | [optional] -**first_name** | **String** | | [optional] -**last_name** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**user_status** | **i32** | User Status | [optional] +**id** | Option<**i64**> | | [optional] +**username** | Option<**String**> | | [optional] +**first_name** | Option<**String**> | | [optional] +**last_name** | Option<**String**> | | [optional] +**email** | Option<**String**> | | [optional] +**password** | Option<**String**> | | [optional] +**phone** | Option<**String**> | | [optional] +**user_status** | Option<**i32**> | User Status | [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/rust/reqwest/petstore/docs/UserApi.md b/samples/client/petstore/rust/reqwest/petstore/docs/UserApi.md index afa1d6cd63d8..a6268f251a64 100644 --- a/samples/client/petstore/rust/reqwest/petstore/docs/UserApi.md +++ b/samples/client/petstore/rust/reqwest/petstore/docs/UserApi.md @@ -27,7 +27,7 @@ This can only be done by the logged in user. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**User**](User.md) | Created user object | Required | +**body** | [**User**](User.md) | Created user object | [required] | ### Return type @@ -55,7 +55,7 @@ Creates list of users with given input array Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**Vec**](User.md) | List of user object | Required | +**body** | [**Vec**](User.md) | List of user object | [required] | ### Return type @@ -83,7 +83,7 @@ Creates list of users with given input array Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**Vec**](User.md) | List of user object | Required | +**body** | [**Vec**](User.md) | List of user object | [required] | ### Return type @@ -113,7 +113,7 @@ This can only be done by the logged in user. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | The name that needs to be deleted | Required | +**username** | **String** | The name that needs to be deleted | [required] | ### Return type @@ -141,7 +141,7 @@ Get user by user name Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | The name that needs to be fetched. Use user1 for testing. | Required | +**username** | **String** | The name that needs to be fetched. Use user1 for testing. | [required] | ### Return type @@ -169,8 +169,8 @@ Logs user into the system Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | The user name for login | Required | -**password** | **String** | The password for login in clear text | Required | +**username** | **String** | The user name for login | [required] | +**password** | **String** | The password for login in clear text | [required] | ### Return type @@ -225,8 +225,8 @@ This can only be done by the logged in user. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | name that need to be deleted | Required | -**body** | [**User**](User.md) | Updated user object | Required | +**username** | **String** | name that need to be deleted | [required] | +**body** | [**User**](User.md) | Updated user object | [required] | ### Return type diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs index 81b049f96bac..2412f13002e7 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use reqwest; @@ -29,13 +31,13 @@ impl PetApiClient { pub trait PetApi { fn add_pet(&self, body: crate::models::Pet) -> Result<(), Error>; - fn delete_pet(&self, pet_id: i64, api_key: &str) -> Result<(), Error>; + fn delete_pet(&self, pet_id: i64, api_key: Option<&str>) -> Result<(), Error>; fn find_pets_by_status(&self, status: Vec) -> Result, Error>; fn find_pets_by_tags(&self, tags: Vec) -> Result, Error>; fn get_pet_by_id(&self, pet_id: i64) -> Result; fn update_pet(&self, body: crate::models::Pet) -> Result<(), Error>; - fn update_pet_with_form(&self, pet_id: i64, name: &str, status: &str) -> Result<(), Error>; - fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: std::path::PathBuf) -> Result; + fn update_pet_with_form(&self, pet_id: i64, name: Option<&str>, status: Option<&str>) -> Result<(), Error>; + fn upload_file(&self, pet_id: i64, additional_metadata: Option<&str>, file: Option) -> Result; } impl PetApi for PetApiClient { @@ -61,7 +63,7 @@ impl PetApi for PetApiClient { Ok(()) } - fn delete_pet(&self, pet_id: i64, api_key: &str) -> Result<(), Error> { + fn delete_pet(&self, pet_id: i64, api_key: Option<&str>) -> Result<(), Error> { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; @@ -71,7 +73,9 @@ impl PetApi for PetApiClient { if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } - req_builder = req_builder.header("api_key", api_key.to_string()); + if let Some(param_value) = api_key { + req_builder = req_builder.header("api_key", param_value.to_string()); + } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; @@ -172,7 +176,7 @@ impl PetApi for PetApiClient { Ok(()) } - fn update_pet_with_form(&self, pet_id: i64, name: &str, status: &str) -> Result<(), Error> { + fn update_pet_with_form(&self, pet_id: i64, name: Option<&str>, status: Option<&str>) -> Result<(), Error> { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; @@ -186,8 +190,12 @@ impl PetApi for PetApiClient { req_builder = req_builder.bearer_auth(token.to_owned()); }; let mut form_params = std::collections::HashMap::new(); - form_params.insert("name", name.to_string()); - form_params.insert("status", status.to_string()); + if let Some(param_value) = name { + form_params.insert("name", param_value.to_string()); + } + if let Some(param_value) = status { + form_params.insert("status", param_value.to_string()); + } req_builder = req_builder.form(&form_params); // send request @@ -197,7 +205,7 @@ impl PetApi for PetApiClient { Ok(()) } - fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: std::path::PathBuf) -> Result { + fn upload_file(&self, pet_id: i64, additional_metadata: Option<&str>, file: Option) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; @@ -210,9 +218,13 @@ impl PetApi for PetApiClient { if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - let form = reqwest::multipart::Form::new() - .text("additionalMetadata", additional_metadata.to_string()) - .file("file", file)?; + let mut form = reqwest::multipart::Form::new(); + if let Some(param_value) = additional_metadata { + form = form.text("additionalMetadata", param_value.to_string()); + } + if let Some(param_value) = file { + form = form.file("file", param_value)?; + } req_builder = req_builder.multipart(form); // send request diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs index 419af90dc616..11b427c47f56 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use reqwest; diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs index 9fb810d1df5d..f0d39ed235ae 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use reqwest; diff --git a/samples/client/petstore/rust/reqwest/rust-test/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/rust-test/.openapi-generator/VERSION index 0e97bd19efbf..c3a2c7076fa8 100644 --- a/samples/client/petstore/rust/reqwest/rust-test/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/reqwest/rust-test/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/reqwest/rust-test/docs/TypeTesting.md b/samples/client/petstore/rust/reqwest/rust-test/docs/TypeTesting.md index e84136389e9b..7b05cee280a8 100644 --- a/samples/client/petstore/rust/reqwest/rust-test/docs/TypeTesting.md +++ b/samples/client/petstore/rust/reqwest/rust-test/docs/TypeTesting.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**integer** | **i32** | | [optional] -**long** | **i64** | | [optional] -**number** | **f32** | | [optional] -**float** | **f32** | | [optional] -**double** | **f64** | | [optional] -**uuid** | **String** | | [optional] +**integer** | Option<**i32**> | | [optional] +**long** | Option<**i64**> | | [optional] +**number** | Option<**f32**> | | [optional] +**float** | Option<**f32**> | | [optional] +**double** | Option<**f64**> | | [optional] +**uuid** | Option<**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/rust/reqwest/rust-test/src/apis/default_api.rs b/samples/client/petstore/rust/reqwest/rust-test/src/apis/default_api.rs index 9466fd22a2de..f154a6998c33 100644 --- a/samples/client/petstore/rust/reqwest/rust-test/src/apis/default_api.rs +++ b/samples/client/petstore/rust/reqwest/rust-test/src/apis/default_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use reqwest; From 756984adc92bcfc01e4c5dfa120a87bbec351d45 Mon Sep 17 00:00:00 2001 From: Massimiliano Pippi Date: Tue, 15 Oct 2019 15:03:34 +0200 Subject: [PATCH 016/142] fix boolean operators precedence (#4158) --- .../org/openapitools/codegen/languages/AbstractGoCodegen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java index c2b8150dc5d8..5a2ccc8154d0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java @@ -505,7 +505,7 @@ public Map postProcessModels(Map objs) { CodegenModel model = (CodegenModel) v; for (CodegenProperty param : model.vars) { if (!addedTimeImport - && "time.Time".equals(param.dataType) || ("[]time.Time".equals(param.dataType))) { + && ("time.Time".equals(param.dataType) || ("[]time.Time".equals(param.dataType)))) { imports.add(createMapping("import", "time")); addedTimeImport = true; } From 755a6f4445c59a58f898553d5263888454e8bd66 Mon Sep 17 00:00:00 2001 From: Josh Burton Date: Wed, 16 Oct 2019 02:05:38 +1300 Subject: [PATCH 017/142] Adds Dart Dio generator (#4018) * Adds initial implemenation of dart-dio generator * Adds remaining boilerplate for dart-dio generator --- .github/.test/samples.json | 6 + bin/utils/ensure-up-to-date | 1 + docs/generators.md | 1 + docs/generators/README.md | 1 + docs/generators/dart-dio.md | 21 + .../languages/DartDioClientCodegen.java | 277 +++++++++++++ .../org.openapitools.codegen.CodegenConfig | 1 + .../main/resources/dart-dio/README.mustache | 110 +++++ .../dart-dio/analysis_options.mustache | 1 + .../src/main/resources/dart-dio/api.mustache | 94 +++++ .../main/resources/dart-dio/api_doc.mustache | 86 ++++ .../main/resources/dart-dio/apilib.mustache | 39 ++ .../main/resources/dart-dio/class.mustache | 28 ++ .../src/main/resources/dart-dio/enum.mustache | 36 ++ .../resources/dart-dio/gitignore.mustache | 27 ++ .../main/resources/dart-dio/model.mustache | 8 + .../resources/dart-dio/object_doc.mustache | 16 + .../main/resources/dart-dio/pubspec.mustache | 13 + .../resources/dart-dio/serializers.mustache | 26 ++ samples/client/petstore/dart-dio/.gitignore | 27 ++ .../dart-dio/.openapi-generator-ignore | 23 ++ .../dart-dio/.openapi-generator/VERSION | 1 + samples/client/petstore/dart-dio/README.md | 116 ++++++ .../petstore/dart-dio/analysis_options.yaml | 1 + .../petstore/dart-dio/docs/ApiResponse.md | 17 + .../client/petstore/dart-dio/docs/Category.md | 16 + .../client/petstore/dart-dio/docs/Order.md | 20 + samples/client/petstore/dart-dio/docs/Pet.md | 20 + .../client/petstore/dart-dio/docs/PetApi.md | 379 ++++++++++++++++++ .../client/petstore/dart-dio/docs/StoreApi.md | 186 +++++++++ samples/client/petstore/dart-dio/docs/Tag.md | 16 + samples/client/petstore/dart-dio/docs/User.md | 22 + .../client/petstore/dart-dio/docs/UserApi.md | 349 ++++++++++++++++ samples/client/petstore/dart-dio/lib/api.dart | 52 +++ .../petstore/dart-dio/lib/api/pet_api.dart | 376 +++++++++++++++++ .../petstore/dart-dio/lib/api/store_api.dart | 180 +++++++++ .../petstore/dart-dio/lib/api/user_api.dart | 344 ++++++++++++++++ .../dart-dio/lib/model/api_response.dart | 24 ++ .../dart-dio/lib/model/api_response.g.dart | 167 ++++++++ .../petstore/dart-dio/lib/model/category.dart | 20 + .../dart-dio/lib/model/category.g.dart | 144 +++++++ .../petstore/dart-dio/lib/model/order.dart | 39 ++ .../petstore/dart-dio/lib/model/order.g.dart | 243 +++++++++++ .../petstore/dart-dio/lib/model/pet.dart | 42 ++ .../petstore/dart-dio/lib/model/pet.g.dart | 258 ++++++++++++ .../petstore/dart-dio/lib/model/tag.dart | 20 + .../petstore/dart-dio/lib/model/tag.g.dart | 144 +++++++ .../petstore/dart-dio/lib/model/user.dart | 46 +++ .../petstore/dart-dio/lib/model/user.g.dart | 290 ++++++++++++++ .../petstore/dart-dio/lib/serializers.dart | 48 +++ .../petstore/dart-dio/lib/serializers.g.dart | 18 + samples/client/petstore/dart-dio/pubspec.yaml | 13 + website/i18n/en.json | 3 + 53 files changed, 4456 insertions(+) create mode 100644 docs/generators/dart-dio.md create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java create mode 100644 modules/openapi-generator/src/main/resources/dart-dio/README.mustache create mode 100644 modules/openapi-generator/src/main/resources/dart-dio/analysis_options.mustache create mode 100644 modules/openapi-generator/src/main/resources/dart-dio/api.mustache create mode 100644 modules/openapi-generator/src/main/resources/dart-dio/api_doc.mustache create mode 100644 modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache create mode 100644 modules/openapi-generator/src/main/resources/dart-dio/class.mustache create mode 100644 modules/openapi-generator/src/main/resources/dart-dio/enum.mustache create mode 100644 modules/openapi-generator/src/main/resources/dart-dio/gitignore.mustache create mode 100644 modules/openapi-generator/src/main/resources/dart-dio/model.mustache create mode 100644 modules/openapi-generator/src/main/resources/dart-dio/object_doc.mustache create mode 100644 modules/openapi-generator/src/main/resources/dart-dio/pubspec.mustache create mode 100644 modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache create mode 100644 samples/client/petstore/dart-dio/.gitignore create mode 100644 samples/client/petstore/dart-dio/.openapi-generator-ignore create mode 100644 samples/client/petstore/dart-dio/.openapi-generator/VERSION create mode 100644 samples/client/petstore/dart-dio/README.md create mode 100644 samples/client/petstore/dart-dio/analysis_options.yaml create mode 100644 samples/client/petstore/dart-dio/docs/ApiResponse.md create mode 100644 samples/client/petstore/dart-dio/docs/Category.md create mode 100644 samples/client/petstore/dart-dio/docs/Order.md create mode 100644 samples/client/petstore/dart-dio/docs/Pet.md create mode 100644 samples/client/petstore/dart-dio/docs/PetApi.md create mode 100644 samples/client/petstore/dart-dio/docs/StoreApi.md create mode 100644 samples/client/petstore/dart-dio/docs/Tag.md create mode 100644 samples/client/petstore/dart-dio/docs/User.md create mode 100644 samples/client/petstore/dart-dio/docs/UserApi.md create mode 100644 samples/client/petstore/dart-dio/lib/api.dart create mode 100644 samples/client/petstore/dart-dio/lib/api/pet_api.dart create mode 100644 samples/client/petstore/dart-dio/lib/api/store_api.dart create mode 100644 samples/client/petstore/dart-dio/lib/api/user_api.dart create mode 100644 samples/client/petstore/dart-dio/lib/model/api_response.dart create mode 100644 samples/client/petstore/dart-dio/lib/model/api_response.g.dart create mode 100644 samples/client/petstore/dart-dio/lib/model/category.dart create mode 100644 samples/client/petstore/dart-dio/lib/model/category.g.dart create mode 100644 samples/client/petstore/dart-dio/lib/model/order.dart create mode 100644 samples/client/petstore/dart-dio/lib/model/order.g.dart create mode 100644 samples/client/petstore/dart-dio/lib/model/pet.dart create mode 100644 samples/client/petstore/dart-dio/lib/model/pet.g.dart create mode 100644 samples/client/petstore/dart-dio/lib/model/tag.dart create mode 100644 samples/client/petstore/dart-dio/lib/model/tag.g.dart create mode 100644 samples/client/petstore/dart-dio/lib/model/user.dart create mode 100644 samples/client/petstore/dart-dio/lib/model/user.g.dart create mode 100644 samples/client/petstore/dart-dio/lib/serializers.dart create mode 100644 samples/client/petstore/dart-dio/lib/serializers.g.dart create mode 100644 samples/client/petstore/dart-dio/pubspec.yaml diff --git a/.github/.test/samples.json b/.github/.test/samples.json index 7c1fa1e23353..4683eb01986b 100644 --- a/.github/.test/samples.json +++ b/.github/.test/samples.json @@ -151,6 +151,12 @@ "Client: Dart" ] }, + { + "input": "dart-dio-petstore.sh", + "matches": [ + "Client: Dart" + ] + }, { "input": "dart-petstore.sh", "matches": [ diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date index 3251835821d0..19ae855e6f52 100755 --- a/bin/utils/ensure-up-to-date +++ b/bin/utils/ensure-up-to-date @@ -65,6 +65,7 @@ declare -a scripts=( "./bin/apex-petstore.sh" "./bin/perl-petstore-all.sh" "./bin/dart-jaguar-petstore.sh" +"./bin/dart-dio-petstore.sh" "./bin/dart-petstore.sh" "./bin/dart2-petstore.sh" "./bin/java-play-framework-petstore-server-all.sh" diff --git a/docs/generators.md b/docs/generators.md index 262a9355c5ec..734fbfbf37d4 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -6,6 +6,7 @@ title: Generators List The following generators are available: ## CLIENT generators + * [ada](generators/ada) * [android](generators/android) * [apex](generators/apex) diff --git a/docs/generators/README.md b/docs/generators/README.md index 6c3328cc0725..070ef96c15e2 100644 --- a/docs/generators/README.md +++ b/docs/generators/README.md @@ -14,6 +14,7 @@ The following generators are available: - [csharp-dotnet2](csharp-dotnet2.md) - [csharp-refactor](csharp-refactor.md) - [dart](dart.md) + - [dart-dio](dart-dio.md) - [dart-jaguar](dart-jaguar.md) - [eiffel](eiffel.md) - [elixir](elixir.md) diff --git a/docs/generators/dart-dio.md b/docs/generators/dart-dio.md new file mode 100644 index 000000000000..dde7792b2943 --- /dev/null +++ b/docs/generators/dart-dio.md @@ -0,0 +1,21 @@ + +--- +id: generator-opts-client-dart-dio +title: Config Options for dart-dio +sidebar_label: dart-dio +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|browserClient|Is the client browser based (for Dart 1.x only)| |null| +|pubName|Name in generated pubspec| |null| +|pubVersion|Version in generated pubspec| |null| +|pubDescription|Description in generated pubspec| |null| +|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| +|sourceFolder|Source folder for generated code| |null| +|supportDart2|Support Dart 2.x (Dart 1.x support has been deprecated)| |true| +|nullableFields|Is the null fields should be in the JSON payload| |null| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java new file mode 100644 index 000000000000..5bc9c8328080 --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java @@ -0,0 +1,277 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * 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 org.openapitools.codegen.languages; + +import org.apache.commons.lang3.StringUtils; +import org.openapitools.codegen.CliOption; +import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.CodegenModel; +import org.openapitools.codegen.CodegenOperation; +import org.openapitools.codegen.CodegenParameter; +import org.openapitools.codegen.CodegenProperty; +import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.utils.ModelUtils; +import org.openapitools.codegen.utils.ProcessUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.util.HashSet; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; + +import io.swagger.v3.oas.models.media.Schema; + +import static org.openapitools.codegen.utils.StringUtils.underscore; + +public class DartDioClientCodegen extends DartClientCodegen { + private static final Logger LOGGER = LoggerFactory.getLogger(DartDioClientCodegen.class); + + private static final String NULLABLE_FIELDS = "nullableFields"; + private static final String IS_FORMAT_JSON = "jsonFormat"; + private static final String CLIENT_NAME = "clientName"; + + private static Set modelToIgnore = new HashSet<>(); + + static { + modelToIgnore.add("datetime"); + modelToIgnore.add("map"); + modelToIgnore.add("object"); + modelToIgnore.add("list"); + modelToIgnore.add("file"); + modelToIgnore.add("uint8list"); + } + + private static final String SERIALIZATION_JSON = "json"; + + private boolean nullableFields = true; + private String serialization = SERIALIZATION_JSON; + + public DartDioClientCodegen() { + super(); + browserClient = false; + outputFolder = "generated-code/dart-dio"; + embeddedTemplateDir = templateDir = "dart-dio"; + + //no tests at this time + modelTestTemplateFiles.clear(); + apiTestTemplateFiles.clear(); + + cliOptions.add(new CliOption(NULLABLE_FIELDS, "Is the null fields should be in the JSON payload")); + + typeMapping.put("file", "Uint8List"); + typeMapping.put("binary", "Uint8List"); + + importMapping.put("BuiltList", "built_collection/built_collection"); + importMapping.put("BuiltMap", "built_collection/built_collection"); + } + + @Override + public String getName() { + return "dart-dio"; + } + + @Override + public String getHelp() { + return "Generates a Dart Dio client library."; + } + + @Override + public String toDefaultValue(Schema p) { + if (ModelUtils.isMapSchema(p)) { + return "const {}"; + } else if (ModelUtils.isArraySchema(p)) { + return "const []"; + } + return super.toDefaultValue(p); + } + + @Override + public void processOpts() { + if (StringUtils.isEmpty(System.getenv("DART_POST_PROCESS_FILE"))) { + LOGGER.info("Environment variable DART_POST_PROCESS_FILE not defined so the Dart code may not be properly formatted. To define it, try `export DART_POST_PROCESS_FILE=\"/usr/local/bin/dartfmt -w\"` (Linux/Mac)"); + LOGGER.info("NOTE: To enable file post-processing, 'enablePostProcessFile' must be set to `true` (--enable-post-process-file for CLI)."); + } + + if (additionalProperties.containsKey(NULLABLE_FIELDS)) { + nullableFields = convertPropertyToBooleanAndWriteBack(NULLABLE_FIELDS); + } else { + //not set, use to be passed to template + additionalProperties.put(NULLABLE_FIELDS, nullableFields); + } + + additionalProperties.put(IS_FORMAT_JSON, true); + + if (additionalProperties.containsKey(PUB_NAME)) { + this.setPubName((String) additionalProperties.get(PUB_NAME)); + } else { + //not set, use to be passed to template + additionalProperties.put(PUB_NAME, pubName); + } + + if (!additionalProperties.containsKey(CLIENT_NAME)) { + additionalProperties.put(CLIENT_NAME, org.openapitools.codegen.utils.StringUtils.camelize(pubName)); + } + + if (additionalProperties.containsKey(PUB_VERSION)) { + this.setPubVersion((String) additionalProperties.get(PUB_VERSION)); + } else { + //not set, use to be passed to template + additionalProperties.put(PUB_VERSION, pubVersion); + } + + if (additionalProperties.containsKey(PUB_DESCRIPTION)) { + this.setPubDescription((String) additionalProperties.get(PUB_DESCRIPTION)); + } else { + //not set, use to be passed to template + additionalProperties.put(PUB_DESCRIPTION, pubDescription); + } + + if (additionalProperties.containsKey(USE_ENUM_EXTENSION)) { + this.setUseEnumExtension(convertPropertyToBooleanAndWriteBack(USE_ENUM_EXTENSION)); + } else { + // Not set, use to be passed to template. + additionalProperties.put(USE_ENUM_EXTENSION, useEnumExtension); + } + + if (additionalProperties.containsKey(CodegenConstants.SOURCE_FOLDER)) { + this.setSourceFolder((String) additionalProperties.get(CodegenConstants.SOURCE_FOLDER)); + } + + // make api and model doc path available in mustache template + additionalProperties.put("apiDocPath", apiDocPath); + additionalProperties.put("modelDocPath", modelDocPath); + + final String libFolder = sourceFolder + File.separator + "lib"; + supportingFiles.add(new SupportingFile("pubspec.mustache", "", "pubspec.yaml")); + supportingFiles.add(new SupportingFile("analysis_options.mustache", "", "analysis_options.yaml")); + supportingFiles.add(new SupportingFile("apilib.mustache", libFolder, "api.dart")); + supportingFiles.add(new SupportingFile("serializers.mustache", libFolder, "serializers.dart")); + + supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")); + supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); + } + + @Override + public Map postProcessModels(Map objs) { + objs = super.postProcessModels(objs); + List models = (List) objs.get("models"); + ProcessUtils.addIndexToProperties(models, 1); + for (Object _mo : models) { + Map mo = (Map) _mo; + Set modelImports = new HashSet<>(); + CodegenModel cm = (CodegenModel) mo.get("model"); + for (String modelImport : cm.imports) { + if (importMapping.containsKey(modelImport)) { + modelImports.add(importMapping.get(modelImport)); + } else { + if (!modelToIgnore.contains(modelImport.toLowerCase(Locale.ROOT))) { + modelImports.add(pubName + "/model/" + underscore(modelImport)); + } + } + } + + cm.imports = modelImports; + cm.vendorExtensions.put("hasVars", cm.vars.size() > 0); + } + return objs; + } + + @Override + public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { + if (nullableFields) { + property.isNullable = true; + } + + if (property.isListContainer) { + //Updates any List properties on a model to a BuiltList. This happens in post processing rather + //than type mapping as we only want this to apply to models, not every other class. + if ("List".equals(property.baseType)) { + property.setDatatype(property.dataType.replaceAll(property.baseType, "BuiltList")); + property.setBaseType("BuiltList"); + model.imports.add("BuiltList"); + } + } + if (property.isMapContainer) { + //Updates any List properties on a model to a BuiltList. This happens in post processing rather + //than type mapping as we only want this to apply to models, not every other class. + if ("Map".equals(property.baseType)) { + property.setDatatype(property.dataType.replaceAll(property.baseType, "BuiltMap")); + property.setBaseType("BuiltMap"); + model.imports.add("BuiltMap"); + } + } + + } + + @Override + public Map postProcessOperationsWithModels(Map objs, List allModels) { + objs = super.postProcessOperationsWithModels(objs, allModels); + Map operations = (Map) objs.get("operations"); + List operationList = (List) operations.get("operation"); + + Set modelImports = new HashSet<>(); + Set fullImports = new HashSet<>(); + + for (CodegenOperation op : operationList) { + op.httpMethod = op.httpMethod.toLowerCase(Locale.ROOT); + boolean isJson = true; //default to JSON + boolean isForm = false; + boolean isMultipart = false; + if (op.consumes != null) { + for (Map consume : op.consumes) { + if (consume.containsKey("mediaType")) { + String type = consume.get("mediaType"); + isJson = type.equalsIgnoreCase("application/json"); + isForm = type.equalsIgnoreCase("application/x-www-form-urlencoded"); + isMultipart = type.equalsIgnoreCase("multipart/form-data"); + break; + } + } + } + + for (CodegenParameter param : op.bodyParams) { + if (param.baseType != null && param.baseType.equalsIgnoreCase("Uint8List") && isMultipart) { + param.baseType = "MultipartFile"; + param.dataType = "MultipartFile"; + } + } + + op.vendorExtensions.put("isJson", isJson); + op.vendorExtensions.put("isForm", isForm); + op.vendorExtensions.put("isMultipart", isMultipart); + + Set imports = new HashSet<>(); + for (String item : op.imports) { + if (!modelToIgnore.contains(item.toLowerCase(Locale.ROOT))) { + imports.add(underscore(item)); + } else if (item.equalsIgnoreCase("Uint8List")) { + fullImports.add("dart:typed_data"); + } + } + modelImports.addAll(imports); + op.imports = imports; + } + + objs.put("modelImports", modelImports); + objs.put("fullImports", fullImports); + + return objs; + } +} diff --git a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig index 67c0f473b506..3313be307ce8 100644 --- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig +++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig @@ -20,6 +20,7 @@ org.openapitools.codegen.languages.CSharpNetCoreClientCodegen org.openapitools.codegen.languages.CSharpDotNet2ClientCodegen org.openapitools.codegen.languages.CSharpNancyFXServerCodegen org.openapitools.codegen.languages.DartClientCodegen +org.openapitools.codegen.languages.DartDioClientCodegen org.openapitools.codegen.languages.DartJaguarClientCodegen org.openapitools.codegen.languages.EiffelClientCodegen org.openapitools.codegen.languages.ElixirClientCodegen diff --git a/modules/openapi-generator/src/main/resources/dart-dio/README.mustache b/modules/openapi-generator/src/main/resources/dart-dio/README.mustache new file mode 100644 index 000000000000..1367a32a5daf --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/README.mustache @@ -0,0 +1,110 @@ +# {{pubName}} +{{#appDescription}} +{{{appDescription}}} +{{/appDescription}} + +This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: {{appVersion}} +{{#artifactVersion}} +- Package version: {{artifactVersion}} +{{/artifactVersion}} +{{^hideGenerationTimestamp}} +- Build date: {{generatedDate}} +{{/hideGenerationTimestamp}} +- Build package: {{generatorClass}} +{{#infoUrl}} +For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) +{{/infoUrl}} + +## Requirements + +Dart 1.20.0 or later OR Flutter 0.0.20 or later + +## Installation & Usage + +### Github +If this Dart package is published to Github, please include the following in pubspec.yaml +``` +name: {{pubName}} +version: {{pubVersion}} +description: {{pubDescription}} +dependencies: + {{pubName}}: + git: https://github.com/{{gitUserId}}/{{gitRepoId}}.git + version: 'any' +``` + +### Local +To use the package in your local drive, please include the following in pubspec.yaml +``` +dependencies: + {{pubName}}: + path: /path/to/{{pubName}} +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```dart +import 'package:{{pubName}}/api.dart'; +{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} + +var api_instance = new {{classname}}(); +{{#allParams}} +var {{paramName}} = {{#isListContainer}}[{{/isListContainer}}{{#isBodyParam}}new {{dataType}}(){{/isBodyParam}}{{^isBodyParam}}{{{example}}}{{/isBodyParam}}{{#isListContainer}}]{{/isListContainer}}; // {{{dataType}}} | {{{description}}} +{{/allParams}} + +try { + {{#returnType}}var result = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + {{#returnType}} + print(result); + {{/returnType}} +} catch (e) { + print("Exception when calling {{classname}}->{{operationId}}: $e\n"); +} +{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} +``` + +## Documentation for API Endpoints + +All URIs are relative to *{{basePath}}* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}/{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} + +## Documentation For Models + +{{#models}}{{#model}} - [{{{classname}}}]({{modelDocPath}}/{{{classname}}}.md) +{{/model}}{{/models}} + +## Documentation For Authorization + +{{^authMethods}} All endpoints do not require authorization. +{{/authMethods}}{{#authMethods}}{{#last}} Authentication schemes defined for the API:{{/last}}{{/authMethods}} +{{#authMethods}}## {{{name}}} + +{{#isApiKey}}- **Type**: API key +- **API key parameter name**: {{{keyParamName}}} +- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} +{{/isApiKey}} +{{#isBasic}}- **Type**: HTTP basic authentication +{{/isBasic}} +{{#isOAuth}}- **Type**: OAuth +- **Flow**: {{{flow}}} +- **Authorization URL**: {{{authorizationUrl}}} +- **Scopes**: {{^scopes}}N/A{{/scopes}} +{{#scopes}} - **{{{scope}}}**: {{{description}}} +{{/scopes}} +{{/isOAuth}} + +{{/authMethods}} + +## Author + +{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}} +{{/hasMore}}{{/apis}}{{/apiInfo}} + diff --git a/modules/openapi-generator/src/main/resources/dart-dio/analysis_options.mustache b/modules/openapi-generator/src/main/resources/dart-dio/analysis_options.mustache new file mode 100644 index 000000000000..655cb67bd888 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/analysis_options.mustache @@ -0,0 +1 @@ +analyzer: \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache new file mode 100644 index 000000000000..b190d6639570 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache @@ -0,0 +1,94 @@ +import 'dart:async'; +import 'dart:io'; +import 'dart:convert'; +import 'package:dio/dio.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/serializer.dart'; + +{{#operations}} +{{#modelImports}}import 'package:{{pubName}}/model/{{.}}.dart'; +{{/modelImports}} +{{#fullImports}}import '{{.}}'; +{{/fullImports}} + +class {{classname}} { + final Dio _dio; + Serializers _serializers; + + {{classname}}(this._dio, this._serializers); + + {{#operation}} + /// {{summary}} + /// + /// {{notes}} + Future{{/returnType}}>{{nickname}}({{#allParams}}{{#required}}{{{dataType}}} {{paramName}},{{/required}}{{/allParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{paramName}},{{/required}}{{/allParams}}CancelToken cancelToken, Map headers,}) async { + + String path = "{{{path}}}"{{#pathParams}}.replaceAll("{" + "{{baseName}}" + "}", {{{paramName}}}.toString()){{/pathParams}}; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + Map formParams = {}; + + {{#headerParams}} + headerParams["{{baseName}}"] = {{paramName}}; + {{/headerParams}} + {{#queryParams}} + queryParams["{{baseName}}"] = {{paramName}}; + {{/queryParams}} + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = [{{#consumes}} + "{{{mediaType}}}"{{#hasMore}},{{/hasMore}}{{/consumes}}]; + + {{#bodyParam}} + {{#isListContainer}} + final type = const FullType(BuiltList, const [const FullType({{baseType}})]); + var serializedBody = _serializers.serialize(BuiltList<{{baseType}}>.from({{paramName}}), specifiedType: type); + {{/isListContainer}} + {{^isListContainer}} + var serializedBody = _serializers.serialize({{paramName}}); + {{/isListContainer}} + var data = json.encode(serializedBody); + {{/bodyParam}} + + return _dio.request( + path, + queryParameters: queryParams, + {{#bodyParam}} + data: data, + {{/bodyParam}} + options: Options( + method: '{{httpMethod}}'.toUpperCase(), + headers: headerParams, + contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ){{#returnType}}.then((response) { + + {{#isListContainer}} + final FullType type = const FullType(BuiltList, const [const FullType({{returnBaseType}})]); + BuiltList<{{returnBaseType}}> dataList = _serializers.deserialize(response.data, specifiedType: type); + var data = dataList.toList(); + {{/isListContainer}} + {{^isListContainer}} + var serializer = _serializers.serializerForType({{{returnType}}}); + var data = _serializers.deserializeWith<{{{returnType}}}>(serializer, response.data); + {{/isListContainer}} + + return Response<{{{returnType}}}>( + data: data, + headers: response.headers, + request: response.request, + redirects: response.redirects, + statusCode: response.statusCode, + statusMessage: response.statusMessage, + extra: response.extra, + ); + }){{/returnType}}; + } + {{/operation}} + } +{{/operations}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api_doc.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api_doc.mustache new file mode 100644 index 000000000000..773ee0d562e1 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/api_doc.mustache @@ -0,0 +1,86 @@ +# {{pubName}}.api.{{classname}}{{#description}} +{{description}}{{/description}} + +## Load the API package +```dart +import 'package:{{pubName}}/api.dart'; +``` + +All URIs are relative to *{{basePath}}* + +Method | HTTP request | Description +------------- | ------------- | ------------- +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{/operation}}{{/operations}} + +{{#operations}} +{{#operation}} +# **{{{operationId}}}** +> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) + +{{{summary}}}{{#notes}} + +{{{notes}}}{{/notes}} + +### Example +```dart +import 'package:{{pubName}}/api.dart'; +{{#hasAuthMethods}} +{{#authMethods}} +{{#isBasic}} +// TODO Configure HTTP basic authorization: {{{name}}} +//defaultApiClient.getAuthentication('{{{name}}}').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('{{{name}}}').password = 'YOUR_PASSWORD'; +{{/isBasic}} +{{#isApiKey}} +// TODO Configure API key authorization: {{{name}}} +//defaultApiClient.getAuthentication('{{{name}}}').apiKey = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//defaultApiClient.getAuthentication('{{{name}}}').apiKeyPrefix = 'Bearer'; +{{/isApiKey}} +{{#isOAuth}} +// TODO Configure OAuth2 access token for authorization: {{{name}}} +//defaultApiClient.getAuthentication('{{{name}}}').accessToken = 'YOUR_ACCESS_TOKEN'; +{{/isOAuth}} +{{/authMethods}} +{{/hasAuthMethods}} + +var api_instance = new {{classname}}(); +{{#allParams}} +var {{paramName}} = {{#isListContainer}}[{{/isListContainer}}{{#isBodyParam}}new {{dataType}}(){{/isBodyParam}}{{^isBodyParam}}{{{example}}}{{/isBodyParam}}{{#isListContainer}}]{{/isListContainer}}; // {{{dataType}}} | {{{description}}} +{{/allParams}} + +try { + {{#returnType}}var result = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + {{#returnType}} + print(result); + {{/returnType}} +} catch (e) { + print("Exception when calling {{classname}}->{{operationId}}: $e\n"); +} +``` + +### Parameters +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} +Name | Type | Description | Notes +------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{baseType}}.md){{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{/allParams}} + +### Return type + +{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} + +### Authorization + +{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../README.md#{{{name}}}){{^-last}}, {{/-last}}{{/authMethods}} + +### HTTP request headers + + - **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} + - **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} + +[[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) + +{{/operation}} +{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache b/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache new file mode 100644 index 000000000000..11690b8c28ba --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache @@ -0,0 +1,39 @@ +library {{pubName}}.api; + +import 'package:http/io_client.dart'; +import 'package:dio/dio.dart'; +import 'package:built_value/serializer.dart'; +import 'package:{{pubName}}/serializers.dart'; +{{#apiInfo}}{{#apis}}import 'package:{{pubName}}/api/{{classFilename}}.dart'; +{{/apis}}{{/apiInfo}} + +class {{clientName}} { + + Dio dio; + Serializers serializers; + String basePath = "http://petstore.swagger.io/v2"; + + {{clientName}}({this.dio, Serializers serializers}) { + if (dio == null) { + BaseOptions options = new BaseOptions( + baseUrl: basePath, + connectTimeout: 5000, + receiveTimeout: 3000, + ); + this.dio = new Dio(options); + } + + this.serializers = serializers ?? standardSerializers; +} + +{{#apiInfo}}{{#apis}} + /** + * Get {{classname}} instance, base route and serializer can be overridden by a given but be careful, + * by doing that all interceptors will not be executed + */ + {{classname}} get{{classname}}() { + return {{classname}}(dio, serializers); + } + +{{/apis}}{{/apiInfo}} +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-dio/class.mustache b/modules/openapi-generator/src/main/resources/dart-dio/class.mustache new file mode 100644 index 000000000000..41743a4235cb --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/class.mustache @@ -0,0 +1,28 @@ +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part '{{classFilename}}.g.dart'; + +abstract class {{classname}} implements Built<{{classname}}, {{classname}}Builder> { + +{{#vars}} + {{#description}}/* {{{description}}} */{{/description}} + {{#isNullable}} + @nullable + {{/isNullable}} + + {{#description}}/* {{{description}}} */{{/description}} + @BuiltValueField(wireName: '{{baseName}}') + {{{dataType}}} get {{name}}; + {{#allowableValues}} + {{#min}} // range from {{min}} to {{max}}{{/min}}//{{^min}}enum {{name}}Enum { {{#values}} {{.}}, {{/values}} };{{/min}}{ + {{/allowableValues}} +{{/vars}} + + // Boilerplate code needed to wire-up generated code + {{classname}}._(); + + factory {{classname}}([updates({{classname}}Builder b)]) = _${{classname}}; + static Serializer<{{classname}}> get serializer => _${{classVarName}}Serializer; + +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-dio/enum.mustache b/modules/openapi-generator/src/main/resources/dart-dio/enum.mustache new file mode 100644 index 000000000000..d4a4d2b8d111 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/enum.mustache @@ -0,0 +1,36 @@ +@Entity() +class {{classname}} { + /// The underlying value of this enum member. + final {{dataType}} value; + + const {{classname}}._internal(this.value); + + {{#allowableValues}} + {{#enumVars}} + {{#description}} + /// {{description}} + {{/description}} + static const {{classname}} {{{name}}} = const {{classname}}._internal({{{value}}}); + {{/enumVars}} + {{/allowableValues}} +} + +class {{classname}}TypeTransformer extends TypeTransformer<{{classname}}> { + + @override + dynamic encode({{classname}} data) { + return data.value; + } + + @override + {{classname}} decode(dynamic data) { + switch (data) { + {{#allowableValues}} + {{#enumVars}} + case {{{value}}}: return {{classname}}.{{{name}}}; + {{/enumVars}} + {{/allowableValues}} + default: throw('Unknown enum value to decode: $data'); + } + } +} diff --git a/modules/openapi-generator/src/main/resources/dart-dio/gitignore.mustache b/modules/openapi-generator/src/main/resources/dart-dio/gitignore.mustache new file mode 100644 index 000000000000..7c2804416498 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/gitignore.mustache @@ -0,0 +1,27 @@ +# See https://www.dartlang.org/tools/private-files.html + +# Files and directories created by pub +.buildlog +.packages +.project +.pub/ +build/ +**/packages/ + +# Files created by dart2js +# (Most Dart developers will use pub build to compile Dart, use/modify these +# rules if you intend to use dart2js directly +# Convention is to use extension '.dart.js' for Dart compiled to Javascript to +# differentiate from explicit Javascript files) +*.dart.js +*.part.js +*.js.deps +*.js.map +*.info.json + +# Directory created by dartdoc +doc/api/ + +# Don't commit pubspec lock file +# (Library packages only! Remove pattern if developing an application package) +pubspec.lock diff --git a/modules/openapi-generator/src/main/resources/dart-dio/model.mustache b/modules/openapi-generator/src/main/resources/dart-dio/model.mustache new file mode 100644 index 000000000000..da50fb566125 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/model.mustache @@ -0,0 +1,8 @@ +{{#models}} + {{#model}} + {{#imports}} + import 'package:{{.}}.dart'; + {{/imports}} + {{#isEnum}}{{>enum}}{{/isEnum}}{{^isEnum}}{{>class}}{{/isEnum}} + {{/model}} +{{/models}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-dio/object_doc.mustache b/modules/openapi-generator/src/main/resources/dart-dio/object_doc.mustache new file mode 100644 index 000000000000..657f84d8905e --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/object_doc.mustache @@ -0,0 +1,16 @@ +{{#models}}{{#model}}# {{pubName}}.model.{{classname}} + +## Load the model package +```dart +import 'package:{{pubName}}/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{/vars}} + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + +{{/model}}{{/models}} diff --git a/modules/openapi-generator/src/main/resources/dart-dio/pubspec.mustache b/modules/openapi-generator/src/main/resources/dart-dio/pubspec.mustache new file mode 100644 index 000000000000..d69417f7cbdb --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/pubspec.mustache @@ -0,0 +1,13 @@ +name: {{pubName}} +version: {{pubVersion}} +description: {{pubDescription}} +environment: + sdk: ">=2.3.0 <3.0.0" +dependencies: + dio: ^3.0.3 + built_value: 6.7.0 + built_collection: 4.2.2 +dev_dependencies: + built_value_generator: ^6.7.1 + build_runner: ^1.7.1 + test: 1.6.5 \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache b/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache new file mode 100644 index 000000000000..141eaa307e4c --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache @@ -0,0 +1,26 @@ +library serializers; + +import 'package:built_value/serializer.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/standard_json_plugin.dart'; + +{{#models}}{{#model}}import 'package:{{pubName}}/model/{{classFilename}}.dart'; +{{/model}}{{/models}} + +part 'serializers.g.dart'; + +@SerializersFor(const [ +{{#models}}{{#model}}{{classname}}, +{{/model}}{{/models}} +]) + +//allow all models to be serialized within a list +Serializers serializers = (_$serializers.toBuilder() +{{#models}}{{#model}}..addBuilderFactory( +const FullType(BuiltList, const [const FullType({{classname}})]), +() => new ListBuilder<{{classname}}>()) +{{/model}}{{/models}} +).build(); + +Serializers standardSerializers = +(serializers.toBuilder()..addPlugin(StandardJsonPlugin())).build(); \ No newline at end of file diff --git a/samples/client/petstore/dart-dio/.gitignore b/samples/client/petstore/dart-dio/.gitignore new file mode 100644 index 000000000000..7c2804416498 --- /dev/null +++ b/samples/client/petstore/dart-dio/.gitignore @@ -0,0 +1,27 @@ +# See https://www.dartlang.org/tools/private-files.html + +# Files and directories created by pub +.buildlog +.packages +.project +.pub/ +build/ +**/packages/ + +# Files created by dart2js +# (Most Dart developers will use pub build to compile Dart, use/modify these +# rules if you intend to use dart2js directly +# Convention is to use extension '.dart.js' for Dart compiled to Javascript to +# differentiate from explicit Javascript files) +*.dart.js +*.part.js +*.js.deps +*.js.map +*.info.json + +# Directory created by dartdoc +doc/api/ + +# Don't commit pubspec lock file +# (Library packages only! Remove pattern if developing an application package) +pubspec.lock diff --git a/samples/client/petstore/dart-dio/.openapi-generator-ignore b/samples/client/petstore/dart-dio/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/client/petstore/dart-dio/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# 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 OpenAPI Generator 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 +# This 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/dart-dio/.openapi-generator/VERSION b/samples/client/petstore/dart-dio/.openapi-generator/VERSION new file mode 100644 index 000000000000..0e97bd19efbf --- /dev/null +++ b/samples/client/petstore/dart-dio/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.1.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart-dio/README.md b/samples/client/petstore/dart-dio/README.md new file mode 100644 index 000000000000..ded15d6b9238 --- /dev/null +++ b/samples/client/petstore/dart-dio/README.md @@ -0,0 +1,116 @@ +# openapi +This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + +This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 1.0.0 +- Build date: 2019-10-03T14:20:56.615+13:00[Pacific/Auckland] +- Build package: org.openapitools.codegen.languages.DartDioClientCodegen + +## Requirements + +Dart 1.20.0 or later OR Flutter 0.0.20 or later + +## Installation & Usage + +### Github +If this Dart package is published to Github, please include the following in pubspec.yaml +``` +name: openapi +version: 1.0.0 +description: OpenAPI API client +dependencies: + openapi: + git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git + version: 'any' +``` + +### Local +To use the package in your local drive, please include the following in pubspec.yaml +``` +dependencies: + openapi: + path: /path/to/openapi +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```dart +import 'package:openapi/api.dart'; + + +var api_instance = new PetApi(); +var body = new Pet(); // Pet | Pet object that needs to be added to the store + +try { + api_instance.addPet(body); +} catch (e) { + print("Exception when calling PetApi->addPet: $e\n"); +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*PetApi* | [**addPet**](docs//PetApi.md#addpet) | **post** /pet | Add a new pet to the store +*PetApi* | [**deletePet**](docs//PetApi.md#deletepet) | **delete** /pet/{petId} | Deletes a pet +*PetApi* | [**findPetsByStatus**](docs//PetApi.md#findpetsbystatus) | **get** /pet/findByStatus | Finds Pets by status +*PetApi* | [**findPetsByTags**](docs//PetApi.md#findpetsbytags) | **get** /pet/findByTags | Finds Pets by tags +*PetApi* | [**getPetById**](docs//PetApi.md#getpetbyid) | **get** /pet/{petId} | Find pet by ID +*PetApi* | [**updatePet**](docs//PetApi.md#updatepet) | **put** /pet | Update an existing pet +*PetApi* | [**updatePetWithForm**](docs//PetApi.md#updatepetwithform) | **post** /pet/{petId} | Updates a pet in the store with form data +*PetApi* | [**uploadFile**](docs//PetApi.md#uploadfile) | **post** /pet/{petId}/uploadImage | uploads an image +*StoreApi* | [**deleteOrder**](docs//StoreApi.md#deleteorder) | **delete** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**getInventory**](docs//StoreApi.md#getinventory) | **get** /store/inventory | Returns pet inventories by status +*StoreApi* | [**getOrderById**](docs//StoreApi.md#getorderbyid) | **get** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**placeOrder**](docs//StoreApi.md#placeorder) | **post** /store/order | Place an order for a pet +*UserApi* | [**createUser**](docs//UserApi.md#createuser) | **post** /user | Create user +*UserApi* | [**createUsersWithArrayInput**](docs//UserApi.md#createuserswitharrayinput) | **post** /user/createWithArray | Creates list of users with given input array +*UserApi* | [**createUsersWithListInput**](docs//UserApi.md#createuserswithlistinput) | **post** /user/createWithList | Creates list of users with given input array +*UserApi* | [**deleteUser**](docs//UserApi.md#deleteuser) | **delete** /user/{username} | Delete user +*UserApi* | [**getUserByName**](docs//UserApi.md#getuserbyname) | **get** /user/{username} | Get user by user name +*UserApi* | [**loginUser**](docs//UserApi.md#loginuser) | **get** /user/login | Logs user into the system +*UserApi* | [**logoutUser**](docs//UserApi.md#logoutuser) | **get** /user/logout | Logs out current logged in user session +*UserApi* | [**updateUser**](docs//UserApi.md#updateuser) | **put** /user/{username} | Updated user + + +## Documentation For Models + + - [ApiResponse](docs//ApiResponse.md) + - [Category](docs//Category.md) + - [Order](docs//Order.md) + - [Pet](docs//Pet.md) + - [Tag](docs//Tag.md) + - [User](docs//User.md) + + +## Documentation For Authorization + + +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +## petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + + +## Author + + + + diff --git a/samples/client/petstore/dart-dio/analysis_options.yaml b/samples/client/petstore/dart-dio/analysis_options.yaml new file mode 100644 index 000000000000..655cb67bd888 --- /dev/null +++ b/samples/client/petstore/dart-dio/analysis_options.yaml @@ -0,0 +1 @@ +analyzer: \ No newline at end of file diff --git a/samples/client/petstore/dart-dio/docs/ApiResponse.md b/samples/client/petstore/dart-dio/docs/ApiResponse.md new file mode 100644 index 000000000000..92422f0f446e --- /dev/null +++ b/samples/client/petstore/dart-dio/docs/ApiResponse.md @@ -0,0 +1,17 @@ +# openapi.model.ApiResponse + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | [optional] [default to null] +**type** | **String** | | [optional] [default to null] +**message** | **String** | | [optional] [default to null] + +[[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/dart-dio/docs/Category.md b/samples/client/petstore/dart-dio/docs/Category.md new file mode 100644 index 000000000000..cc0d1633b59c --- /dev/null +++ b/samples/client/petstore/dart-dio/docs/Category.md @@ -0,0 +1,16 @@ +# openapi.model.Category + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**name** | **String** | | [optional] [default to null] + +[[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/dart-dio/docs/Order.md b/samples/client/petstore/dart-dio/docs/Order.md new file mode 100644 index 000000000000..310ce6c65be3 --- /dev/null +++ b/samples/client/petstore/dart-dio/docs/Order.md @@ -0,0 +1,20 @@ +# openapi.model.Order + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**petId** | **int** | | [optional] [default to null] +**quantity** | **int** | | [optional] [default to null] +**shipDate** | [**DateTime**](DateTime.md) | | [optional] [default to null] +**status** | **String** | Order Status | [optional] [default to null] +**complete** | **bool** | | [optional] [default to false] + +[[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/dart-dio/docs/Pet.md b/samples/client/petstore/dart-dio/docs/Pet.md new file mode 100644 index 000000000000..619e45d18483 --- /dev/null +++ b/samples/client/petstore/dart-dio/docs/Pet.md @@ -0,0 +1,20 @@ +# openapi.model.Pet + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**category** | [**Category**](Category.md) | | [optional] [default to null] +**name** | **String** | | [default to null] +**photoUrls** | **BuiltList<String>** | | [default to const []] +**tags** | [**BuiltList<Tag>**](Tag.md) | | [optional] [default to const []] +**status** | **String** | pet status in the store | [optional] [default to null] + +[[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/dart-dio/docs/PetApi.md b/samples/client/petstore/dart-dio/docs/PetApi.md new file mode 100644 index 000000000000..e781974607c8 --- /dev/null +++ b/samples/client/petstore/dart-dio/docs/PetApi.md @@ -0,0 +1,379 @@ +# openapi.api.PetApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +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** +> addPet(body) + +Add a new pet to the store + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var body = new Pet(); // Pet | Pet object that needs to be added to the store + +try { + api_instance.addPet(body); +} catch (e) { + print("Exception when calling PetApi->addPet: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[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) + +# **deletePet** +> deletePet(petId, apiKey) + +Deletes a pet + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var petId = 789; // int | Pet id to delete +var apiKey = apiKey_example; // String | + +try { + api_instance.deletePet(petId, apiKey); +} catch (e) { + print("Exception when calling PetApi->deletePet: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| Pet id to delete | [default to null] + **apiKey** | **String**| | [optional] [default to null] + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[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) + +# **findPetsByStatus** +> List findPetsByStatus(status) + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var status = []; // List | Status values that need to be considered for filter + +try { + var result = api_instance.findPetsByStatus(status); + print(result); +} catch (e) { + print("Exception when calling PetApi->findPetsByStatus: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [default to const []] + +### Return type + +[**List**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[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) + +# **findPetsByTags** +> List findPetsByTags(tags) + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var tags = []; // List | Tags to filter by + +try { + var result = api_instance.findPetsByTags(tags); + print(result); +} catch (e) { + print("Exception when calling PetApi->findPetsByTags: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**List<String>**](String.md)| Tags to filter by | [default to const []] + +### Return type + +[**List**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[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) + +# **getPetById** +> Pet getPetById(petId) + +Find pet by ID + +Returns a single pet + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key +//defaultApiClient.getAuthentication('api_key').apiKey = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; + +var api_instance = new PetApi(); +var petId = 789; // int | ID of pet to return + +try { + var result = api_instance.getPetById(petId); + print(result); +} catch (e) { + print("Exception when calling PetApi->getPetById: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| ID of pet to return | [default to null] + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[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) + +# **updatePet** +> updatePet(body) + +Update an existing pet + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var body = new Pet(); // Pet | Pet object that needs to be added to the store + +try { + api_instance.updatePet(body); +} catch (e) { + print("Exception when calling PetApi->updatePet: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[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) + +# **updatePetWithForm** +> updatePetWithForm(petId, name, status) + +Updates a pet in the store with form data + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var petId = 789; // int | ID of pet that needs to be updated +var name = name_example; // String | Updated name of the pet +var status = status_example; // String | Updated status of the pet + +try { + api_instance.updatePetWithForm(petId, name, status); +} catch (e) { + print("Exception when calling PetApi->updatePetWithForm: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| ID of pet that needs to be updated | [default to null] + **name** | **String**| Updated name of the pet | [optional] [default to null] + **status** | **String**| Updated status of the pet | [optional] [default to null] + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[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) + +# **uploadFile** +> ApiResponse uploadFile(petId, additionalMetadata, file) + +uploads an image + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var petId = 789; // int | ID of pet to update +var additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server +var file = BINARY_DATA_HERE; // Uint8List | file to upload + +try { + var result = api_instance.uploadFile(petId, additionalMetadata, file); + print(result); +} catch (e) { + print("Exception when calling PetApi->uploadFile: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| ID of pet to update | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + **file** | **Uint8List**| file to upload | [optional] [default to null] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[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/dart-dio/docs/StoreApi.md b/samples/client/petstore/dart-dio/docs/StoreApi.md new file mode 100644 index 000000000000..33896baac9bf --- /dev/null +++ b/samples/client/petstore/dart-dio/docs/StoreApi.md @@ -0,0 +1,186 @@ +# openapi.api.StoreApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +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** +> 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 +```dart +import 'package:openapi/api.dart'; + +var api_instance = new StoreApi(); +var orderId = orderId_example; // String | ID of the order that needs to be deleted + +try { + api_instance.deleteOrder(orderId); +} catch (e) { + print("Exception when calling StoreApi->deleteOrder: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String**| ID of the order that needs to be deleted | [default to null] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[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) + +# **getInventory** +> Map getInventory() + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key +//defaultApiClient.getAuthentication('api_key').apiKey = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; + +var api_instance = new StoreApi(); + +try { + var result = api_instance.getInventory(); + print(result); +} catch (e) { + print("Exception when calling StoreApi->getInventory: $e\n"); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**Map** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + +# **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 +```dart +import 'package:openapi/api.dart'; + +var api_instance = new StoreApi(); +var orderId = 789; // int | ID of pet that needs to be fetched + +try { + var result = api_instance.getOrderById(orderId); + print(result); +} catch (e) { + print("Exception when calling StoreApi->getOrderById: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **int**| ID of pet that needs to be fetched | [default to null] + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[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) + +# **placeOrder** +> Order placeOrder(body) + +Place an order for a pet + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new StoreApi(); +var body = new Order(); // Order | order placed for purchasing the pet + +try { + var result = api_instance.placeOrder(body); + print(result); +} catch (e) { + print("Exception when calling StoreApi->placeOrder: $e\n"); +} +``` + +### 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 + +[[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/dart-dio/docs/Tag.md b/samples/client/petstore/dart-dio/docs/Tag.md new file mode 100644 index 000000000000..ded7b32ac3d7 --- /dev/null +++ b/samples/client/petstore/dart-dio/docs/Tag.md @@ -0,0 +1,16 @@ +# openapi.model.Tag + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**name** | **String** | | [optional] [default to null] + +[[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/dart-dio/docs/User.md b/samples/client/petstore/dart-dio/docs/User.md new file mode 100644 index 000000000000..3761b70cf0b7 --- /dev/null +++ b/samples/client/petstore/dart-dio/docs/User.md @@ -0,0 +1,22 @@ +# openapi.model.User + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**username** | **String** | | [optional] [default to null] +**firstName** | **String** | | [optional] [default to null] +**lastName** | **String** | | [optional] [default to null] +**email** | **String** | | [optional] [default to null] +**password** | **String** | | [optional] [default to null] +**phone** | **String** | | [optional] [default to null] +**userStatus** | **int** | User Status | [optional] [default to null] + +[[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/dart-dio/docs/UserApi.md b/samples/client/petstore/dart-dio/docs/UserApi.md new file mode 100644 index 000000000000..052dc20aef76 --- /dev/null +++ b/samples/client/petstore/dart-dio/docs/UserApi.md @@ -0,0 +1,349 @@ +# openapi.api.UserApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +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** +> createUser(body) + +Create user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); +var body = new User(); // User | Created user object + +try { + api_instance.createUser(body); +} catch (e) { + print("Exception when calling UserApi->createUser: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md)| Created user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[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) + +# **createUsersWithArrayInput** +> createUsersWithArrayInput(body) + +Creates list of users with given input array + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); +var body = [new List<User>()]; // List | List of user object + +try { + api_instance.createUsersWithArrayInput(body); +} catch (e) { + print("Exception when calling UserApi->createUsersWithArrayInput: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**List<User>**](User.md)| List of user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[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) + +# **createUsersWithListInput** +> createUsersWithListInput(body) + +Creates list of users with given input array + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); +var body = [new List<User>()]; // List | List of user object + +try { + api_instance.createUsersWithListInput(body); +} catch (e) { + print("Exception when calling UserApi->createUsersWithListInput: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**List<User>**](User.md)| List of user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[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) + +# **deleteUser** +> deleteUser(username) + +Delete user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); +var username = username_example; // String | The name that needs to be deleted + +try { + api_instance.deleteUser(username); +} catch (e) { + print("Exception when calling UserApi->deleteUser: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be deleted | [default to null] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[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) + +# **getUserByName** +> User getUserByName(username) + +Get user by user name + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); +var username = username_example; // String | The name that needs to be fetched. Use user1 for testing. + +try { + var result = api_instance.getUserByName(username); + print(result); +} catch (e) { + print("Exception when calling UserApi->getUserByName: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be fetched. Use user1 for testing. | [default to null] + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[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) + +# **loginUser** +> String loginUser(username, password) + +Logs user into the system + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); +var username = username_example; // String | The user name for login +var password = password_example; // String | The password for login in clear text + +try { + var result = api_instance.loginUser(username, password); + print(result); +} catch (e) { + print("Exception when calling UserApi->loginUser: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The user name for login | [default to null] + **password** | **String**| The password for login in clear text | [default to null] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[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) + +# **logoutUser** +> logoutUser() + +Logs out current logged in user session + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); + +try { + api_instance.logoutUser(); +} catch (e) { + print("Exception when calling UserApi->logoutUser: $e\n"); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[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) + +# **updateUser** +> updateUser(username, body) + +Updated user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); +var username = username_example; // String | name that need to be deleted +var body = new User(); // User | Updated user object + +try { + api_instance.updateUser(username, body); +} catch (e) { + print("Exception when calling UserApi->updateUser: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| name that need to be deleted | [default to null] + **body** | [**User**](User.md)| Updated user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[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/dart-dio/lib/api.dart b/samples/client/petstore/dart-dio/lib/api.dart new file mode 100644 index 000000000000..b2575064fbf3 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/api.dart @@ -0,0 +1,52 @@ +library openapi.api; + +import 'package:http/io_client.dart'; +import 'package:dio/dio.dart'; +import 'package:built_value/serializer.dart'; +import 'package:openapi/serializers.dart'; +import 'package:openapi/api/pet_api.dart'; +import 'package:openapi/api/store_api.dart'; +import 'package:openapi/api/user_api.dart'; + +class Openapi { + Dio dio; + Serializers serializers; + String basePath = "http://petstore.swagger.io/v2"; + + Openapi({this.dio, Serializers serializers}) { + if (dio == null) { + BaseOptions options = new BaseOptions( + baseUrl: basePath, + connectTimeout: 5000, + receiveTimeout: 3000, + ); + this.dio = new Dio(options); + } + + this.serializers = serializers ?? standardSerializers; + } + + /** + * Get PetApi instance, base route and serializer can be overridden by a given but be careful, + * by doing that all interceptors will not be executed + */ + PetApi getPetApi() { + return PetApi(dio, serializers); + } + + /** + * Get StoreApi instance, base route and serializer can be overridden by a given but be careful, + * by doing that all interceptors will not be executed + */ + StoreApi getStoreApi() { + return StoreApi(dio, serializers); + } + + /** + * Get UserApi instance, base route and serializer can be overridden by a given but be careful, + * by doing that all interceptors will not be executed + */ + UserApi getUserApi() { + return UserApi(dio, serializers); + } +} diff --git a/samples/client/petstore/dart-dio/lib/api/pet_api.dart b/samples/client/petstore/dart-dio/lib/api/pet_api.dart new file mode 100644 index 000000000000..fee534d8540c --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/api/pet_api.dart @@ -0,0 +1,376 @@ +import 'dart:async'; +import 'dart:io'; +import 'dart:convert'; +import 'package:dio/dio.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/serializer.dart'; + +import 'package:openapi/model/pet.dart'; +import 'package:openapi/model/api_response.dart'; +import 'dart:typed_data'; + +class PetApi { + final Dio _dio; + Serializers _serializers; + + PetApi(this._dio, this._serializers); + + /// Add a new pet to the store + /// + /// + Future addPet( + Pet body, { + CancelToken cancelToken, + Map headers, + }) async { + String path = "/pet"; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = ["application/json", "application/xml"]; + + var serializedBody = _serializers.serialize(body); + var data = json.encode(serializedBody); + + return _dio.request( + path, + queryParameters: queryParams, + data: data, + options: Options( + method: 'post'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ); + } + + /// Deletes a pet + /// + /// + Future deletePet( + int petId, { + String apiKey, + CancelToken cancelToken, + Map headers, + }) async { + String path = + "/pet/{petId}".replaceAll("{" + "petId" + "}", petId.toString()); + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + headerParams["api_key"] = apiKey; + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + return _dio.request( + path, + queryParameters: queryParams, + options: Options( + method: 'delete'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ); + } + + /// Finds Pets by status + /// + /// Multiple status values can be provided with comma separated strings + Future>> findPetsByStatus( + List status, { + CancelToken cancelToken, + Map headers, + }) async { + String path = "/pet/findByStatus"; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams["status"] = status; + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + return _dio + .request( + path, + queryParameters: queryParams, + options: Options( + method: 'get'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ) + .then((response) { + final FullType type = + const FullType(BuiltList, const [const FullType(Pet)]); + BuiltList dataList = + _serializers.deserialize(response.data, specifiedType: type); + var data = dataList.toList(); + + return Response>( + data: data, + headers: response.headers, + request: response.request, + redirects: response.redirects, + statusCode: response.statusCode, + statusMessage: response.statusMessage, + extra: response.extra, + ); + }); + } + + /// Finds Pets by tags + /// + /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + Future>> findPetsByTags( + List tags, { + CancelToken cancelToken, + Map headers, + }) async { + String path = "/pet/findByTags"; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams["tags"] = tags; + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + return _dio + .request( + path, + queryParameters: queryParams, + options: Options( + method: 'get'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ) + .then((response) { + final FullType type = + const FullType(BuiltList, const [const FullType(Pet)]); + BuiltList dataList = + _serializers.deserialize(response.data, specifiedType: type); + var data = dataList.toList(); + + return Response>( + data: data, + headers: response.headers, + request: response.request, + redirects: response.redirects, + statusCode: response.statusCode, + statusMessage: response.statusMessage, + extra: response.extra, + ); + }); + } + + /// Find pet by ID + /// + /// Returns a single pet + Future> getPetById( + int petId, { + CancelToken cancelToken, + Map headers, + }) async { + String path = + "/pet/{petId}".replaceAll("{" + "petId" + "}", petId.toString()); + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + return _dio + .request( + path, + queryParameters: queryParams, + options: Options( + method: 'get'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ) + .then((response) { + var serializer = _serializers.serializerForType(Pet); + var data = _serializers.deserializeWith(serializer, response.data); + + return Response( + data: data, + headers: response.headers, + request: response.request, + redirects: response.redirects, + statusCode: response.statusCode, + statusMessage: response.statusMessage, + extra: response.extra, + ); + }); + } + + /// Update an existing pet + /// + /// + Future updatePet( + Pet body, { + CancelToken cancelToken, + Map headers, + }) async { + String path = "/pet"; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = ["application/json", "application/xml"]; + + var serializedBody = _serializers.serialize(body); + var data = json.encode(serializedBody); + + return _dio.request( + path, + queryParameters: queryParams, + data: data, + options: Options( + method: 'put'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ); + } + + /// Updates a pet in the store with form data + /// + /// + Future updatePetWithForm( + int petId, { + String name, + String status, + CancelToken cancelToken, + Map headers, + }) async { + String path = + "/pet/{petId}".replaceAll("{" + "petId" + "}", petId.toString()); + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = ["application/x-www-form-urlencoded"]; + + return _dio.request( + path, + queryParameters: queryParams, + options: Options( + method: 'post'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ); + } + + /// uploads an image + /// + /// + Future> uploadFile( + int petId, { + String additionalMetadata, + Uint8List file, + CancelToken cancelToken, + Map headers, + }) async { + String path = "/pet/{petId}/uploadImage" + .replaceAll("{" + "petId" + "}", petId.toString()); + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = ["multipart/form-data"]; + + return _dio + .request( + path, + queryParameters: queryParams, + options: Options( + method: 'post'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ) + .then((response) { + var serializer = _serializers.serializerForType(ApiResponse); + var data = + _serializers.deserializeWith(serializer, response.data); + + return Response( + data: data, + headers: response.headers, + request: response.request, + redirects: response.redirects, + statusCode: response.statusCode, + statusMessage: response.statusMessage, + extra: response.extra, + ); + }); + } +} diff --git a/samples/client/petstore/dart-dio/lib/api/store_api.dart b/samples/client/petstore/dart-dio/lib/api/store_api.dart new file mode 100644 index 000000000000..440dcd604b8a --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/api/store_api.dart @@ -0,0 +1,180 @@ +import 'dart:async'; +import 'dart:io'; +import 'dart:convert'; +import 'package:dio/dio.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/serializer.dart'; + +import 'package:openapi/model/order.dart'; + +class StoreApi { + final Dio _dio; + Serializers _serializers; + + StoreApi(this._dio, this._serializers); + + /// Delete purchase order by ID + /// + /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + Future deleteOrder(String orderId, { CancelToken cancelToken, Map headers,}) async { + String path = "/store/order/{orderId}".replaceAll("{" + "orderId" + "}", orderId.toString()); + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + + return _dio.request( + path, + queryParameters: queryParams, + options: Options( + method: 'delete'.toUpperCase(), + headers: headerParams, + contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ); + } + /// Returns pet inventories by status + /// + /// Returns a map of status codes to quantities + Future>>getInventory({ CancelToken cancelToken, Map headers,}) async { + + String path = "/store/inventory"; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + + return _dio.request( + path, + queryParameters: queryParams, + options: Options( + method: 'get'.toUpperCase(), + headers: headerParams, + contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ).then((response) { + + var serializer = _serializers.serializerForType(Map); + var data = _serializers.deserializeWith>(serializer, response.data); + + return Response>( + data: data, + headers: response.headers, + request: response.request, + redirects: response.redirects, + statusCode: response.statusCode, + statusMessage: response.statusMessage, + extra: response.extra, + ); + }); + } + /// Find purchase order by ID + /// + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + Future>getOrderById(int orderId,{ CancelToken cancelToken, Map headers,}) async { + + String path = "/store/order/{orderId}".replaceAll("{" + "orderId" + "}", orderId.toString()); + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + + return _dio.request( + path, + queryParameters: queryParams, + options: Options( + method: 'get'.toUpperCase(), + headers: headerParams, + contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ).then((response) { + + var serializer = _serializers.serializerForType(Order); + var data = _serializers.deserializeWith(serializer, response.data); + + return Response( + data: data, + headers: response.headers, + request: response.request, + redirects: response.redirects, + statusCode: response.statusCode, + statusMessage: response.statusMessage, + extra: response.extra, + ); + }); + } + /// Place an order for a pet + /// + /// + Future>placeOrder(Order body,{ CancelToken cancelToken, Map headers,}) async { + + String path = "/store/order"; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + var serializedBody = _serializers.serialize(body); + var data = json.encode(serializedBody); + + return _dio.request( + path, + queryParameters: queryParams, + data: data, + options: Options( + method: 'post'.toUpperCase(), + headers: headerParams, + contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ).then((response) { + + var serializer = _serializers.serializerForType(Order); + var data = _serializers.deserializeWith(serializer, response.data); + + return Response( + data: data, + headers: response.headers, + request: response.request, + redirects: response.redirects, + statusCode: response.statusCode, + statusMessage: response.statusMessage, + extra: response.extra, + ); + }); + } + } diff --git a/samples/client/petstore/dart-dio/lib/api/user_api.dart b/samples/client/petstore/dart-dio/lib/api/user_api.dart new file mode 100644 index 000000000000..d30d72c38039 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/api/user_api.dart @@ -0,0 +1,344 @@ +import 'dart:async'; +import 'dart:io'; +import 'dart:convert'; +import 'package:dio/dio.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/serializer.dart'; + +import 'package:openapi/model/user.dart'; + +class UserApi { + final Dio _dio; + Serializers _serializers; + + UserApi(this._dio, this._serializers); + + /// Create user + /// + /// This can only be done by the logged in user. + Future createUser( + User body, { + CancelToken cancelToken, + Map headers, + }) async { + String path = "/user"; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + var serializedBody = _serializers.serialize(body); + var data = json.encode(serializedBody); + + return _dio.request( + path, + queryParameters: queryParams, + data: data, + options: Options( + method: 'post'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ); + } + + /// Creates list of users with given input array + /// + /// + Future createUsersWithArrayInput( + List body, { + CancelToken cancelToken, + Map headers, + }) async { + String path = "/user/createWithArray"; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + final type = const FullType(BuiltList, const [const FullType(User)]); + var serializedBody = + _serializers.serialize(BuiltList.from(body), specifiedType: type); + var data = json.encode(serializedBody); + + return _dio.request( + path, + queryParameters: queryParams, + data: data, + options: Options( + method: 'post'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ); + } + + /// Creates list of users with given input array + /// + /// + Future createUsersWithListInput( + List body, { + CancelToken cancelToken, + Map headers, + }) async { + String path = "/user/createWithList"; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + final type = const FullType(BuiltList, const [const FullType(User)]); + var serializedBody = + _serializers.serialize(BuiltList.from(body), specifiedType: type); + var data = json.encode(serializedBody); + + return _dio.request( + path, + queryParameters: queryParams, + data: data, + options: Options( + method: 'post'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ); + } + + /// Delete user + /// + /// This can only be done by the logged in user. + Future deleteUser( + String username, { + CancelToken cancelToken, + Map headers, + }) async { + String path = "/user/{username}" + .replaceAll("{" + "username" + "}", username.toString()); + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + return _dio.request( + path, + queryParameters: queryParams, + options: Options( + method: 'delete'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ); + } + + /// Get user by user name + /// + /// + Future> getUserByName( + String username, { + CancelToken cancelToken, + Map headers, + }) async { + String path = "/user/{username}" + .replaceAll("{" + "username" + "}", username.toString()); + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + return _dio + .request( + path, + queryParameters: queryParams, + options: Options( + method: 'get'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ) + .then((response) { + var serializer = _serializers.serializerForType(User); + var data = _serializers.deserializeWith(serializer, response.data); + + return Response( + data: data, + headers: response.headers, + request: response.request, + redirects: response.redirects, + statusCode: response.statusCode, + statusMessage: response.statusMessage, + extra: response.extra, + ); + }); + } + + /// Logs user into the system + /// + /// + Future> loginUser( + String username, + String password, { + CancelToken cancelToken, + Map headers, + }) async { + String path = "/user/login"; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams["username"] = username; + queryParams["password"] = password; + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + return _dio + .request( + path, + queryParameters: queryParams, + options: Options( + method: 'get'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ) + .then((response) { + var serializer = _serializers.serializerForType(String); + var data = + _serializers.deserializeWith(serializer, response.data); + + return Response( + data: data, + headers: response.headers, + request: response.request, + redirects: response.redirects, + statusCode: response.statusCode, + statusMessage: response.statusMessage, + extra: response.extra, + ); + }); + } + + /// Logs out current logged in user session + /// + /// + Future logoutUser({ + CancelToken cancelToken, + Map headers, + }) async { + String path = "/user/logout"; + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + return _dio.request( + path, + queryParameters: queryParams, + options: Options( + method: 'get'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ); + } + + /// Updated user + /// + /// This can only be done by the logged in user. + Future updateUser( + String username, + User body, { + CancelToken cancelToken, + Map headers, + }) async { + String path = "/user/{username}" + .replaceAll("{" + "username" + "}", username.toString()); + + // query params + Map queryParams = {}; + Map headerParams = Map.from(headers); + Map formParams = {}; + + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + formParams.removeWhere((key, value) => value == null); + + List contentTypes = []; + + var serializedBody = _serializers.serialize(body); + var data = json.encode(serializedBody); + + return _dio.request( + path, + queryParameters: queryParams, + data: data, + options: Options( + method: 'put'.toUpperCase(), + headers: headerParams, + contentType: + contentTypes.isNotEmpty ? contentTypes[0] : "application/json", + ), + cancelToken: cancelToken, + ); + } +} diff --git a/samples/client/petstore/dart-dio/lib/model/api_response.dart b/samples/client/petstore/dart-dio/lib/model/api_response.dart new file mode 100644 index 000000000000..0feebafb0051 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/api_response.dart @@ -0,0 +1,24 @@ +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'api_response.g.dart'; + +abstract class ApiResponse implements Built { + @nullable + @BuiltValueField(wireName: 'code') + int get code; + + @nullable + @BuiltValueField(wireName: 'type') + String get type; + + @nullable + @BuiltValueField(wireName: 'message') + String get message; + + // Boilerplate code needed to wire-up generated code + ApiResponse._(); + + factory ApiResponse([updates(ApiResponseBuilder b)]) = _$ApiResponse; + static Serializer get serializer => _$apiResponseSerializer; +} diff --git a/samples/client/petstore/dart-dio/lib/model/api_response.g.dart b/samples/client/petstore/dart-dio/lib/model/api_response.g.dart new file mode 100644 index 000000000000..ca7c7161ba8a --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/api_response.g.dart @@ -0,0 +1,167 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'api_response.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$apiResponseSerializer = new _$ApiResponseSerializer(); + +class _$ApiResponseSerializer implements StructuredSerializer { + @override + final Iterable types = const [ApiResponse, _$ApiResponse]; + @override + final String wireName = 'ApiResponse'; + + @override + Iterable serialize(Serializers serializers, ApiResponse object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'code', + serializers.serialize(object.code, specifiedType: const FullType(int)), + 'type', + serializers.serialize(object.type, specifiedType: const FullType(String)), + 'message', + serializers.serialize(object.message, + specifiedType: const FullType(String)), + ]; + + return result; + } + + @override + ApiResponse deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = new ApiResponseBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final dynamic value = iterator.current; + switch (key) { + case 'code': + result.code = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + break; + case 'type': + result.type = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + case 'message': + result.message = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + } + } + + return result.build(); + } +} + +class _$ApiResponse extends ApiResponse { + @override + final int code; + @override + final String type; + @override + final String message; + + factory _$ApiResponse([void Function(ApiResponseBuilder) updates]) => + (new ApiResponseBuilder()..update(updates)).build(); + + _$ApiResponse._({this.code, this.type, this.message}) : super._() { + if (code == null) { + throw new BuiltValueNullFieldError('ApiResponse', 'code'); + } + if (type == null) { + throw new BuiltValueNullFieldError('ApiResponse', 'type'); + } + if (message == null) { + throw new BuiltValueNullFieldError('ApiResponse', 'message'); + } + } + + @override + ApiResponse rebuild(void Function(ApiResponseBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + ApiResponseBuilder toBuilder() => new ApiResponseBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is ApiResponse && + code == other.code && + type == other.type && + message == other.message; + } + + @override + int get hashCode { + return $jf( + $jc($jc($jc(0, code.hashCode), type.hashCode), message.hashCode)); + } + + @override + String toString() { + return (newBuiltValueToStringHelper('ApiResponse') + ..add('code', code) + ..add('type', type) + ..add('message', message)) + .toString(); + } +} + +class ApiResponseBuilder implements Builder { + _$ApiResponse _$v; + + int _code; + int get code => _$this._code; + set code(int code) => _$this._code = code; + + String _type; + String get type => _$this._type; + set type(String type) => _$this._type = type; + + String _message; + String get message => _$this._message; + set message(String message) => _$this._message = message; + + ApiResponseBuilder(); + + ApiResponseBuilder get _$this { + if (_$v != null) { + _code = _$v.code; + _type = _$v.type; + _message = _$v.message; + _$v = null; + } + return this; + } + + @override + void replace(ApiResponse other) { + if (other == null) { + throw new ArgumentError.notNull('other'); + } + _$v = other as _$ApiResponse; + } + + @override + void update(void Function(ApiResponseBuilder) updates) { + if (updates != null) updates(this); + } + + @override + _$ApiResponse build() { + final _$result = + _$v ?? new _$ApiResponse._(code: code, type: type, message: message); + replace(_$result); + return _$result; + } +} + +// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new diff --git a/samples/client/petstore/dart-dio/lib/model/category.dart b/samples/client/petstore/dart-dio/lib/model/category.dart new file mode 100644 index 000000000000..5d80fb503667 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/category.dart @@ -0,0 +1,20 @@ +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'category.g.dart'; + +abstract class Category implements Built { + @nullable + @BuiltValueField(wireName: 'id') + int get id; + + @nullable + @BuiltValueField(wireName: 'name') + String get name; + + // Boilerplate code needed to wire-up generated code + Category._(); + + factory Category([updates(CategoryBuilder b)]) = _$Category; + static Serializer get serializer => _$categorySerializer; +} diff --git a/samples/client/petstore/dart-dio/lib/model/category.g.dart b/samples/client/petstore/dart-dio/lib/model/category.g.dart new file mode 100644 index 000000000000..4e4b83a0060d --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/category.g.dart @@ -0,0 +1,144 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'category.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$categorySerializer = new _$CategorySerializer(); + +class _$CategorySerializer implements StructuredSerializer { + @override + final Iterable types = const [Category, _$Category]; + @override + final String wireName = 'Category'; + + @override + Iterable serialize(Serializers serializers, Category object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'id', + serializers.serialize(object.id, specifiedType: const FullType(int)), + 'name', + serializers.serialize(object.name, specifiedType: const FullType(String)), + ]; + + return result; + } + + @override + Category deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = new CategoryBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final dynamic value = iterator.current; + switch (key) { + case 'id': + result.id = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + break; + case 'name': + result.name = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + } + } + + return result.build(); + } +} + +class _$Category extends Category { + @override + final int id; + @override + final String name; + + factory _$Category([void Function(CategoryBuilder) updates]) => + (new CategoryBuilder()..update(updates)).build(); + + _$Category._({this.id, this.name}) : super._() { + if (id == null) { + throw new BuiltValueNullFieldError('Category', 'id'); + } + if (name == null) { + throw new BuiltValueNullFieldError('Category', 'name'); + } + } + + @override + Category rebuild(void Function(CategoryBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + CategoryBuilder toBuilder() => new CategoryBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is Category && id == other.id && name == other.name; + } + + @override + int get hashCode { + return $jf($jc($jc(0, id.hashCode), name.hashCode)); + } + + @override + String toString() { + return (newBuiltValueToStringHelper('Category') + ..add('id', id) + ..add('name', name)) + .toString(); + } +} + +class CategoryBuilder implements Builder { + _$Category _$v; + + int _id; + int get id => _$this._id; + set id(int id) => _$this._id = id; + + String _name; + String get name => _$this._name; + set name(String name) => _$this._name = name; + + CategoryBuilder(); + + CategoryBuilder get _$this { + if (_$v != null) { + _id = _$v.id; + _name = _$v.name; + _$v = null; + } + return this; + } + + @override + void replace(Category other) { + if (other == null) { + throw new ArgumentError.notNull('other'); + } + _$v = other as _$Category; + } + + @override + void update(void Function(CategoryBuilder) updates) { + if (updates != null) updates(this); + } + + @override + _$Category build() { + final _$result = _$v ?? new _$Category._(id: id, name: name); + replace(_$result); + return _$result; + } +} + +// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new diff --git a/samples/client/petstore/dart-dio/lib/model/order.dart b/samples/client/petstore/dart-dio/lib/model/order.dart new file mode 100644 index 000000000000..a5bcec14b398 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/order.dart @@ -0,0 +1,39 @@ +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'order.g.dart'; + +abstract class Order implements Built { + @nullable + @BuiltValueField(wireName: 'id') + int get id; + + @nullable + @BuiltValueField(wireName: 'petId') + int get petId; + + @nullable + @BuiltValueField(wireName: 'quantity') + int get quantity; + + @nullable + @BuiltValueField(wireName: 'shipDate') + DateTime get shipDate; + /* Order Status */ + @nullable + + /* Order Status */ + @BuiltValueField(wireName: 'status') + String get status; + //enum statusEnum { placed, approved, delivered, };{ + + @nullable + @BuiltValueField(wireName: 'complete') + bool get complete; + + // Boilerplate code needed to wire-up generated code + Order._(); + + factory Order([updates(OrderBuilder b)]) = _$Order; + static Serializer get serializer => _$orderSerializer; +} diff --git a/samples/client/petstore/dart-dio/lib/model/order.g.dart b/samples/client/petstore/dart-dio/lib/model/order.g.dart new file mode 100644 index 000000000000..e4eede934c30 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/order.g.dart @@ -0,0 +1,243 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'order.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$orderSerializer = new _$OrderSerializer(); + +class _$OrderSerializer implements StructuredSerializer { + @override + final Iterable types = const [Order, _$Order]; + @override + final String wireName = 'Order'; + + @override + Iterable serialize(Serializers serializers, Order object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'id', + serializers.serialize(object.id, specifiedType: const FullType(int)), + 'petId', + serializers.serialize(object.petId, specifiedType: const FullType(int)), + 'quantity', + serializers.serialize(object.quantity, + specifiedType: const FullType(int)), + 'shipDate', + serializers.serialize(object.shipDate, + specifiedType: const FullType(DateTime)), + 'status', + serializers.serialize(object.status, + specifiedType: const FullType(String)), + 'complete', + serializers.serialize(object.complete, + specifiedType: const FullType(bool)), + ]; + + return result; + } + + @override + Order deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = new OrderBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final dynamic value = iterator.current; + switch (key) { + case 'id': + result.id = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + break; + case 'petId': + result.petId = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + break; + case 'quantity': + result.quantity = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + break; + case 'shipDate': + result.shipDate = serializers.deserialize(value, + specifiedType: const FullType(DateTime)) as DateTime; + break; + case 'status': + result.status = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + case 'complete': + result.complete = serializers.deserialize(value, + specifiedType: const FullType(bool)) as bool; + break; + } + } + + return result.build(); + } +} + +class _$Order extends Order { + @override + final int id; + @override + final int petId; + @override + final int quantity; + @override + final DateTime shipDate; + @override + final String status; + @override + final bool complete; + + factory _$Order([void Function(OrderBuilder) updates]) => + (new OrderBuilder()..update(updates)).build(); + + _$Order._( + {this.id, + this.petId, + this.quantity, + this.shipDate, + this.status, + this.complete}) + : super._() { + if (id == null) { + throw new BuiltValueNullFieldError('Order', 'id'); + } + if (petId == null) { + throw new BuiltValueNullFieldError('Order', 'petId'); + } + if (quantity == null) { + throw new BuiltValueNullFieldError('Order', 'quantity'); + } + if (shipDate == null) { + throw new BuiltValueNullFieldError('Order', 'shipDate'); + } + if (status == null) { + throw new BuiltValueNullFieldError('Order', 'status'); + } + if (complete == null) { + throw new BuiltValueNullFieldError('Order', 'complete'); + } + } + + @override + Order rebuild(void Function(OrderBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + OrderBuilder toBuilder() => new OrderBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is Order && + id == other.id && + petId == other.petId && + quantity == other.quantity && + shipDate == other.shipDate && + status == other.status && + complete == other.complete; + } + + @override + int get hashCode { + return $jf($jc( + $jc( + $jc( + $jc($jc($jc(0, id.hashCode), petId.hashCode), + quantity.hashCode), + shipDate.hashCode), + status.hashCode), + complete.hashCode)); + } + + @override + String toString() { + return (newBuiltValueToStringHelper('Order') + ..add('id', id) + ..add('petId', petId) + ..add('quantity', quantity) + ..add('shipDate', shipDate) + ..add('status', status) + ..add('complete', complete)) + .toString(); + } +} + +class OrderBuilder implements Builder { + _$Order _$v; + + int _id; + int get id => _$this._id; + set id(int id) => _$this._id = id; + + int _petId; + int get petId => _$this._petId; + set petId(int petId) => _$this._petId = petId; + + int _quantity; + int get quantity => _$this._quantity; + set quantity(int quantity) => _$this._quantity = quantity; + + DateTime _shipDate; + DateTime get shipDate => _$this._shipDate; + set shipDate(DateTime shipDate) => _$this._shipDate = shipDate; + + String _status; + String get status => _$this._status; + set status(String status) => _$this._status = status; + + bool _complete; + bool get complete => _$this._complete; + set complete(bool complete) => _$this._complete = complete; + + OrderBuilder(); + + OrderBuilder get _$this { + if (_$v != null) { + _id = _$v.id; + _petId = _$v.petId; + _quantity = _$v.quantity; + _shipDate = _$v.shipDate; + _status = _$v.status; + _complete = _$v.complete; + _$v = null; + } + return this; + } + + @override + void replace(Order other) { + if (other == null) { + throw new ArgumentError.notNull('other'); + } + _$v = other as _$Order; + } + + @override + void update(void Function(OrderBuilder) updates) { + if (updates != null) updates(this); + } + + @override + _$Order build() { + final _$result = _$v ?? + new _$Order._( + id: id, + petId: petId, + quantity: quantity, + shipDate: shipDate, + status: status, + complete: complete); + replace(_$result); + return _$result; + } +} + +// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new diff --git a/samples/client/petstore/dart-dio/lib/model/pet.dart b/samples/client/petstore/dart-dio/lib/model/pet.dart new file mode 100644 index 000000000000..c3554e423955 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/pet.dart @@ -0,0 +1,42 @@ +import 'package:openapi/model/tag.dart'; +import 'package:openapi/model/category.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'pet.g.dart'; + +abstract class Pet implements Built { + @nullable + @BuiltValueField(wireName: 'id') + int get id; + + @nullable + @BuiltValueField(wireName: 'category') + Category get category; + + @nullable + @BuiltValueField(wireName: 'name') + String get name; + + @nullable + @BuiltValueField(wireName: 'photoUrls') + BuiltList get photoUrls; + + @nullable + @BuiltValueField(wireName: 'tags') + BuiltList get tags; + /* pet status in the store */ + @nullable + + /* pet status in the store */ + @BuiltValueField(wireName: 'status') + String get status; + //enum statusEnum { available, pending, sold, };{ + + // Boilerplate code needed to wire-up generated code + Pet._(); + + factory Pet([updates(PetBuilder b)]) = _$Pet; + static Serializer get serializer => _$petSerializer; +} diff --git a/samples/client/petstore/dart-dio/lib/model/pet.g.dart b/samples/client/petstore/dart-dio/lib/model/pet.g.dart new file mode 100644 index 000000000000..058ad2dc9b14 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/pet.g.dart @@ -0,0 +1,258 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'pet.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$petSerializer = new _$PetSerializer(); + +class _$PetSerializer implements StructuredSerializer { + @override + final Iterable types = const [Pet, _$Pet]; + @override + final String wireName = 'Pet'; + + @override + Iterable serialize(Serializers serializers, Pet object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'id', + serializers.serialize(object.id, specifiedType: const FullType(int)), + 'category', + serializers.serialize(object.category, + specifiedType: const FullType(Category)), + 'name', + serializers.serialize(object.name, specifiedType: const FullType(String)), + 'photoUrls', + serializers.serialize(object.photoUrls, + specifiedType: const FullType(List, const [const FullType(String)])), + 'tags', + serializers.serialize(object.tags, + specifiedType: const FullType(List, const [const FullType(Tag)])), + 'status', + serializers.serialize(object.status, + specifiedType: const FullType(String)), + ]; + + return result; + } + + @override + Pet deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = new PetBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final dynamic value = iterator.current; + switch (key) { + case 'id': + result.id = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + break; + case 'category': + result.category.replace(serializers.deserialize(value, + specifiedType: const FullType(Category)) as Category); + break; + case 'name': + result.name = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + case 'photoUrls': + result.photoUrls = serializers.deserialize(value, + specifiedType: + const FullType(List, const [const FullType(String)])) + as List; + break; + case 'tags': + result.tags = serializers.deserialize(value, + specifiedType: + const FullType(List, const [const FullType(Tag)])) + as List; + break; + case 'status': + result.status = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + } + } + + return result.build(); + } +} + +class _$Pet extends Pet { + @override + final int id; + @override + final Category category; + @override + final String name; + @override + final List photoUrls; + @override + final List tags; + @override + final String status; + + factory _$Pet([void Function(PetBuilder) updates]) => + (new PetBuilder()..update(updates)).build(); + + _$Pet._( + {this.id, + this.category, + this.name, + this.photoUrls, + this.tags, + this.status}) + : super._() { + if (id == null) { + throw new BuiltValueNullFieldError('Pet', 'id'); + } + if (category == null) { + throw new BuiltValueNullFieldError('Pet', 'category'); + } + if (name == null) { + throw new BuiltValueNullFieldError('Pet', 'name'); + } + if (photoUrls == null) { + throw new BuiltValueNullFieldError('Pet', 'photoUrls'); + } + if (tags == null) { + throw new BuiltValueNullFieldError('Pet', 'tags'); + } + if (status == null) { + throw new BuiltValueNullFieldError('Pet', 'status'); + } + } + + @override + Pet rebuild(void Function(PetBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + PetBuilder toBuilder() => new PetBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is Pet && + id == other.id && + category == other.category && + name == other.name && + photoUrls == other.photoUrls && + tags == other.tags && + status == other.status; + } + + @override + int get hashCode { + return $jf($jc( + $jc( + $jc($jc($jc($jc(0, id.hashCode), category.hashCode), name.hashCode), + photoUrls.hashCode), + tags.hashCode), + status.hashCode)); + } + + @override + String toString() { + return (newBuiltValueToStringHelper('Pet') + ..add('id', id) + ..add('category', category) + ..add('name', name) + ..add('photoUrls', photoUrls) + ..add('tags', tags) + ..add('status', status)) + .toString(); + } +} + +class PetBuilder implements Builder { + _$Pet _$v; + + int _id; + int get id => _$this._id; + set id(int id) => _$this._id = id; + + CategoryBuilder _category; + CategoryBuilder get category => _$this._category ??= new CategoryBuilder(); + set category(CategoryBuilder category) => _$this._category = category; + + String _name; + String get name => _$this._name; + set name(String name) => _$this._name = name; + + List _photoUrls; + List get photoUrls => _$this._photoUrls; + set photoUrls(List photoUrls) => _$this._photoUrls = photoUrls; + + List _tags; + List get tags => _$this._tags; + set tags(List tags) => _$this._tags = tags; + + String _status; + String get status => _$this._status; + set status(String status) => _$this._status = status; + + PetBuilder(); + + PetBuilder get _$this { + if (_$v != null) { + _id = _$v.id; + _category = _$v.category?.toBuilder(); + _name = _$v.name; + _photoUrls = _$v.photoUrls; + _tags = _$v.tags; + _status = _$v.status; + _$v = null; + } + return this; + } + + @override + void replace(Pet other) { + if (other == null) { + throw new ArgumentError.notNull('other'); + } + _$v = other as _$Pet; + } + + @override + void update(void Function(PetBuilder) updates) { + if (updates != null) updates(this); + } + + @override + _$Pet build() { + _$Pet _$result; + try { + _$result = _$v ?? + new _$Pet._( + id: id, + category: category.build(), + name: name, + photoUrls: photoUrls, + tags: tags, + status: status); + } catch (_) { + String _$failedField; + try { + _$failedField = 'category'; + category.build(); + } catch (e) { + throw new BuiltValueNestedFieldError( + 'Pet', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new diff --git a/samples/client/petstore/dart-dio/lib/model/tag.dart b/samples/client/petstore/dart-dio/lib/model/tag.dart new file mode 100644 index 000000000000..9d304767721b --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/tag.dart @@ -0,0 +1,20 @@ +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'tag.g.dart'; + +abstract class Tag implements Built { + @nullable + @BuiltValueField(wireName: 'id') + int get id; + + @nullable + @BuiltValueField(wireName: 'name') + String get name; + + // Boilerplate code needed to wire-up generated code + Tag._(); + + factory Tag([updates(TagBuilder b)]) = _$Tag; + static Serializer get serializer => _$tagSerializer; +} diff --git a/samples/client/petstore/dart-dio/lib/model/tag.g.dart b/samples/client/petstore/dart-dio/lib/model/tag.g.dart new file mode 100644 index 000000000000..e7de1eab62c9 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/tag.g.dart @@ -0,0 +1,144 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'tag.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$tagSerializer = new _$TagSerializer(); + +class _$TagSerializer implements StructuredSerializer { + @override + final Iterable types = const [Tag, _$Tag]; + @override + final String wireName = 'Tag'; + + @override + Iterable serialize(Serializers serializers, Tag object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'id', + serializers.serialize(object.id, specifiedType: const FullType(int)), + 'name', + serializers.serialize(object.name, specifiedType: const FullType(String)), + ]; + + return result; + } + + @override + Tag deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = new TagBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final dynamic value = iterator.current; + switch (key) { + case 'id': + result.id = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + break; + case 'name': + result.name = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + } + } + + return result.build(); + } +} + +class _$Tag extends Tag { + @override + final int id; + @override + final String name; + + factory _$Tag([void Function(TagBuilder) updates]) => + (new TagBuilder()..update(updates)).build(); + + _$Tag._({this.id, this.name}) : super._() { + if (id == null) { + throw new BuiltValueNullFieldError('Tag', 'id'); + } + if (name == null) { + throw new BuiltValueNullFieldError('Tag', 'name'); + } + } + + @override + Tag rebuild(void Function(TagBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + TagBuilder toBuilder() => new TagBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is Tag && id == other.id && name == other.name; + } + + @override + int get hashCode { + return $jf($jc($jc(0, id.hashCode), name.hashCode)); + } + + @override + String toString() { + return (newBuiltValueToStringHelper('Tag') + ..add('id', id) + ..add('name', name)) + .toString(); + } +} + +class TagBuilder implements Builder { + _$Tag _$v; + + int _id; + int get id => _$this._id; + set id(int id) => _$this._id = id; + + String _name; + String get name => _$this._name; + set name(String name) => _$this._name = name; + + TagBuilder(); + + TagBuilder get _$this { + if (_$v != null) { + _id = _$v.id; + _name = _$v.name; + _$v = null; + } + return this; + } + + @override + void replace(Tag other) { + if (other == null) { + throw new ArgumentError.notNull('other'); + } + _$v = other as _$Tag; + } + + @override + void update(void Function(TagBuilder) updates) { + if (updates != null) updates(this); + } + + @override + _$Tag build() { + final _$result = _$v ?? new _$Tag._(id: id, name: name); + replace(_$result); + return _$result; + } +} + +// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new diff --git a/samples/client/petstore/dart-dio/lib/model/user.dart b/samples/client/petstore/dart-dio/lib/model/user.dart new file mode 100644 index 000000000000..da351b55d898 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/user.dart @@ -0,0 +1,46 @@ +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'user.g.dart'; + +abstract class User implements Built { + @nullable + @BuiltValueField(wireName: 'id') + int get id; + + @nullable + @BuiltValueField(wireName: 'username') + String get username; + + @nullable + @BuiltValueField(wireName: 'firstName') + String get firstName; + + @nullable + @BuiltValueField(wireName: 'lastName') + String get lastName; + + @nullable + @BuiltValueField(wireName: 'email') + String get email; + + @nullable + @BuiltValueField(wireName: 'password') + String get password; + + @nullable + @BuiltValueField(wireName: 'phone') + String get phone; + /* User Status */ + @nullable + + /* User Status */ + @BuiltValueField(wireName: 'userStatus') + int get userStatus; + + // Boilerplate code needed to wire-up generated code + User._(); + + factory User([updates(UserBuilder b)]) = _$User; + static Serializer get serializer => _$userSerializer; +} diff --git a/samples/client/petstore/dart-dio/lib/model/user.g.dart b/samples/client/petstore/dart-dio/lib/model/user.g.dart new file mode 100644 index 000000000000..2b277e1d49c2 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/model/user.g.dart @@ -0,0 +1,290 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'user.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$userSerializer = new _$UserSerializer(); + +class _$UserSerializer implements StructuredSerializer { + @override + final Iterable types = const [User, _$User]; + @override + final String wireName = 'User'; + + @override + Iterable serialize(Serializers serializers, User object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'id', + serializers.serialize(object.id, specifiedType: const FullType(int)), + 'username', + serializers.serialize(object.username, + specifiedType: const FullType(String)), + 'firstName', + serializers.serialize(object.firstName, + specifiedType: const FullType(String)), + 'lastName', + serializers.serialize(object.lastName, + specifiedType: const FullType(String)), + 'email', + serializers.serialize(object.email, + specifiedType: const FullType(String)), + 'password', + serializers.serialize(object.password, + specifiedType: const FullType(String)), + 'phone', + serializers.serialize(object.phone, + specifiedType: const FullType(String)), + 'userStatus', + serializers.serialize(object.userStatus, + specifiedType: const FullType(int)), + ]; + + return result; + } + + @override + User deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = new UserBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final dynamic value = iterator.current; + switch (key) { + case 'id': + result.id = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + break; + case 'username': + result.username = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + case 'firstName': + result.firstName = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + case 'lastName': + result.lastName = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + case 'email': + result.email = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + case 'password': + result.password = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + case 'phone': + result.phone = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; + case 'userStatus': + result.userStatus = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + break; + } + } + + return result.build(); + } +} + +class _$User extends User { + @override + final int id; + @override + final String username; + @override + final String firstName; + @override + final String lastName; + @override + final String email; + @override + final String password; + @override + final String phone; + @override + final int userStatus; + + factory _$User([void Function(UserBuilder) updates]) => + (new UserBuilder()..update(updates)).build(); + + _$User._( + {this.id, + this.username, + this.firstName, + this.lastName, + this.email, + this.password, + this.phone, + this.userStatus}) + : super._() { + if (id == null) { + throw new BuiltValueNullFieldError('User', 'id'); + } + if (username == null) { + throw new BuiltValueNullFieldError('User', 'username'); + } + if (firstName == null) { + throw new BuiltValueNullFieldError('User', 'firstName'); + } + if (lastName == null) { + throw new BuiltValueNullFieldError('User', 'lastName'); + } + if (email == null) { + throw new BuiltValueNullFieldError('User', 'email'); + } + if (password == null) { + throw new BuiltValueNullFieldError('User', 'password'); + } + if (phone == null) { + throw new BuiltValueNullFieldError('User', 'phone'); + } + if (userStatus == null) { + throw new BuiltValueNullFieldError('User', 'userStatus'); + } + } + + @override + User rebuild(void Function(UserBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + UserBuilder toBuilder() => new UserBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is User && + id == other.id && + username == other.username && + firstName == other.firstName && + lastName == other.lastName && + email == other.email && + password == other.password && + phone == other.phone && + userStatus == other.userStatus; + } + + @override + int get hashCode { + return $jf($jc( + $jc( + $jc( + $jc( + $jc( + $jc($jc($jc(0, id.hashCode), username.hashCode), + firstName.hashCode), + lastName.hashCode), + email.hashCode), + password.hashCode), + phone.hashCode), + userStatus.hashCode)); + } + + @override + String toString() { + return (newBuiltValueToStringHelper('User') + ..add('id', id) + ..add('username', username) + ..add('firstName', firstName) + ..add('lastName', lastName) + ..add('email', email) + ..add('password', password) + ..add('phone', phone) + ..add('userStatus', userStatus)) + .toString(); + } +} + +class UserBuilder implements Builder { + _$User _$v; + + int _id; + int get id => _$this._id; + set id(int id) => _$this._id = id; + + String _username; + String get username => _$this._username; + set username(String username) => _$this._username = username; + + String _firstName; + String get firstName => _$this._firstName; + set firstName(String firstName) => _$this._firstName = firstName; + + String _lastName; + String get lastName => _$this._lastName; + set lastName(String lastName) => _$this._lastName = lastName; + + String _email; + String get email => _$this._email; + set email(String email) => _$this._email = email; + + String _password; + String get password => _$this._password; + set password(String password) => _$this._password = password; + + String _phone; + String get phone => _$this._phone; + set phone(String phone) => _$this._phone = phone; + + int _userStatus; + int get userStatus => _$this._userStatus; + set userStatus(int userStatus) => _$this._userStatus = userStatus; + + UserBuilder(); + + UserBuilder get _$this { + if (_$v != null) { + _id = _$v.id; + _username = _$v.username; + _firstName = _$v.firstName; + _lastName = _$v.lastName; + _email = _$v.email; + _password = _$v.password; + _phone = _$v.phone; + _userStatus = _$v.userStatus; + _$v = null; + } + return this; + } + + @override + void replace(User other) { + if (other == null) { + throw new ArgumentError.notNull('other'); + } + _$v = other as _$User; + } + + @override + void update(void Function(UserBuilder) updates) { + if (updates != null) updates(this); + } + + @override + _$User build() { + final _$result = _$v ?? + new _$User._( + id: id, + username: username, + firstName: firstName, + lastName: lastName, + email: email, + password: password, + phone: phone, + userStatus: userStatus); + replace(_$result); + return _$result; + } +} + +// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new diff --git a/samples/client/petstore/dart-dio/lib/serializers.dart b/samples/client/petstore/dart-dio/lib/serializers.dart new file mode 100644 index 000000000000..88a06193f3ca --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/serializers.dart @@ -0,0 +1,48 @@ +library serializers; + +import 'package:built_value/serializer.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/standard_json_plugin.dart'; + +import 'package:openapi/model/api_response.dart'; +import 'package:openapi/model/category.dart'; +import 'package:openapi/model/order.dart'; +import 'package:openapi/model/pet.dart'; +import 'package:openapi/model/tag.dart'; +import 'package:openapi/model/user.dart'; + +part 'serializers.g.dart'; + +@SerializersFor(const [ + ApiResponse, + Category, + Order, + Pet, + Tag, + User, +]) + +//allow all models to be serialized within a list +Serializers serializers = (_$serializers.toBuilder() + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(ApiResponse)]), + () => new ListBuilder()) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(Category)]), + () => new ListBuilder()) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(Order)]), + () => new ListBuilder()) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(Pet)]), + () => new ListBuilder()) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(Tag)]), + () => new ListBuilder()) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(User)]), + () => new ListBuilder())) + .build(); + +Serializers standardSerializers = + (serializers.toBuilder()..addPlugin(StandardJsonPlugin())).build(); diff --git a/samples/client/petstore/dart-dio/lib/serializers.g.dart b/samples/client/petstore/dart-dio/lib/serializers.g.dart new file mode 100644 index 000000000000..8106577235d9 --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/serializers.g.dart @@ -0,0 +1,18 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of serializers; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializers _$serializers = (new Serializers().toBuilder() + ..add(ApiResponse.serializer) + ..add(Category.serializer) + ..add(Order.serializer) + ..add(Pet.serializer) + ..add(Tag.serializer) + ..add(User.serializer)) + .build(); + +// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new diff --git a/samples/client/petstore/dart-dio/pubspec.yaml b/samples/client/petstore/dart-dio/pubspec.yaml new file mode 100644 index 000000000000..b2d0d4d00ab7 --- /dev/null +++ b/samples/client/petstore/dart-dio/pubspec.yaml @@ -0,0 +1,13 @@ +name: openapi +version: 1.0.0 +description: OpenAPI API client +environment: + sdk: ">=2.3.0 <3.0.0" +dependencies: + dio: ^3.0.3 + built_value: 6.7.0 + built_collection: 4.2.2 +dev_dependencies: + built_value_generator: ^6.7.1 + build_runner: ^1.7.1 + test: 1.6.5 \ No newline at end of file diff --git a/website/i18n/en.json b/website/i18n/en.json index 254fe09c38f0..f7ba090bb22f 100644 --- a/website/i18n/en.json +++ b/website/i18n/en.json @@ -112,6 +112,9 @@ "generators/dart-jaguar": { "title": "generators/dart-jaguar" }, + "generators/dart-dio": { + "title": "generators/dart-dio" + }, "generators/dart": { "title": "generators/dart" }, From 83fdc6e75268032a9727a4902b599a76f540b6be Mon Sep 17 00:00:00 2001 From: sunn <33183834+etherealjoy@users.noreply.github.com> Date: Tue, 15 Oct 2019 15:59:45 +0200 Subject: [PATCH 018/142] [C++] [Qt5] Add generation of cmake files to qt5 client (#4133) * Add generation of cmake files to qt5 client * Update after review --- .../languages/CppQt5ClientCodegen.java | 3 ++ .../cpp-qt5-client/CMakeLists.txt.mustache | 24 +++++++++++++++ .../client/petstore/cpp-qt5/CMakeLists.txt | 29 +++++++++++++++++++ .../petstore/cpp-qt5/client/CMakeLists.txt | 24 +++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 modules/openapi-generator/src/main/resources/cpp-qt5-client/CMakeLists.txt.mustache create mode 100644 samples/client/petstore/cpp-qt5/CMakeLists.txt create mode 100644 samples/client/petstore/cpp-qt5/client/CMakeLists.txt diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java index 29beb10a50c1..449e2b8351de 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java @@ -80,6 +80,7 @@ public CppQt5ClientCodegen() { supportingFiles.add(new SupportingFile("HttpFileElement.cpp.mustache", sourceFolder, PREFIX + "HttpFileElement.cpp")); supportingFiles.add(new SupportingFile("object.mustache", sourceFolder, PREFIX + "Object.h")); supportingFiles.add(new SupportingFile("enum.mustache", sourceFolder, PREFIX + "Enum.h")); + supportingFiles.add(new SupportingFile("CMakeLists.txt.mustache", sourceFolder, "CMakeLists.txt")); if (optionalProjectFileFlag) { supportingFiles.add(new SupportingFile("Project.mustache", sourceFolder, "client.pri")); } @@ -107,6 +108,8 @@ public void processOpts() { supportingFiles.add(new SupportingFile("HttpFileElement.cpp.mustache", sourceFolder, modelNamePrefix + "HttpFileElement.cpp")); supportingFiles.add(new SupportingFile("object.mustache", sourceFolder, modelNamePrefix + "Object.h")); supportingFiles.add(new SupportingFile("enum.mustache", sourceFolder, modelNamePrefix + "Enum.h")); + supportingFiles.add(new SupportingFile("CMakeLists.txt.mustache", sourceFolder, "CMakeLists.txt")); + typeMapping.put("file", modelNamePrefix + "HttpFileElement"); importMapping.put(modelNamePrefix + "HttpFileElement", "#include \"" + modelNamePrefix + "HttpFileElement.h\""); diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/CMakeLists.txt.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/CMakeLists.txt.mustache new file mode 100644 index 000000000000..c53100cca69b --- /dev/null +++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/CMakeLists.txt.mustache @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.2) + +project(client) +set(CMAKE_VERBOSE_MAKEFILE ON) +set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(CMAKE_AUTOMOC ON) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -Wno-unused-variable") + +find_package(Qt5Core REQUIRED) +find_package(Qt5Network REQUIRED) + +file(GLOB SRCS + ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp +) + +add_library(${PROJECT_NAME} ${SRCS}) +target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Network ssl crypto) + +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD_REQUIRED ON) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_EXTENSIONS OFF) + +install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) diff --git a/samples/client/petstore/cpp-qt5/CMakeLists.txt b/samples/client/petstore/cpp-qt5/CMakeLists.txt new file mode 100644 index 000000000000..517669ae8062 --- /dev/null +++ b/samples/client/petstore/cpp-qt5/CMakeLists.txt @@ -0,0 +1,29 @@ +cmake_minimum_required(VERSION 3.2) + +project(cpp-qt5-petstore) +set(CMAKE_VERBOSE_MAKEFILE ON) +set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(CMAKE_AUTOMOC ON) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -Wno-unused-variable") + +find_package(Qt5Core REQUIRED) +find_package(Qt5Network REQUIRED) +find_package(Qt5Test REQUIRED) + +file(GLOB SRCS + ${CMAKE_CURRENT_SOURCE_DIR}/PetStore/*.cpp +) + +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR}/client +) + +add_subdirectory(client) +add_executable(${PROJECT_NAME} ${SRCS}) +target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Network Qt5::Test ssl crypto client) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD_REQUIRED ON) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_EXTENSIONS OFF) + +install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) diff --git a/samples/client/petstore/cpp-qt5/client/CMakeLists.txt b/samples/client/petstore/cpp-qt5/client/CMakeLists.txt new file mode 100644 index 000000000000..c53100cca69b --- /dev/null +++ b/samples/client/petstore/cpp-qt5/client/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.2) + +project(client) +set(CMAKE_VERBOSE_MAKEFILE ON) +set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(CMAKE_AUTOMOC ON) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -Wno-unused-variable") + +find_package(Qt5Core REQUIRED) +find_package(Qt5Network REQUIRED) + +file(GLOB SRCS + ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp +) + +add_library(${PROJECT_NAME} ${SRCS}) +target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Network ssl crypto) + +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD_REQUIRED ON) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_EXTENSIONS OFF) + +install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) From 23727befa7d79e9cef14b06a81a4456cc521eff6 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 15 Oct 2019 22:23:18 +0800 Subject: [PATCH 019/142] add athornz as dart-dio template creator --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ab1862c14dee..087ede1f0ef7 100644 --- a/README.md +++ b/README.md @@ -681,6 +681,7 @@ Here is a list of template creators: * Dart (refactor): @joernahrens * Dart 2: @swipesight * Dart (Jaguar): @jaumard + * Dart (Dio): @athornz * Elixir: @niku * Elm: @eriktim * Eiffel: @jvelilla From 672a7e9c60ff1e528f5789eaef8fcbb23c9d2ab6 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 16 Oct 2019 02:52:04 +0800 Subject: [PATCH 020/142] update samples --- bin/utils/ensure-up-to-date | 2 +- docs/generators.md | 2 +- .../go/go-petstore-withXml/docs/AnotherFakeApi.md | 1 + .../go/go-petstore-withXml/docs/FakeApi.md | 14 ++++++++++++++ .../docs/FakeClassnameTags123Api.md | 1 + .../petstore/go/go-petstore-withXml/docs/PetApi.md | 9 +++++++++ .../go/go-petstore-withXml/docs/StoreApi.md | 4 ++++ .../go/go-petstore-withXml/docs/UserApi.md | 8 ++++++++ 8 files changed, 39 insertions(+), 2 deletions(-) diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date index 19ae855e6f52..adc1993015f1 100755 --- a/bin/utils/ensure-up-to-date +++ b/bin/utils/ensure-up-to-date @@ -65,7 +65,7 @@ declare -a scripts=( "./bin/apex-petstore.sh" "./bin/perl-petstore-all.sh" "./bin/dart-jaguar-petstore.sh" -"./bin/dart-dio-petstore.sh" +#"./bin/dart-dio-petstore.sh" "./bin/dart-petstore.sh" "./bin/dart2-petstore.sh" "./bin/java-play-framework-petstore-server-all.sh" diff --git a/docs/generators.md b/docs/generators.md index 734fbfbf37d4..5f3814379fe7 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -6,7 +6,6 @@ title: Generators List The following generators are available: ## CLIENT generators - * [ada](generators/ada) * [android](generators/android) * [apex](generators/apex) @@ -20,6 +19,7 @@ The following generators are available: * [csharp-dotnet2 (deprecated)](generators/csharp-dotnet2) * [csharp-netcore](generators/csharp-netcore) * [dart](generators/dart) +* [dart-dio](generators/dart-dio) * [dart-jaguar](generators/dart-jaguar) * [eiffel](generators/eiffel) * [elixir](generators/elixir) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AnotherFakeApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/AnotherFakeApi.md index 0b9deb0c58a5..2c22f8f1b307 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/AnotherFakeApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AnotherFakeApi.md @@ -11,6 +11,7 @@ Method | HTTP request | Description ## Call123TestSpecialTags > Client Call123TestSpecialTags(ctx, body) + To test special tags To test special tags and operation ID starting with number diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md index 9aaf2e63a96f..1d85fdf9d313 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md @@ -24,6 +24,7 @@ Method | HTTP request | Description ## CreateXmlItem > CreateXmlItem(ctx, xmlItem) + creates an XmlItem this route creates an XmlItem @@ -59,6 +60,7 @@ No authorization required > bool FakeOuterBooleanSerialize(ctx, optional) + Test serialization of outer boolean types ### Required Parameters @@ -101,6 +103,7 @@ No authorization required > OuterComposite FakeOuterCompositeSerialize(ctx, optional) + Test serialization of object with outer number type ### Required Parameters @@ -143,6 +146,7 @@ No authorization required > float32 FakeOuterNumberSerialize(ctx, optional) + Test serialization of outer number types ### Required Parameters @@ -185,6 +189,7 @@ No authorization required > string FakeOuterStringSerialize(ctx, optional) + Test serialization of outer string types ### Required Parameters @@ -227,6 +232,7 @@ No authorization required > TestBodyWithFileSchema(ctx, body) + For this test, the body for this request much reference a schema named `File`. ### Required Parameters @@ -260,6 +266,7 @@ No authorization required > TestBodyWithQueryParams(ctx, query, body) + ### Required Parameters @@ -290,6 +297,7 @@ No authorization required ## TestClientModel > Client TestClientModel(ctx, body) + To test \"client\" model To test \"client\" model @@ -323,6 +331,7 @@ No authorization required ## TestEndpointParameters > TestEndpointParameters(ctx, number, double, patternWithoutDelimiter, byte_, optional) + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -382,6 +391,7 @@ Name | Type | Description | Notes ## TestEnumParameters > TestEnumParameters(ctx, optional) + To test enum parameters To test enum parameters @@ -431,6 +441,7 @@ No authorization required ## TestGroupParameters > TestGroupParameters(ctx, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, optional) + Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) @@ -481,6 +492,7 @@ No authorization required ## TestInlineAdditionalProperties > TestInlineAdditionalProperties(ctx, param) + test inline additionalProperties ### Required Parameters @@ -512,6 +524,7 @@ No authorization required ## TestJsonFormData > TestJsonFormData(ctx, param, param2) + test json serialization of form data ### Required Parameters @@ -546,6 +559,7 @@ No authorization required > TestQueryParameterCollectionFormat(ctx, pipe, ioutil, http, url, context) + To test the collection format in query parameters ### Required Parameters diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/FakeClassnameTags123Api.md b/samples/client/petstore/go/go-petstore-withXml/docs/FakeClassnameTags123Api.md index b3cbcc2c06e1..224542b70517 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/FakeClassnameTags123Api.md @@ -11,6 +11,7 @@ Method | HTTP request | Description ## TestClassname > Client TestClassname(ctx, body) + To test class name in snake case To test class name in snake case diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md index de48d4b6763c..6ee9afef754b 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md @@ -19,6 +19,7 @@ Method | HTTP request | Description ## AddPet > AddPet(ctx, body) + Add a new pet to the store ### Required Parameters @@ -50,6 +51,7 @@ Name | Type | Description | Notes ## DeletePet > DeletePet(ctx, petId, optional) + Deletes a pet ### Required Parameters @@ -92,6 +94,7 @@ Name | Type | Description | Notes ## FindPetsByStatus > []Pet FindPetsByStatus(ctx, status) + Finds Pets by status Multiple status values can be provided with comma separated strings @@ -125,6 +128,7 @@ Name | Type | Description | Notes ## FindPetsByTags > []Pet FindPetsByTags(ctx, tags) + Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -158,6 +162,7 @@ Name | Type | Description | Notes ## GetPetById > Pet GetPetById(ctx, petId) + Find pet by ID Returns a single pet @@ -191,6 +196,7 @@ Name | Type | Description | Notes ## UpdatePet > UpdatePet(ctx, body) + Update an existing pet ### Required Parameters @@ -222,6 +228,7 @@ Name | Type | Description | Notes ## UpdatePetWithForm > UpdatePetWithForm(ctx, petId, optional) + Updates a pet in the store with form data ### Required Parameters @@ -265,6 +272,7 @@ Name | Type | Description | Notes ## UploadFile > ApiResponse UploadFile(ctx, petId, optional) + uploads an image ### Required Parameters @@ -308,6 +316,7 @@ Name | Type | Description | Notes ## UploadFileWithRequiredFile > ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional) + uploads an image (required) ### Required Parameters diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/StoreApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/StoreApi.md index 083ed777590f..531ab09ff688 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/StoreApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/StoreApi.md @@ -14,6 +14,7 @@ Method | HTTP request | Description ## DeleteOrder > DeleteOrder(ctx, orderId) + Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -47,6 +48,7 @@ No authorization required ## GetInventory > map[string]int32 GetInventory(ctx, ) + Returns pet inventories by status Returns a map of status codes to quantities @@ -76,6 +78,7 @@ This endpoint does not need any parameter. ## GetOrderById > Order GetOrderById(ctx, orderId) + Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -109,6 +112,7 @@ No authorization required ## PlaceOrder > Order PlaceOrder(ctx, body) + Place an order for a pet ### Required Parameters diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md index 3201e1771dc8..d9f16bb5fb0e 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md @@ -18,6 +18,7 @@ Method | HTTP request | Description ## CreateUser > CreateUser(ctx, body) + Create user This can only be done by the logged in user. @@ -51,6 +52,7 @@ No authorization required ## CreateUsersWithArrayInput > CreateUsersWithArrayInput(ctx, body) + Creates list of users with given input array ### Required Parameters @@ -82,6 +84,7 @@ No authorization required ## CreateUsersWithListInput > CreateUsersWithListInput(ctx, body) + Creates list of users with given input array ### Required Parameters @@ -113,6 +116,7 @@ No authorization required ## DeleteUser > DeleteUser(ctx, username) + Delete user This can only be done by the logged in user. @@ -146,6 +150,7 @@ No authorization required ## GetUserByName > User GetUserByName(ctx, username) + Get user by user name ### Required Parameters @@ -177,6 +182,7 @@ No authorization required ## LoginUser > string LoginUser(ctx, username, password) + Logs user into the system ### Required Parameters @@ -209,6 +215,7 @@ No authorization required ## LogoutUser > LogoutUser(ctx, ) + Logs out current logged in user session ### Required Parameters @@ -236,6 +243,7 @@ No authorization required ## UpdateUser > UpdateUser(ctx, username, body) + Updated user This can only be done by the logged in user. From 9d606804bee649abbb2db673ad376c184604a18d Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 16 Oct 2019 11:33:16 +0800 Subject: [PATCH 021/142] disable docker_layer_caching: true --- circle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index 504cfb4435dd..d30998c3a708 100644 --- a/circle.yml +++ b/circle.yml @@ -7,8 +7,8 @@ jobs: # environment: # SWAGGER_HOST=http://petstore.swagger.io # SWAGGER_BASE_PATH=/v2 - machine: - docker_layer_caching: true + #machine: + # docker_layer_caching: true working_directory: ~/OpenAPITools/openapi-generator parallelism: 3 shell: /bin/bash --login From 3fbd59b95a1fe5ddd1e03f201b17f4bd520d9c7d Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 16 Oct 2019 11:41:20 +0800 Subject: [PATCH 022/142] switch to machine enable is true --- circle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index d30998c3a708..8faa965698b6 100644 --- a/circle.yml +++ b/circle.yml @@ -7,8 +7,8 @@ jobs: # environment: # SWAGGER_HOST=http://petstore.swagger.io # SWAGGER_BASE_PATH=/v2 - #machine: - # docker_layer_caching: true + machine: + enable: true working_directory: ~/OpenAPITools/openapi-generator parallelism: 3 shell: /bin/bash --login From 428102b5e34b201a8353361fadc4f6f045d20a22 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 16 Oct 2019 13:17:42 +0800 Subject: [PATCH 023/142] Add a link to blog post in csdn (#4166) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 087ede1f0ef7..9ead17a9b646 100644 --- a/README.md +++ b/README.md @@ -644,6 +644,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2019-09-22 - [Redefining SDKs as software diversity kits](https://devrel.net/dev-rel/redefining-sdks-as-software-diversity-kits) by [Sid Maestre (Xero)](https://twitter.com/sidneyallen) at [DevRelCon San Francisco 2019](https://sf2019.devrel.net/) - 2019-09-23 - [swaggerからOpenApi GeneratorでSpringのコードを自動生成](https://qiita.com/littleFeet/items/492df2ad68a0799a5e5e) by [@littleFeet](https://qiita.com/littleFeet) at [Qiita](https://qiita.com/) - 2019-10-09 - [openapi-generator で生成した Go クライアントで Bearer 認証をする](https://autopp-tech.hatenablog.com/entry/2019/10/09/222039) by [Akira Tanimura](https://github.com/autopp) +- 2019-10-12 - [OpenApi自动生成client](https://blog.csdn.net/wxid2798226/article/details/102527467) by [郑泽洲](https://me.csdn.net/wxid2798226) ## [6 - About Us](#table-of-contents) From f195f8ff7a14ad88b8319537a229f75710c85e0c Mon Sep 17 00:00:00 2001 From: Esteban Gehring Date: Wed, 16 Oct 2019 08:44:38 +0200 Subject: [PATCH 024/142] typescript-rxjs: fix query parameters type (#4160) * #4159: fix typescript-rxjs query parameter type * re-generate typescript-rxjs samples --- .../src/main/resources/typescript-rxjs/apis.mustache | 2 +- .../petstore/typescript-rxjs/builds/default/apis/PetApi.ts | 4 ++-- .../petstore/typescript-rxjs/builds/default/apis/UserApi.ts | 2 +- .../petstore/typescript-rxjs/builds/es6-target/apis/PetApi.ts | 4 ++-- .../typescript-rxjs/builds/es6-target/apis/UserApi.ts | 2 +- .../typescript-rxjs/builds/with-interfaces/apis/PetApi.ts | 4 ++-- .../typescript-rxjs/builds/with-interfaces/apis/UserApi.ts | 2 +- .../typescript-rxjs/builds/with-npm-version/apis/PetApi.ts | 4 ++-- .../typescript-rxjs/builds/with-npm-version/apis/UserApi.ts | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache b/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache index 3c548d7b547d..0c70dc5e6ca9 100644 --- a/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache @@ -86,7 +86,7 @@ export class {{classname}} extends BaseAPI { {{/hasHttpHeaders}} {{#hasQueryParams}} - const query: HttpQuery = { + const query: HttpQuery = { {{#queryParams}} {{#isListContainer}} {{#isCollectionFormatMulti}} diff --git a/samples/client/petstore/typescript-rxjs/builds/default/apis/PetApi.ts b/samples/client/petstore/typescript-rxjs/builds/default/apis/PetApi.ts index a5328a8c7285..16c0d116369e 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/apis/PetApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/default/apis/PetApi.ts @@ -123,7 +123,7 @@ export class PetApi extends BaseAPI { }), }; - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.status && { 'status': requestParameters.status.join(COLLECTION_FORMATS['csv']) }), }; @@ -151,7 +151,7 @@ export class PetApi extends BaseAPI { }), }; - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.tags && { 'tags': requestParameters.tags.join(COLLECTION_FORMATS['csv']) }), }; diff --git a/samples/client/petstore/typescript-rxjs/builds/default/apis/UserApi.ts b/samples/client/petstore/typescript-rxjs/builds/default/apis/UserApi.ts index 2194fdfe9f68..ed3aaa8e371a 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/apis/UserApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/default/apis/UserApi.ts @@ -139,7 +139,7 @@ export class UserApi extends BaseAPI { throwIfRequired(requestParameters, 'username', 'loginUser'); throwIfRequired(requestParameters, 'password', 'loginUser'); - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.username && { 'username': requestParameters.username }), ...(requestParameters.password && { 'password': requestParameters.password }), }; diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/PetApi.ts b/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/PetApi.ts index a5328a8c7285..16c0d116369e 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/PetApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/PetApi.ts @@ -123,7 +123,7 @@ export class PetApi extends BaseAPI { }), }; - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.status && { 'status': requestParameters.status.join(COLLECTION_FORMATS['csv']) }), }; @@ -151,7 +151,7 @@ export class PetApi extends BaseAPI { }), }; - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.tags && { 'tags': requestParameters.tags.join(COLLECTION_FORMATS['csv']) }), }; diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/UserApi.ts b/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/UserApi.ts index 2194fdfe9f68..ed3aaa8e371a 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/UserApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/UserApi.ts @@ -139,7 +139,7 @@ export class UserApi extends BaseAPI { throwIfRequired(requestParameters, 'username', 'loginUser'); throwIfRequired(requestParameters, 'password', 'loginUser'); - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.username && { 'username': requestParameters.username }), ...(requestParameters.password && { 'password': requestParameters.password }), }; diff --git a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/PetApi.ts b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/PetApi.ts index a5328a8c7285..16c0d116369e 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/PetApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/PetApi.ts @@ -123,7 +123,7 @@ export class PetApi extends BaseAPI { }), }; - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.status && { 'status': requestParameters.status.join(COLLECTION_FORMATS['csv']) }), }; @@ -151,7 +151,7 @@ export class PetApi extends BaseAPI { }), }; - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.tags && { 'tags': requestParameters.tags.join(COLLECTION_FORMATS['csv']) }), }; diff --git a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/UserApi.ts b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/UserApi.ts index 2194fdfe9f68..ed3aaa8e371a 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/UserApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/apis/UserApi.ts @@ -139,7 +139,7 @@ export class UserApi extends BaseAPI { throwIfRequired(requestParameters, 'username', 'loginUser'); throwIfRequired(requestParameters, 'password', 'loginUser'); - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.username && { 'username': requestParameters.username }), ...(requestParameters.password && { 'password': requestParameters.password }), }; diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/PetApi.ts b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/PetApi.ts index a5328a8c7285..16c0d116369e 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/PetApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/PetApi.ts @@ -123,7 +123,7 @@ export class PetApi extends BaseAPI { }), }; - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.status && { 'status': requestParameters.status.join(COLLECTION_FORMATS['csv']) }), }; @@ -151,7 +151,7 @@ export class PetApi extends BaseAPI { }), }; - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.tags && { 'tags': requestParameters.tags.join(COLLECTION_FORMATS['csv']) }), }; diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/UserApi.ts b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/UserApi.ts index 2194fdfe9f68..ed3aaa8e371a 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/UserApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/UserApi.ts @@ -139,7 +139,7 @@ export class UserApi extends BaseAPI { throwIfRequired(requestParameters, 'username', 'loginUser'); throwIfRequired(requestParameters, 'password', 'loginUser'); - const query: HttpQuery = { + const query: HttpQuery = { ...(requestParameters.username && { 'username': requestParameters.username }), ...(requestParameters.password && { 'password': requestParameters.password }), }; From 1786e7549035d8ca4cc46273690f7d4c89932544 Mon Sep 17 00:00:00 2001 From: Arun Date: Wed, 16 Oct 2019 12:45:14 +0530 Subject: [PATCH 025/142] Skip adding None value in query parameters (#4161) --- .../src/main/resources/python/api.mustache | 2 +- .../python/petstore_api/api/fake_api.py | 28 +++++++++---------- .../python/petstore_api/api/pet_api.py | 4 +-- .../python/petstore_api/api/user_api.py | 4 +-- .../python/petstore_api/api/fake_api.py | 28 +++++++++---------- .../python/petstore_api/api/pet_api.py | 4 +-- .../python/petstore_api/api/user_api.py | 4 +-- 7 files changed, 37 insertions(+), 37 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/api.mustache b/modules/openapi-generator/src/main/resources/python/api.mustache index 590299dc5f4b..9ed3340627e8 100644 --- a/modules/openapi-generator/src/main/resources/python/api.mustache +++ b/modules/openapi-generator/src/main/resources/python/api.mustache @@ -182,7 +182,7 @@ class {{classname}}(object): query_params = [] {{#queryParams}} - if '{{paramName}}' in local_var_params: + if '{{paramName}}' in local_var_params and local_var_params['{{paramName}}'] is not None: # noqa: E501 query_params.append(('{{baseName}}', local_var_params['{{paramName}}'])){{#isListContainer}} # noqa: E501 collection_formats['{{baseName}}'] = '{{collectionFormat}}'{{/isListContainer}} # noqa: E501 {{/queryParams}} diff --git a/samples/client/petstore/python/petstore_api/api/fake_api.py b/samples/client/petstore/python/petstore_api/api/fake_api.py index 00333bfd2c47..692c12e25acf 100644 --- a/samples/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python/petstore_api/api/fake_api.py @@ -748,7 +748,7 @@ def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # path_params = {} query_params = [] - if 'query' in local_var_params: + if 'query' in local_var_params and local_var_params['query'] is not None: # noqa: E501 query_params.append(('query', local_var_params['query'])) # noqa: E501 header_params = {} @@ -1180,14 +1180,14 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'enum_query_string_array' in local_var_params: + if 'enum_query_string_array' in local_var_params and local_var_params['enum_query_string_array'] is not None: # noqa: E501 query_params.append(('enum_query_string_array', local_var_params['enum_query_string_array'])) # noqa: E501 collection_formats['enum_query_string_array'] = 'csv' # noqa: E501 - if 'enum_query_string' in local_var_params: + if 'enum_query_string' in local_var_params and local_var_params['enum_query_string'] is not None: # noqa: E501 query_params.append(('enum_query_string', local_var_params['enum_query_string'])) # noqa: E501 - if 'enum_query_integer' in local_var_params: + if 'enum_query_integer' in local_var_params and local_var_params['enum_query_integer'] is not None: # noqa: E501 query_params.append(('enum_query_integer', local_var_params['enum_query_integer'])) # noqa: E501 - if 'enum_query_double' in local_var_params: + if 'enum_query_double' in local_var_params and local_var_params['enum_query_double'] is not None: # noqa: E501 query_params.append(('enum_query_double', local_var_params['enum_query_double'])) # noqa: E501 header_params = {} @@ -1323,13 +1323,13 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b path_params = {} query_params = [] - if 'required_string_group' in local_var_params: + if 'required_string_group' in local_var_params and local_var_params['required_string_group'] is not None: # noqa: E501 query_params.append(('required_string_group', local_var_params['required_string_group'])) # noqa: E501 - if 'required_int64_group' in local_var_params: + if 'required_int64_group' in local_var_params and local_var_params['required_int64_group'] is not None: # noqa: E501 query_params.append(('required_int64_group', local_var_params['required_int64_group'])) # noqa: E501 - if 'string_group' in local_var_params: + if 'string_group' in local_var_params and local_var_params['string_group'] is not None: # noqa: E501 query_params.append(('string_group', local_var_params['string_group'])) # noqa: E501 - if 'int64_group' in local_var_params: + if 'int64_group' in local_var_params and local_var_params['int64_group'] is not None: # noqa: E501 query_params.append(('int64_group', local_var_params['int64_group'])) # noqa: E501 header_params = {} @@ -1681,19 +1681,19 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht path_params = {} query_params = [] - if 'pipe' in local_var_params: + if 'pipe' in local_var_params and local_var_params['pipe'] is not None: # noqa: E501 query_params.append(('pipe', local_var_params['pipe'])) # noqa: E501 collection_formats['pipe'] = 'csv' # noqa: E501 - if 'ioutil' in local_var_params: + if 'ioutil' in local_var_params and local_var_params['ioutil'] is not None: # noqa: E501 query_params.append(('ioutil', local_var_params['ioutil'])) # noqa: E501 collection_formats['ioutil'] = 'csv' # noqa: E501 - if 'http' in local_var_params: + if 'http' in local_var_params and local_var_params['http'] is not None: # noqa: E501 query_params.append(('http', local_var_params['http'])) # noqa: E501 collection_formats['http'] = 'space' # noqa: E501 - if 'url' in local_var_params: + if 'url' in local_var_params and local_var_params['url'] is not None: # noqa: E501 query_params.append(('url', local_var_params['url'])) # noqa: E501 collection_formats['url'] = 'csv' # noqa: E501 - if 'context' in local_var_params: + if 'context' in local_var_params and local_var_params['context'] is not None: # noqa: E501 query_params.append(('context', local_var_params['context'])) # noqa: E501 collection_formats['context'] = 'multi' # noqa: E501 diff --git a/samples/client/petstore/python/petstore_api/api/pet_api.py b/samples/client/petstore/python/petstore_api/api/pet_api.py index 1deb664c43e5..f96abdf72080 100644 --- a/samples/client/petstore/python/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python/petstore_api/api/pet_api.py @@ -324,7 +324,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'status' in local_var_params: + if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 query_params.append(('status', local_var_params['status'])) # noqa: E501 collection_formats['status'] = 'csv' # noqa: E501 @@ -433,7 +433,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'tags' in local_var_params: + if 'tags' in local_var_params and local_var_params['tags'] is not None: # noqa: E501 query_params.append(('tags', local_var_params['tags'])) # noqa: E501 collection_formats['tags'] = 'csv' # noqa: E501 diff --git a/samples/client/petstore/python/petstore_api/api/user_api.py b/samples/client/petstore/python/petstore_api/api/user_api.py index d3674f5ba5c6..86135f2c891b 100644 --- a/samples/client/petstore/python/petstore_api/api/user_api.py +++ b/samples/client/petstore/python/petstore_api/api/user_api.py @@ -634,9 +634,9 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'username' in local_var_params: + if 'username' in local_var_params and local_var_params['username'] is not None: # noqa: E501 query_params.append(('username', local_var_params['username'])) # noqa: E501 - if 'password' in local_var_params: + if 'password' in local_var_params and local_var_params['password'] is not None: # noqa: E501 query_params.append(('password', local_var_params['password'])) # noqa: E501 header_params = {} diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py index bd4e6f6c3e22..ee3d07235761 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py @@ -754,7 +754,7 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): # path_params = {} query_params = [] - if 'query' in local_var_params: + if 'query' in local_var_params and local_var_params['query'] is not None: # noqa: E501 query_params.append(('query', local_var_params['query'])) # noqa: E501 header_params = {} @@ -1186,14 +1186,14 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'enum_query_string_array' in local_var_params: + if 'enum_query_string_array' in local_var_params and local_var_params['enum_query_string_array'] is not None: # noqa: E501 query_params.append(('enum_query_string_array', local_var_params['enum_query_string_array'])) # noqa: E501 collection_formats['enum_query_string_array'] = 'multi' # noqa: E501 - if 'enum_query_string' in local_var_params: + if 'enum_query_string' in local_var_params and local_var_params['enum_query_string'] is not None: # noqa: E501 query_params.append(('enum_query_string', local_var_params['enum_query_string'])) # noqa: E501 - if 'enum_query_integer' in local_var_params: + if 'enum_query_integer' in local_var_params and local_var_params['enum_query_integer'] is not None: # noqa: E501 query_params.append(('enum_query_integer', local_var_params['enum_query_integer'])) # noqa: E501 - if 'enum_query_double' in local_var_params: + if 'enum_query_double' in local_var_params and local_var_params['enum_query_double'] is not None: # noqa: E501 query_params.append(('enum_query_double', local_var_params['enum_query_double'])) # noqa: E501 header_params = {} @@ -1329,13 +1329,13 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b path_params = {} query_params = [] - if 'required_string_group' in local_var_params: + if 'required_string_group' in local_var_params and local_var_params['required_string_group'] is not None: # noqa: E501 query_params.append(('required_string_group', local_var_params['required_string_group'])) # noqa: E501 - if 'required_int64_group' in local_var_params: + if 'required_int64_group' in local_var_params and local_var_params['required_int64_group'] is not None: # noqa: E501 query_params.append(('required_int64_group', local_var_params['required_int64_group'])) # noqa: E501 - if 'string_group' in local_var_params: + if 'string_group' in local_var_params and local_var_params['string_group'] is not None: # noqa: E501 query_params.append(('string_group', local_var_params['string_group'])) # noqa: E501 - if 'int64_group' in local_var_params: + if 'int64_group' in local_var_params and local_var_params['int64_group'] is not None: # noqa: E501 query_params.append(('int64_group', local_var_params['int64_group'])) # noqa: E501 header_params = {} @@ -1687,19 +1687,19 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht path_params = {} query_params = [] - if 'pipe' in local_var_params: + if 'pipe' in local_var_params and local_var_params['pipe'] is not None: # noqa: E501 query_params.append(('pipe', local_var_params['pipe'])) # noqa: E501 collection_formats['pipe'] = 'multi' # noqa: E501 - if 'ioutil' in local_var_params: + if 'ioutil' in local_var_params and local_var_params['ioutil'] is not None: # noqa: E501 query_params.append(('ioutil', local_var_params['ioutil'])) # noqa: E501 collection_formats['ioutil'] = 'csv' # noqa: E501 - if 'http' in local_var_params: + if 'http' in local_var_params and local_var_params['http'] is not None: # noqa: E501 query_params.append(('http', local_var_params['http'])) # noqa: E501 collection_formats['http'] = 'space' # noqa: E501 - if 'url' in local_var_params: + if 'url' in local_var_params and local_var_params['url'] is not None: # noqa: E501 query_params.append(('url', local_var_params['url'])) # noqa: E501 collection_formats['url'] = 'csv' # noqa: E501 - if 'context' in local_var_params: + if 'context' in local_var_params and local_var_params['context'] is not None: # noqa: E501 query_params.append(('context', local_var_params['context'])) # noqa: E501 collection_formats['context'] = 'multi' # noqa: E501 diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py index 60987d9715b6..05819b4c13b4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py @@ -331,7 +331,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'status' in local_var_params: + if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 query_params.append(('status', local_var_params['status'])) # noqa: E501 collection_formats['status'] = 'csv' # noqa: E501 @@ -440,7 +440,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'tags' in local_var_params: + if 'tags' in local_var_params and local_var_params['tags'] is not None: # noqa: E501 query_params.append(('tags', local_var_params['tags'])) # noqa: E501 collection_formats['tags'] = 'csv' # noqa: E501 diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py index 5e8125477fb2..62682316ae21 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py @@ -646,9 +646,9 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'username' in local_var_params: + if 'username' in local_var_params and local_var_params['username'] is not None: # noqa: E501 query_params.append(('username', local_var_params['username'])) # noqa: E501 - if 'password' in local_var_params: + if 'password' in local_var_params and local_var_params['password'] is not None: # noqa: E501 query_params.append(('password', local_var_params['password'])) # noqa: E501 header_params = {} From 095fa719b3f8e97652e6335ca1949982b3eb931a Mon Sep 17 00:00:00 2001 From: Arun Date: Wed, 16 Oct 2019 13:04:22 +0530 Subject: [PATCH 026/142] [python] Remove post_params and body from OPTIONS request (#4163) * Remove post_params and body from OPTIONS * Empty commit to retrigger build --- .../src/main/resources/python/api_client.mustache | 4 +--- samples/client/petstore/python/petstore_api/api_client.py | 4 +--- .../client/petstore/python/petstore_api/api_client.py | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/api_client.mustache b/modules/openapi-generator/src/main/resources/python/api_client.mustache index 768b8d973f8f..546313cc19da 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_client.mustache @@ -379,10 +379,8 @@ class ApiClient(object): return self.rest_client.OPTIONS(url, query_params=query_params, headers=headers, - post_params=post_params, _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + _request_timeout=_request_timeout) elif method == "POST": return self.rest_client.POST(url, query_params=query_params, diff --git a/samples/client/petstore/python/petstore_api/api_client.py b/samples/client/petstore/python/petstore_api/api_client.py index df3a9815aa04..64e1278b4ebc 100644 --- a/samples/client/petstore/python/petstore_api/api_client.py +++ b/samples/client/petstore/python/petstore_api/api_client.py @@ -372,10 +372,8 @@ def request(self, method, url, query_params=None, headers=None, return self.rest_client.OPTIONS(url, query_params=query_params, headers=headers, - post_params=post_params, _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + _request_timeout=_request_timeout) elif method == "POST": return self.rest_client.POST(url, query_params=query_params, diff --git a/samples/openapi3/client/petstore/python/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/petstore_api/api_client.py index df3a9815aa04..64e1278b4ebc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -372,10 +372,8 @@ def request(self, method, url, query_params=None, headers=None, return self.rest_client.OPTIONS(url, query_params=query_params, headers=headers, - post_params=post_params, _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + _request_timeout=_request_timeout) elif method == "POST": return self.rest_client.POST(url, query_params=query_params, From d71b1cf49e4942234c1cea4f357b40046fa569b8 Mon Sep 17 00:00:00 2001 From: Arun Date: Wed, 16 Oct 2019 13:14:04 +0530 Subject: [PATCH 027/142] [python] Add option to skip client validations (#4137) * Adds options to skip client side validations * Runs petstore.sh * Correct typo in variable name * Consistent code styling * Rerun petstore.sh * Change position of local_vars_configuration * Make code pep8 compliant --- .../src/main/resources/python/api.mustache | 26 ++--- .../main/resources/python/api_client.mustache | 1 + .../resources/python/configuration.mustache | 2 + .../src/main/resources/python/model.mustache | 45 ++++--- .../petstore_api/api/another_fake_api.py | 4 +- .../python/petstore_api/api/fake_api.py | 110 +++++++++--------- .../api/fake_classname_tags_123_api.py | 4 +- .../python/petstore_api/api/pet_api.py | 40 +++---- .../python/petstore_api/api/store_api.py | 16 +-- .../python/petstore_api/api/user_api.py | 36 +++--- .../python/petstore_api/api_client.py | 1 + .../python/petstore_api/configuration.py | 2 + .../models/additional_properties_any_type.py | 14 ++- .../models/additional_properties_array.py | 14 ++- .../models/additional_properties_boolean.py | 14 ++- .../models/additional_properties_class.py | 14 ++- .../models/additional_properties_integer.py | 14 ++- .../models/additional_properties_number.py | 14 ++- .../models/additional_properties_object.py | 14 ++- .../models/additional_properties_string.py | 14 ++- .../python/petstore_api/models/animal.py | 16 ++- .../petstore_api/models/api_response.py | 14 ++- .../models/array_of_array_of_number_only.py | 14 ++- .../models/array_of_number_only.py | 14 ++- .../python/petstore_api/models/array_test.py | 14 ++- .../petstore_api/models/capitalization.py | 14 ++- .../python/petstore_api/models/cat.py | 14 ++- .../python/petstore_api/models/cat_all_of.py | 14 ++- .../python/petstore_api/models/category.py | 16 ++- .../python/petstore_api/models/class_model.py | 14 ++- .../python/petstore_api/models/client.py | 14 ++- .../python/petstore_api/models/dog.py | 14 ++- .../python/petstore_api/models/dog_all_of.py | 14 ++- .../python/petstore_api/models/enum_arrays.py | 19 ++- .../python/petstore_api/models/enum_class.py | 14 ++- .../python/petstore_api/models/enum_test.py | 24 ++-- .../python/petstore_api/models/file.py | 14 ++- .../models/file_schema_test_class.py | 14 ++- .../python/petstore_api/models/format_test.py | 64 ++++++---- .../petstore_api/models/has_only_read_only.py | 14 ++- .../python/petstore_api/models/list.py | 14 ++- .../python/petstore_api/models/map_test.py | 17 ++- ...perties_and_additional_properties_class.py | 14 ++- .../petstore_api/models/model200_response.py | 14 ++- .../petstore_api/models/model_return.py | 14 ++- .../python/petstore_api/models/name.py | 16 ++- .../python/petstore_api/models/number_only.py | 14 ++- .../python/petstore_api/models/order.py | 16 ++- .../petstore_api/models/outer_composite.py | 14 ++- .../python/petstore_api/models/outer_enum.py | 14 ++- .../python/petstore_api/models/pet.py | 20 +++- .../petstore_api/models/read_only_first.py | 14 ++- .../petstore_api/models/special_model_name.py | 14 ++- .../python/petstore_api/models/tag.py | 14 ++- .../models/type_holder_default.py | 24 ++-- .../models/type_holder_example.py | 26 +++-- .../python/petstore_api/models/user.py | 14 ++- .../python/petstore_api/models/xml_item.py | 14 ++- .../petstore_api/api/another_fake_api.py | 4 +- .../python/petstore_api/api/fake_api.py | 106 ++++++++--------- .../api/fake_classname_tags_123_api.py | 4 +- .../python/petstore_api/api/pet_api.py | 40 +++---- .../python/petstore_api/api/store_api.py | 16 +-- .../python/petstore_api/api/user_api.py | 36 +++--- .../python/petstore_api/api_client.py | 1 + .../python/petstore_api/configuration.py | 2 + .../models/additional_properties_class.py | 14 ++- .../python/petstore_api/models/animal.py | 16 ++- .../petstore_api/models/api_response.py | 14 ++- .../models/array_of_array_of_number_only.py | 14 ++- .../models/array_of_number_only.py | 14 ++- .../python/petstore_api/models/array_test.py | 14 ++- .../petstore_api/models/capitalization.py | 14 ++- .../python/petstore_api/models/cat.py | 14 ++- .../python/petstore_api/models/cat_all_of.py | 14 ++- .../python/petstore_api/models/category.py | 16 ++- .../python/petstore_api/models/class_model.py | 14 ++- .../python/petstore_api/models/client.py | 14 ++- .../python/petstore_api/models/dog.py | 14 ++- .../python/petstore_api/models/dog_all_of.py | 14 ++- .../python/petstore_api/models/enum_arrays.py | 19 ++- .../python/petstore_api/models/enum_class.py | 14 ++- .../python/petstore_api/models/enum_test.py | 24 ++-- .../python/petstore_api/models/file.py | 14 ++- .../models/file_schema_test_class.py | 14 ++- .../python/petstore_api/models/foo.py | 14 ++- .../python/petstore_api/models/format_test.py | 67 +++++++---- .../petstore_api/models/has_only_read_only.py | 14 ++- .../models/health_check_result.py | 14 ++- .../petstore_api/models/inline_object.py | 14 ++- .../petstore_api/models/inline_object1.py | 14 ++- .../petstore_api/models/inline_object2.py | 19 ++- .../petstore_api/models/inline_object3.py | 61 ++++++---- .../petstore_api/models/inline_object4.py | 18 ++- .../petstore_api/models/inline_object5.py | 16 ++- .../models/inline_response_default.py | 14 ++- .../python/petstore_api/models/list.py | 14 ++- .../python/petstore_api/models/map_test.py | 17 ++- ...perties_and_additional_properties_class.py | 14 ++- .../petstore_api/models/model200_response.py | 14 ++- .../petstore_api/models/model_return.py | 14 ++- .../python/petstore_api/models/name.py | 16 ++- .../petstore_api/models/nullable_class.py | 14 ++- .../python/petstore_api/models/number_only.py | 14 ++- .../python/petstore_api/models/order.py | 16 ++- .../petstore_api/models/outer_composite.py | 14 ++- .../python/petstore_api/models/outer_enum.py | 14 ++- .../models/outer_enum_default_value.py | 14 ++- .../petstore_api/models/outer_enum_integer.py | 14 ++- .../outer_enum_integer_default_value.py | 14 ++- .../python/petstore_api/models/pet.py | 20 +++- .../petstore_api/models/read_only_first.py | 14 ++- .../petstore_api/models/special_model_name.py | 14 ++- .../python/petstore_api/models/tag.py | 14 ++- .../python/petstore_api/models/user.py | 14 ++- 115 files changed, 1453 insertions(+), 620 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/api.mustache b/modules/openapi-generator/src/main/resources/python/api.mustache index 9ed3340627e8..f1a110bd473c 100644 --- a/modules/openapi-generator/src/main/resources/python/api.mustache +++ b/modules/openapi-generator/src/main/resources/python/api.mustache @@ -126,8 +126,8 @@ class {{classname}}(object): {{^isNullable}} {{#required}} # verify the required parameter '{{paramName}}' is set - if ('{{paramName}}' not in local_var_params or - local_var_params['{{paramName}}'] is None): + if self.api_client.client_side_validation and ('{{paramName}}' not in local_var_params or # noqa: E501 + local_var_params['{{paramName}}'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `{{paramName}}` when calling `{{operationId}}`") # noqa: E501 {{/required}} {{/isNullable}} @@ -136,35 +136,35 @@ class {{classname}}(object): {{#allParams}} {{#hasValidation}} {{#maxLength}} - if ('{{paramName}}' in local_var_params and - len(local_var_params['{{paramName}}']) > {{maxLength}}): + if self.api_client.client_side_validation and ('{{paramName}}' in local_var_params and # noqa: E501 + len(local_var_params['{{paramName}}']) > {{maxLength}}): # noqa: E501 raise ApiValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, length must be less than or equal to `{{maxLength}}`") # noqa: E501 {{/maxLength}} {{#minLength}} - if ('{{paramName}}' in local_var_params and - len(local_var_params['{{paramName}}']) < {{minLength}}): + if self.api_client.client_side_validation and ('{{paramName}}' in local_var_params and # noqa: E501 + len(local_var_params['{{paramName}}']) < {{minLength}}): # noqa: E501 raise ApiValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, length must be greater than or equal to `{{minLength}}`") # noqa: E501 {{/minLength}} {{#maximum}} - if '{{paramName}}' in local_var_params and local_var_params['{{paramName}}'] >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}}: # noqa: E501 + if self.api_client.client_side_validation and '{{paramName}}' in local_var_params and local_var_params['{{paramName}}'] >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}}: # noqa: E501 raise ApiValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, must be a value less than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}`{{maximum}}`") # noqa: E501 {{/maximum}} {{#minimum}} - if '{{paramName}}' in local_var_params and local_var_params['{{paramName}}'] <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}}: # noqa: E501 + if self.api_client.client_side_validation and '{{paramName}}' in local_var_params and local_var_params['{{paramName}}'] <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}}: # noqa: E501 raise ApiValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, must be a value greater than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}`{{minimum}}`") # noqa: E501 {{/minimum}} {{#pattern}} - if '{{paramName}}' in local_var_params and not re.search(r'{{{vendorExtensions.x-regex}}}', local_var_params['{{paramName}}']{{#vendorExtensions.x-modifiers}}{{#-first}}, flags={{/-first}}re.{{.}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}): # noqa: E501 + if self.api_client.client_side_validation and '{{paramName}}' in local_var_params and not re.search(r'{{{vendorExtensions.x-regex}}}', local_var_params['{{paramName}}']{{#vendorExtensions.x-modifiers}}{{#-first}}, flags={{/-first}}re.{{.}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}): # noqa: E501 raise ApiValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, must conform to the pattern `{{{pattern}}}`") # noqa: E501 {{/pattern}} {{#maxItems}} - if ('{{paramName}}' in local_var_params and - len(local_var_params['{{paramName}}']) > {{maxItems}}): + if self.api_client.client_side_validation and ('{{paramName}}' in local_var_params and # noqa: E501 + len(local_var_params['{{paramName}}']) > {{maxItems}}): # noqa: E501 raise ApiValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, number of items must be less than or equal to `{{maxItems}}`") # noqa: E501 {{/maxItems}} {{#minItems}} - if ('{{paramName}}' in local_var_params and - len(local_var_params['{{paramName}}']) < {{minItems}}): + if self.api_client.client_side_validation and ('{{paramName}}' in local_var_params and # noqa: E501 + len(local_var_params['{{paramName}}']) < {{minItems}}): # noqa: E501 raise ApiValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, number of items must be greater than or equal to `{{minItems}}`") # noqa: E501 {{/minItems}} {{/hasValidation}} diff --git a/modules/openapi-generator/src/main/resources/python/api_client.mustache b/modules/openapi-generator/src/main/resources/python/api_client.mustache index 546313cc19da..63dd91ebb5d9 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_client.mustache @@ -72,6 +72,7 @@ class ApiClient(object): self.cookie = cookie # Set default User-Agent. self.user_agent = '{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{packageVersion}}}/python{{/httpUserAgent}}' + self.client_side_validation = configuration.client_side_validation def __del__(self): if self._pool: diff --git a/modules/openapi-generator/src/main/resources/python/configuration.mustache b/modules/openapi-generator/src/main/resources/python/configuration.mustache index 2afcb7478ef4..9677031a8c98 100644 --- a/modules/openapi-generator/src/main/resources/python/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/python/configuration.mustache @@ -149,6 +149,8 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): self.retries = None """Adding retries to override urllib3 default value 3 """ + # Disable client side validation + self.client_side_validation = True @property def logger_file(self): diff --git a/modules/openapi-generator/src/main/resources/python/model.mustache b/modules/openapi-generator/src/main/resources/python/model.mustache index 16c8dadbf620..e2c39f3d6b3b 100644 --- a/modules/openapi-generator/src/main/resources/python/model.mustache +++ b/modules/openapi-generator/src/main/resources/python/model.mustache @@ -7,6 +7,8 @@ import re # noqa: F401 import six +from {{packageName}}.configuration import Configuration + {{#models}} {{#model}} @@ -51,8 +53,11 @@ class {{classname}}(object): } {{/discriminator}} - def __init__(self{{#vars}}, {{name}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}): # noqa: E501 + def __init__(self{{#vars}}, {{name}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}, local_vars_configuration=None): # noqa: E501 """{{classname}} - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration {{#vars}}{{#-first}} {{/-first}} self._{{name}} = None @@ -101,7 +106,7 @@ class {{classname}}(object): """ {{^isNullable}} {{#required}} - if {{name}} is None: + if self.local_vars_configuration.client_side_validation and {{name}} is None: # noqa: E501 raise ValueError("Invalid value for `{{name}}`, must not be `None`") # noqa: E501 {{/required}} {{/isNullable}} @@ -109,7 +114,8 @@ class {{classname}}(object): {{#isContainer}} allowed_values = [{{#isNullable}}None,{{/isNullable}}{{#allowableValues}}{{#values}}{{#items.isString}}"{{/items.isString}}{{{this}}}{{#items.isString}}"{{/items.isString}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] # noqa: E501 {{#isListContainer}} - if not set({{{name}}}).issubset(set(allowed_values)): + if (self.local_vars_configuration.client_side_validation and + not set({{{name}}}).issubset(set(allowed_values))): raise ValueError( "Invalid values for `{{{name}}}` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set({{{name}}}) - set(allowed_values))), # noqa: E501 @@ -117,7 +123,8 @@ class {{classname}}(object): ) {{/isListContainer}} {{#isMapContainer}} - if not set({{{name}}}.keys()).issubset(set(allowed_values)): + if (self.local_vars_configuration.client_side_validation and + not set({{{name}}}.keys()).issubset(set(allowed_values))): raise ValueError( "Invalid keys in `{{{name}}}` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set({{{name}}}.keys()) - set(allowed_values))), # noqa: E501 @@ -127,7 +134,7 @@ class {{classname}}(object): {{/isContainer}} {{^isContainer}} allowed_values = [{{#isNullable}}None,{{/isNullable}}{{#allowableValues}}{{#values}}{{#isString}}"{{/isString}}{{{this}}}{{#isString}}"{{/isString}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] # noqa: E501 - if {{{name}}} not in allowed_values: + if self.local_vars_configuration.client_side_validation and {{{name}}} not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `{{{name}}}` ({0}), must be one of {1}" # noqa: E501 .format({{{name}}}, allowed_values) @@ -137,31 +144,38 @@ class {{classname}}(object): {{^isEnum}} {{#hasValidation}} {{#maxLength}} - if {{name}} is not None and len({{name}}) > {{maxLength}}: + if (self.local_vars_configuration.client_side_validation and + {{name}} is not None and len({{name}}) > {{maxLength}}): raise ValueError("Invalid value for `{{name}}`, length must be less than or equal to `{{maxLength}}`") # noqa: E501 {{/maxLength}} {{#minLength}} - if {{name}} is not None and len({{name}}) < {{minLength}}: + if (self.local_vars_configuration.client_side_validation and + {{name}} is not None and len({{name}}) < {{minLength}}): raise ValueError("Invalid value for `{{name}}`, length must be greater than or equal to `{{minLength}}`") # noqa: E501 {{/minLength}} {{#maximum}} - if {{name}} is not None and {{name}} >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}}: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + {{name}} is not None and {{name}} >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}}): # noqa: E501 raise ValueError("Invalid value for `{{name}}`, must be a value less than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}`{{maximum}}`") # noqa: E501 {{/maximum}} {{#minimum}} - if {{name}} is not None and {{name}} <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}}: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + {{name}} is not None and {{name}} <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}}): # noqa: E501 raise ValueError("Invalid value for `{{name}}`, must be a value greater than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}`{{minimum}}`") # noqa: E501 {{/minimum}} {{#pattern}} - if {{name}} is not None and not re.search(r'{{{vendorExtensions.x-regex}}}', {{name}}{{#vendorExtensions.x-modifiers}}{{#-first}}, flags={{/-first}}re.{{.}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}): # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + {{name}} is not None and not re.search(r'{{{vendorExtensions.x-regex}}}', {{name}}{{#vendorExtensions.x-modifiers}}{{#-first}}, flags={{/-first}}re.{{.}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}})): # noqa: E501 raise ValueError(r"Invalid value for `{{name}}`, must be a follow pattern or equal to `{{{pattern}}}`") # noqa: E501 {{/pattern}} {{#maxItems}} - if {{name}} is not None and len({{name}}) > {{maxItems}}: + if (self.local_vars_configuration.client_side_validation and + {{name}} is not None and len({{name}}) > {{maxItems}}): raise ValueError("Invalid value for `{{name}}`, number of items must be less than or equal to `{{maxItems}}`") # noqa: E501 {{/maxItems}} {{#minItems}} - if {{name}} is not None and len({{name}}) < {{minItems}}: + if (self.local_vars_configuration.client_side_validation and + {{name}} is not None and len({{name}}) < {{minItems}}): raise ValueError("Invalid value for `{{name}}`, number of items must be greater than or equal to `{{minItems}}`") # noqa: E501 {{/minItems}} {{/hasValidation}} @@ -215,10 +229,13 @@ class {{classname}}(object): if not isinstance(other, {{classname}}): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, {{classname}}): + return True + + return self.to_dict() != other.to_dict() {{/model}} {{/models}} diff --git a/samples/client/petstore/python/petstore_api/api/another_fake_api.py b/samples/client/petstore/python/petstore_api/api/another_fake_api.py index a47a8e3ea184..268310a3e2fb 100644 --- a/samples/client/petstore/python/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python/petstore_api/api/another_fake_api.py @@ -103,8 +103,8 @@ def call_123_test_special_tags_with_http_info(self, body, **kwargs): # noqa: E5 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `call_123_test_special_tags`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python/petstore_api/api/fake_api.py b/samples/client/petstore/python/petstore_api/api/fake_api.py index 692c12e25acf..6907451d9200 100644 --- a/samples/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python/petstore_api/api/fake_api.py @@ -103,8 +103,8 @@ def create_xml_item_with_http_info(self, xml_item, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'xml_item' is set - if ('xml_item' not in local_var_params or - local_var_params['xml_item'] is None): + if self.api_client.client_side_validation and ('xml_item' not in local_var_params or # noqa: E501 + local_var_params['xml_item'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `xml_item` when calling `create_xml_item`") # noqa: E501 collection_formats = {} @@ -627,8 +627,8 @@ def test_body_with_file_schema_with_http_info(self, body, **kwargs): # noqa: E5 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_body_with_file_schema`") # noqa: E501 collection_formats = {} @@ -735,12 +735,12 @@ def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'query' is set - if ('query' not in local_var_params or - local_var_params['query'] is None): + if self.api_client.client_side_validation and ('query' not in local_var_params or # noqa: E501 + local_var_params['query'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `query` when calling `test_body_with_query_params`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_body_with_query_params`") # noqa: E501 collection_formats = {} @@ -849,8 +849,8 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_client_model`") # noqa: E501 collection_formats = {} @@ -987,49 +987,49 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'number' is set - if ('number' not in local_var_params or - local_var_params['number'] is None): + if self.api_client.client_side_validation and ('number' not in local_var_params or # noqa: E501 + local_var_params['number'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `number` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'double' is set - if ('double' not in local_var_params or - local_var_params['double'] is None): + if self.api_client.client_side_validation and ('double' not in local_var_params or # noqa: E501 + local_var_params['double'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `double` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'pattern_without_delimiter' is set - if ('pattern_without_delimiter' not in local_var_params or - local_var_params['pattern_without_delimiter'] is None): + if self.api_client.client_side_validation and ('pattern_without_delimiter' not in local_var_params or # noqa: E501 + local_var_params['pattern_without_delimiter'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'byte' is set - if ('byte' not in local_var_params or - local_var_params['byte'] is None): + if self.api_client.client_side_validation and ('byte' not in local_var_params or # noqa: E501 + local_var_params['byte'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `byte` when calling `test_endpoint_parameters`") # noqa: E501 - if 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 + if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 raise ApiValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value less than or equal to `543.2`") # noqa: E501 - if 'number' in local_var_params and local_var_params['number'] < 32.1: # noqa: E501 + if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] < 32.1: # noqa: E501 raise ApiValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value greater than or equal to `32.1`") # noqa: E501 - if 'double' in local_var_params and local_var_params['double'] > 123.4: # noqa: E501 + if self.api_client.client_side_validation and 'double' in local_var_params and local_var_params['double'] > 123.4: # noqa: E501 raise ApiValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value less than or equal to `123.4`") # noqa: E501 - if 'double' in local_var_params and local_var_params['double'] < 67.8: # noqa: E501 + if self.api_client.client_side_validation and 'double' in local_var_params and local_var_params['double'] < 67.8: # noqa: E501 raise ApiValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value greater than or equal to `67.8`") # noqa: E501 - if 'pattern_without_delimiter' in local_var_params and not re.search(r'^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 + if self.api_client.client_side_validation and 'pattern_without_delimiter' in local_var_params and not re.search(r'^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 raise ApiValueError("Invalid value for parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`, must conform to the pattern `/^[A-Z].*/`") # noqa: E501 - if 'integer' in local_var_params and local_var_params['integer'] > 100: # noqa: E501 + if self.api_client.client_side_validation and 'integer' in local_var_params and local_var_params['integer'] > 100: # noqa: E501 raise ApiValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value less than or equal to `100`") # noqa: E501 - if 'integer' in local_var_params and local_var_params['integer'] < 10: # noqa: E501 + if self.api_client.client_side_validation and 'integer' in local_var_params and local_var_params['integer'] < 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value greater than or equal to `10`") # noqa: E501 - if 'int32' in local_var_params and local_var_params['int32'] > 200: # noqa: E501 + if self.api_client.client_side_validation and 'int32' in local_var_params and local_var_params['int32'] > 200: # noqa: E501 raise ApiValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value less than or equal to `200`") # noqa: E501 - if 'int32' in local_var_params and local_var_params['int32'] < 20: # noqa: E501 + if self.api_client.client_side_validation and 'int32' in local_var_params and local_var_params['int32'] < 20: # noqa: E501 raise ApiValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value greater than or equal to `20`") # noqa: E501 - if 'float' in local_var_params and local_var_params['float'] > 987.6: # noqa: E501 + if self.api_client.client_side_validation and 'float' in local_var_params and local_var_params['float'] > 987.6: # noqa: E501 raise ApiValueError("Invalid value for parameter `float` when calling `test_endpoint_parameters`, must be a value less than or equal to `987.6`") # noqa: E501 - if 'string' in local_var_params and not re.search(r'[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 + if self.api_client.client_side_validation and 'string' in local_var_params and not re.search(r'[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 raise ApiValueError("Invalid value for parameter `string` when calling `test_endpoint_parameters`, must conform to the pattern `/[a-z]/i`") # noqa: E501 - if ('password' in local_var_params and - len(local_var_params['password']) > 64): + if self.api_client.client_side_validation and ('password' in local_var_params and # noqa: E501 + len(local_var_params['password']) > 64): # noqa: E501 raise ApiValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be less than or equal to `64`") # noqa: E501 - if ('password' in local_var_params and - len(local_var_params['password']) < 10): + if self.api_client.client_side_validation and ('password' in local_var_params and # noqa: E501 + len(local_var_params['password']) < 10): # noqa: E501 raise ApiValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be greater than or equal to `10`") # noqa: E501 collection_formats = {} @@ -1306,16 +1306,16 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'required_string_group' is set - if ('required_string_group' not in local_var_params or - local_var_params['required_string_group'] is None): + if self.api_client.client_side_validation and ('required_string_group' not in local_var_params or # noqa: E501 + local_var_params['required_string_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_string_group` when calling `test_group_parameters`") # noqa: E501 # verify the required parameter 'required_boolean_group' is set - if ('required_boolean_group' not in local_var_params or - local_var_params['required_boolean_group'] is None): + if self.api_client.client_side_validation and ('required_boolean_group' not in local_var_params or # noqa: E501 + local_var_params['required_boolean_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_boolean_group` when calling `test_group_parameters`") # noqa: E501 # verify the required parameter 'required_int64_group' is set - if ('required_int64_group' not in local_var_params or - local_var_params['required_int64_group'] is None): + if self.api_client.client_side_validation and ('required_int64_group' not in local_var_params or # noqa: E501 + local_var_params['required_int64_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_int64_group` when calling `test_group_parameters`") # noqa: E501 collection_formats = {} @@ -1426,8 +1426,8 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'param' is set - if ('param' not in local_var_params or - local_var_params['param'] is None): + if self.api_client.client_side_validation and ('param' not in local_var_params or # noqa: E501 + local_var_params['param'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `param` when calling `test_inline_additional_properties`") # noqa: E501 collection_formats = {} @@ -1534,12 +1534,12 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'param' is set - if ('param' not in local_var_params or - local_var_params['param'] is None): + if self.api_client.client_side_validation and ('param' not in local_var_params or # noqa: E501 + local_var_params['param'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `param` when calling `test_json_form_data`") # noqa: E501 # verify the required parameter 'param2' is set - if ('param2' not in local_var_params or - local_var_params['param2'] is None): + if self.api_client.client_side_validation and ('param2' not in local_var_params or # noqa: E501 + local_var_params['param2'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `param2` when calling `test_json_form_data`") # noqa: E501 collection_formats = {} @@ -1656,24 +1656,24 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pipe' is set - if ('pipe' not in local_var_params or - local_var_params['pipe'] is None): + if self.api_client.client_side_validation and ('pipe' not in local_var_params or # noqa: E501 + local_var_params['pipe'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pipe` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'ioutil' is set - if ('ioutil' not in local_var_params or - local_var_params['ioutil'] is None): + if self.api_client.client_side_validation and ('ioutil' not in local_var_params or # noqa: E501 + local_var_params['ioutil'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `ioutil` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'http' is set - if ('http' not in local_var_params or - local_var_params['http'] is None): + if self.api_client.client_side_validation and ('http' not in local_var_params or # noqa: E501 + local_var_params['http'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `http` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'url' is set - if ('url' not in local_var_params or - local_var_params['url'] is None): + if self.api_client.client_side_validation and ('url' not in local_var_params or # noqa: E501 + local_var_params['url'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `url` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'context' is set - if ('context' not in local_var_params or - local_var_params['context'] is None): + if self.api_client.client_side_validation and ('context' not in local_var_params or # noqa: E501 + local_var_params['context'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `context` when calling `test_query_parameter_collection_format`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py index 3e778e922686..90579feaae38 100644 --- a/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py @@ -103,8 +103,8 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_classname`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python/petstore_api/api/pet_api.py b/samples/client/petstore/python/petstore_api/api/pet_api.py index f96abdf72080..54abb9b95e77 100644 --- a/samples/client/petstore/python/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python/petstore_api/api/pet_api.py @@ -101,8 +101,8 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `add_pet`") # noqa: E501 collection_formats = {} @@ -209,8 +209,8 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `delete_pet`") # noqa: E501 collection_formats = {} @@ -315,8 +315,8 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'status' is set - if ('status' not in local_var_params or - local_var_params['status'] is None): + if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501 + local_var_params['status'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `status` when calling `find_pets_by_status`") # noqa: E501 collection_formats = {} @@ -424,8 +424,8 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'tags' is set - if ('tags' not in local_var_params or - local_var_params['tags'] is None): + if self.api_client.client_side_validation and ('tags' not in local_var_params or # noqa: E501 + local_var_params['tags'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `tags` when calling `find_pets_by_tags`") # noqa: E501 collection_formats = {} @@ -533,8 +533,8 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id`") # noqa: E501 collection_formats = {} @@ -639,8 +639,8 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `update_pet`") # noqa: E501 collection_formats = {} @@ -749,8 +749,8 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `update_pet_with_form`") # noqa: E501 collection_formats = {} @@ -863,8 +863,8 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file`") # noqa: E501 collection_formats = {} @@ -981,12 +981,12 @@ def upload_file_with_required_file_with_http_info(self, pet_id, required_file, * local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file_with_required_file`") # noqa: E501 # verify the required parameter 'required_file' is set - if ('required_file' not in local_var_params or - local_var_params['required_file'] is None): + if self.api_client.client_side_validation and ('required_file' not in local_var_params or # noqa: E501 + local_var_params['required_file'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_file` when calling `upload_file_with_required_file`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python/petstore_api/api/store_api.py b/samples/client/petstore/python/petstore_api/api/store_api.py index c3aa1c4a3d59..b907b107b2b6 100644 --- a/samples/client/petstore/python/petstore_api/api/store_api.py +++ b/samples/client/petstore/python/petstore_api/api/store_api.py @@ -103,8 +103,8 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - if ('order_id' not in local_var_params or - local_var_params['order_id'] is None): + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `delete_order`") # noqa: E501 collection_formats = {} @@ -307,13 +307,13 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - if ('order_id' not in local_var_params or - local_var_params['order_id'] is None): + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `get_order_by_id`") # noqa: E501 - if 'order_id' in local_var_params and local_var_params['order_id'] > 5: # noqa: E501 + if self.api_client.client_side_validation and 'order_id' in local_var_params and local_var_params['order_id'] > 5: # noqa: E501 raise ApiValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value less than or equal to `5`") # noqa: E501 - if 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501 + if self.api_client.client_side_validation and 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} @@ -417,8 +417,8 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `place_order`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python/petstore_api/api/user_api.py b/samples/client/petstore/python/petstore_api/api/user_api.py index 86135f2c891b..268721dcb890 100644 --- a/samples/client/petstore/python/petstore_api/api/user_api.py +++ b/samples/client/petstore/python/petstore_api/api/user_api.py @@ -103,8 +103,8 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_user`") # noqa: E501 collection_formats = {} @@ -205,8 +205,8 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_users_with_array_input`") # noqa: E501 collection_formats = {} @@ -307,8 +307,8 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_users_with_list_input`") # noqa: E501 collection_formats = {} @@ -411,8 +411,8 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `delete_user`") # noqa: E501 collection_formats = {} @@ -513,8 +513,8 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `get_user_by_name`") # noqa: E501 collection_formats = {} @@ -621,12 +621,12 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `login_user`") # noqa: E501 # verify the required parameter 'password' is set - if ('password' not in local_var_params or - local_var_params['password'] is None): + if self.api_client.client_side_validation and ('password' not in local_var_params or # noqa: E501 + local_var_params['password'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `password` when calling `login_user`") # noqa: E501 collection_formats = {} @@ -831,12 +831,12 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `update_user`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `update_user`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python/petstore_api/api_client.py b/samples/client/petstore/python/petstore_api/api_client.py index 64e1278b4ebc..f9c494a76c36 100644 --- a/samples/client/petstore/python/petstore_api/api_client.py +++ b/samples/client/petstore/python/petstore_api/api_client.py @@ -77,6 +77,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.cookie = cookie # Set default User-Agent. self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation def __del__(self): if self._pool: diff --git a/samples/client/petstore/python/petstore_api/configuration.py b/samples/client/petstore/python/petstore_api/configuration.py index 459ff6a3ca25..5e9d7b5d41d3 100644 --- a/samples/client/petstore/python/petstore_api/configuration.py +++ b/samples/client/petstore/python/petstore_api/configuration.py @@ -138,6 +138,8 @@ def __init__(self, host="http://petstore.swagger.io:80/v2", self.retries = None """Adding retries to override urllib3 default value 3 """ + # Disable client side validation + self.client_side_validation = True @property def logger_file(self): diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_any_type.py b/samples/client/petstore/python/petstore_api/models/additional_properties_any_type.py index ed4f40068bf8..2954285de87c 100644 --- a/samples/client/petstore/python/petstore_api/models/additional_properties_any_type.py +++ b/samples/client/petstore/python/petstore_api/models/additional_properties_any_type.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesAnyType(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesAnyType(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesAnyType - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesAnyType): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesAnyType): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_array.py b/samples/client/petstore/python/petstore_api/models/additional_properties_array.py index 22b4133f3675..c6369c22a12f 100644 --- a/samples/client/petstore/python/petstore_api/models/additional_properties_array.py +++ b/samples/client/petstore/python/petstore_api/models/additional_properties_array.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesArray(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesArray(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesArray - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesArray): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesArray): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_boolean.py b/samples/client/petstore/python/petstore_api/models/additional_properties_boolean.py index 24e2fc178abc..599b7c8b8843 100644 --- a/samples/client/petstore/python/petstore_api/models/additional_properties_boolean.py +++ b/samples/client/petstore/python/petstore_api/models/additional_properties_boolean.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesBoolean(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesBoolean(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesBoolean - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesBoolean): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesBoolean): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python/petstore_api/models/additional_properties_class.py index e9e9307d1b72..be4455c683bf 100644 --- a/samples/client/petstore/python/petstore_api/models/additional_properties_class.py +++ b/samples/client/petstore/python/petstore_api/models/additional_properties_class.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -58,8 +60,11 @@ class AdditionalPropertiesClass(object): 'anytype_3': 'anytype_3' } - def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, anytype_1=None, anytype_2=None, anytype_3=None): # noqa: E501 + def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, anytype_1=None, anytype_2=None, anytype_3=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._map_string = None self._map_number = None @@ -365,8 +370,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_integer.py b/samples/client/petstore/python/petstore_api/models/additional_properties_integer.py index 43bcf425a7b3..ddbb85fdf33b 100644 --- a/samples/client/petstore/python/petstore_api/models/additional_properties_integer.py +++ b/samples/client/petstore/python/petstore_api/models/additional_properties_integer.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesInteger(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesInteger(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesInteger - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesInteger): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesInteger): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_number.py b/samples/client/petstore/python/petstore_api/models/additional_properties_number.py index b3e034035a8e..8bbeda83ecca 100644 --- a/samples/client/petstore/python/petstore_api/models/additional_properties_number.py +++ b/samples/client/petstore/python/petstore_api/models/additional_properties_number.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesNumber(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesNumber(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesNumber - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesNumber): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesNumber): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_object.py b/samples/client/petstore/python/petstore_api/models/additional_properties_object.py index 9ab56a4e5537..af87595b3e41 100644 --- a/samples/client/petstore/python/petstore_api/models/additional_properties_object.py +++ b/samples/client/petstore/python/petstore_api/models/additional_properties_object.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesObject(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesObject(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesObject - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesObject): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesObject): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_string.py b/samples/client/petstore/python/petstore_api/models/additional_properties_string.py index 4667186bdc4f..6ab2c91feda9 100644 --- a/samples/client/petstore/python/petstore_api/models/additional_properties_string.py +++ b/samples/client/petstore/python/petstore_api/models/additional_properties_string.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesString(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesString(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesString - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesString): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesString): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/animal.py b/samples/client/petstore/python/petstore_api/models/animal.py index 552ef0e8326b..65cef1a60885 100644 --- a/samples/client/petstore/python/petstore_api/models/animal.py +++ b/samples/client/petstore/python/petstore_api/models/animal.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Animal(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -45,8 +47,11 @@ class Animal(object): 'Cat': 'Cat' } - def __init__(self, class_name=None, color='red'): # noqa: E501 + def __init__(self, class_name=None, color='red', local_vars_configuration=None): # noqa: E501 """Animal - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._class_name = None self._color = None @@ -74,7 +79,7 @@ def class_name(self, class_name): :param class_name: The class_name of this Animal. # noqa: E501 :type: str """ - if class_name is None: + if self.local_vars_configuration.client_side_validation and class_name is None: # noqa: E501 raise ValueError("Invalid value for `class_name`, must not be `None`") # noqa: E501 self._class_name = class_name @@ -143,8 +148,11 @@ def __eq__(self, other): if not isinstance(other, Animal): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Animal): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/api_response.py b/samples/client/petstore/python/petstore_api/models/api_response.py index 190c3df34526..24e80d02aea4 100644 --- a/samples/client/petstore/python/petstore_api/models/api_response.py +++ b/samples/client/petstore/python/petstore_api/models/api_response.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ApiResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class ApiResponse(object): 'message': 'message' } - def __init__(self, code=None, type=None, message=None): # noqa: E501 + def __init__(self, code=None, type=None, message=None, local_vars_configuration=None): # noqa: E501 """ApiResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._code = None self._type = None @@ -157,8 +162,11 @@ def __eq__(self, other): if not isinstance(other, ApiResponse): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ApiResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py b/samples/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py index ebf964298018..1f654452077f 100644 --- a/samples/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ArrayOfArrayOfNumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ArrayOfArrayOfNumberOnly(object): 'array_array_number': 'ArrayArrayNumber' } - def __init__(self, array_array_number=None): # noqa: E501 + def __init__(self, array_array_number=None, local_vars_configuration=None): # noqa: E501 """ArrayOfArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_array_number = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, ArrayOfArrayOfNumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayOfArrayOfNumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/array_of_number_only.py b/samples/client/petstore/python/petstore_api/models/array_of_number_only.py index 8e1837c46bda..27ba1f58e31e 100644 --- a/samples/client/petstore/python/petstore_api/models/array_of_number_only.py +++ b/samples/client/petstore/python/petstore_api/models/array_of_number_only.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ArrayOfNumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ArrayOfNumberOnly(object): 'array_number': 'ArrayNumber' } - def __init__(self, array_number=None): # noqa: E501 + def __init__(self, array_number=None, local_vars_configuration=None): # noqa: E501 """ArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_number = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, ArrayOfNumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayOfNumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/array_test.py b/samples/client/petstore/python/petstore_api/models/array_test.py index f548fef3ee8c..f34a372f6f3b 100644 --- a/samples/client/petstore/python/petstore_api/models/array_test.py +++ b/samples/client/petstore/python/petstore_api/models/array_test.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ArrayTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class ArrayTest(object): 'array_array_of_model': 'array_array_of_model' } - def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None): # noqa: E501 + def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None, local_vars_configuration=None): # noqa: E501 """ArrayTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_of_string = None self._array_array_of_integer = None @@ -157,8 +162,11 @@ def __eq__(self, other): if not isinstance(other, ArrayTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/capitalization.py b/samples/client/petstore/python/petstore_api/models/capitalization.py index 0da6b77e84dc..cef34c5f6dc3 100644 --- a/samples/client/petstore/python/petstore_api/models/capitalization.py +++ b/samples/client/petstore/python/petstore_api/models/capitalization.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Capitalization(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Capitalization(object): 'att_name': 'ATT_NAME' } - def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None): # noqa: E501 + def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None, local_vars_configuration=None): # noqa: E501 """Capitalization - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._small_camel = None self._capital_camel = None @@ -237,8 +242,11 @@ def __eq__(self, other): if not isinstance(other, Capitalization): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Capitalization): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/cat.py b/samples/client/petstore/python/petstore_api/models/cat.py index 216e5123538c..e39c1c82508c 100644 --- a/samples/client/petstore/python/petstore_api/models/cat.py +++ b/samples/client/petstore/python/petstore_api/models/cat.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Cat(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Cat(object): 'declawed': 'declawed' } - def __init__(self, declawed=None): # noqa: E501 + def __init__(self, declawed=None, local_vars_configuration=None): # noqa: E501 """Cat - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._declawed = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, Cat): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Cat): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/cat_all_of.py b/samples/client/petstore/python/petstore_api/models/cat_all_of.py index 3c90df84ec3a..7e90fab93489 100644 --- a/samples/client/petstore/python/petstore_api/models/cat_all_of.py +++ b/samples/client/petstore/python/petstore_api/models/cat_all_of.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class CatAllOf(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class CatAllOf(object): 'declawed': 'declawed' } - def __init__(self, declawed=None): # noqa: E501 + def __init__(self, declawed=None, local_vars_configuration=None): # noqa: E501 """CatAllOf - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._declawed = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, CatAllOf): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, CatAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/category.py b/samples/client/petstore/python/petstore_api/models/category.py index 0e23c409e50a..b47c148953ea 100644 --- a/samples/client/petstore/python/petstore_api/models/category.py +++ b/samples/client/petstore/python/petstore_api/models/category.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Category(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Category(object): 'name': 'name' } - def __init__(self, id=None, name='default-name'): # noqa: E501 + def __init__(self, id=None, name='default-name', local_vars_configuration=None): # noqa: E501 """Category - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._name = None @@ -90,7 +95,7 @@ def name(self, name): :param name: The name of this Category. # noqa: E501 :type: str """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -132,8 +137,11 @@ def __eq__(self, other): if not isinstance(other, Category): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Category): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/class_model.py b/samples/client/petstore/python/petstore_api/models/class_model.py index 88562beff8b1..ef6060ffa70d 100644 --- a/samples/client/petstore/python/petstore_api/models/class_model.py +++ b/samples/client/petstore/python/petstore_api/models/class_model.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ClassModel(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ClassModel(object): '_class': '_class' } - def __init__(self, _class=None): # noqa: E501 + def __init__(self, _class=None, local_vars_configuration=None): # noqa: E501 """ClassModel - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__class = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, ClassModel): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassModel): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/client.py b/samples/client/petstore/python/petstore_api/models/client.py index b7083fd9bd75..ee5dbf1c43a1 100644 --- a/samples/client/petstore/python/petstore_api/models/client.py +++ b/samples/client/petstore/python/petstore_api/models/client.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Client(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Client(object): 'client': 'client' } - def __init__(self, client=None): # noqa: E501 + def __init__(self, client=None, local_vars_configuration=None): # noqa: E501 """Client - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._client = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, Client): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Client): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/dog.py b/samples/client/petstore/python/petstore_api/models/dog.py index c325cb252c32..eacb63eedb09 100644 --- a/samples/client/petstore/python/petstore_api/models/dog.py +++ b/samples/client/petstore/python/petstore_api/models/dog.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Dog(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Dog(object): 'breed': 'breed' } - def __init__(self, breed=None): # noqa: E501 + def __init__(self, breed=None, local_vars_configuration=None): # noqa: E501 """Dog - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._breed = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, Dog): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Dog): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/dog_all_of.py b/samples/client/petstore/python/petstore_api/models/dog_all_of.py index b6328b05589e..48e048557085 100644 --- a/samples/client/petstore/python/petstore_api/models/dog_all_of.py +++ b/samples/client/petstore/python/petstore_api/models/dog_all_of.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class DogAllOf(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class DogAllOf(object): 'breed': 'breed' } - def __init__(self, breed=None): # noqa: E501 + def __init__(self, breed=None, local_vars_configuration=None): # noqa: E501 """DogAllOf - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._breed = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, DogAllOf): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, DogAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/enum_arrays.py b/samples/client/petstore/python/petstore_api/models/enum_arrays.py index 00aa21d04da8..481283a05c32 100644 --- a/samples/client/petstore/python/petstore_api/models/enum_arrays.py +++ b/samples/client/petstore/python/petstore_api/models/enum_arrays.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class EnumArrays(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class EnumArrays(object): 'array_enum': 'array_enum' } - def __init__(self, just_symbol=None, array_enum=None): # noqa: E501 + def __init__(self, just_symbol=None, array_enum=None, local_vars_configuration=None): # noqa: E501 """EnumArrays - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._just_symbol = None self._array_enum = None @@ -71,7 +76,7 @@ def just_symbol(self, just_symbol): :type: str """ allowed_values = [">=", "$"] # noqa: E501 - if just_symbol not in allowed_values: + if self.local_vars_configuration.client_side_validation and just_symbol not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `just_symbol` ({0}), must be one of {1}" # noqa: E501 .format(just_symbol, allowed_values) @@ -98,7 +103,8 @@ def array_enum(self, array_enum): :type: list[str] """ allowed_values = ["fish", "crab"] # noqa: E501 - if not set(array_enum).issubset(set(allowed_values)): + if (self.local_vars_configuration.client_side_validation and + not set(array_enum).issubset(set(allowed_values))): raise ValueError( "Invalid values for `array_enum` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(array_enum) - set(allowed_values))), # noqa: E501 @@ -144,8 +150,11 @@ def __eq__(self, other): if not isinstance(other, EnumArrays): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumArrays): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/enum_class.py b/samples/client/petstore/python/petstore_api/models/enum_class.py index 3c1aa279755b..8bc627578608 100644 --- a/samples/client/petstore/python/petstore_api/models/enum_class.py +++ b/samples/client/petstore/python/petstore_api/models/enum_class.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class EnumClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class EnumClass(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """EnumClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +89,11 @@ def __eq__(self, other): if not isinstance(other, EnumClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/enum_test.py b/samples/client/petstore/python/petstore_api/models/enum_test.py index 11e5020363ec..464281b3ec0e 100644 --- a/samples/client/petstore/python/petstore_api/models/enum_test.py +++ b/samples/client/petstore/python/petstore_api/models/enum_test.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class EnumTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -46,8 +48,11 @@ class EnumTest(object): 'outer_enum': 'outerEnum' } - def __init__(self, enum_string=None, enum_string_required=None, enum_integer=None, enum_number=None, outer_enum=None): # noqa: E501 + def __init__(self, enum_string=None, enum_string_required=None, enum_integer=None, enum_number=None, outer_enum=None, local_vars_configuration=None): # noqa: E501 """EnumTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._enum_string = None self._enum_string_required = None @@ -85,7 +90,7 @@ def enum_string(self, enum_string): :type: str """ allowed_values = ["UPPER", "lower", ""] # noqa: E501 - if enum_string not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_string not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_string` ({0}), must be one of {1}" # noqa: E501 .format(enum_string, allowed_values) @@ -111,10 +116,10 @@ def enum_string_required(self, enum_string_required): :param enum_string_required: The enum_string_required of this EnumTest. # noqa: E501 :type: str """ - if enum_string_required is None: + if self.local_vars_configuration.client_side_validation and enum_string_required is None: # noqa: E501 raise ValueError("Invalid value for `enum_string_required`, must not be `None`") # noqa: E501 allowed_values = ["UPPER", "lower", ""] # noqa: E501 - if enum_string_required not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_string_required not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_string_required` ({0}), must be one of {1}" # noqa: E501 .format(enum_string_required, allowed_values) @@ -141,7 +146,7 @@ def enum_integer(self, enum_integer): :type: int """ allowed_values = [1, -1] # noqa: E501 - if enum_integer not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_integer not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_integer` ({0}), must be one of {1}" # noqa: E501 .format(enum_integer, allowed_values) @@ -168,7 +173,7 @@ def enum_number(self, enum_number): :type: float """ allowed_values = [1.1, -1.2] # noqa: E501 - if enum_number not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_number not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_number` ({0}), must be one of {1}" # noqa: E501 .format(enum_number, allowed_values) @@ -234,8 +239,11 @@ def __eq__(self, other): if not isinstance(other, EnumTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/file.py b/samples/client/petstore/python/petstore_api/models/file.py index 475f86b799f7..282df2957e67 100644 --- a/samples/client/petstore/python/petstore_api/models/file.py +++ b/samples/client/petstore/python/petstore_api/models/file.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class File(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class File(object): 'source_uri': 'sourceURI' } - def __init__(self, source_uri=None): # noqa: E501 + def __init__(self, source_uri=None, local_vars_configuration=None): # noqa: E501 """File - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._source_uri = None self.discriminator = None @@ -107,8 +112,11 @@ def __eq__(self, other): if not isinstance(other, File): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, File): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/file_schema_test_class.py b/samples/client/petstore/python/petstore_api/models/file_schema_test_class.py index 9f3b5bdc1793..de7f865b47e2 100644 --- a/samples/client/petstore/python/petstore_api/models/file_schema_test_class.py +++ b/samples/client/petstore/python/petstore_api/models/file_schema_test_class.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class FileSchemaTestClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class FileSchemaTestClass(object): 'files': 'files' } - def __init__(self, file=None, files=None): # noqa: E501 + def __init__(self, file=None, files=None, local_vars_configuration=None): # noqa: E501 """FileSchemaTestClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._file = None self._files = None @@ -131,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, FileSchemaTestClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, FileSchemaTestClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/format_test.py b/samples/client/petstore/python/petstore_api/models/format_test.py index 1451cdcd6af0..6396c442f624 100644 --- a/samples/client/petstore/python/petstore_api/models/format_test.py +++ b/samples/client/petstore/python/petstore_api/models/format_test.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class FormatTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -64,8 +66,11 @@ class FormatTest(object): 'big_decimal': 'BigDecimal' } - def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None, big_decimal=None): # noqa: E501 + def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None, big_decimal=None, local_vars_configuration=None): # noqa: E501 """FormatTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._integer = None self._int32 = None @@ -126,9 +131,11 @@ def integer(self, integer): :param integer: The integer of this FormatTest. # noqa: E501 :type: int """ - if integer is not None and integer > 100: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + integer is not None and integer > 100): # noqa: E501 raise ValueError("Invalid value for `integer`, must be a value less than or equal to `100`") # noqa: E501 - if integer is not None and integer < 10: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + integer is not None and integer < 10): # noqa: E501 raise ValueError("Invalid value for `integer`, must be a value greater than or equal to `10`") # noqa: E501 self._integer = integer @@ -151,9 +158,11 @@ def int32(self, int32): :param int32: The int32 of this FormatTest. # noqa: E501 :type: int """ - if int32 is not None and int32 > 200: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + int32 is not None and int32 > 200): # noqa: E501 raise ValueError("Invalid value for `int32`, must be a value less than or equal to `200`") # noqa: E501 - if int32 is not None and int32 < 20: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + int32 is not None and int32 < 20): # noqa: E501 raise ValueError("Invalid value for `int32`, must be a value greater than or equal to `20`") # noqa: E501 self._int32 = int32 @@ -197,11 +206,13 @@ def number(self, number): :param number: The number of this FormatTest. # noqa: E501 :type: float """ - if number is None: + if self.local_vars_configuration.client_side_validation and number is None: # noqa: E501 raise ValueError("Invalid value for `number`, must not be `None`") # noqa: E501 - if number is not None and number > 543.2: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + number is not None and number > 543.2): # noqa: E501 raise ValueError("Invalid value for `number`, must be a value less than or equal to `543.2`") # noqa: E501 - if number is not None and number < 32.1: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + number is not None and number < 32.1): # noqa: E501 raise ValueError("Invalid value for `number`, must be a value greater than or equal to `32.1`") # noqa: E501 self._number = number @@ -224,9 +235,11 @@ def float(self, float): :param float: The float of this FormatTest. # noqa: E501 :type: float """ - if float is not None and float > 987.6: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + float is not None and float > 987.6): # noqa: E501 raise ValueError("Invalid value for `float`, must be a value less than or equal to `987.6`") # noqa: E501 - if float is not None and float < 54.3: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + float is not None and float < 54.3): # noqa: E501 raise ValueError("Invalid value for `float`, must be a value greater than or equal to `54.3`") # noqa: E501 self._float = float @@ -249,9 +262,11 @@ def double(self, double): :param double: The double of this FormatTest. # noqa: E501 :type: float """ - if double is not None and double > 123.4: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + double is not None and double > 123.4): # noqa: E501 raise ValueError("Invalid value for `double`, must be a value less than or equal to `123.4`") # noqa: E501 - if double is not None and double < 67.8: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + double is not None and double < 67.8): # noqa: E501 raise ValueError("Invalid value for `double`, must be a value greater than or equal to `67.8`") # noqa: E501 self._double = double @@ -274,7 +289,8 @@ def string(self, string): :param string: The string of this FormatTest. # noqa: E501 :type: str """ - if string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE): # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE)): # noqa: E501 raise ValueError(r"Invalid value for `string`, must be a follow pattern or equal to `/[a-z]/i`") # noqa: E501 self._string = string @@ -297,9 +313,10 @@ def byte(self, byte): :param byte: The byte of this FormatTest. # noqa: E501 :type: str """ - if byte is None: + if self.local_vars_configuration.client_side_validation and byte is None: # noqa: E501 raise ValueError("Invalid value for `byte`, must not be `None`") # noqa: E501 - if byte is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', byte): # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + byte is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', byte)): # noqa: E501 raise ValueError(r"Invalid value for `byte`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`") # noqa: E501 self._byte = byte @@ -343,7 +360,7 @@ def date(self, date): :param date: The date of this FormatTest. # noqa: E501 :type: date """ - if date is None: + if self.local_vars_configuration.client_side_validation and date is None: # noqa: E501 raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501 self._date = date @@ -408,11 +425,13 @@ def password(self, password): :param password: The password of this FormatTest. # noqa: E501 :type: str """ - if password is None: + if self.local_vars_configuration.client_side_validation and password is None: # noqa: E501 raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 - if password is not None and len(password) > 64: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) > 64): raise ValueError("Invalid value for `password`, length must be less than or equal to `64`") # noqa: E501 - if password is not None and len(password) < 10: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) < 10): raise ValueError("Invalid value for `password`, length must be greater than or equal to `10`") # noqa: E501 self._password = password @@ -475,8 +494,11 @@ def __eq__(self, other): if not isinstance(other, FormatTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, FormatTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/has_only_read_only.py b/samples/client/petstore/python/petstore_api/models/has_only_read_only.py index 7c8d921a2d8d..5fc2f8a9ebdd 100644 --- a/samples/client/petstore/python/petstore_api/models/has_only_read_only.py +++ b/samples/client/petstore/python/petstore_api/models/has_only_read_only.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class HasOnlyReadOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class HasOnlyReadOnly(object): 'foo': 'foo' } - def __init__(self, bar=None, foo=None): # noqa: E501 + def __init__(self, bar=None, foo=None, local_vars_configuration=None): # noqa: E501 """HasOnlyReadOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._bar = None self._foo = None @@ -131,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, HasOnlyReadOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, HasOnlyReadOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/list.py b/samples/client/petstore/python/petstore_api/models/list.py index 74fc3719aa03..d58d13e90fbc 100644 --- a/samples/client/petstore/python/petstore_api/models/list.py +++ b/samples/client/petstore/python/petstore_api/models/list.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class List(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class List(object): '_123_list': '123-list' } - def __init__(self, _123_list=None): # noqa: E501 + def __init__(self, _123_list=None, local_vars_configuration=None): # noqa: E501 """List - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__123_list = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, List): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, List): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/map_test.py b/samples/client/petstore/python/petstore_api/models/map_test.py index cdfb9365297c..b170dce412c7 100644 --- a/samples/client/petstore/python/petstore_api/models/map_test.py +++ b/samples/client/petstore/python/petstore_api/models/map_test.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class MapTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -44,8 +46,11 @@ class MapTest(object): 'indirect_map': 'indirect_map' } - def __init__(self, map_map_of_string=None, map_of_enum_string=None, direct_map=None, indirect_map=None): # noqa: E501 + def __init__(self, map_map_of_string=None, map_of_enum_string=None, direct_map=None, indirect_map=None, local_vars_configuration=None): # noqa: E501 """MapTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._map_map_of_string = None self._map_of_enum_string = None @@ -102,7 +107,8 @@ def map_of_enum_string(self, map_of_enum_string): :type: dict(str, str) """ allowed_values = ["UPPER", "lower"] # noqa: E501 - if not set(map_of_enum_string.keys()).issubset(set(allowed_values)): + if (self.local_vars_configuration.client_side_validation and + not set(map_of_enum_string.keys()).issubset(set(allowed_values))): raise ValueError( "Invalid keys in `map_of_enum_string` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(map_of_enum_string.keys()) - set(allowed_values))), # noqa: E501 @@ -190,8 +196,11 @@ def __eq__(self, other): if not isinstance(other, MapTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MapTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py index 41a916eac10f..5da34f8830e8 100644 --- a/samples/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class MixedPropertiesAndAdditionalPropertiesClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class MixedPropertiesAndAdditionalPropertiesClass(object): 'map': 'map' } - def __init__(self, uuid=None, date_time=None, map=None): # noqa: E501 + def __init__(self, uuid=None, date_time=None, map=None, local_vars_configuration=None): # noqa: E501 """MixedPropertiesAndAdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._uuid = None self._date_time = None @@ -157,8 +162,11 @@ def __eq__(self, other): if not isinstance(other, MixedPropertiesAndAdditionalPropertiesClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MixedPropertiesAndAdditionalPropertiesClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/model200_response.py b/samples/client/petstore/python/petstore_api/models/model200_response.py index 563b82b59391..841ce1f18f3d 100644 --- a/samples/client/petstore/python/petstore_api/models/model200_response.py +++ b/samples/client/petstore/python/petstore_api/models/model200_response.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Model200Response(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Model200Response(object): '_class': 'class' } - def __init__(self, name=None, _class=None): # noqa: E501 + def __init__(self, name=None, _class=None, local_vars_configuration=None): # noqa: E501 """Model200Response - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.__class = None @@ -131,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, Model200Response): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Model200Response): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/model_return.py b/samples/client/petstore/python/petstore_api/models/model_return.py index 098012015988..fdd8d72314ad 100644 --- a/samples/client/petstore/python/petstore_api/models/model_return.py +++ b/samples/client/petstore/python/petstore_api/models/model_return.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ModelReturn(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ModelReturn(object): '_return': 'return' } - def __init__(self, _return=None): # noqa: E501 + def __init__(self, _return=None, local_vars_configuration=None): # noqa: E501 """ModelReturn - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__return = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, ModelReturn): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ModelReturn): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/name.py b/samples/client/petstore/python/petstore_api/models/name.py index 43014d0fb643..bb2c1fbd73cc 100644 --- a/samples/client/petstore/python/petstore_api/models/name.py +++ b/samples/client/petstore/python/petstore_api/models/name.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Name(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -44,8 +46,11 @@ class Name(object): '_123_number': '123Number' } - def __init__(self, name=None, snake_case=None, _property=None, _123_number=None): # noqa: E501 + def __init__(self, name=None, snake_case=None, _property=None, _123_number=None, local_vars_configuration=None): # noqa: E501 """Name - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self._snake_case = None @@ -79,7 +84,7 @@ def name(self, name): :param name: The name of this Name. # noqa: E501 :type: int """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -184,8 +189,11 @@ def __eq__(self, other): if not isinstance(other, Name): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Name): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/number_only.py b/samples/client/petstore/python/petstore_api/models/number_only.py index b6f3d1c1b65c..99b2424852fb 100644 --- a/samples/client/petstore/python/petstore_api/models/number_only.py +++ b/samples/client/petstore/python/petstore_api/models/number_only.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class NumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class NumberOnly(object): 'just_number': 'JustNumber' } - def __init__(self, just_number=None): # noqa: E501 + def __init__(self, just_number=None, local_vars_configuration=None): # noqa: E501 """NumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._just_number = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, NumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, NumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/order.py b/samples/client/petstore/python/petstore_api/models/order.py index 8b64e3a35832..8c863cce8fe5 100644 --- a/samples/client/petstore/python/petstore_api/models/order.py +++ b/samples/client/petstore/python/petstore_api/models/order.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Order(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Order(object): 'complete': 'complete' } - def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False): # noqa: E501 + def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False, local_vars_configuration=None): # noqa: E501 """Order - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._pet_id = None @@ -177,7 +182,7 @@ def status(self, status): :type: str """ allowed_values = ["placed", "approved", "delivered"] # noqa: E501 - if status not in allowed_values: + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 .format(status, allowed_values) @@ -243,8 +248,11 @@ def __eq__(self, other): if not isinstance(other, Order): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Order): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/outer_composite.py b/samples/client/petstore/python/petstore_api/models/outer_composite.py index dccd67055bed..c11859114a57 100644 --- a/samples/client/petstore/python/petstore_api/models/outer_composite.py +++ b/samples/client/petstore/python/petstore_api/models/outer_composite.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class OuterComposite(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class OuterComposite(object): 'my_boolean': 'my_boolean' } - def __init__(self, my_number=None, my_string=None, my_boolean=None): # noqa: E501 + def __init__(self, my_number=None, my_string=None, my_boolean=None, local_vars_configuration=None): # noqa: E501 """OuterComposite - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._my_number = None self._my_string = None @@ -157,8 +162,11 @@ def __eq__(self, other): if not isinstance(other, OuterComposite): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OuterComposite): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/outer_enum.py b/samples/client/petstore/python/petstore_api/models/outer_enum.py index a6697a0b1522..8fbfeb7aaea5 100644 --- a/samples/client/petstore/python/petstore_api/models/outer_enum.py +++ b/samples/client/petstore/python/petstore_api/models/outer_enum.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class OuterEnum(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class OuterEnum(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """OuterEnum - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +89,11 @@ def __eq__(self, other): if not isinstance(other, OuterEnum): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OuterEnum): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/pet.py b/samples/client/petstore/python/petstore_api/models/pet.py index 870608e17ac3..edbf73f53127 100644 --- a/samples/client/petstore/python/petstore_api/models/pet.py +++ b/samples/client/petstore/python/petstore_api/models/pet.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Pet(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Pet(object): 'status': 'status' } - def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None): # noqa: E501 + def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None, local_vars_configuration=None): # noqa: E501 """Pet - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._category = None @@ -130,7 +135,7 @@ def name(self, name): :param name: The name of this Pet. # noqa: E501 :type: str """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -153,7 +158,7 @@ def photo_urls(self, photo_urls): :param photo_urls: The photo_urls of this Pet. # noqa: E501 :type: list[str] """ - if photo_urls is None: + if self.local_vars_configuration.client_side_validation and photo_urls is None: # noqa: E501 raise ValueError("Invalid value for `photo_urls`, must not be `None`") # noqa: E501 self._photo_urls = photo_urls @@ -200,7 +205,7 @@ def status(self, status): :type: str """ allowed_values = ["available", "pending", "sold"] # noqa: E501 - if status not in allowed_values: + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 .format(status, allowed_values) @@ -245,8 +250,11 @@ def __eq__(self, other): if not isinstance(other, Pet): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Pet): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/read_only_first.py b/samples/client/petstore/python/petstore_api/models/read_only_first.py index 3dfb7c7f6267..a84679e98dee 100644 --- a/samples/client/petstore/python/petstore_api/models/read_only_first.py +++ b/samples/client/petstore/python/petstore_api/models/read_only_first.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ReadOnlyFirst(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class ReadOnlyFirst(object): 'baz': 'baz' } - def __init__(self, bar=None, baz=None): # noqa: E501 + def __init__(self, bar=None, baz=None, local_vars_configuration=None): # noqa: E501 """ReadOnlyFirst - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._bar = None self._baz = None @@ -131,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, ReadOnlyFirst): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ReadOnlyFirst): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/special_model_name.py b/samples/client/petstore/python/petstore_api/models/special_model_name.py index 2fd6378fcdc5..396e75bcee5c 100644 --- a/samples/client/petstore/python/petstore_api/models/special_model_name.py +++ b/samples/client/petstore/python/petstore_api/models/special_model_name.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class SpecialModelName(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class SpecialModelName(object): 'special_property_name': '$special[property.name]' } - def __init__(self, special_property_name=None): # noqa: E501 + def __init__(self, special_property_name=None, local_vars_configuration=None): # noqa: E501 """SpecialModelName - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._special_property_name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, SpecialModelName): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, SpecialModelName): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/tag.py b/samples/client/petstore/python/petstore_api/models/tag.py index cb9c22d9f53a..d6137fdd47f0 100644 --- a/samples/client/petstore/python/petstore_api/models/tag.py +++ b/samples/client/petstore/python/petstore_api/models/tag.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Tag(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Tag(object): 'name': 'name' } - def __init__(self, id=None, name=None): # noqa: E501 + def __init__(self, id=None, name=None, local_vars_configuration=None): # noqa: E501 """Tag - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._name = None @@ -131,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, Tag): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Tag): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/type_holder_default.py b/samples/client/petstore/python/petstore_api/models/type_holder_default.py index d7c207cb5f63..8163ea77aa73 100644 --- a/samples/client/petstore/python/petstore_api/models/type_holder_default.py +++ b/samples/client/petstore/python/petstore_api/models/type_holder_default.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class TypeHolderDefault(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -46,8 +48,11 @@ class TypeHolderDefault(object): 'array_item': 'array_item' } - def __init__(self, string_item='what', number_item=None, integer_item=None, bool_item=True, array_item=None): # noqa: E501 + def __init__(self, string_item='what', number_item=None, integer_item=None, bool_item=True, array_item=None, local_vars_configuration=None): # noqa: E501 """TypeHolderDefault - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._string_item = None self._number_item = None @@ -80,7 +85,7 @@ def string_item(self, string_item): :param string_item: The string_item of this TypeHolderDefault. # noqa: E501 :type: str """ - if string_item is None: + if self.local_vars_configuration.client_side_validation and string_item is None: # noqa: E501 raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501 self._string_item = string_item @@ -103,7 +108,7 @@ def number_item(self, number_item): :param number_item: The number_item of this TypeHolderDefault. # noqa: E501 :type: float """ - if number_item is None: + if self.local_vars_configuration.client_side_validation and number_item is None: # noqa: E501 raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501 self._number_item = number_item @@ -126,7 +131,7 @@ def integer_item(self, integer_item): :param integer_item: The integer_item of this TypeHolderDefault. # noqa: E501 :type: int """ - if integer_item is None: + if self.local_vars_configuration.client_side_validation and integer_item is None: # noqa: E501 raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501 self._integer_item = integer_item @@ -149,7 +154,7 @@ def bool_item(self, bool_item): :param bool_item: The bool_item of this TypeHolderDefault. # noqa: E501 :type: bool """ - if bool_item is None: + if self.local_vars_configuration.client_side_validation and bool_item is None: # noqa: E501 raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501 self._bool_item = bool_item @@ -172,7 +177,7 @@ def array_item(self, array_item): :param array_item: The array_item of this TypeHolderDefault. # noqa: E501 :type: list[int] """ - if array_item is None: + if self.local_vars_configuration.client_side_validation and array_item is None: # noqa: E501 raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501 self._array_item = array_item @@ -214,8 +219,11 @@ def __eq__(self, other): if not isinstance(other, TypeHolderDefault): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, TypeHolderDefault): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/type_holder_example.py b/samples/client/petstore/python/petstore_api/models/type_holder_example.py index 745fe95da2c0..34481fd21e31 100644 --- a/samples/client/petstore/python/petstore_api/models/type_holder_example.py +++ b/samples/client/petstore/python/petstore_api/models/type_holder_example.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class TypeHolderExample(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class TypeHolderExample(object): 'array_item': 'array_item' } - def __init__(self, string_item=None, number_item=None, float_item=None, integer_item=None, bool_item=None, array_item=None): # noqa: E501 + def __init__(self, string_item=None, number_item=None, float_item=None, integer_item=None, bool_item=None, array_item=None, local_vars_configuration=None): # noqa: E501 """TypeHolderExample - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._string_item = None self._number_item = None @@ -84,7 +89,7 @@ def string_item(self, string_item): :param string_item: The string_item of this TypeHolderExample. # noqa: E501 :type: str """ - if string_item is None: + if self.local_vars_configuration.client_side_validation and string_item is None: # noqa: E501 raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501 self._string_item = string_item @@ -107,7 +112,7 @@ def number_item(self, number_item): :param number_item: The number_item of this TypeHolderExample. # noqa: E501 :type: float """ - if number_item is None: + if self.local_vars_configuration.client_side_validation and number_item is None: # noqa: E501 raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501 self._number_item = number_item @@ -130,7 +135,7 @@ def float_item(self, float_item): :param float_item: The float_item of this TypeHolderExample. # noqa: E501 :type: float """ - if float_item is None: + if self.local_vars_configuration.client_side_validation and float_item is None: # noqa: E501 raise ValueError("Invalid value for `float_item`, must not be `None`") # noqa: E501 self._float_item = float_item @@ -153,7 +158,7 @@ def integer_item(self, integer_item): :param integer_item: The integer_item of this TypeHolderExample. # noqa: E501 :type: int """ - if integer_item is None: + if self.local_vars_configuration.client_side_validation and integer_item is None: # noqa: E501 raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501 self._integer_item = integer_item @@ -176,7 +181,7 @@ def bool_item(self, bool_item): :param bool_item: The bool_item of this TypeHolderExample. # noqa: E501 :type: bool """ - if bool_item is None: + if self.local_vars_configuration.client_side_validation and bool_item is None: # noqa: E501 raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501 self._bool_item = bool_item @@ -199,7 +204,7 @@ def array_item(self, array_item): :param array_item: The array_item of this TypeHolderExample. # noqa: E501 :type: list[int] """ - if array_item is None: + if self.local_vars_configuration.client_side_validation and array_item is None: # noqa: E501 raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501 self._array_item = array_item @@ -241,8 +246,11 @@ def __eq__(self, other): if not isinstance(other, TypeHolderExample): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, TypeHolderExample): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/user.py b/samples/client/petstore/python/petstore_api/models/user.py index f46f5165dfd6..de88bda4cde7 100644 --- a/samples/client/petstore/python/petstore_api/models/user.py +++ b/samples/client/petstore/python/petstore_api/models/user.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class User(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -52,8 +54,11 @@ class User(object): 'user_status': 'userStatus' } - def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None): # noqa: E501 + def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None, local_vars_configuration=None): # noqa: E501 """User - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._username = None @@ -289,8 +294,11 @@ def __eq__(self, other): if not isinstance(other, User): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, User): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python/petstore_api/models/xml_item.py b/samples/client/petstore/python/petstore_api/models/xml_item.py index eaceeb5ef45d..52ecc9aa5225 100644 --- a/samples/client/petstore/python/petstore_api/models/xml_item.py +++ b/samples/client/petstore/python/petstore_api/models/xml_item.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class XmlItem(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -94,8 +96,11 @@ class XmlItem(object): 'prefix_ns_wrapped_array': 'prefix_ns_wrapped_array' } - def __init__(self, attribute_string=None, attribute_number=None, attribute_integer=None, attribute_boolean=None, wrapped_array=None, name_string=None, name_number=None, name_integer=None, name_boolean=None, name_array=None, name_wrapped_array=None, prefix_string=None, prefix_number=None, prefix_integer=None, prefix_boolean=None, prefix_array=None, prefix_wrapped_array=None, namespace_string=None, namespace_number=None, namespace_integer=None, namespace_boolean=None, namespace_array=None, namespace_wrapped_array=None, prefix_ns_string=None, prefix_ns_number=None, prefix_ns_integer=None, prefix_ns_boolean=None, prefix_ns_array=None, prefix_ns_wrapped_array=None): # noqa: E501 + def __init__(self, attribute_string=None, attribute_number=None, attribute_integer=None, attribute_boolean=None, wrapped_array=None, name_string=None, name_number=None, name_integer=None, name_boolean=None, name_array=None, name_wrapped_array=None, prefix_string=None, prefix_number=None, prefix_integer=None, prefix_boolean=None, prefix_array=None, prefix_wrapped_array=None, namespace_string=None, namespace_number=None, namespace_integer=None, namespace_boolean=None, namespace_array=None, namespace_wrapped_array=None, prefix_ns_string=None, prefix_ns_number=None, prefix_ns_integer=None, prefix_ns_boolean=None, prefix_ns_array=None, prefix_ns_wrapped_array=None, local_vars_configuration=None): # noqa: E501 """XmlItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._attribute_string = None self._attribute_number = None @@ -833,8 +838,11 @@ def __eq__(self, other): if not isinstance(other, XmlItem): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, XmlItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py index 07cf6defd827..6f3925c1ab6b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py @@ -103,8 +103,8 @@ def call_123_test_special_tags_with_http_info(self, client, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'client' is set - if ('client' not in local_var_params or - local_var_params['client'] is None): + if self.api_client.client_side_validation and ('client' not in local_var_params or # noqa: E501 + local_var_params['client'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `client` when calling `call_123_test_special_tags`") # noqa: E501 collection_formats = {} diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py index ee3d07235761..b4247c90c749 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py @@ -633,8 +633,8 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kw local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'file_schema_test_class' is set - if ('file_schema_test_class' not in local_var_params or - local_var_params['file_schema_test_class'] is None): + if self.api_client.client_side_validation and ('file_schema_test_class' not in local_var_params or # noqa: E501 + local_var_params['file_schema_test_class'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `file_schema_test_class` when calling `test_body_with_file_schema`") # noqa: E501 collection_formats = {} @@ -741,12 +741,12 @@ def test_body_with_query_params_with_http_info(self, query, user, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'query' is set - if ('query' not in local_var_params or - local_var_params['query'] is None): + if self.api_client.client_side_validation and ('query' not in local_var_params or # noqa: E501 + local_var_params['query'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `query` when calling `test_body_with_query_params`") # noqa: E501 # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user` when calling `test_body_with_query_params`") # noqa: E501 collection_formats = {} @@ -855,8 +855,8 @@ def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'client' is set - if ('client' not in local_var_params or - local_var_params['client'] is None): + if self.api_client.client_side_validation and ('client' not in local_var_params or # noqa: E501 + local_var_params['client'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `client` when calling `test_client_model`") # noqa: E501 collection_formats = {} @@ -993,49 +993,49 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'number' is set - if ('number' not in local_var_params or - local_var_params['number'] is None): + if self.api_client.client_side_validation and ('number' not in local_var_params or # noqa: E501 + local_var_params['number'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `number` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'double' is set - if ('double' not in local_var_params or - local_var_params['double'] is None): + if self.api_client.client_side_validation and ('double' not in local_var_params or # noqa: E501 + local_var_params['double'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `double` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'pattern_without_delimiter' is set - if ('pattern_without_delimiter' not in local_var_params or - local_var_params['pattern_without_delimiter'] is None): + if self.api_client.client_side_validation and ('pattern_without_delimiter' not in local_var_params or # noqa: E501 + local_var_params['pattern_without_delimiter'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'byte' is set - if ('byte' not in local_var_params or - local_var_params['byte'] is None): + if self.api_client.client_side_validation and ('byte' not in local_var_params or # noqa: E501 + local_var_params['byte'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `byte` when calling `test_endpoint_parameters`") # noqa: E501 - if 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 + if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 raise ApiValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value less than or equal to `543.2`") # noqa: E501 - if 'number' in local_var_params and local_var_params['number'] < 32.1: # noqa: E501 + if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] < 32.1: # noqa: E501 raise ApiValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value greater than or equal to `32.1`") # noqa: E501 - if 'double' in local_var_params and local_var_params['double'] > 123.4: # noqa: E501 + if self.api_client.client_side_validation and 'double' in local_var_params and local_var_params['double'] > 123.4: # noqa: E501 raise ApiValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value less than or equal to `123.4`") # noqa: E501 - if 'double' in local_var_params and local_var_params['double'] < 67.8: # noqa: E501 + if self.api_client.client_side_validation and 'double' in local_var_params and local_var_params['double'] < 67.8: # noqa: E501 raise ApiValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value greater than or equal to `67.8`") # noqa: E501 - if 'pattern_without_delimiter' in local_var_params and not re.search(r'^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 + if self.api_client.client_side_validation and 'pattern_without_delimiter' in local_var_params and not re.search(r'^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 raise ApiValueError("Invalid value for parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`, must conform to the pattern `/^[A-Z].*/`") # noqa: E501 - if 'integer' in local_var_params and local_var_params['integer'] > 100: # noqa: E501 + if self.api_client.client_side_validation and 'integer' in local_var_params and local_var_params['integer'] > 100: # noqa: E501 raise ApiValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value less than or equal to `100`") # noqa: E501 - if 'integer' in local_var_params and local_var_params['integer'] < 10: # noqa: E501 + if self.api_client.client_side_validation and 'integer' in local_var_params and local_var_params['integer'] < 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value greater than or equal to `10`") # noqa: E501 - if 'int32' in local_var_params and local_var_params['int32'] > 200: # noqa: E501 + if self.api_client.client_side_validation and 'int32' in local_var_params and local_var_params['int32'] > 200: # noqa: E501 raise ApiValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value less than or equal to `200`") # noqa: E501 - if 'int32' in local_var_params and local_var_params['int32'] < 20: # noqa: E501 + if self.api_client.client_side_validation and 'int32' in local_var_params and local_var_params['int32'] < 20: # noqa: E501 raise ApiValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value greater than or equal to `20`") # noqa: E501 - if 'float' in local_var_params and local_var_params['float'] > 987.6: # noqa: E501 + if self.api_client.client_side_validation and 'float' in local_var_params and local_var_params['float'] > 987.6: # noqa: E501 raise ApiValueError("Invalid value for parameter `float` when calling `test_endpoint_parameters`, must be a value less than or equal to `987.6`") # noqa: E501 - if 'string' in local_var_params and not re.search(r'[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 + if self.api_client.client_side_validation and 'string' in local_var_params and not re.search(r'[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 raise ApiValueError("Invalid value for parameter `string` when calling `test_endpoint_parameters`, must conform to the pattern `/[a-z]/i`") # noqa: E501 - if ('password' in local_var_params and - len(local_var_params['password']) > 64): + if self.api_client.client_side_validation and ('password' in local_var_params and # noqa: E501 + len(local_var_params['password']) > 64): # noqa: E501 raise ApiValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be less than or equal to `64`") # noqa: E501 - if ('password' in local_var_params and - len(local_var_params['password']) < 10): + if self.api_client.client_side_validation and ('password' in local_var_params and # noqa: E501 + len(local_var_params['password']) < 10): # noqa: E501 raise ApiValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be greater than or equal to `10`") # noqa: E501 collection_formats = {} @@ -1312,16 +1312,16 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'required_string_group' is set - if ('required_string_group' not in local_var_params or - local_var_params['required_string_group'] is None): + if self.api_client.client_side_validation and ('required_string_group' not in local_var_params or # noqa: E501 + local_var_params['required_string_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_string_group` when calling `test_group_parameters`") # noqa: E501 # verify the required parameter 'required_boolean_group' is set - if ('required_boolean_group' not in local_var_params or - local_var_params['required_boolean_group'] is None): + if self.api_client.client_side_validation and ('required_boolean_group' not in local_var_params or # noqa: E501 + local_var_params['required_boolean_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_boolean_group` when calling `test_group_parameters`") # noqa: E501 # verify the required parameter 'required_int64_group' is set - if ('required_int64_group' not in local_var_params or - local_var_params['required_int64_group'] is None): + if self.api_client.client_side_validation and ('required_int64_group' not in local_var_params or # noqa: E501 + local_var_params['required_int64_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_int64_group` when calling `test_group_parameters`") # noqa: E501 collection_formats = {} @@ -1432,8 +1432,8 @@ def test_inline_additional_properties_with_http_info(self, request_body, **kwarg local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'request_body' is set - if ('request_body' not in local_var_params or - local_var_params['request_body'] is None): + if self.api_client.client_side_validation and ('request_body' not in local_var_params or # noqa: E501 + local_var_params['request_body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `request_body` when calling `test_inline_additional_properties`") # noqa: E501 collection_formats = {} @@ -1540,12 +1540,12 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'param' is set - if ('param' not in local_var_params or - local_var_params['param'] is None): + if self.api_client.client_side_validation and ('param' not in local_var_params or # noqa: E501 + local_var_params['param'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `param` when calling `test_json_form_data`") # noqa: E501 # verify the required parameter 'param2' is set - if ('param2' not in local_var_params or - local_var_params['param2'] is None): + if self.api_client.client_side_validation and ('param2' not in local_var_params or # noqa: E501 + local_var_params['param2'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `param2` when calling `test_json_form_data`") # noqa: E501 collection_formats = {} @@ -1662,24 +1662,24 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pipe' is set - if ('pipe' not in local_var_params or - local_var_params['pipe'] is None): + if self.api_client.client_side_validation and ('pipe' not in local_var_params or # noqa: E501 + local_var_params['pipe'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pipe` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'ioutil' is set - if ('ioutil' not in local_var_params or - local_var_params['ioutil'] is None): + if self.api_client.client_side_validation and ('ioutil' not in local_var_params or # noqa: E501 + local_var_params['ioutil'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `ioutil` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'http' is set - if ('http' not in local_var_params or - local_var_params['http'] is None): + if self.api_client.client_side_validation and ('http' not in local_var_params or # noqa: E501 + local_var_params['http'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `http` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'url' is set - if ('url' not in local_var_params or - local_var_params['url'] is None): + if self.api_client.client_side_validation and ('url' not in local_var_params or # noqa: E501 + local_var_params['url'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `url` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'context' is set - if ('context' not in local_var_params or - local_var_params['context'] is None): + if self.api_client.client_side_validation and ('context' not in local_var_params or # noqa: E501 + local_var_params['context'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `context` when calling `test_query_parameter_collection_format`") # noqa: E501 collection_formats = {} diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py index 8446a6d39973..a01b9a7de524 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py @@ -103,8 +103,8 @@ def test_classname_with_http_info(self, client, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'client' is set - if ('client' not in local_var_params or - local_var_params['client'] is None): + if self.api_client.client_side_validation and ('client' not in local_var_params or # noqa: E501 + local_var_params['client'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `client` when calling `test_classname`") # noqa: E501 collection_formats = {} diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py index 05819b4c13b4..af535ad11990 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py @@ -107,8 +107,8 @@ def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet' is set - if ('pet' not in local_var_params or - local_var_params['pet'] is None): + if self.api_client.client_side_validation and ('pet' not in local_var_params or # noqa: E501 + local_var_params['pet'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet` when calling `add_pet`") # noqa: E501 collection_formats = {} @@ -216,8 +216,8 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `delete_pet`") # noqa: E501 collection_formats = {} @@ -322,8 +322,8 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'status' is set - if ('status' not in local_var_params or - local_var_params['status'] is None): + if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501 + local_var_params['status'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `status` when calling `find_pets_by_status`") # noqa: E501 collection_formats = {} @@ -431,8 +431,8 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'tags' is set - if ('tags' not in local_var_params or - local_var_params['tags'] is None): + if self.api_client.client_side_validation and ('tags' not in local_var_params or # noqa: E501 + local_var_params['tags'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `tags` when calling `find_pets_by_tags`") # noqa: E501 collection_formats = {} @@ -540,8 +540,8 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id`") # noqa: E501 collection_formats = {} @@ -652,8 +652,8 @@ def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet' is set - if ('pet' not in local_var_params or - local_var_params['pet'] is None): + if self.api_client.client_side_validation and ('pet' not in local_var_params or # noqa: E501 + local_var_params['pet'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet` when calling `update_pet`") # noqa: E501 collection_formats = {} @@ -763,8 +763,8 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `update_pet_with_form`") # noqa: E501 collection_formats = {} @@ -877,8 +877,8 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file`") # noqa: E501 collection_formats = {} @@ -995,12 +995,12 @@ def upload_file_with_required_file_with_http_info(self, pet_id, required_file, * local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file_with_required_file`") # noqa: E501 # verify the required parameter 'required_file' is set - if ('required_file' not in local_var_params or - local_var_params['required_file'] is None): + if self.api_client.client_side_validation and ('required_file' not in local_var_params or # noqa: E501 + local_var_params['required_file'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_file` when calling `upload_file_with_required_file`") # noqa: E501 collection_formats = {} diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py index 944ea66190c7..7ad607fdf32a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py @@ -103,8 +103,8 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - if ('order_id' not in local_var_params or - local_var_params['order_id'] is None): + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `delete_order`") # noqa: E501 collection_formats = {} @@ -307,13 +307,13 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - if ('order_id' not in local_var_params or - local_var_params['order_id'] is None): + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `get_order_by_id`") # noqa: E501 - if 'order_id' in local_var_params and local_var_params['order_id'] > 5: # noqa: E501 + if self.api_client.client_side_validation and 'order_id' in local_var_params and local_var_params['order_id'] > 5: # noqa: E501 raise ApiValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value less than or equal to `5`") # noqa: E501 - if 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501 + if self.api_client.client_side_validation and 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} @@ -417,8 +417,8 @@ def place_order_with_http_info(self, order, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order' is set - if ('order' not in local_var_params or - local_var_params['order'] is None): + if self.api_client.client_side_validation and ('order' not in local_var_params or # noqa: E501 + local_var_params['order'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `order` when calling `place_order`") # noqa: E501 collection_formats = {} diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py index 62682316ae21..eb2663b7569b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py @@ -103,8 +103,8 @@ def create_user_with_http_info(self, user, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user` when calling `create_user`") # noqa: E501 collection_formats = {} @@ -209,8 +209,8 @@ def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user` when calling `create_users_with_array_input`") # noqa: E501 collection_formats = {} @@ -315,8 +315,8 @@ def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user` when calling `create_users_with_list_input`") # noqa: E501 collection_formats = {} @@ -423,8 +423,8 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `delete_user`") # noqa: E501 collection_formats = {} @@ -525,8 +525,8 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `get_user_by_name`") # noqa: E501 collection_formats = {} @@ -633,12 +633,12 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `login_user`") # noqa: E501 # verify the required parameter 'password' is set - if ('password' not in local_var_params or - local_var_params['password'] is None): + if self.api_client.client_side_validation and ('password' not in local_var_params or # noqa: E501 + local_var_params['password'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `password` when calling `login_user`") # noqa: E501 collection_formats = {} @@ -843,12 +843,12 @@ def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `update_user`") # noqa: E501 # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `user` when calling `update_user`") # noqa: E501 collection_formats = {} diff --git a/samples/openapi3/client/petstore/python/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/petstore_api/api_client.py index 64e1278b4ebc..f9c494a76c36 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -77,6 +77,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.cookie = cookie # Set default User-Agent. self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation def __del__(self): if self._pool: diff --git a/samples/openapi3/client/petstore/python/petstore_api/configuration.py b/samples/openapi3/client/petstore/python/petstore_api/configuration.py index 499d3870a570..d03bd91e1971 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/configuration.py +++ b/samples/openapi3/client/petstore/python/petstore_api/configuration.py @@ -138,6 +138,8 @@ def __init__(self, host="http://petstore.swagger.io:80/v2", self.retries = None """Adding retries to override urllib3 default value 3 """ + # Disable client side validation + self.client_side_validation = True @property def logger_file(self): diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_class.py index 17cd6af67978..9da151ae8294 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_class.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class AdditionalPropertiesClass(object): 'map_of_map_property': 'map_of_map_property' } - def __init__(self, map_property=None, map_of_map_property=None): # noqa: E501 + def __init__(self, map_property=None, map_of_map_property=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._map_property = None self._map_of_map_property = None @@ -131,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/animal.py b/samples/openapi3/client/petstore/python/petstore_api/models/animal.py index 552ef0e8326b..65cef1a60885 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/animal.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/animal.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Animal(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -45,8 +47,11 @@ class Animal(object): 'Cat': 'Cat' } - def __init__(self, class_name=None, color='red'): # noqa: E501 + def __init__(self, class_name=None, color='red', local_vars_configuration=None): # noqa: E501 """Animal - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._class_name = None self._color = None @@ -74,7 +79,7 @@ def class_name(self, class_name): :param class_name: The class_name of this Animal. # noqa: E501 :type: str """ - if class_name is None: + if self.local_vars_configuration.client_side_validation and class_name is None: # noqa: E501 raise ValueError("Invalid value for `class_name`, must not be `None`") # noqa: E501 self._class_name = class_name @@ -143,8 +148,11 @@ def __eq__(self, other): if not isinstance(other, Animal): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Animal): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/api_response.py b/samples/openapi3/client/petstore/python/petstore_api/models/api_response.py index 190c3df34526..24e80d02aea4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/api_response.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/api_response.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ApiResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class ApiResponse(object): 'message': 'message' } - def __init__(self, code=None, type=None, message=None): # noqa: E501 + def __init__(self, code=None, type=None, message=None, local_vars_configuration=None): # noqa: E501 """ApiResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._code = None self._type = None @@ -157,8 +162,11 @@ def __eq__(self, other): if not isinstance(other, ApiResponse): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ApiResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py index ebf964298018..1f654452077f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ArrayOfArrayOfNumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ArrayOfArrayOfNumberOnly(object): 'array_array_number': 'ArrayArrayNumber' } - def __init__(self, array_array_number=None): # noqa: E501 + def __init__(self, array_array_number=None, local_vars_configuration=None): # noqa: E501 """ArrayOfArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_array_number = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, ArrayOfArrayOfNumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayOfArrayOfNumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/array_of_number_only.py b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_number_only.py index 8e1837c46bda..27ba1f58e31e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_number_only.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ArrayOfNumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ArrayOfNumberOnly(object): 'array_number': 'ArrayNumber' } - def __init__(self, array_number=None): # noqa: E501 + def __init__(self, array_number=None, local_vars_configuration=None): # noqa: E501 """ArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_number = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, ArrayOfNumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayOfNumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py index f548fef3ee8c..f34a372f6f3b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ArrayTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class ArrayTest(object): 'array_array_of_model': 'array_array_of_model' } - def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None): # noqa: E501 + def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None, local_vars_configuration=None): # noqa: E501 """ArrayTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_of_string = None self._array_array_of_integer = None @@ -157,8 +162,11 @@ def __eq__(self, other): if not isinstance(other, ArrayTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/capitalization.py b/samples/openapi3/client/petstore/python/petstore_api/models/capitalization.py index 0da6b77e84dc..cef34c5f6dc3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/capitalization.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/capitalization.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Capitalization(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Capitalization(object): 'att_name': 'ATT_NAME' } - def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None): # noqa: E501 + def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None, local_vars_configuration=None): # noqa: E501 """Capitalization - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._small_camel = None self._capital_camel = None @@ -237,8 +242,11 @@ def __eq__(self, other): if not isinstance(other, Capitalization): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Capitalization): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/cat.py b/samples/openapi3/client/petstore/python/petstore_api/models/cat.py index 216e5123538c..e39c1c82508c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/cat.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/cat.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Cat(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Cat(object): 'declawed': 'declawed' } - def __init__(self, declawed=None): # noqa: E501 + def __init__(self, declawed=None, local_vars_configuration=None): # noqa: E501 """Cat - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._declawed = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, Cat): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Cat): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/cat_all_of.py b/samples/openapi3/client/petstore/python/petstore_api/models/cat_all_of.py index 3c90df84ec3a..7e90fab93489 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/cat_all_of.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/cat_all_of.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class CatAllOf(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class CatAllOf(object): 'declawed': 'declawed' } - def __init__(self, declawed=None): # noqa: E501 + def __init__(self, declawed=None, local_vars_configuration=None): # noqa: E501 """CatAllOf - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._declawed = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, CatAllOf): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, CatAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/category.py b/samples/openapi3/client/petstore/python/petstore_api/models/category.py index 0e23c409e50a..b47c148953ea 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/category.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/category.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Category(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Category(object): 'name': 'name' } - def __init__(self, id=None, name='default-name'): # noqa: E501 + def __init__(self, id=None, name='default-name', local_vars_configuration=None): # noqa: E501 """Category - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._name = None @@ -90,7 +95,7 @@ def name(self, name): :param name: The name of this Category. # noqa: E501 :type: str """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -132,8 +137,11 @@ def __eq__(self, other): if not isinstance(other, Category): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Category): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/class_model.py b/samples/openapi3/client/petstore/python/petstore_api/models/class_model.py index 88562beff8b1..ef6060ffa70d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/class_model.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/class_model.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ClassModel(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ClassModel(object): '_class': '_class' } - def __init__(self, _class=None): # noqa: E501 + def __init__(self, _class=None, local_vars_configuration=None): # noqa: E501 """ClassModel - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__class = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, ClassModel): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassModel): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/client.py b/samples/openapi3/client/petstore/python/petstore_api/models/client.py index b7083fd9bd75..ee5dbf1c43a1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/client.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Client(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Client(object): 'client': 'client' } - def __init__(self, client=None): # noqa: E501 + def __init__(self, client=None, local_vars_configuration=None): # noqa: E501 """Client - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._client = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, Client): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Client): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/dog.py b/samples/openapi3/client/petstore/python/petstore_api/models/dog.py index c325cb252c32..eacb63eedb09 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/dog.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/dog.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Dog(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Dog(object): 'breed': 'breed' } - def __init__(self, breed=None): # noqa: E501 + def __init__(self, breed=None, local_vars_configuration=None): # noqa: E501 """Dog - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._breed = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, Dog): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Dog): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/dog_all_of.py b/samples/openapi3/client/petstore/python/petstore_api/models/dog_all_of.py index b6328b05589e..48e048557085 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/dog_all_of.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/dog_all_of.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class DogAllOf(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class DogAllOf(object): 'breed': 'breed' } - def __init__(self, breed=None): # noqa: E501 + def __init__(self, breed=None, local_vars_configuration=None): # noqa: E501 """DogAllOf - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._breed = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, DogAllOf): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, DogAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py b/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py index 00aa21d04da8..481283a05c32 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class EnumArrays(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class EnumArrays(object): 'array_enum': 'array_enum' } - def __init__(self, just_symbol=None, array_enum=None): # noqa: E501 + def __init__(self, just_symbol=None, array_enum=None, local_vars_configuration=None): # noqa: E501 """EnumArrays - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._just_symbol = None self._array_enum = None @@ -71,7 +76,7 @@ def just_symbol(self, just_symbol): :type: str """ allowed_values = [">=", "$"] # noqa: E501 - if just_symbol not in allowed_values: + if self.local_vars_configuration.client_side_validation and just_symbol not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `just_symbol` ({0}), must be one of {1}" # noqa: E501 .format(just_symbol, allowed_values) @@ -98,7 +103,8 @@ def array_enum(self, array_enum): :type: list[str] """ allowed_values = ["fish", "crab"] # noqa: E501 - if not set(array_enum).issubset(set(allowed_values)): + if (self.local_vars_configuration.client_side_validation and + not set(array_enum).issubset(set(allowed_values))): raise ValueError( "Invalid values for `array_enum` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(array_enum) - set(allowed_values))), # noqa: E501 @@ -144,8 +150,11 @@ def __eq__(self, other): if not isinstance(other, EnumArrays): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumArrays): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/enum_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/enum_class.py index 3c1aa279755b..8bc627578608 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/enum_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/enum_class.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class EnumClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class EnumClass(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """EnumClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +89,11 @@ def __eq__(self, other): if not isinstance(other, EnumClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py index 07b17fe5daba..24ed1b462d0d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class EnumTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -52,8 +54,11 @@ class EnumTest(object): 'outer_enum_integer_default_value': 'outerEnumIntegerDefaultValue' } - def __init__(self, enum_string=None, enum_string_required=None, enum_integer=None, enum_number=None, outer_enum=None, outer_enum_integer=None, outer_enum_default_value=None, outer_enum_integer_default_value=None): # noqa: E501 + def __init__(self, enum_string=None, enum_string_required=None, enum_integer=None, enum_number=None, outer_enum=None, outer_enum_integer=None, outer_enum_default_value=None, outer_enum_integer_default_value=None, local_vars_configuration=None): # noqa: E501 """EnumTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._enum_string = None self._enum_string_required = None @@ -99,7 +104,7 @@ def enum_string(self, enum_string): :type: str """ allowed_values = ["UPPER", "lower", ""] # noqa: E501 - if enum_string not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_string not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_string` ({0}), must be one of {1}" # noqa: E501 .format(enum_string, allowed_values) @@ -125,10 +130,10 @@ def enum_string_required(self, enum_string_required): :param enum_string_required: The enum_string_required of this EnumTest. # noqa: E501 :type: str """ - if enum_string_required is None: + if self.local_vars_configuration.client_side_validation and enum_string_required is None: # noqa: E501 raise ValueError("Invalid value for `enum_string_required`, must not be `None`") # noqa: E501 allowed_values = ["UPPER", "lower", ""] # noqa: E501 - if enum_string_required not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_string_required not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_string_required` ({0}), must be one of {1}" # noqa: E501 .format(enum_string_required, allowed_values) @@ -155,7 +160,7 @@ def enum_integer(self, enum_integer): :type: int """ allowed_values = [1, -1] # noqa: E501 - if enum_integer not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_integer not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_integer` ({0}), must be one of {1}" # noqa: E501 .format(enum_integer, allowed_values) @@ -182,7 +187,7 @@ def enum_number(self, enum_number): :type: float """ allowed_values = [1.1, -1.2] # noqa: E501 - if enum_number not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_number not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_number` ({0}), must be one of {1}" # noqa: E501 .format(enum_number, allowed_values) @@ -311,8 +316,11 @@ def __eq__(self, other): if not isinstance(other, EnumTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/file.py b/samples/openapi3/client/petstore/python/petstore_api/models/file.py index 475f86b799f7..282df2957e67 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/file.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/file.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class File(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class File(object): 'source_uri': 'sourceURI' } - def __init__(self, source_uri=None): # noqa: E501 + def __init__(self, source_uri=None, local_vars_configuration=None): # noqa: E501 """File - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._source_uri = None self.discriminator = None @@ -107,8 +112,11 @@ def __eq__(self, other): if not isinstance(other, File): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, File): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/file_schema_test_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/file_schema_test_class.py index 9f3b5bdc1793..de7f865b47e2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/file_schema_test_class.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class FileSchemaTestClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class FileSchemaTestClass(object): 'files': 'files' } - def __init__(self, file=None, files=None): # noqa: E501 + def __init__(self, file=None, files=None, local_vars_configuration=None): # noqa: E501 """FileSchemaTestClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._file = None self._files = None @@ -131,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, FileSchemaTestClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, FileSchemaTestClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/foo.py b/samples/openapi3/client/petstore/python/petstore_api/models/foo.py index 4368815952d1..0a98b8837cac 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/foo.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/foo.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Foo(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Foo(object): 'bar': 'bar' } - def __init__(self, bar='bar'): # noqa: E501 + def __init__(self, bar='bar', local_vars_configuration=None): # noqa: E501 """Foo - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._bar = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, Foo): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Foo): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py index 005e00cdffc4..60e64039be55 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class FormatTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -66,8 +68,11 @@ class FormatTest(object): 'pattern_with_digits_and_delimiter': 'pattern_with_digits_and_delimiter' } - def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None, pattern_with_digits=None, pattern_with_digits_and_delimiter=None): # noqa: E501 + def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None, pattern_with_digits=None, pattern_with_digits_and_delimiter=None, local_vars_configuration=None): # noqa: E501 """FormatTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._integer = None self._int32 = None @@ -131,9 +136,11 @@ def integer(self, integer): :param integer: The integer of this FormatTest. # noqa: E501 :type: int """ - if integer is not None and integer > 100: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + integer is not None and integer > 100): # noqa: E501 raise ValueError("Invalid value for `integer`, must be a value less than or equal to `100`") # noqa: E501 - if integer is not None and integer < 10: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + integer is not None and integer < 10): # noqa: E501 raise ValueError("Invalid value for `integer`, must be a value greater than or equal to `10`") # noqa: E501 self._integer = integer @@ -156,9 +163,11 @@ def int32(self, int32): :param int32: The int32 of this FormatTest. # noqa: E501 :type: int """ - if int32 is not None and int32 > 200: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + int32 is not None and int32 > 200): # noqa: E501 raise ValueError("Invalid value for `int32`, must be a value less than or equal to `200`") # noqa: E501 - if int32 is not None and int32 < 20: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + int32 is not None and int32 < 20): # noqa: E501 raise ValueError("Invalid value for `int32`, must be a value greater than or equal to `20`") # noqa: E501 self._int32 = int32 @@ -202,11 +211,13 @@ def number(self, number): :param number: The number of this FormatTest. # noqa: E501 :type: float """ - if number is None: + if self.local_vars_configuration.client_side_validation and number is None: # noqa: E501 raise ValueError("Invalid value for `number`, must not be `None`") # noqa: E501 - if number is not None and number > 543.2: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + number is not None and number > 543.2): # noqa: E501 raise ValueError("Invalid value for `number`, must be a value less than or equal to `543.2`") # noqa: E501 - if number is not None and number < 32.1: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + number is not None and number < 32.1): # noqa: E501 raise ValueError("Invalid value for `number`, must be a value greater than or equal to `32.1`") # noqa: E501 self._number = number @@ -229,9 +240,11 @@ def float(self, float): :param float: The float of this FormatTest. # noqa: E501 :type: float """ - if float is not None and float > 987.6: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + float is not None and float > 987.6): # noqa: E501 raise ValueError("Invalid value for `float`, must be a value less than or equal to `987.6`") # noqa: E501 - if float is not None and float < 54.3: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + float is not None and float < 54.3): # noqa: E501 raise ValueError("Invalid value for `float`, must be a value greater than or equal to `54.3`") # noqa: E501 self._float = float @@ -254,9 +267,11 @@ def double(self, double): :param double: The double of this FormatTest. # noqa: E501 :type: float """ - if double is not None and double > 123.4: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + double is not None and double > 123.4): # noqa: E501 raise ValueError("Invalid value for `double`, must be a value less than or equal to `123.4`") # noqa: E501 - if double is not None and double < 67.8: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + double is not None and double < 67.8): # noqa: E501 raise ValueError("Invalid value for `double`, must be a value greater than or equal to `67.8`") # noqa: E501 self._double = double @@ -279,7 +294,8 @@ def string(self, string): :param string: The string of this FormatTest. # noqa: E501 :type: str """ - if string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE): # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE)): # noqa: E501 raise ValueError(r"Invalid value for `string`, must be a follow pattern or equal to `/[a-z]/i`") # noqa: E501 self._string = string @@ -302,7 +318,7 @@ def byte(self, byte): :param byte: The byte of this FormatTest. # noqa: E501 :type: str """ - if byte is None: + if self.local_vars_configuration.client_side_validation and byte is None: # noqa: E501 raise ValueError("Invalid value for `byte`, must not be `None`") # noqa: E501 self._byte = byte @@ -346,7 +362,7 @@ def date(self, date): :param date: The date of this FormatTest. # noqa: E501 :type: date """ - if date is None: + if self.local_vars_configuration.client_side_validation and date is None: # noqa: E501 raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501 self._date = date @@ -411,11 +427,13 @@ def password(self, password): :param password: The password of this FormatTest. # noqa: E501 :type: str """ - if password is None: + if self.local_vars_configuration.client_side_validation and password is None: # noqa: E501 raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 - if password is not None and len(password) > 64: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) > 64): raise ValueError("Invalid value for `password`, length must be less than or equal to `64`") # noqa: E501 - if password is not None and len(password) < 10: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) < 10): raise ValueError("Invalid value for `password`, length must be greater than or equal to `10`") # noqa: E501 self._password = password @@ -440,7 +458,8 @@ def pattern_with_digits(self, pattern_with_digits): :param pattern_with_digits: The pattern_with_digits of this FormatTest. # noqa: E501 :type: str """ - if pattern_with_digits is not None and not re.search(r'^\d{10}$', pattern_with_digits): # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + pattern_with_digits is not None and not re.search(r'^\d{10}$', pattern_with_digits)): # noqa: E501 raise ValueError(r"Invalid value for `pattern_with_digits`, must be a follow pattern or equal to `/^\d{10}$/`") # noqa: E501 self._pattern_with_digits = pattern_with_digits @@ -465,7 +484,8 @@ def pattern_with_digits_and_delimiter(self, pattern_with_digits_and_delimiter): :param pattern_with_digits_and_delimiter: The pattern_with_digits_and_delimiter of this FormatTest. # noqa: E501 :type: str """ - if pattern_with_digits_and_delimiter is not None and not re.search(r'^image_\d{1,3}$', pattern_with_digits_and_delimiter, flags=re.IGNORECASE): # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + pattern_with_digits_and_delimiter is not None and not re.search(r'^image_\d{1,3}$', pattern_with_digits_and_delimiter, flags=re.IGNORECASE)): # noqa: E501 raise ValueError(r"Invalid value for `pattern_with_digits_and_delimiter`, must be a follow pattern or equal to `/^image_\d{1,3}$/i`") # noqa: E501 self._pattern_with_digits_and_delimiter = pattern_with_digits_and_delimiter @@ -507,8 +527,11 @@ def __eq__(self, other): if not isinstance(other, FormatTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, FormatTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/has_only_read_only.py b/samples/openapi3/client/petstore/python/petstore_api/models/has_only_read_only.py index 7c8d921a2d8d..5fc2f8a9ebdd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/has_only_read_only.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class HasOnlyReadOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class HasOnlyReadOnly(object): 'foo': 'foo' } - def __init__(self, bar=None, foo=None): # noqa: E501 + def __init__(self, bar=None, foo=None, local_vars_configuration=None): # noqa: E501 """HasOnlyReadOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._bar = None self._foo = None @@ -131,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, HasOnlyReadOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, HasOnlyReadOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/health_check_result.py b/samples/openapi3/client/petstore/python/petstore_api/models/health_check_result.py index c7051c31c5c8..7c62a43ef7a2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/health_check_result.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/health_check_result.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class HealthCheckResult(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class HealthCheckResult(object): 'nullable_message': 'NullableMessage' } - def __init__(self, nullable_message=None): # noqa: E501 + def __init__(self, nullable_message=None, local_vars_configuration=None): # noqa: E501 """HealthCheckResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._nullable_message = None self.discriminator = None @@ -104,8 +109,11 @@ def __eq__(self, other): if not isinstance(other, HealthCheckResult): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, HealthCheckResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object.py b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object.py index 39eba7c59aa1..0ac70b16a32a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class InlineObject(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class InlineObject(object): 'status': 'status' } - def __init__(self, name=None, status=None): # noqa: E501 + def __init__(self, name=None, status=None, local_vars_configuration=None): # noqa: E501 """InlineObject - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self._status = None @@ -135,8 +140,11 @@ def __eq__(self, other): if not isinstance(other, InlineObject): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, InlineObject): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object1.py b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object1.py index b354a352a509..300af445d033 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object1.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object1.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class InlineObject1(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class InlineObject1(object): 'file': 'file' } - def __init__(self, additional_metadata=None, file=None): # noqa: E501 + def __init__(self, additional_metadata=None, file=None, local_vars_configuration=None): # noqa: E501 """InlineObject1 - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._additional_metadata = None self._file = None @@ -135,8 +140,11 @@ def __eq__(self, other): if not isinstance(other, InlineObject1): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, InlineObject1): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object2.py b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object2.py index 88032d774a3b..4e30b86dc22e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object2.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object2.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class InlineObject2(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class InlineObject2(object): 'enum_form_string': 'enum_form_string' } - def __init__(self, enum_form_string_array=None, enum_form_string='-efg'): # noqa: E501 + def __init__(self, enum_form_string_array=None, enum_form_string='-efg', local_vars_configuration=None): # noqa: E501 """InlineObject2 - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._enum_form_string_array = None self._enum_form_string = None @@ -73,7 +78,8 @@ def enum_form_string_array(self, enum_form_string_array): :type: list[str] """ allowed_values = [">", "$"] # noqa: E501 - if not set(enum_form_string_array).issubset(set(allowed_values)): + if (self.local_vars_configuration.client_side_validation and + not set(enum_form_string_array).issubset(set(allowed_values))): raise ValueError( "Invalid values for `enum_form_string_array` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(enum_form_string_array) - set(allowed_values))), # noqa: E501 @@ -103,7 +109,7 @@ def enum_form_string(self, enum_form_string): :type: str """ allowed_values = ["_abc", "-efg", "(xyz)"] # noqa: E501 - if enum_form_string not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_form_string not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_form_string` ({0}), must be one of {1}" # noqa: E501 .format(enum_form_string, allowed_values) @@ -148,8 +154,11 @@ def __eq__(self, other): if not isinstance(other, InlineObject2): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, InlineObject2): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object3.py b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object3.py index 843136bf6bf4..9870a922b2b7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object3.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object3.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class InlineObject3(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -64,8 +66,11 @@ class InlineObject3(object): 'callback': 'callback' } - def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, pattern_without_delimiter=None, byte=None, binary=None, date=None, date_time=None, password=None, callback=None): # noqa: E501 + def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, pattern_without_delimiter=None, byte=None, binary=None, date=None, date_time=None, password=None, callback=None, local_vars_configuration=None): # noqa: E501 """InlineObject3 - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._integer = None self._int32 = None @@ -128,9 +133,11 @@ def integer(self, integer): :param integer: The integer of this InlineObject3. # noqa: E501 :type: int """ - if integer is not None and integer > 100: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + integer is not None and integer > 100): # noqa: E501 raise ValueError("Invalid value for `integer`, must be a value less than or equal to `100`") # noqa: E501 - if integer is not None and integer < 10: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + integer is not None and integer < 10): # noqa: E501 raise ValueError("Invalid value for `integer`, must be a value greater than or equal to `10`") # noqa: E501 self._integer = integer @@ -155,9 +162,11 @@ def int32(self, int32): :param int32: The int32 of this InlineObject3. # noqa: E501 :type: int """ - if int32 is not None and int32 > 200: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + int32 is not None and int32 > 200): # noqa: E501 raise ValueError("Invalid value for `int32`, must be a value less than or equal to `200`") # noqa: E501 - if int32 is not None and int32 < 20: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + int32 is not None and int32 < 20): # noqa: E501 raise ValueError("Invalid value for `int32`, must be a value greater than or equal to `20`") # noqa: E501 self._int32 = int32 @@ -205,11 +214,13 @@ def number(self, number): :param number: The number of this InlineObject3. # noqa: E501 :type: float """ - if number is None: + if self.local_vars_configuration.client_side_validation and number is None: # noqa: E501 raise ValueError("Invalid value for `number`, must not be `None`") # noqa: E501 - if number is not None and number > 543.2: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + number is not None and number > 543.2): # noqa: E501 raise ValueError("Invalid value for `number`, must be a value less than or equal to `543.2`") # noqa: E501 - if number is not None and number < 32.1: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + number is not None and number < 32.1): # noqa: E501 raise ValueError("Invalid value for `number`, must be a value greater than or equal to `32.1`") # noqa: E501 self._number = number @@ -234,7 +245,8 @@ def float(self, float): :param float: The float of this InlineObject3. # noqa: E501 :type: float """ - if float is not None and float > 987.6: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + float is not None and float > 987.6): # noqa: E501 raise ValueError("Invalid value for `float`, must be a value less than or equal to `987.6`") # noqa: E501 self._float = float @@ -259,11 +271,13 @@ def double(self, double): :param double: The double of this InlineObject3. # noqa: E501 :type: float """ - if double is None: + if self.local_vars_configuration.client_side_validation and double is None: # noqa: E501 raise ValueError("Invalid value for `double`, must not be `None`") # noqa: E501 - if double is not None and double > 123.4: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + double is not None and double > 123.4): # noqa: E501 raise ValueError("Invalid value for `double`, must be a value less than or equal to `123.4`") # noqa: E501 - if double is not None and double < 67.8: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + double is not None and double < 67.8): # noqa: E501 raise ValueError("Invalid value for `double`, must be a value greater than or equal to `67.8`") # noqa: E501 self._double = double @@ -288,7 +302,8 @@ def string(self, string): :param string: The string of this InlineObject3. # noqa: E501 :type: str """ - if string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE): # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE)): # noqa: E501 raise ValueError(r"Invalid value for `string`, must be a follow pattern or equal to `/[a-z]/i`") # noqa: E501 self._string = string @@ -313,9 +328,10 @@ def pattern_without_delimiter(self, pattern_without_delimiter): :param pattern_without_delimiter: The pattern_without_delimiter of this InlineObject3. # noqa: E501 :type: str """ - if pattern_without_delimiter is None: + if self.local_vars_configuration.client_side_validation and pattern_without_delimiter is None: # noqa: E501 raise ValueError("Invalid value for `pattern_without_delimiter`, must not be `None`") # noqa: E501 - if pattern_without_delimiter is not None and not re.search(r'^[A-Z].*', pattern_without_delimiter): # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + pattern_without_delimiter is not None and not re.search(r'^[A-Z].*', pattern_without_delimiter)): # noqa: E501 raise ValueError(r"Invalid value for `pattern_without_delimiter`, must be a follow pattern or equal to `/^[A-Z].*/`") # noqa: E501 self._pattern_without_delimiter = pattern_without_delimiter @@ -340,7 +356,7 @@ def byte(self, byte): :param byte: The byte of this InlineObject3. # noqa: E501 :type: str """ - if byte is None: + if self.local_vars_configuration.client_side_validation and byte is None: # noqa: E501 raise ValueError("Invalid value for `byte`, must not be `None`") # noqa: E501 self._byte = byte @@ -434,9 +450,11 @@ def password(self, password): :param password: The password of this InlineObject3. # noqa: E501 :type: str """ - if password is not None and len(password) > 64: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) > 64): raise ValueError("Invalid value for `password`, length must be less than or equal to `64`") # noqa: E501 - if password is not None and len(password) < 10: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) < 10): raise ValueError("Invalid value for `password`, length must be greater than or equal to `10`") # noqa: E501 self._password = password @@ -501,8 +519,11 @@ def __eq__(self, other): if not isinstance(other, InlineObject3): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, InlineObject3): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object4.py b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object4.py index 4b8171119260..a4ecb978d0aa 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object4.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object4.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class InlineObject4(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class InlineObject4(object): 'param2': 'param2' } - def __init__(self, param=None, param2=None): # noqa: E501 + def __init__(self, param=None, param2=None, local_vars_configuration=None): # noqa: E501 """InlineObject4 - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._param = None self._param2 = None @@ -70,7 +75,7 @@ def param(self, param): :param param: The param of this InlineObject4. # noqa: E501 :type: str """ - if param is None: + if self.local_vars_configuration.client_side_validation and param is None: # noqa: E501 raise ValueError("Invalid value for `param`, must not be `None`") # noqa: E501 self._param = param @@ -95,7 +100,7 @@ def param2(self, param2): :param param2: The param2 of this InlineObject4. # noqa: E501 :type: str """ - if param2 is None: + if self.local_vars_configuration.client_side_validation and param2 is None: # noqa: E501 raise ValueError("Invalid value for `param2`, must not be `None`") # noqa: E501 self._param2 = param2 @@ -137,8 +142,11 @@ def __eq__(self, other): if not isinstance(other, InlineObject4): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, InlineObject4): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object5.py b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object5.py index bdc63b3ab20f..2badeb2274cf 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object5.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object5.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class InlineObject5(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class InlineObject5(object): 'required_file': 'requiredFile' } - def __init__(self, additional_metadata=None, required_file=None): # noqa: E501 + def __init__(self, additional_metadata=None, required_file=None, local_vars_configuration=None): # noqa: E501 """InlineObject5 - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._additional_metadata = None self._required_file = None @@ -94,7 +99,7 @@ def required_file(self, required_file): :param required_file: The required_file of this InlineObject5. # noqa: E501 :type: file """ - if required_file is None: + if self.local_vars_configuration.client_side_validation and required_file is None: # noqa: E501 raise ValueError("Invalid value for `required_file`, must not be `None`") # noqa: E501 self._required_file = required_file @@ -136,8 +141,11 @@ def __eq__(self, other): if not isinstance(other, InlineObject5): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, InlineObject5): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inline_response_default.py b/samples/openapi3/client/petstore/python/petstore_api/models/inline_response_default.py index 434ebdfb0890..3904d39c9ccf 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/inline_response_default.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/inline_response_default.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class InlineResponseDefault(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class InlineResponseDefault(object): 'string': 'string' } - def __init__(self, string=None): # noqa: E501 + def __init__(self, string=None, local_vars_configuration=None): # noqa: E501 """InlineResponseDefault - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._string = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, InlineResponseDefault): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, InlineResponseDefault): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/list.py b/samples/openapi3/client/petstore/python/petstore_api/models/list.py index 74fc3719aa03..d58d13e90fbc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/list.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/list.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class List(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class List(object): '_123_list': '123-list' } - def __init__(self, _123_list=None): # noqa: E501 + def __init__(self, _123_list=None, local_vars_configuration=None): # noqa: E501 """List - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__123_list = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, List): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, List): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py index cdfb9365297c..b170dce412c7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class MapTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -44,8 +46,11 @@ class MapTest(object): 'indirect_map': 'indirect_map' } - def __init__(self, map_map_of_string=None, map_of_enum_string=None, direct_map=None, indirect_map=None): # noqa: E501 + def __init__(self, map_map_of_string=None, map_of_enum_string=None, direct_map=None, indirect_map=None, local_vars_configuration=None): # noqa: E501 """MapTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._map_map_of_string = None self._map_of_enum_string = None @@ -102,7 +107,8 @@ def map_of_enum_string(self, map_of_enum_string): :type: dict(str, str) """ allowed_values = ["UPPER", "lower"] # noqa: E501 - if not set(map_of_enum_string.keys()).issubset(set(allowed_values)): + if (self.local_vars_configuration.client_side_validation and + not set(map_of_enum_string.keys()).issubset(set(allowed_values))): raise ValueError( "Invalid keys in `map_of_enum_string` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(map_of_enum_string.keys()) - set(allowed_values))), # noqa: E501 @@ -190,8 +196,11 @@ def __eq__(self, other): if not isinstance(other, MapTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MapTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py index 41a916eac10f..5da34f8830e8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class MixedPropertiesAndAdditionalPropertiesClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class MixedPropertiesAndAdditionalPropertiesClass(object): 'map': 'map' } - def __init__(self, uuid=None, date_time=None, map=None): # noqa: E501 + def __init__(self, uuid=None, date_time=None, map=None, local_vars_configuration=None): # noqa: E501 """MixedPropertiesAndAdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._uuid = None self._date_time = None @@ -157,8 +162,11 @@ def __eq__(self, other): if not isinstance(other, MixedPropertiesAndAdditionalPropertiesClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MixedPropertiesAndAdditionalPropertiesClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/model200_response.py b/samples/openapi3/client/petstore/python/petstore_api/models/model200_response.py index 563b82b59391..841ce1f18f3d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/model200_response.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/model200_response.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Model200Response(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Model200Response(object): '_class': 'class' } - def __init__(self, name=None, _class=None): # noqa: E501 + def __init__(self, name=None, _class=None, local_vars_configuration=None): # noqa: E501 """Model200Response - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.__class = None @@ -131,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, Model200Response): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Model200Response): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/model_return.py b/samples/openapi3/client/petstore/python/petstore_api/models/model_return.py index 098012015988..fdd8d72314ad 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/model_return.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/model_return.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ModelReturn(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ModelReturn(object): '_return': 'return' } - def __init__(self, _return=None): # noqa: E501 + def __init__(self, _return=None, local_vars_configuration=None): # noqa: E501 """ModelReturn - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__return = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, ModelReturn): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ModelReturn): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/name.py b/samples/openapi3/client/petstore/python/petstore_api/models/name.py index 43014d0fb643..bb2c1fbd73cc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/name.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/name.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Name(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -44,8 +46,11 @@ class Name(object): '_123_number': '123Number' } - def __init__(self, name=None, snake_case=None, _property=None, _123_number=None): # noqa: E501 + def __init__(self, name=None, snake_case=None, _property=None, _123_number=None, local_vars_configuration=None): # noqa: E501 """Name - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self._snake_case = None @@ -79,7 +84,7 @@ def name(self, name): :param name: The name of this Name. # noqa: E501 :type: int """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -184,8 +189,11 @@ def __eq__(self, other): if not isinstance(other, Name): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Name): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py index b589850f458c..b81eb554e916 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class NullableClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -60,8 +62,11 @@ class NullableClass(object): 'object_items_nullable': 'object_items_nullable' } - def __init__(self, integer_prop=None, number_prop=None, boolean_prop=None, string_prop=None, date_prop=None, datetime_prop=None, array_nullable_prop=None, array_and_items_nullable_prop=None, array_items_nullable=None, object_nullable_prop=None, object_and_items_nullable_prop=None, object_items_nullable=None): # noqa: E501 + def __init__(self, integer_prop=None, number_prop=None, boolean_prop=None, string_prop=None, date_prop=None, datetime_prop=None, array_nullable_prop=None, array_and_items_nullable_prop=None, array_items_nullable=None, object_nullable_prop=None, object_and_items_nullable_prop=None, object_items_nullable=None, local_vars_configuration=None): # noqa: E501 """NullableClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._integer_prop = None self._number_prop = None @@ -381,8 +386,11 @@ def __eq__(self, other): if not isinstance(other, NullableClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, NullableClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/number_only.py b/samples/openapi3/client/petstore/python/petstore_api/models/number_only.py index b6f3d1c1b65c..99b2424852fb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/number_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/number_only.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class NumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class NumberOnly(object): 'just_number': 'JustNumber' } - def __init__(self, just_number=None): # noqa: E501 + def __init__(self, just_number=None, local_vars_configuration=None): # noqa: E501 """NumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._just_number = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, NumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, NumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/order.py b/samples/openapi3/client/petstore/python/petstore_api/models/order.py index 8b64e3a35832..8c863cce8fe5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/order.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/order.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Order(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Order(object): 'complete': 'complete' } - def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False): # noqa: E501 + def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False, local_vars_configuration=None): # noqa: E501 """Order - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._pet_id = None @@ -177,7 +182,7 @@ def status(self, status): :type: str """ allowed_values = ["placed", "approved", "delivered"] # noqa: E501 - if status not in allowed_values: + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 .format(status, allowed_values) @@ -243,8 +248,11 @@ def __eq__(self, other): if not isinstance(other, Order): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Order): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/outer_composite.py b/samples/openapi3/client/petstore/python/petstore_api/models/outer_composite.py index dccd67055bed..c11859114a57 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/outer_composite.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/outer_composite.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class OuterComposite(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class OuterComposite(object): 'my_boolean': 'my_boolean' } - def __init__(self, my_number=None, my_string=None, my_boolean=None): # noqa: E501 + def __init__(self, my_number=None, my_string=None, my_boolean=None, local_vars_configuration=None): # noqa: E501 """OuterComposite - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._my_number = None self._my_string = None @@ -157,8 +162,11 @@ def __eq__(self, other): if not isinstance(other, OuterComposite): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OuterComposite): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum.py b/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum.py index a6697a0b1522..8fbfeb7aaea5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class OuterEnum(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class OuterEnum(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """OuterEnum - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +89,11 @@ def __eq__(self, other): if not isinstance(other, OuterEnum): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OuterEnum): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_default_value.py b/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_default_value.py index 30824a6587ee..881edd1384f8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_default_value.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_default_value.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class OuterEnumDefaultValue(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class OuterEnumDefaultValue(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """OuterEnumDefaultValue - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +89,11 @@ def __eq__(self, other): if not isinstance(other, OuterEnumDefaultValue): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OuterEnumDefaultValue): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer.py b/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer.py index 59edabdd20f1..8e6d0c44b081 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class OuterEnumInteger(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class OuterEnumInteger(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """OuterEnumInteger - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +89,11 @@ def __eq__(self, other): if not isinstance(other, OuterEnumInteger): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OuterEnumInteger): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer_default_value.py b/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer_default_value.py index 488fd986ef11..943ad3b596c1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer_default_value.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer_default_value.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class OuterEnumIntegerDefaultValue(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class OuterEnumIntegerDefaultValue(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """OuterEnumIntegerDefaultValue - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +89,11 @@ def __eq__(self, other): if not isinstance(other, OuterEnumIntegerDefaultValue): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OuterEnumIntegerDefaultValue): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/pet.py b/samples/openapi3/client/petstore/python/petstore_api/models/pet.py index 870608e17ac3..edbf73f53127 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/pet.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/pet.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Pet(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Pet(object): 'status': 'status' } - def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None): # noqa: E501 + def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None, local_vars_configuration=None): # noqa: E501 """Pet - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._category = None @@ -130,7 +135,7 @@ def name(self, name): :param name: The name of this Pet. # noqa: E501 :type: str """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -153,7 +158,7 @@ def photo_urls(self, photo_urls): :param photo_urls: The photo_urls of this Pet. # noqa: E501 :type: list[str] """ - if photo_urls is None: + if self.local_vars_configuration.client_side_validation and photo_urls is None: # noqa: E501 raise ValueError("Invalid value for `photo_urls`, must not be `None`") # noqa: E501 self._photo_urls = photo_urls @@ -200,7 +205,7 @@ def status(self, status): :type: str """ allowed_values = ["available", "pending", "sold"] # noqa: E501 - if status not in allowed_values: + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 .format(status, allowed_values) @@ -245,8 +250,11 @@ def __eq__(self, other): if not isinstance(other, Pet): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Pet): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/read_only_first.py b/samples/openapi3/client/petstore/python/petstore_api/models/read_only_first.py index 3dfb7c7f6267..a84679e98dee 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/read_only_first.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/read_only_first.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ReadOnlyFirst(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class ReadOnlyFirst(object): 'baz': 'baz' } - def __init__(self, bar=None, baz=None): # noqa: E501 + def __init__(self, bar=None, baz=None, local_vars_configuration=None): # noqa: E501 """ReadOnlyFirst - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._bar = None self._baz = None @@ -131,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, ReadOnlyFirst): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ReadOnlyFirst): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/special_model_name.py b/samples/openapi3/client/petstore/python/petstore_api/models/special_model_name.py index 2fd6378fcdc5..396e75bcee5c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/special_model_name.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/special_model_name.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class SpecialModelName(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class SpecialModelName(object): 'special_property_name': '$special[property.name]' } - def __init__(self, special_property_name=None): # noqa: E501 + def __init__(self, special_property_name=None, local_vars_configuration=None): # noqa: E501 """SpecialModelName - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._special_property_name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, SpecialModelName): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, SpecialModelName): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/tag.py b/samples/openapi3/client/petstore/python/petstore_api/models/tag.py index cb9c22d9f53a..d6137fdd47f0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/tag.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/tag.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Tag(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Tag(object): 'name': 'name' } - def __init__(self, id=None, name=None): # noqa: E501 + def __init__(self, id=None, name=None, local_vars_configuration=None): # noqa: E501 """Tag - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._name = None @@ -131,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, Tag): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Tag): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/user.py b/samples/openapi3/client/petstore/python/petstore_api/models/user.py index f46f5165dfd6..de88bda4cde7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/user.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/user.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class User(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -52,8 +54,11 @@ class User(object): 'user_status': 'userStatus' } - def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None): # noqa: E501 + def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None, local_vars_configuration=None): # noqa: E501 """User - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._username = None @@ -289,8 +294,11 @@ def __eq__(self, other): if not isinstance(other, User): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, User): + return True + + return self.to_dict() != other.to_dict() From 7756bb5b74f68bbed96cf4b17dbfec0d34609b20 Mon Sep 17 00:00:00 2001 From: Jeremie Bresson Date: Wed, 16 Oct 2019 10:05:17 +0200 Subject: [PATCH 028/142] CircleCI change 'machine' configuration --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 8faa965698b6..7534998122d9 100644 --- a/circle.yml +++ b/circle.yml @@ -8,7 +8,7 @@ jobs: # SWAGGER_HOST=http://petstore.swagger.io # SWAGGER_BASE_PATH=/v2 machine: - enable: true + image: circleci/classic:latest working_directory: ~/OpenAPITools/openapi-generator parallelism: 3 shell: /bin/bash --login From f763b6dce331550f1732815b8fa9aa1998416e60 Mon Sep 17 00:00:00 2001 From: Jeremie Bresson Date: Wed, 16 Oct 2019 13:42:03 +0200 Subject: [PATCH 029/142] Update samples --- .../petstore_api/api/another_fake_api.py | 4 +- .../petstore_api/api/fake_api.py | 138 +++++++++--------- .../api/fake_classname_tags_123_api.py | 4 +- .../petstore_api/api/pet_api.py | 44 +++--- .../petstore_api/api/store_api.py | 16 +- .../petstore_api/api/user_api.py | 40 ++--- .../python-asyncio/petstore_api/api_client.py | 5 +- .../petstore_api/configuration.py | 2 + .../models/additional_properties_any_type.py | 14 +- .../models/additional_properties_array.py | 14 +- .../models/additional_properties_boolean.py | 14 +- .../models/additional_properties_class.py | 14 +- .../models/additional_properties_integer.py | 14 +- .../models/additional_properties_number.py | 14 +- .../models/additional_properties_object.py | 14 +- .../models/additional_properties_string.py | 14 +- .../petstore_api/models/animal.py | 16 +- .../petstore_api/models/api_response.py | 14 +- .../models/array_of_array_of_number_only.py | 14 +- .../models/array_of_number_only.py | 14 +- .../petstore_api/models/array_test.py | 14 +- .../petstore_api/models/capitalization.py | 14 +- .../python-asyncio/petstore_api/models/cat.py | 14 +- .../petstore_api/models/cat_all_of.py | 14 +- .../petstore_api/models/category.py | 16 +- .../petstore_api/models/class_model.py | 14 +- .../petstore_api/models/client.py | 14 +- .../python-asyncio/petstore_api/models/dog.py | 14 +- .../petstore_api/models/dog_all_of.py | 14 +- .../petstore_api/models/enum_arrays.py | 19 ++- .../petstore_api/models/enum_class.py | 14 +- .../petstore_api/models/enum_test.py | 24 ++- .../petstore_api/models/file.py | 14 +- .../models/file_schema_test_class.py | 14 +- .../petstore_api/models/format_test.py | 64 +++++--- .../petstore_api/models/has_only_read_only.py | 14 +- .../petstore_api/models/list.py | 14 +- .../petstore_api/models/map_test.py | 17 ++- ...perties_and_additional_properties_class.py | 14 +- .../petstore_api/models/model200_response.py | 14 +- .../petstore_api/models/model_return.py | 14 +- .../petstore_api/models/name.py | 16 +- .../petstore_api/models/number_only.py | 14 +- .../petstore_api/models/order.py | 16 +- .../petstore_api/models/outer_composite.py | 14 +- .../petstore_api/models/outer_enum.py | 14 +- .../python-asyncio/petstore_api/models/pet.py | 20 ++- .../petstore_api/models/read_only_first.py | 14 +- .../petstore_api/models/special_model_name.py | 14 +- .../python-asyncio/petstore_api/models/tag.py | 14 +- .../models/type_holder_default.py | 24 ++- .../models/type_holder_example.py | 26 ++-- .../petstore_api/models/user.py | 14 +- .../petstore_api/models/xml_item.py | 14 +- .../petstore_api/api/another_fake_api.py | 4 +- .../petstore_api/api/fake_api.py | 138 +++++++++--------- .../api/fake_classname_tags_123_api.py | 4 +- .../petstore_api/api/pet_api.py | 44 +++--- .../petstore_api/api/store_api.py | 16 +- .../petstore_api/api/user_api.py | 40 ++--- .../python-tornado/petstore_api/api_client.py | 5 +- .../petstore_api/configuration.py | 2 + .../models/additional_properties_any_type.py | 14 +- .../models/additional_properties_array.py | 14 +- .../models/additional_properties_boolean.py | 14 +- .../models/additional_properties_class.py | 14 +- .../models/additional_properties_integer.py | 14 +- .../models/additional_properties_number.py | 14 +- .../models/additional_properties_object.py | 14 +- .../models/additional_properties_string.py | 14 +- .../petstore_api/models/animal.py | 16 +- .../petstore_api/models/api_response.py | 14 +- .../models/array_of_array_of_number_only.py | 14 +- .../models/array_of_number_only.py | 14 +- .../petstore_api/models/array_test.py | 14 +- .../petstore_api/models/capitalization.py | 14 +- .../python-tornado/petstore_api/models/cat.py | 14 +- .../petstore_api/models/cat_all_of.py | 14 +- .../petstore_api/models/category.py | 16 +- .../petstore_api/models/class_model.py | 14 +- .../petstore_api/models/client.py | 14 +- .../python-tornado/petstore_api/models/dog.py | 14 +- .../petstore_api/models/dog_all_of.py | 14 +- .../petstore_api/models/enum_arrays.py | 19 ++- .../petstore_api/models/enum_class.py | 14 +- .../petstore_api/models/enum_test.py | 24 ++- .../petstore_api/models/file.py | 14 +- .../models/file_schema_test_class.py | 14 +- .../petstore_api/models/format_test.py | 64 +++++--- .../petstore_api/models/has_only_read_only.py | 14 +- .../petstore_api/models/list.py | 14 +- .../petstore_api/models/map_test.py | 17 ++- ...perties_and_additional_properties_class.py | 14 +- .../petstore_api/models/model200_response.py | 14 +- .../petstore_api/models/model_return.py | 14 +- .../petstore_api/models/name.py | 16 +- .../petstore_api/models/number_only.py | 14 +- .../petstore_api/models/order.py | 16 +- .../petstore_api/models/outer_composite.py | 14 +- .../petstore_api/models/outer_enum.py | 14 +- .../python-tornado/petstore_api/models/pet.py | 20 ++- .../petstore_api/models/read_only_first.py | 14 +- .../petstore_api/models/special_model_name.py | 14 +- .../python-tornado/petstore_api/models/tag.py | 14 +- .../models/type_holder_default.py | 24 ++- .../models/type_holder_example.py | 26 ++-- .../petstore_api/models/user.py | 14 +- .../petstore_api/models/xml_item.py | 14 +- 108 files changed, 1386 insertions(+), 616 deletions(-) diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py index a47a8e3ea184..268310a3e2fb 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py @@ -103,8 +103,8 @@ def call_123_test_special_tags_with_http_info(self, body, **kwargs): # noqa: E5 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `call_123_test_special_tags`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py index 00333bfd2c47..6907451d9200 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py @@ -103,8 +103,8 @@ def create_xml_item_with_http_info(self, xml_item, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'xml_item' is set - if ('xml_item' not in local_var_params or - local_var_params['xml_item'] is None): + if self.api_client.client_side_validation and ('xml_item' not in local_var_params or # noqa: E501 + local_var_params['xml_item'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `xml_item` when calling `create_xml_item`") # noqa: E501 collection_formats = {} @@ -627,8 +627,8 @@ def test_body_with_file_schema_with_http_info(self, body, **kwargs): # noqa: E5 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_body_with_file_schema`") # noqa: E501 collection_formats = {} @@ -735,12 +735,12 @@ def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'query' is set - if ('query' not in local_var_params or - local_var_params['query'] is None): + if self.api_client.client_side_validation and ('query' not in local_var_params or # noqa: E501 + local_var_params['query'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `query` when calling `test_body_with_query_params`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_body_with_query_params`") # noqa: E501 collection_formats = {} @@ -748,7 +748,7 @@ def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # path_params = {} query_params = [] - if 'query' in local_var_params: + if 'query' in local_var_params and local_var_params['query'] is not None: # noqa: E501 query_params.append(('query', local_var_params['query'])) # noqa: E501 header_params = {} @@ -849,8 +849,8 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_client_model`") # noqa: E501 collection_formats = {} @@ -987,49 +987,49 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'number' is set - if ('number' not in local_var_params or - local_var_params['number'] is None): + if self.api_client.client_side_validation and ('number' not in local_var_params or # noqa: E501 + local_var_params['number'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `number` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'double' is set - if ('double' not in local_var_params or - local_var_params['double'] is None): + if self.api_client.client_side_validation and ('double' not in local_var_params or # noqa: E501 + local_var_params['double'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `double` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'pattern_without_delimiter' is set - if ('pattern_without_delimiter' not in local_var_params or - local_var_params['pattern_without_delimiter'] is None): + if self.api_client.client_side_validation and ('pattern_without_delimiter' not in local_var_params or # noqa: E501 + local_var_params['pattern_without_delimiter'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'byte' is set - if ('byte' not in local_var_params or - local_var_params['byte'] is None): + if self.api_client.client_side_validation and ('byte' not in local_var_params or # noqa: E501 + local_var_params['byte'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `byte` when calling `test_endpoint_parameters`") # noqa: E501 - if 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 + if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 raise ApiValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value less than or equal to `543.2`") # noqa: E501 - if 'number' in local_var_params and local_var_params['number'] < 32.1: # noqa: E501 + if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] < 32.1: # noqa: E501 raise ApiValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value greater than or equal to `32.1`") # noqa: E501 - if 'double' in local_var_params and local_var_params['double'] > 123.4: # noqa: E501 + if self.api_client.client_side_validation and 'double' in local_var_params and local_var_params['double'] > 123.4: # noqa: E501 raise ApiValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value less than or equal to `123.4`") # noqa: E501 - if 'double' in local_var_params and local_var_params['double'] < 67.8: # noqa: E501 + if self.api_client.client_side_validation and 'double' in local_var_params and local_var_params['double'] < 67.8: # noqa: E501 raise ApiValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value greater than or equal to `67.8`") # noqa: E501 - if 'pattern_without_delimiter' in local_var_params and not re.search(r'^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 + if self.api_client.client_side_validation and 'pattern_without_delimiter' in local_var_params and not re.search(r'^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 raise ApiValueError("Invalid value for parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`, must conform to the pattern `/^[A-Z].*/`") # noqa: E501 - if 'integer' in local_var_params and local_var_params['integer'] > 100: # noqa: E501 + if self.api_client.client_side_validation and 'integer' in local_var_params and local_var_params['integer'] > 100: # noqa: E501 raise ApiValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value less than or equal to `100`") # noqa: E501 - if 'integer' in local_var_params and local_var_params['integer'] < 10: # noqa: E501 + if self.api_client.client_side_validation and 'integer' in local_var_params and local_var_params['integer'] < 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value greater than or equal to `10`") # noqa: E501 - if 'int32' in local_var_params and local_var_params['int32'] > 200: # noqa: E501 + if self.api_client.client_side_validation and 'int32' in local_var_params and local_var_params['int32'] > 200: # noqa: E501 raise ApiValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value less than or equal to `200`") # noqa: E501 - if 'int32' in local_var_params and local_var_params['int32'] < 20: # noqa: E501 + if self.api_client.client_side_validation and 'int32' in local_var_params and local_var_params['int32'] < 20: # noqa: E501 raise ApiValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value greater than or equal to `20`") # noqa: E501 - if 'float' in local_var_params and local_var_params['float'] > 987.6: # noqa: E501 + if self.api_client.client_side_validation and 'float' in local_var_params and local_var_params['float'] > 987.6: # noqa: E501 raise ApiValueError("Invalid value for parameter `float` when calling `test_endpoint_parameters`, must be a value less than or equal to `987.6`") # noqa: E501 - if 'string' in local_var_params and not re.search(r'[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 + if self.api_client.client_side_validation and 'string' in local_var_params and not re.search(r'[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 raise ApiValueError("Invalid value for parameter `string` when calling `test_endpoint_parameters`, must conform to the pattern `/[a-z]/i`") # noqa: E501 - if ('password' in local_var_params and - len(local_var_params['password']) > 64): + if self.api_client.client_side_validation and ('password' in local_var_params and # noqa: E501 + len(local_var_params['password']) > 64): # noqa: E501 raise ApiValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be less than or equal to `64`") # noqa: E501 - if ('password' in local_var_params and - len(local_var_params['password']) < 10): + if self.api_client.client_side_validation and ('password' in local_var_params and # noqa: E501 + len(local_var_params['password']) < 10): # noqa: E501 raise ApiValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be greater than or equal to `10`") # noqa: E501 collection_formats = {} @@ -1180,14 +1180,14 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'enum_query_string_array' in local_var_params: + if 'enum_query_string_array' in local_var_params and local_var_params['enum_query_string_array'] is not None: # noqa: E501 query_params.append(('enum_query_string_array', local_var_params['enum_query_string_array'])) # noqa: E501 collection_formats['enum_query_string_array'] = 'csv' # noqa: E501 - if 'enum_query_string' in local_var_params: + if 'enum_query_string' in local_var_params and local_var_params['enum_query_string'] is not None: # noqa: E501 query_params.append(('enum_query_string', local_var_params['enum_query_string'])) # noqa: E501 - if 'enum_query_integer' in local_var_params: + if 'enum_query_integer' in local_var_params and local_var_params['enum_query_integer'] is not None: # noqa: E501 query_params.append(('enum_query_integer', local_var_params['enum_query_integer'])) # noqa: E501 - if 'enum_query_double' in local_var_params: + if 'enum_query_double' in local_var_params and local_var_params['enum_query_double'] is not None: # noqa: E501 query_params.append(('enum_query_double', local_var_params['enum_query_double'])) # noqa: E501 header_params = {} @@ -1306,16 +1306,16 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'required_string_group' is set - if ('required_string_group' not in local_var_params or - local_var_params['required_string_group'] is None): + if self.api_client.client_side_validation and ('required_string_group' not in local_var_params or # noqa: E501 + local_var_params['required_string_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_string_group` when calling `test_group_parameters`") # noqa: E501 # verify the required parameter 'required_boolean_group' is set - if ('required_boolean_group' not in local_var_params or - local_var_params['required_boolean_group'] is None): + if self.api_client.client_side_validation and ('required_boolean_group' not in local_var_params or # noqa: E501 + local_var_params['required_boolean_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_boolean_group` when calling `test_group_parameters`") # noqa: E501 # verify the required parameter 'required_int64_group' is set - if ('required_int64_group' not in local_var_params or - local_var_params['required_int64_group'] is None): + if self.api_client.client_side_validation and ('required_int64_group' not in local_var_params or # noqa: E501 + local_var_params['required_int64_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_int64_group` when calling `test_group_parameters`") # noqa: E501 collection_formats = {} @@ -1323,13 +1323,13 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b path_params = {} query_params = [] - if 'required_string_group' in local_var_params: + if 'required_string_group' in local_var_params and local_var_params['required_string_group'] is not None: # noqa: E501 query_params.append(('required_string_group', local_var_params['required_string_group'])) # noqa: E501 - if 'required_int64_group' in local_var_params: + if 'required_int64_group' in local_var_params and local_var_params['required_int64_group'] is not None: # noqa: E501 query_params.append(('required_int64_group', local_var_params['required_int64_group'])) # noqa: E501 - if 'string_group' in local_var_params: + if 'string_group' in local_var_params and local_var_params['string_group'] is not None: # noqa: E501 query_params.append(('string_group', local_var_params['string_group'])) # noqa: E501 - if 'int64_group' in local_var_params: + if 'int64_group' in local_var_params and local_var_params['int64_group'] is not None: # noqa: E501 query_params.append(('int64_group', local_var_params['int64_group'])) # noqa: E501 header_params = {} @@ -1426,8 +1426,8 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'param' is set - if ('param' not in local_var_params or - local_var_params['param'] is None): + if self.api_client.client_side_validation and ('param' not in local_var_params or # noqa: E501 + local_var_params['param'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `param` when calling `test_inline_additional_properties`") # noqa: E501 collection_formats = {} @@ -1534,12 +1534,12 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'param' is set - if ('param' not in local_var_params or - local_var_params['param'] is None): + if self.api_client.client_side_validation and ('param' not in local_var_params or # noqa: E501 + local_var_params['param'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `param` when calling `test_json_form_data`") # noqa: E501 # verify the required parameter 'param2' is set - if ('param2' not in local_var_params or - local_var_params['param2'] is None): + if self.api_client.client_side_validation and ('param2' not in local_var_params or # noqa: E501 + local_var_params['param2'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `param2` when calling `test_json_form_data`") # noqa: E501 collection_formats = {} @@ -1656,24 +1656,24 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pipe' is set - if ('pipe' not in local_var_params or - local_var_params['pipe'] is None): + if self.api_client.client_side_validation and ('pipe' not in local_var_params or # noqa: E501 + local_var_params['pipe'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pipe` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'ioutil' is set - if ('ioutil' not in local_var_params or - local_var_params['ioutil'] is None): + if self.api_client.client_side_validation and ('ioutil' not in local_var_params or # noqa: E501 + local_var_params['ioutil'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `ioutil` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'http' is set - if ('http' not in local_var_params or - local_var_params['http'] is None): + if self.api_client.client_side_validation and ('http' not in local_var_params or # noqa: E501 + local_var_params['http'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `http` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'url' is set - if ('url' not in local_var_params or - local_var_params['url'] is None): + if self.api_client.client_side_validation and ('url' not in local_var_params or # noqa: E501 + local_var_params['url'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `url` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'context' is set - if ('context' not in local_var_params or - local_var_params['context'] is None): + if self.api_client.client_side_validation and ('context' not in local_var_params or # noqa: E501 + local_var_params['context'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `context` when calling `test_query_parameter_collection_format`") # noqa: E501 collection_formats = {} @@ -1681,19 +1681,19 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht path_params = {} query_params = [] - if 'pipe' in local_var_params: + if 'pipe' in local_var_params and local_var_params['pipe'] is not None: # noqa: E501 query_params.append(('pipe', local_var_params['pipe'])) # noqa: E501 collection_formats['pipe'] = 'csv' # noqa: E501 - if 'ioutil' in local_var_params: + if 'ioutil' in local_var_params and local_var_params['ioutil'] is not None: # noqa: E501 query_params.append(('ioutil', local_var_params['ioutil'])) # noqa: E501 collection_formats['ioutil'] = 'csv' # noqa: E501 - if 'http' in local_var_params: + if 'http' in local_var_params and local_var_params['http'] is not None: # noqa: E501 query_params.append(('http', local_var_params['http'])) # noqa: E501 collection_formats['http'] = 'space' # noqa: E501 - if 'url' in local_var_params: + if 'url' in local_var_params and local_var_params['url'] is not None: # noqa: E501 query_params.append(('url', local_var_params['url'])) # noqa: E501 collection_formats['url'] = 'csv' # noqa: E501 - if 'context' in local_var_params: + if 'context' in local_var_params and local_var_params['context'] is not None: # noqa: E501 query_params.append(('context', local_var_params['context'])) # noqa: E501 collection_formats['context'] = 'multi' # noqa: E501 diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py index 3e778e922686..90579feaae38 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py @@ -103,8 +103,8 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_classname`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py index 1deb664c43e5..54abb9b95e77 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py @@ -101,8 +101,8 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `add_pet`") # noqa: E501 collection_formats = {} @@ -209,8 +209,8 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `delete_pet`") # noqa: E501 collection_formats = {} @@ -315,8 +315,8 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'status' is set - if ('status' not in local_var_params or - local_var_params['status'] is None): + if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501 + local_var_params['status'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `status` when calling `find_pets_by_status`") # noqa: E501 collection_formats = {} @@ -324,7 +324,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'status' in local_var_params: + if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 query_params.append(('status', local_var_params['status'])) # noqa: E501 collection_formats['status'] = 'csv' # noqa: E501 @@ -424,8 +424,8 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'tags' is set - if ('tags' not in local_var_params or - local_var_params['tags'] is None): + if self.api_client.client_side_validation and ('tags' not in local_var_params or # noqa: E501 + local_var_params['tags'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `tags` when calling `find_pets_by_tags`") # noqa: E501 collection_formats = {} @@ -433,7 +433,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'tags' in local_var_params: + if 'tags' in local_var_params and local_var_params['tags'] is not None: # noqa: E501 query_params.append(('tags', local_var_params['tags'])) # noqa: E501 collection_formats['tags'] = 'csv' # noqa: E501 @@ -533,8 +533,8 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id`") # noqa: E501 collection_formats = {} @@ -639,8 +639,8 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `update_pet`") # noqa: E501 collection_formats = {} @@ -749,8 +749,8 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `update_pet_with_form`") # noqa: E501 collection_formats = {} @@ -863,8 +863,8 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file`") # noqa: E501 collection_formats = {} @@ -981,12 +981,12 @@ def upload_file_with_required_file_with_http_info(self, pet_id, required_file, * local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file_with_required_file`") # noqa: E501 # verify the required parameter 'required_file' is set - if ('required_file' not in local_var_params or - local_var_params['required_file'] is None): + if self.api_client.client_side_validation and ('required_file' not in local_var_params or # noqa: E501 + local_var_params['required_file'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_file` when calling `upload_file_with_required_file`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py index c3aa1c4a3d59..b907b107b2b6 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py @@ -103,8 +103,8 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - if ('order_id' not in local_var_params or - local_var_params['order_id'] is None): + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `delete_order`") # noqa: E501 collection_formats = {} @@ -307,13 +307,13 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - if ('order_id' not in local_var_params or - local_var_params['order_id'] is None): + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `get_order_by_id`") # noqa: E501 - if 'order_id' in local_var_params and local_var_params['order_id'] > 5: # noqa: E501 + if self.api_client.client_side_validation and 'order_id' in local_var_params and local_var_params['order_id'] > 5: # noqa: E501 raise ApiValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value less than or equal to `5`") # noqa: E501 - if 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501 + if self.api_client.client_side_validation and 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} @@ -417,8 +417,8 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `place_order`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py index d3674f5ba5c6..268721dcb890 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py @@ -103,8 +103,8 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_user`") # noqa: E501 collection_formats = {} @@ -205,8 +205,8 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_users_with_array_input`") # noqa: E501 collection_formats = {} @@ -307,8 +307,8 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_users_with_list_input`") # noqa: E501 collection_formats = {} @@ -411,8 +411,8 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `delete_user`") # noqa: E501 collection_formats = {} @@ -513,8 +513,8 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `get_user_by_name`") # noqa: E501 collection_formats = {} @@ -621,12 +621,12 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `login_user`") # noqa: E501 # verify the required parameter 'password' is set - if ('password' not in local_var_params or - local_var_params['password'] is None): + if self.api_client.client_side_validation and ('password' not in local_var_params or # noqa: E501 + local_var_params['password'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `password` when calling `login_user`") # noqa: E501 collection_formats = {} @@ -634,9 +634,9 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'username' in local_var_params: + if 'username' in local_var_params and local_var_params['username'] is not None: # noqa: E501 query_params.append(('username', local_var_params['username'])) # noqa: E501 - if 'password' in local_var_params: + if 'password' in local_var_params and local_var_params['password'] is not None: # noqa: E501 query_params.append(('password', local_var_params['password'])) # noqa: E501 header_params = {} @@ -831,12 +831,12 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `update_user`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `update_user`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python-asyncio/petstore_api/api_client.py b/samples/client/petstore/python-asyncio/petstore_api/api_client.py index c6fc3a0609cd..0405206d9829 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api_client.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api_client.py @@ -77,6 +77,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.cookie = cookie # Set default User-Agent. self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation def __del__(self): if self._pool: @@ -372,10 +373,8 @@ def request(self, method, url, query_params=None, headers=None, return self.rest_client.OPTIONS(url, query_params=query_params, headers=headers, - post_params=post_params, _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + _request_timeout=_request_timeout) elif method == "POST": return self.rest_client.POST(url, query_params=query_params, diff --git a/samples/client/petstore/python-asyncio/petstore_api/configuration.py b/samples/client/petstore/python-asyncio/petstore_api/configuration.py index 23b51a35e9d1..ae776ad8c4e0 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/configuration.py +++ b/samples/client/petstore/python-asyncio/petstore_api/configuration.py @@ -134,6 +134,8 @@ def __init__(self, host="http://petstore.swagger.io:80/v2", self.retries = None """Adding retries to override urllib3 default value 3 """ + # Disable client side validation + self.client_side_validation = True @property def logger_file(self): diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_any_type.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_any_type.py index ed4f40068bf8..2954285de87c 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_any_type.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_any_type.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesAnyType(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesAnyType(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesAnyType - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesAnyType): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesAnyType): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_array.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_array.py index 22b4133f3675..c6369c22a12f 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_array.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_array.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesArray(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesArray(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesArray - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesArray): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesArray): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_boolean.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_boolean.py index 24e2fc178abc..599b7c8b8843 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_boolean.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_boolean.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesBoolean(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesBoolean(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesBoolean - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesBoolean): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesBoolean): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_class.py index e9e9307d1b72..be4455c683bf 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_class.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_class.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -58,8 +60,11 @@ class AdditionalPropertiesClass(object): 'anytype_3': 'anytype_3' } - def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, anytype_1=None, anytype_2=None, anytype_3=None): # noqa: E501 + def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, anytype_1=None, anytype_2=None, anytype_3=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._map_string = None self._map_number = None @@ -365,8 +370,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_integer.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_integer.py index 43bcf425a7b3..ddbb85fdf33b 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_integer.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_integer.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesInteger(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesInteger(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesInteger - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesInteger): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesInteger): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_number.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_number.py index b3e034035a8e..8bbeda83ecca 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_number.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_number.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesNumber(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesNumber(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesNumber - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesNumber): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesNumber): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_object.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_object.py index 9ab56a4e5537..af87595b3e41 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_object.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_object.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesObject(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesObject(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesObject - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesObject): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesObject): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_string.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_string.py index 4667186bdc4f..6ab2c91feda9 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_string.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_string.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesString(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesString(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesString - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesString): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesString): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/animal.py b/samples/client/petstore/python-asyncio/petstore_api/models/animal.py index 552ef0e8326b..65cef1a60885 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/animal.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/animal.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Animal(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -45,8 +47,11 @@ class Animal(object): 'Cat': 'Cat' } - def __init__(self, class_name=None, color='red'): # noqa: E501 + def __init__(self, class_name=None, color='red', local_vars_configuration=None): # noqa: E501 """Animal - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._class_name = None self._color = None @@ -74,7 +79,7 @@ def class_name(self, class_name): :param class_name: The class_name of this Animal. # noqa: E501 :type: str """ - if class_name is None: + if self.local_vars_configuration.client_side_validation and class_name is None: # noqa: E501 raise ValueError("Invalid value for `class_name`, must not be `None`") # noqa: E501 self._class_name = class_name @@ -143,8 +148,11 @@ def __eq__(self, other): if not isinstance(other, Animal): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Animal): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/api_response.py b/samples/client/petstore/python-asyncio/petstore_api/models/api_response.py index 190c3df34526..24e80d02aea4 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/api_response.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/api_response.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ApiResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class ApiResponse(object): 'message': 'message' } - def __init__(self, code=None, type=None, message=None): # noqa: E501 + def __init__(self, code=None, type=None, message=None, local_vars_configuration=None): # noqa: E501 """ApiResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._code = None self._type = None @@ -157,8 +162,11 @@ def __eq__(self, other): if not isinstance(other, ApiResponse): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ApiResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/array_of_array_of_number_only.py b/samples/client/petstore/python-asyncio/petstore_api/models/array_of_array_of_number_only.py index ebf964298018..1f654452077f 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/array_of_array_of_number_only.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ArrayOfArrayOfNumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ArrayOfArrayOfNumberOnly(object): 'array_array_number': 'ArrayArrayNumber' } - def __init__(self, array_array_number=None): # noqa: E501 + def __init__(self, array_array_number=None, local_vars_configuration=None): # noqa: E501 """ArrayOfArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_array_number = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, ArrayOfArrayOfNumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayOfArrayOfNumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/array_of_number_only.py b/samples/client/petstore/python-asyncio/petstore_api/models/array_of_number_only.py index 8e1837c46bda..27ba1f58e31e 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/array_of_number_only.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/array_of_number_only.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ArrayOfNumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ArrayOfNumberOnly(object): 'array_number': 'ArrayNumber' } - def __init__(self, array_number=None): # noqa: E501 + def __init__(self, array_number=None, local_vars_configuration=None): # noqa: E501 """ArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_number = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, ArrayOfNumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayOfNumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/array_test.py b/samples/client/petstore/python-asyncio/petstore_api/models/array_test.py index f548fef3ee8c..f34a372f6f3b 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/array_test.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/array_test.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ArrayTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class ArrayTest(object): 'array_array_of_model': 'array_array_of_model' } - def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None): # noqa: E501 + def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None, local_vars_configuration=None): # noqa: E501 """ArrayTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_of_string = None self._array_array_of_integer = None @@ -157,8 +162,11 @@ def __eq__(self, other): if not isinstance(other, ArrayTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/capitalization.py b/samples/client/petstore/python-asyncio/petstore_api/models/capitalization.py index 0da6b77e84dc..cef34c5f6dc3 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/capitalization.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/capitalization.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Capitalization(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Capitalization(object): 'att_name': 'ATT_NAME' } - def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None): # noqa: E501 + def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None, local_vars_configuration=None): # noqa: E501 """Capitalization - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._small_camel = None self._capital_camel = None @@ -237,8 +242,11 @@ def __eq__(self, other): if not isinstance(other, Capitalization): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Capitalization): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/cat.py b/samples/client/petstore/python-asyncio/petstore_api/models/cat.py index 216e5123538c..e39c1c82508c 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/cat.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/cat.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Cat(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Cat(object): 'declawed': 'declawed' } - def __init__(self, declawed=None): # noqa: E501 + def __init__(self, declawed=None, local_vars_configuration=None): # noqa: E501 """Cat - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._declawed = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, Cat): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Cat): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/cat_all_of.py b/samples/client/petstore/python-asyncio/petstore_api/models/cat_all_of.py index 3c90df84ec3a..7e90fab93489 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/cat_all_of.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/cat_all_of.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class CatAllOf(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class CatAllOf(object): 'declawed': 'declawed' } - def __init__(self, declawed=None): # noqa: E501 + def __init__(self, declawed=None, local_vars_configuration=None): # noqa: E501 """CatAllOf - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._declawed = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, CatAllOf): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, CatAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/category.py b/samples/client/petstore/python-asyncio/petstore_api/models/category.py index 0e23c409e50a..b47c148953ea 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/category.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/category.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Category(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Category(object): 'name': 'name' } - def __init__(self, id=None, name='default-name'): # noqa: E501 + def __init__(self, id=None, name='default-name', local_vars_configuration=None): # noqa: E501 """Category - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._name = None @@ -90,7 +95,7 @@ def name(self, name): :param name: The name of this Category. # noqa: E501 :type: str """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -132,8 +137,11 @@ def __eq__(self, other): if not isinstance(other, Category): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Category): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/class_model.py b/samples/client/petstore/python-asyncio/petstore_api/models/class_model.py index 88562beff8b1..ef6060ffa70d 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/class_model.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/class_model.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ClassModel(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ClassModel(object): '_class': '_class' } - def __init__(self, _class=None): # noqa: E501 + def __init__(self, _class=None, local_vars_configuration=None): # noqa: E501 """ClassModel - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__class = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, ClassModel): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassModel): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/client.py b/samples/client/petstore/python-asyncio/petstore_api/models/client.py index b7083fd9bd75..ee5dbf1c43a1 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/client.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/client.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Client(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Client(object): 'client': 'client' } - def __init__(self, client=None): # noqa: E501 + def __init__(self, client=None, local_vars_configuration=None): # noqa: E501 """Client - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._client = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, Client): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Client): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/dog.py b/samples/client/petstore/python-asyncio/petstore_api/models/dog.py index c325cb252c32..eacb63eedb09 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/dog.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/dog.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Dog(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Dog(object): 'breed': 'breed' } - def __init__(self, breed=None): # noqa: E501 + def __init__(self, breed=None, local_vars_configuration=None): # noqa: E501 """Dog - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._breed = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, Dog): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Dog): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/dog_all_of.py b/samples/client/petstore/python-asyncio/petstore_api/models/dog_all_of.py index b6328b05589e..48e048557085 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/dog_all_of.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/dog_all_of.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class DogAllOf(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class DogAllOf(object): 'breed': 'breed' } - def __init__(self, breed=None): # noqa: E501 + def __init__(self, breed=None, local_vars_configuration=None): # noqa: E501 """DogAllOf - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._breed = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, DogAllOf): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, DogAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/enum_arrays.py b/samples/client/petstore/python-asyncio/petstore_api/models/enum_arrays.py index 00aa21d04da8..481283a05c32 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/enum_arrays.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/enum_arrays.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class EnumArrays(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class EnumArrays(object): 'array_enum': 'array_enum' } - def __init__(self, just_symbol=None, array_enum=None): # noqa: E501 + def __init__(self, just_symbol=None, array_enum=None, local_vars_configuration=None): # noqa: E501 """EnumArrays - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._just_symbol = None self._array_enum = None @@ -71,7 +76,7 @@ def just_symbol(self, just_symbol): :type: str """ allowed_values = [">=", "$"] # noqa: E501 - if just_symbol not in allowed_values: + if self.local_vars_configuration.client_side_validation and just_symbol not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `just_symbol` ({0}), must be one of {1}" # noqa: E501 .format(just_symbol, allowed_values) @@ -98,7 +103,8 @@ def array_enum(self, array_enum): :type: list[str] """ allowed_values = ["fish", "crab"] # noqa: E501 - if not set(array_enum).issubset(set(allowed_values)): + if (self.local_vars_configuration.client_side_validation and + not set(array_enum).issubset(set(allowed_values))): raise ValueError( "Invalid values for `array_enum` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(array_enum) - set(allowed_values))), # noqa: E501 @@ -144,8 +150,11 @@ def __eq__(self, other): if not isinstance(other, EnumArrays): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumArrays): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/enum_class.py b/samples/client/petstore/python-asyncio/petstore_api/models/enum_class.py index 3c1aa279755b..8bc627578608 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/enum_class.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/enum_class.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class EnumClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class EnumClass(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """EnumClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +89,11 @@ def __eq__(self, other): if not isinstance(other, EnumClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/enum_test.py b/samples/client/petstore/python-asyncio/petstore_api/models/enum_test.py index 11e5020363ec..464281b3ec0e 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/enum_test.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/enum_test.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class EnumTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -46,8 +48,11 @@ class EnumTest(object): 'outer_enum': 'outerEnum' } - def __init__(self, enum_string=None, enum_string_required=None, enum_integer=None, enum_number=None, outer_enum=None): # noqa: E501 + def __init__(self, enum_string=None, enum_string_required=None, enum_integer=None, enum_number=None, outer_enum=None, local_vars_configuration=None): # noqa: E501 """EnumTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._enum_string = None self._enum_string_required = None @@ -85,7 +90,7 @@ def enum_string(self, enum_string): :type: str """ allowed_values = ["UPPER", "lower", ""] # noqa: E501 - if enum_string not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_string not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_string` ({0}), must be one of {1}" # noqa: E501 .format(enum_string, allowed_values) @@ -111,10 +116,10 @@ def enum_string_required(self, enum_string_required): :param enum_string_required: The enum_string_required of this EnumTest. # noqa: E501 :type: str """ - if enum_string_required is None: + if self.local_vars_configuration.client_side_validation and enum_string_required is None: # noqa: E501 raise ValueError("Invalid value for `enum_string_required`, must not be `None`") # noqa: E501 allowed_values = ["UPPER", "lower", ""] # noqa: E501 - if enum_string_required not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_string_required not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_string_required` ({0}), must be one of {1}" # noqa: E501 .format(enum_string_required, allowed_values) @@ -141,7 +146,7 @@ def enum_integer(self, enum_integer): :type: int """ allowed_values = [1, -1] # noqa: E501 - if enum_integer not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_integer not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_integer` ({0}), must be one of {1}" # noqa: E501 .format(enum_integer, allowed_values) @@ -168,7 +173,7 @@ def enum_number(self, enum_number): :type: float """ allowed_values = [1.1, -1.2] # noqa: E501 - if enum_number not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_number not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_number` ({0}), must be one of {1}" # noqa: E501 .format(enum_number, allowed_values) @@ -234,8 +239,11 @@ def __eq__(self, other): if not isinstance(other, EnumTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/file.py b/samples/client/petstore/python-asyncio/petstore_api/models/file.py index 475f86b799f7..282df2957e67 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/file.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/file.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class File(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class File(object): 'source_uri': 'sourceURI' } - def __init__(self, source_uri=None): # noqa: E501 + def __init__(self, source_uri=None, local_vars_configuration=None): # noqa: E501 """File - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._source_uri = None self.discriminator = None @@ -107,8 +112,11 @@ def __eq__(self, other): if not isinstance(other, File): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, File): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/file_schema_test_class.py b/samples/client/petstore/python-asyncio/petstore_api/models/file_schema_test_class.py index 9f3b5bdc1793..de7f865b47e2 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/file_schema_test_class.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/file_schema_test_class.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class FileSchemaTestClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class FileSchemaTestClass(object): 'files': 'files' } - def __init__(self, file=None, files=None): # noqa: E501 + def __init__(self, file=None, files=None, local_vars_configuration=None): # noqa: E501 """FileSchemaTestClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._file = None self._files = None @@ -131,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, FileSchemaTestClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, FileSchemaTestClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/format_test.py b/samples/client/petstore/python-asyncio/petstore_api/models/format_test.py index 1451cdcd6af0..6396c442f624 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/format_test.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/format_test.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class FormatTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -64,8 +66,11 @@ class FormatTest(object): 'big_decimal': 'BigDecimal' } - def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None, big_decimal=None): # noqa: E501 + def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None, big_decimal=None, local_vars_configuration=None): # noqa: E501 """FormatTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._integer = None self._int32 = None @@ -126,9 +131,11 @@ def integer(self, integer): :param integer: The integer of this FormatTest. # noqa: E501 :type: int """ - if integer is not None and integer > 100: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + integer is not None and integer > 100): # noqa: E501 raise ValueError("Invalid value for `integer`, must be a value less than or equal to `100`") # noqa: E501 - if integer is not None and integer < 10: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + integer is not None and integer < 10): # noqa: E501 raise ValueError("Invalid value for `integer`, must be a value greater than or equal to `10`") # noqa: E501 self._integer = integer @@ -151,9 +158,11 @@ def int32(self, int32): :param int32: The int32 of this FormatTest. # noqa: E501 :type: int """ - if int32 is not None and int32 > 200: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + int32 is not None and int32 > 200): # noqa: E501 raise ValueError("Invalid value for `int32`, must be a value less than or equal to `200`") # noqa: E501 - if int32 is not None and int32 < 20: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + int32 is not None and int32 < 20): # noqa: E501 raise ValueError("Invalid value for `int32`, must be a value greater than or equal to `20`") # noqa: E501 self._int32 = int32 @@ -197,11 +206,13 @@ def number(self, number): :param number: The number of this FormatTest. # noqa: E501 :type: float """ - if number is None: + if self.local_vars_configuration.client_side_validation and number is None: # noqa: E501 raise ValueError("Invalid value for `number`, must not be `None`") # noqa: E501 - if number is not None and number > 543.2: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + number is not None and number > 543.2): # noqa: E501 raise ValueError("Invalid value for `number`, must be a value less than or equal to `543.2`") # noqa: E501 - if number is not None and number < 32.1: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + number is not None and number < 32.1): # noqa: E501 raise ValueError("Invalid value for `number`, must be a value greater than or equal to `32.1`") # noqa: E501 self._number = number @@ -224,9 +235,11 @@ def float(self, float): :param float: The float of this FormatTest. # noqa: E501 :type: float """ - if float is not None and float > 987.6: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + float is not None and float > 987.6): # noqa: E501 raise ValueError("Invalid value for `float`, must be a value less than or equal to `987.6`") # noqa: E501 - if float is not None and float < 54.3: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + float is not None and float < 54.3): # noqa: E501 raise ValueError("Invalid value for `float`, must be a value greater than or equal to `54.3`") # noqa: E501 self._float = float @@ -249,9 +262,11 @@ def double(self, double): :param double: The double of this FormatTest. # noqa: E501 :type: float """ - if double is not None and double > 123.4: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + double is not None and double > 123.4): # noqa: E501 raise ValueError("Invalid value for `double`, must be a value less than or equal to `123.4`") # noqa: E501 - if double is not None and double < 67.8: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + double is not None and double < 67.8): # noqa: E501 raise ValueError("Invalid value for `double`, must be a value greater than or equal to `67.8`") # noqa: E501 self._double = double @@ -274,7 +289,8 @@ def string(self, string): :param string: The string of this FormatTest. # noqa: E501 :type: str """ - if string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE): # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE)): # noqa: E501 raise ValueError(r"Invalid value for `string`, must be a follow pattern or equal to `/[a-z]/i`") # noqa: E501 self._string = string @@ -297,9 +313,10 @@ def byte(self, byte): :param byte: The byte of this FormatTest. # noqa: E501 :type: str """ - if byte is None: + if self.local_vars_configuration.client_side_validation and byte is None: # noqa: E501 raise ValueError("Invalid value for `byte`, must not be `None`") # noqa: E501 - if byte is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', byte): # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + byte is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', byte)): # noqa: E501 raise ValueError(r"Invalid value for `byte`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`") # noqa: E501 self._byte = byte @@ -343,7 +360,7 @@ def date(self, date): :param date: The date of this FormatTest. # noqa: E501 :type: date """ - if date is None: + if self.local_vars_configuration.client_side_validation and date is None: # noqa: E501 raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501 self._date = date @@ -408,11 +425,13 @@ def password(self, password): :param password: The password of this FormatTest. # noqa: E501 :type: str """ - if password is None: + if self.local_vars_configuration.client_side_validation and password is None: # noqa: E501 raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 - if password is not None and len(password) > 64: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) > 64): raise ValueError("Invalid value for `password`, length must be less than or equal to `64`") # noqa: E501 - if password is not None and len(password) < 10: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) < 10): raise ValueError("Invalid value for `password`, length must be greater than or equal to `10`") # noqa: E501 self._password = password @@ -475,8 +494,11 @@ def __eq__(self, other): if not isinstance(other, FormatTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, FormatTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/has_only_read_only.py b/samples/client/petstore/python-asyncio/petstore_api/models/has_only_read_only.py index 7c8d921a2d8d..5fc2f8a9ebdd 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/has_only_read_only.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/has_only_read_only.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class HasOnlyReadOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class HasOnlyReadOnly(object): 'foo': 'foo' } - def __init__(self, bar=None, foo=None): # noqa: E501 + def __init__(self, bar=None, foo=None, local_vars_configuration=None): # noqa: E501 """HasOnlyReadOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._bar = None self._foo = None @@ -131,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, HasOnlyReadOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, HasOnlyReadOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/list.py b/samples/client/petstore/python-asyncio/petstore_api/models/list.py index 74fc3719aa03..d58d13e90fbc 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/list.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/list.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class List(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class List(object): '_123_list': '123-list' } - def __init__(self, _123_list=None): # noqa: E501 + def __init__(self, _123_list=None, local_vars_configuration=None): # noqa: E501 """List - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__123_list = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, List): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, List): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/map_test.py b/samples/client/petstore/python-asyncio/petstore_api/models/map_test.py index cdfb9365297c..b170dce412c7 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/map_test.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/map_test.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class MapTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -44,8 +46,11 @@ class MapTest(object): 'indirect_map': 'indirect_map' } - def __init__(self, map_map_of_string=None, map_of_enum_string=None, direct_map=None, indirect_map=None): # noqa: E501 + def __init__(self, map_map_of_string=None, map_of_enum_string=None, direct_map=None, indirect_map=None, local_vars_configuration=None): # noqa: E501 """MapTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._map_map_of_string = None self._map_of_enum_string = None @@ -102,7 +107,8 @@ def map_of_enum_string(self, map_of_enum_string): :type: dict(str, str) """ allowed_values = ["UPPER", "lower"] # noqa: E501 - if not set(map_of_enum_string.keys()).issubset(set(allowed_values)): + if (self.local_vars_configuration.client_side_validation and + not set(map_of_enum_string.keys()).issubset(set(allowed_values))): raise ValueError( "Invalid keys in `map_of_enum_string` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(map_of_enum_string.keys()) - set(allowed_values))), # noqa: E501 @@ -190,8 +196,11 @@ def __eq__(self, other): if not isinstance(other, MapTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MapTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python-asyncio/petstore_api/models/mixed_properties_and_additional_properties_class.py index 41a916eac10f..5da34f8830e8 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class MixedPropertiesAndAdditionalPropertiesClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class MixedPropertiesAndAdditionalPropertiesClass(object): 'map': 'map' } - def __init__(self, uuid=None, date_time=None, map=None): # noqa: E501 + def __init__(self, uuid=None, date_time=None, map=None, local_vars_configuration=None): # noqa: E501 """MixedPropertiesAndAdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._uuid = None self._date_time = None @@ -157,8 +162,11 @@ def __eq__(self, other): if not isinstance(other, MixedPropertiesAndAdditionalPropertiesClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MixedPropertiesAndAdditionalPropertiesClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/model200_response.py b/samples/client/petstore/python-asyncio/petstore_api/models/model200_response.py index 563b82b59391..841ce1f18f3d 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/model200_response.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/model200_response.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Model200Response(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Model200Response(object): '_class': 'class' } - def __init__(self, name=None, _class=None): # noqa: E501 + def __init__(self, name=None, _class=None, local_vars_configuration=None): # noqa: E501 """Model200Response - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.__class = None @@ -131,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, Model200Response): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Model200Response): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/model_return.py b/samples/client/petstore/python-asyncio/petstore_api/models/model_return.py index 098012015988..fdd8d72314ad 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/model_return.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/model_return.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ModelReturn(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ModelReturn(object): '_return': 'return' } - def __init__(self, _return=None): # noqa: E501 + def __init__(self, _return=None, local_vars_configuration=None): # noqa: E501 """ModelReturn - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__return = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, ModelReturn): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ModelReturn): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/name.py b/samples/client/petstore/python-asyncio/petstore_api/models/name.py index 43014d0fb643..bb2c1fbd73cc 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/name.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/name.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Name(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -44,8 +46,11 @@ class Name(object): '_123_number': '123Number' } - def __init__(self, name=None, snake_case=None, _property=None, _123_number=None): # noqa: E501 + def __init__(self, name=None, snake_case=None, _property=None, _123_number=None, local_vars_configuration=None): # noqa: E501 """Name - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self._snake_case = None @@ -79,7 +84,7 @@ def name(self, name): :param name: The name of this Name. # noqa: E501 :type: int """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -184,8 +189,11 @@ def __eq__(self, other): if not isinstance(other, Name): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Name): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/number_only.py b/samples/client/petstore/python-asyncio/petstore_api/models/number_only.py index b6f3d1c1b65c..99b2424852fb 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/number_only.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/number_only.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class NumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class NumberOnly(object): 'just_number': 'JustNumber' } - def __init__(self, just_number=None): # noqa: E501 + def __init__(self, just_number=None, local_vars_configuration=None): # noqa: E501 """NumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._just_number = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, NumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, NumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/order.py b/samples/client/petstore/python-asyncio/petstore_api/models/order.py index 8b64e3a35832..8c863cce8fe5 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/order.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/order.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Order(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Order(object): 'complete': 'complete' } - def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False): # noqa: E501 + def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False, local_vars_configuration=None): # noqa: E501 """Order - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._pet_id = None @@ -177,7 +182,7 @@ def status(self, status): :type: str """ allowed_values = ["placed", "approved", "delivered"] # noqa: E501 - if status not in allowed_values: + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 .format(status, allowed_values) @@ -243,8 +248,11 @@ def __eq__(self, other): if not isinstance(other, Order): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Order): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/outer_composite.py b/samples/client/petstore/python-asyncio/petstore_api/models/outer_composite.py index dccd67055bed..c11859114a57 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/outer_composite.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/outer_composite.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class OuterComposite(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class OuterComposite(object): 'my_boolean': 'my_boolean' } - def __init__(self, my_number=None, my_string=None, my_boolean=None): # noqa: E501 + def __init__(self, my_number=None, my_string=None, my_boolean=None, local_vars_configuration=None): # noqa: E501 """OuterComposite - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._my_number = None self._my_string = None @@ -157,8 +162,11 @@ def __eq__(self, other): if not isinstance(other, OuterComposite): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OuterComposite): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/outer_enum.py b/samples/client/petstore/python-asyncio/petstore_api/models/outer_enum.py index a6697a0b1522..8fbfeb7aaea5 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/outer_enum.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/outer_enum.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class OuterEnum(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class OuterEnum(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """OuterEnum - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +89,11 @@ def __eq__(self, other): if not isinstance(other, OuterEnum): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OuterEnum): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/pet.py b/samples/client/petstore/python-asyncio/petstore_api/models/pet.py index 870608e17ac3..edbf73f53127 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/pet.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/pet.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Pet(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Pet(object): 'status': 'status' } - def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None): # noqa: E501 + def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None, local_vars_configuration=None): # noqa: E501 """Pet - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._category = None @@ -130,7 +135,7 @@ def name(self, name): :param name: The name of this Pet. # noqa: E501 :type: str """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -153,7 +158,7 @@ def photo_urls(self, photo_urls): :param photo_urls: The photo_urls of this Pet. # noqa: E501 :type: list[str] """ - if photo_urls is None: + if self.local_vars_configuration.client_side_validation and photo_urls is None: # noqa: E501 raise ValueError("Invalid value for `photo_urls`, must not be `None`") # noqa: E501 self._photo_urls = photo_urls @@ -200,7 +205,7 @@ def status(self, status): :type: str """ allowed_values = ["available", "pending", "sold"] # noqa: E501 - if status not in allowed_values: + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 .format(status, allowed_values) @@ -245,8 +250,11 @@ def __eq__(self, other): if not isinstance(other, Pet): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Pet): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/read_only_first.py b/samples/client/petstore/python-asyncio/petstore_api/models/read_only_first.py index 3dfb7c7f6267..a84679e98dee 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/read_only_first.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/read_only_first.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ReadOnlyFirst(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class ReadOnlyFirst(object): 'baz': 'baz' } - def __init__(self, bar=None, baz=None): # noqa: E501 + def __init__(self, bar=None, baz=None, local_vars_configuration=None): # noqa: E501 """ReadOnlyFirst - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._bar = None self._baz = None @@ -131,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, ReadOnlyFirst): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ReadOnlyFirst): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/special_model_name.py b/samples/client/petstore/python-asyncio/petstore_api/models/special_model_name.py index 2fd6378fcdc5..396e75bcee5c 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/special_model_name.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/special_model_name.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class SpecialModelName(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class SpecialModelName(object): 'special_property_name': '$special[property.name]' } - def __init__(self, special_property_name=None): # noqa: E501 + def __init__(self, special_property_name=None, local_vars_configuration=None): # noqa: E501 """SpecialModelName - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._special_property_name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, SpecialModelName): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, SpecialModelName): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/tag.py b/samples/client/petstore/python-asyncio/petstore_api/models/tag.py index cb9c22d9f53a..d6137fdd47f0 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/tag.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/tag.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Tag(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Tag(object): 'name': 'name' } - def __init__(self, id=None, name=None): # noqa: E501 + def __init__(self, id=None, name=None, local_vars_configuration=None): # noqa: E501 """Tag - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._name = None @@ -131,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, Tag): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Tag): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_default.py b/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_default.py index d7c207cb5f63..8163ea77aa73 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_default.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_default.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class TypeHolderDefault(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -46,8 +48,11 @@ class TypeHolderDefault(object): 'array_item': 'array_item' } - def __init__(self, string_item='what', number_item=None, integer_item=None, bool_item=True, array_item=None): # noqa: E501 + def __init__(self, string_item='what', number_item=None, integer_item=None, bool_item=True, array_item=None, local_vars_configuration=None): # noqa: E501 """TypeHolderDefault - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._string_item = None self._number_item = None @@ -80,7 +85,7 @@ def string_item(self, string_item): :param string_item: The string_item of this TypeHolderDefault. # noqa: E501 :type: str """ - if string_item is None: + if self.local_vars_configuration.client_side_validation and string_item is None: # noqa: E501 raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501 self._string_item = string_item @@ -103,7 +108,7 @@ def number_item(self, number_item): :param number_item: The number_item of this TypeHolderDefault. # noqa: E501 :type: float """ - if number_item is None: + if self.local_vars_configuration.client_side_validation and number_item is None: # noqa: E501 raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501 self._number_item = number_item @@ -126,7 +131,7 @@ def integer_item(self, integer_item): :param integer_item: The integer_item of this TypeHolderDefault. # noqa: E501 :type: int """ - if integer_item is None: + if self.local_vars_configuration.client_side_validation and integer_item is None: # noqa: E501 raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501 self._integer_item = integer_item @@ -149,7 +154,7 @@ def bool_item(self, bool_item): :param bool_item: The bool_item of this TypeHolderDefault. # noqa: E501 :type: bool """ - if bool_item is None: + if self.local_vars_configuration.client_side_validation and bool_item is None: # noqa: E501 raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501 self._bool_item = bool_item @@ -172,7 +177,7 @@ def array_item(self, array_item): :param array_item: The array_item of this TypeHolderDefault. # noqa: E501 :type: list[int] """ - if array_item is None: + if self.local_vars_configuration.client_side_validation and array_item is None: # noqa: E501 raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501 self._array_item = array_item @@ -214,8 +219,11 @@ def __eq__(self, other): if not isinstance(other, TypeHolderDefault): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, TypeHolderDefault): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_example.py b/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_example.py index 745fe95da2c0..34481fd21e31 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_example.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/type_holder_example.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class TypeHolderExample(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class TypeHolderExample(object): 'array_item': 'array_item' } - def __init__(self, string_item=None, number_item=None, float_item=None, integer_item=None, bool_item=None, array_item=None): # noqa: E501 + def __init__(self, string_item=None, number_item=None, float_item=None, integer_item=None, bool_item=None, array_item=None, local_vars_configuration=None): # noqa: E501 """TypeHolderExample - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._string_item = None self._number_item = None @@ -84,7 +89,7 @@ def string_item(self, string_item): :param string_item: The string_item of this TypeHolderExample. # noqa: E501 :type: str """ - if string_item is None: + if self.local_vars_configuration.client_side_validation and string_item is None: # noqa: E501 raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501 self._string_item = string_item @@ -107,7 +112,7 @@ def number_item(self, number_item): :param number_item: The number_item of this TypeHolderExample. # noqa: E501 :type: float """ - if number_item is None: + if self.local_vars_configuration.client_side_validation and number_item is None: # noqa: E501 raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501 self._number_item = number_item @@ -130,7 +135,7 @@ def float_item(self, float_item): :param float_item: The float_item of this TypeHolderExample. # noqa: E501 :type: float """ - if float_item is None: + if self.local_vars_configuration.client_side_validation and float_item is None: # noqa: E501 raise ValueError("Invalid value for `float_item`, must not be `None`") # noqa: E501 self._float_item = float_item @@ -153,7 +158,7 @@ def integer_item(self, integer_item): :param integer_item: The integer_item of this TypeHolderExample. # noqa: E501 :type: int """ - if integer_item is None: + if self.local_vars_configuration.client_side_validation and integer_item is None: # noqa: E501 raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501 self._integer_item = integer_item @@ -176,7 +181,7 @@ def bool_item(self, bool_item): :param bool_item: The bool_item of this TypeHolderExample. # noqa: E501 :type: bool """ - if bool_item is None: + if self.local_vars_configuration.client_side_validation and bool_item is None: # noqa: E501 raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501 self._bool_item = bool_item @@ -199,7 +204,7 @@ def array_item(self, array_item): :param array_item: The array_item of this TypeHolderExample. # noqa: E501 :type: list[int] """ - if array_item is None: + if self.local_vars_configuration.client_side_validation and array_item is None: # noqa: E501 raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501 self._array_item = array_item @@ -241,8 +246,11 @@ def __eq__(self, other): if not isinstance(other, TypeHolderExample): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, TypeHolderExample): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/user.py b/samples/client/petstore/python-asyncio/petstore_api/models/user.py index f46f5165dfd6..de88bda4cde7 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/user.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/user.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class User(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -52,8 +54,11 @@ class User(object): 'user_status': 'userStatus' } - def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None): # noqa: E501 + def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None, local_vars_configuration=None): # noqa: E501 """User - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._username = None @@ -289,8 +294,11 @@ def __eq__(self, other): if not isinstance(other, User): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, User): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/xml_item.py b/samples/client/petstore/python-asyncio/petstore_api/models/xml_item.py index eaceeb5ef45d..52ecc9aa5225 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/xml_item.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/xml_item.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class XmlItem(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -94,8 +96,11 @@ class XmlItem(object): 'prefix_ns_wrapped_array': 'prefix_ns_wrapped_array' } - def __init__(self, attribute_string=None, attribute_number=None, attribute_integer=None, attribute_boolean=None, wrapped_array=None, name_string=None, name_number=None, name_integer=None, name_boolean=None, name_array=None, name_wrapped_array=None, prefix_string=None, prefix_number=None, prefix_integer=None, prefix_boolean=None, prefix_array=None, prefix_wrapped_array=None, namespace_string=None, namespace_number=None, namespace_integer=None, namespace_boolean=None, namespace_array=None, namespace_wrapped_array=None, prefix_ns_string=None, prefix_ns_number=None, prefix_ns_integer=None, prefix_ns_boolean=None, prefix_ns_array=None, prefix_ns_wrapped_array=None): # noqa: E501 + def __init__(self, attribute_string=None, attribute_number=None, attribute_integer=None, attribute_boolean=None, wrapped_array=None, name_string=None, name_number=None, name_integer=None, name_boolean=None, name_array=None, name_wrapped_array=None, prefix_string=None, prefix_number=None, prefix_integer=None, prefix_boolean=None, prefix_array=None, prefix_wrapped_array=None, namespace_string=None, namespace_number=None, namespace_integer=None, namespace_boolean=None, namespace_array=None, namespace_wrapped_array=None, prefix_ns_string=None, prefix_ns_number=None, prefix_ns_integer=None, prefix_ns_boolean=None, prefix_ns_array=None, prefix_ns_wrapped_array=None, local_vars_configuration=None): # noqa: E501 """XmlItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._attribute_string = None self._attribute_number = None @@ -833,8 +838,11 @@ def __eq__(self, other): if not isinstance(other, XmlItem): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, XmlItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py index a47a8e3ea184..268310a3e2fb 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py @@ -103,8 +103,8 @@ def call_123_test_special_tags_with_http_info(self, body, **kwargs): # noqa: E5 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `call_123_test_special_tags`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py b/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py index 00333bfd2c47..6907451d9200 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py @@ -103,8 +103,8 @@ def create_xml_item_with_http_info(self, xml_item, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'xml_item' is set - if ('xml_item' not in local_var_params or - local_var_params['xml_item'] is None): + if self.api_client.client_side_validation and ('xml_item' not in local_var_params or # noqa: E501 + local_var_params['xml_item'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `xml_item` when calling `create_xml_item`") # noqa: E501 collection_formats = {} @@ -627,8 +627,8 @@ def test_body_with_file_schema_with_http_info(self, body, **kwargs): # noqa: E5 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_body_with_file_schema`") # noqa: E501 collection_formats = {} @@ -735,12 +735,12 @@ def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'query' is set - if ('query' not in local_var_params or - local_var_params['query'] is None): + if self.api_client.client_side_validation and ('query' not in local_var_params or # noqa: E501 + local_var_params['query'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `query` when calling `test_body_with_query_params`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_body_with_query_params`") # noqa: E501 collection_formats = {} @@ -748,7 +748,7 @@ def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # path_params = {} query_params = [] - if 'query' in local_var_params: + if 'query' in local_var_params and local_var_params['query'] is not None: # noqa: E501 query_params.append(('query', local_var_params['query'])) # noqa: E501 header_params = {} @@ -849,8 +849,8 @@ def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_client_model`") # noqa: E501 collection_formats = {} @@ -987,49 +987,49 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'number' is set - if ('number' not in local_var_params or - local_var_params['number'] is None): + if self.api_client.client_side_validation and ('number' not in local_var_params or # noqa: E501 + local_var_params['number'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `number` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'double' is set - if ('double' not in local_var_params or - local_var_params['double'] is None): + if self.api_client.client_side_validation and ('double' not in local_var_params or # noqa: E501 + local_var_params['double'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `double` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'pattern_without_delimiter' is set - if ('pattern_without_delimiter' not in local_var_params or - local_var_params['pattern_without_delimiter'] is None): + if self.api_client.client_side_validation and ('pattern_without_delimiter' not in local_var_params or # noqa: E501 + local_var_params['pattern_without_delimiter'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`") # noqa: E501 # verify the required parameter 'byte' is set - if ('byte' not in local_var_params or - local_var_params['byte'] is None): + if self.api_client.client_side_validation and ('byte' not in local_var_params or # noqa: E501 + local_var_params['byte'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `byte` when calling `test_endpoint_parameters`") # noqa: E501 - if 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 + if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] > 543.2: # noqa: E501 raise ApiValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value less than or equal to `543.2`") # noqa: E501 - if 'number' in local_var_params and local_var_params['number'] < 32.1: # noqa: E501 + if self.api_client.client_side_validation and 'number' in local_var_params and local_var_params['number'] < 32.1: # noqa: E501 raise ApiValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value greater than or equal to `32.1`") # noqa: E501 - if 'double' in local_var_params and local_var_params['double'] > 123.4: # noqa: E501 + if self.api_client.client_side_validation and 'double' in local_var_params and local_var_params['double'] > 123.4: # noqa: E501 raise ApiValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value less than or equal to `123.4`") # noqa: E501 - if 'double' in local_var_params and local_var_params['double'] < 67.8: # noqa: E501 + if self.api_client.client_side_validation and 'double' in local_var_params and local_var_params['double'] < 67.8: # noqa: E501 raise ApiValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value greater than or equal to `67.8`") # noqa: E501 - if 'pattern_without_delimiter' in local_var_params and not re.search(r'^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 + if self.api_client.client_side_validation and 'pattern_without_delimiter' in local_var_params and not re.search(r'^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 raise ApiValueError("Invalid value for parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`, must conform to the pattern `/^[A-Z].*/`") # noqa: E501 - if 'integer' in local_var_params and local_var_params['integer'] > 100: # noqa: E501 + if self.api_client.client_side_validation and 'integer' in local_var_params and local_var_params['integer'] > 100: # noqa: E501 raise ApiValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value less than or equal to `100`") # noqa: E501 - if 'integer' in local_var_params and local_var_params['integer'] < 10: # noqa: E501 + if self.api_client.client_side_validation and 'integer' in local_var_params and local_var_params['integer'] < 10: # noqa: E501 raise ApiValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value greater than or equal to `10`") # noqa: E501 - if 'int32' in local_var_params and local_var_params['int32'] > 200: # noqa: E501 + if self.api_client.client_side_validation and 'int32' in local_var_params and local_var_params['int32'] > 200: # noqa: E501 raise ApiValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value less than or equal to `200`") # noqa: E501 - if 'int32' in local_var_params and local_var_params['int32'] < 20: # noqa: E501 + if self.api_client.client_side_validation and 'int32' in local_var_params and local_var_params['int32'] < 20: # noqa: E501 raise ApiValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value greater than or equal to `20`") # noqa: E501 - if 'float' in local_var_params and local_var_params['float'] > 987.6: # noqa: E501 + if self.api_client.client_side_validation and 'float' in local_var_params and local_var_params['float'] > 987.6: # noqa: E501 raise ApiValueError("Invalid value for parameter `float` when calling `test_endpoint_parameters`, must be a value less than or equal to `987.6`") # noqa: E501 - if 'string' in local_var_params and not re.search(r'[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 + if self.api_client.client_side_validation and 'string' in local_var_params and not re.search(r'[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 raise ApiValueError("Invalid value for parameter `string` when calling `test_endpoint_parameters`, must conform to the pattern `/[a-z]/i`") # noqa: E501 - if ('password' in local_var_params and - len(local_var_params['password']) > 64): + if self.api_client.client_side_validation and ('password' in local_var_params and # noqa: E501 + len(local_var_params['password']) > 64): # noqa: E501 raise ApiValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be less than or equal to `64`") # noqa: E501 - if ('password' in local_var_params and - len(local_var_params['password']) < 10): + if self.api_client.client_side_validation and ('password' in local_var_params and # noqa: E501 + len(local_var_params['password']) < 10): # noqa: E501 raise ApiValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be greater than or equal to `10`") # noqa: E501 collection_formats = {} @@ -1180,14 +1180,14 @@ def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'enum_query_string_array' in local_var_params: + if 'enum_query_string_array' in local_var_params and local_var_params['enum_query_string_array'] is not None: # noqa: E501 query_params.append(('enum_query_string_array', local_var_params['enum_query_string_array'])) # noqa: E501 collection_formats['enum_query_string_array'] = 'csv' # noqa: E501 - if 'enum_query_string' in local_var_params: + if 'enum_query_string' in local_var_params and local_var_params['enum_query_string'] is not None: # noqa: E501 query_params.append(('enum_query_string', local_var_params['enum_query_string'])) # noqa: E501 - if 'enum_query_integer' in local_var_params: + if 'enum_query_integer' in local_var_params and local_var_params['enum_query_integer'] is not None: # noqa: E501 query_params.append(('enum_query_integer', local_var_params['enum_query_integer'])) # noqa: E501 - if 'enum_query_double' in local_var_params: + if 'enum_query_double' in local_var_params and local_var_params['enum_query_double'] is not None: # noqa: E501 query_params.append(('enum_query_double', local_var_params['enum_query_double'])) # noqa: E501 header_params = {} @@ -1306,16 +1306,16 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'required_string_group' is set - if ('required_string_group' not in local_var_params or - local_var_params['required_string_group'] is None): + if self.api_client.client_side_validation and ('required_string_group' not in local_var_params or # noqa: E501 + local_var_params['required_string_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_string_group` when calling `test_group_parameters`") # noqa: E501 # verify the required parameter 'required_boolean_group' is set - if ('required_boolean_group' not in local_var_params or - local_var_params['required_boolean_group'] is None): + if self.api_client.client_side_validation and ('required_boolean_group' not in local_var_params or # noqa: E501 + local_var_params['required_boolean_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_boolean_group` when calling `test_group_parameters`") # noqa: E501 # verify the required parameter 'required_int64_group' is set - if ('required_int64_group' not in local_var_params or - local_var_params['required_int64_group'] is None): + if self.api_client.client_side_validation and ('required_int64_group' not in local_var_params or # noqa: E501 + local_var_params['required_int64_group'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_int64_group` when calling `test_group_parameters`") # noqa: E501 collection_formats = {} @@ -1323,13 +1323,13 @@ def test_group_parameters_with_http_info(self, required_string_group, required_b path_params = {} query_params = [] - if 'required_string_group' in local_var_params: + if 'required_string_group' in local_var_params and local_var_params['required_string_group'] is not None: # noqa: E501 query_params.append(('required_string_group', local_var_params['required_string_group'])) # noqa: E501 - if 'required_int64_group' in local_var_params: + if 'required_int64_group' in local_var_params and local_var_params['required_int64_group'] is not None: # noqa: E501 query_params.append(('required_int64_group', local_var_params['required_int64_group'])) # noqa: E501 - if 'string_group' in local_var_params: + if 'string_group' in local_var_params and local_var_params['string_group'] is not None: # noqa: E501 query_params.append(('string_group', local_var_params['string_group'])) # noqa: E501 - if 'int64_group' in local_var_params: + if 'int64_group' in local_var_params and local_var_params['int64_group'] is not None: # noqa: E501 query_params.append(('int64_group', local_var_params['int64_group'])) # noqa: E501 header_params = {} @@ -1426,8 +1426,8 @@ def test_inline_additional_properties_with_http_info(self, param, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'param' is set - if ('param' not in local_var_params or - local_var_params['param'] is None): + if self.api_client.client_side_validation and ('param' not in local_var_params or # noqa: E501 + local_var_params['param'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `param` when calling `test_inline_additional_properties`") # noqa: E501 collection_formats = {} @@ -1534,12 +1534,12 @@ def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'param' is set - if ('param' not in local_var_params or - local_var_params['param'] is None): + if self.api_client.client_side_validation and ('param' not in local_var_params or # noqa: E501 + local_var_params['param'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `param` when calling `test_json_form_data`") # noqa: E501 # verify the required parameter 'param2' is set - if ('param2' not in local_var_params or - local_var_params['param2'] is None): + if self.api_client.client_side_validation and ('param2' not in local_var_params or # noqa: E501 + local_var_params['param2'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `param2` when calling `test_json_form_data`") # noqa: E501 collection_formats = {} @@ -1656,24 +1656,24 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pipe' is set - if ('pipe' not in local_var_params or - local_var_params['pipe'] is None): + if self.api_client.client_side_validation and ('pipe' not in local_var_params or # noqa: E501 + local_var_params['pipe'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pipe` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'ioutil' is set - if ('ioutil' not in local_var_params or - local_var_params['ioutil'] is None): + if self.api_client.client_side_validation and ('ioutil' not in local_var_params or # noqa: E501 + local_var_params['ioutil'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `ioutil` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'http' is set - if ('http' not in local_var_params or - local_var_params['http'] is None): + if self.api_client.client_side_validation and ('http' not in local_var_params or # noqa: E501 + local_var_params['http'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `http` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'url' is set - if ('url' not in local_var_params or - local_var_params['url'] is None): + if self.api_client.client_side_validation and ('url' not in local_var_params or # noqa: E501 + local_var_params['url'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `url` when calling `test_query_parameter_collection_format`") # noqa: E501 # verify the required parameter 'context' is set - if ('context' not in local_var_params or - local_var_params['context'] is None): + if self.api_client.client_side_validation and ('context' not in local_var_params or # noqa: E501 + local_var_params['context'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `context` when calling `test_query_parameter_collection_format`") # noqa: E501 collection_formats = {} @@ -1681,19 +1681,19 @@ def test_query_parameter_collection_format_with_http_info(self, pipe, ioutil, ht path_params = {} query_params = [] - if 'pipe' in local_var_params: + if 'pipe' in local_var_params and local_var_params['pipe'] is not None: # noqa: E501 query_params.append(('pipe', local_var_params['pipe'])) # noqa: E501 collection_formats['pipe'] = 'csv' # noqa: E501 - if 'ioutil' in local_var_params: + if 'ioutil' in local_var_params and local_var_params['ioutil'] is not None: # noqa: E501 query_params.append(('ioutil', local_var_params['ioutil'])) # noqa: E501 collection_formats['ioutil'] = 'csv' # noqa: E501 - if 'http' in local_var_params: + if 'http' in local_var_params and local_var_params['http'] is not None: # noqa: E501 query_params.append(('http', local_var_params['http'])) # noqa: E501 collection_formats['http'] = 'space' # noqa: E501 - if 'url' in local_var_params: + if 'url' in local_var_params and local_var_params['url'] is not None: # noqa: E501 query_params.append(('url', local_var_params['url'])) # noqa: E501 collection_formats['url'] = 'csv' # noqa: E501 - if 'context' in local_var_params: + if 'context' in local_var_params and local_var_params['context'] is not None: # noqa: E501 query_params.append(('context', local_var_params['context'])) # noqa: E501 collection_formats['context'] = 'multi' # noqa: E501 diff --git a/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py index 3e778e922686..90579feaae38 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py @@ -103,8 +103,8 @@ def test_classname_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `test_classname`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py b/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py index 1deb664c43e5..54abb9b95e77 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py @@ -101,8 +101,8 @@ def add_pet_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `add_pet`") # noqa: E501 collection_formats = {} @@ -209,8 +209,8 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `delete_pet`") # noqa: E501 collection_formats = {} @@ -315,8 +315,8 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'status' is set - if ('status' not in local_var_params or - local_var_params['status'] is None): + if self.api_client.client_side_validation and ('status' not in local_var_params or # noqa: E501 + local_var_params['status'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `status` when calling `find_pets_by_status`") # noqa: E501 collection_formats = {} @@ -324,7 +324,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'status' in local_var_params: + if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 query_params.append(('status', local_var_params['status'])) # noqa: E501 collection_formats['status'] = 'csv' # noqa: E501 @@ -424,8 +424,8 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'tags' is set - if ('tags' not in local_var_params or - local_var_params['tags'] is None): + if self.api_client.client_side_validation and ('tags' not in local_var_params or # noqa: E501 + local_var_params['tags'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `tags` when calling `find_pets_by_tags`") # noqa: E501 collection_formats = {} @@ -433,7 +433,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'tags' in local_var_params: + if 'tags' in local_var_params and local_var_params['tags'] is not None: # noqa: E501 query_params.append(('tags', local_var_params['tags'])) # noqa: E501 collection_formats['tags'] = 'csv' # noqa: E501 @@ -533,8 +533,8 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id`") # noqa: E501 collection_formats = {} @@ -639,8 +639,8 @@ def update_pet_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `update_pet`") # noqa: E501 collection_formats = {} @@ -749,8 +749,8 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `update_pet_with_form`") # noqa: E501 collection_formats = {} @@ -863,8 +863,8 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file`") # noqa: E501 collection_formats = {} @@ -981,12 +981,12 @@ def upload_file_with_required_file_with_http_info(self, pet_id, required_file, * local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pet_id' is set - if ('pet_id' not in local_var_params or - local_var_params['pet_id'] is None): + if self.api_client.client_side_validation and ('pet_id' not in local_var_params or # noqa: E501 + local_var_params['pet_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `pet_id` when calling `upload_file_with_required_file`") # noqa: E501 # verify the required parameter 'required_file' is set - if ('required_file' not in local_var_params or - local_var_params['required_file'] is None): + if self.api_client.client_side_validation and ('required_file' not in local_var_params or # noqa: E501 + local_var_params['required_file'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `required_file` when calling `upload_file_with_required_file`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python-tornado/petstore_api/api/store_api.py b/samples/client/petstore/python-tornado/petstore_api/api/store_api.py index c3aa1c4a3d59..b907b107b2b6 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/store_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/store_api.py @@ -103,8 +103,8 @@ def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - if ('order_id' not in local_var_params or - local_var_params['order_id'] is None): + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `delete_order`") # noqa: E501 collection_formats = {} @@ -307,13 +307,13 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'order_id' is set - if ('order_id' not in local_var_params or - local_var_params['order_id'] is None): + if self.api_client.client_side_validation and ('order_id' not in local_var_params or # noqa: E501 + local_var_params['order_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `order_id` when calling `get_order_by_id`") # noqa: E501 - if 'order_id' in local_var_params and local_var_params['order_id'] > 5: # noqa: E501 + if self.api_client.client_side_validation and 'order_id' in local_var_params and local_var_params['order_id'] > 5: # noqa: E501 raise ApiValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value less than or equal to `5`") # noqa: E501 - if 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501 + if self.api_client.client_side_validation and 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} @@ -417,8 +417,8 @@ def place_order_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `place_order`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python-tornado/petstore_api/api/user_api.py b/samples/client/petstore/python-tornado/petstore_api/api/user_api.py index d3674f5ba5c6..268721dcb890 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/user_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/user_api.py @@ -103,8 +103,8 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_user`") # noqa: E501 collection_formats = {} @@ -205,8 +205,8 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_users_with_array_input`") # noqa: E501 collection_formats = {} @@ -307,8 +307,8 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_users_with_list_input`") # noqa: E501 collection_formats = {} @@ -411,8 +411,8 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `delete_user`") # noqa: E501 collection_formats = {} @@ -513,8 +513,8 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `get_user_by_name`") # noqa: E501 collection_formats = {} @@ -621,12 +621,12 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `login_user`") # noqa: E501 # verify the required parameter 'password' is set - if ('password' not in local_var_params or - local_var_params['password'] is None): + if self.api_client.client_side_validation and ('password' not in local_var_params or # noqa: E501 + local_var_params['password'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `password` when calling `login_user`") # noqa: E501 collection_formats = {} @@ -634,9 +634,9 @@ def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'username' in local_var_params: + if 'username' in local_var_params and local_var_params['username'] is not None: # noqa: E501 query_params.append(('username', local_var_params['username'])) # noqa: E501 - if 'password' in local_var_params: + if 'password' in local_var_params and local_var_params['password'] is not None: # noqa: E501 query_params.append(('password', local_var_params['password'])) # noqa: E501 header_params = {} @@ -831,12 +831,12 @@ def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'username' is set - if ('username' not in local_var_params or - local_var_params['username'] is None): + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `update_user`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `update_user`") # noqa: E501 collection_formats = {} diff --git a/samples/client/petstore/python-tornado/petstore_api/api_client.py b/samples/client/petstore/python-tornado/petstore_api/api_client.py index 59c17a32f28b..6824bec06ef5 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api_client.py +++ b/samples/client/petstore/python-tornado/petstore_api/api_client.py @@ -78,6 +78,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.cookie = cookie # Set default User-Agent. self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation def __del__(self): if self._pool: @@ -374,10 +375,8 @@ def request(self, method, url, query_params=None, headers=None, return self.rest_client.OPTIONS(url, query_params=query_params, headers=headers, - post_params=post_params, _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + _request_timeout=_request_timeout) elif method == "POST": return self.rest_client.POST(url, query_params=query_params, diff --git a/samples/client/petstore/python-tornado/petstore_api/configuration.py b/samples/client/petstore/python-tornado/petstore_api/configuration.py index 459ff6a3ca25..5e9d7b5d41d3 100644 --- a/samples/client/petstore/python-tornado/petstore_api/configuration.py +++ b/samples/client/petstore/python-tornado/petstore_api/configuration.py @@ -138,6 +138,8 @@ def __init__(self, host="http://petstore.swagger.io:80/v2", self.retries = None """Adding retries to override urllib3 default value 3 """ + # Disable client side validation + self.client_side_validation = True @property def logger_file(self): diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_any_type.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_any_type.py index ed4f40068bf8..2954285de87c 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_any_type.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_any_type.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesAnyType(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesAnyType(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesAnyType - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesAnyType): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesAnyType): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_array.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_array.py index 22b4133f3675..c6369c22a12f 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_array.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_array.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesArray(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesArray(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesArray - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesArray): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesArray): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_boolean.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_boolean.py index 24e2fc178abc..599b7c8b8843 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_boolean.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_boolean.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesBoolean(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesBoolean(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesBoolean - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesBoolean): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesBoolean): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_class.py index e9e9307d1b72..be4455c683bf 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_class.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_class.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -58,8 +60,11 @@ class AdditionalPropertiesClass(object): 'anytype_3': 'anytype_3' } - def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, anytype_1=None, anytype_2=None, anytype_3=None): # noqa: E501 + def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, anytype_1=None, anytype_2=None, anytype_3=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._map_string = None self._map_number = None @@ -365,8 +370,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_integer.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_integer.py index 43bcf425a7b3..ddbb85fdf33b 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_integer.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_integer.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesInteger(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesInteger(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesInteger - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesInteger): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesInteger): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_number.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_number.py index b3e034035a8e..8bbeda83ecca 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_number.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_number.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesNumber(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesNumber(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesNumber - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesNumber): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesNumber): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_object.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_object.py index 9ab56a4e5537..af87595b3e41 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_object.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_object.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesObject(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesObject(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesObject - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesObject): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesObject): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_string.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_string.py index 4667186bdc4f..6ab2c91feda9 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_string.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_string.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class AdditionalPropertiesString(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class AdditionalPropertiesString(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesString - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, AdditionalPropertiesString): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AdditionalPropertiesString): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/animal.py b/samples/client/petstore/python-tornado/petstore_api/models/animal.py index 552ef0e8326b..65cef1a60885 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/animal.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/animal.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Animal(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -45,8 +47,11 @@ class Animal(object): 'Cat': 'Cat' } - def __init__(self, class_name=None, color='red'): # noqa: E501 + def __init__(self, class_name=None, color='red', local_vars_configuration=None): # noqa: E501 """Animal - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._class_name = None self._color = None @@ -74,7 +79,7 @@ def class_name(self, class_name): :param class_name: The class_name of this Animal. # noqa: E501 :type: str """ - if class_name is None: + if self.local_vars_configuration.client_side_validation and class_name is None: # noqa: E501 raise ValueError("Invalid value for `class_name`, must not be `None`") # noqa: E501 self._class_name = class_name @@ -143,8 +148,11 @@ def __eq__(self, other): if not isinstance(other, Animal): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Animal): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/api_response.py b/samples/client/petstore/python-tornado/petstore_api/models/api_response.py index 190c3df34526..24e80d02aea4 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/api_response.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/api_response.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ApiResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class ApiResponse(object): 'message': 'message' } - def __init__(self, code=None, type=None, message=None): # noqa: E501 + def __init__(self, code=None, type=None, message=None, local_vars_configuration=None): # noqa: E501 """ApiResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._code = None self._type = None @@ -157,8 +162,11 @@ def __eq__(self, other): if not isinstance(other, ApiResponse): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ApiResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/array_of_array_of_number_only.py b/samples/client/petstore/python-tornado/petstore_api/models/array_of_array_of_number_only.py index ebf964298018..1f654452077f 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/array_of_array_of_number_only.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ArrayOfArrayOfNumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ArrayOfArrayOfNumberOnly(object): 'array_array_number': 'ArrayArrayNumber' } - def __init__(self, array_array_number=None): # noqa: E501 + def __init__(self, array_array_number=None, local_vars_configuration=None): # noqa: E501 """ArrayOfArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_array_number = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, ArrayOfArrayOfNumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayOfArrayOfNumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/array_of_number_only.py b/samples/client/petstore/python-tornado/petstore_api/models/array_of_number_only.py index 8e1837c46bda..27ba1f58e31e 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/array_of_number_only.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/array_of_number_only.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ArrayOfNumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ArrayOfNumberOnly(object): 'array_number': 'ArrayNumber' } - def __init__(self, array_number=None): # noqa: E501 + def __init__(self, array_number=None, local_vars_configuration=None): # noqa: E501 """ArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_number = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, ArrayOfNumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayOfNumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/array_test.py b/samples/client/petstore/python-tornado/petstore_api/models/array_test.py index f548fef3ee8c..f34a372f6f3b 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/array_test.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/array_test.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ArrayTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class ArrayTest(object): 'array_array_of_model': 'array_array_of_model' } - def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None): # noqa: E501 + def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None, local_vars_configuration=None): # noqa: E501 """ArrayTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._array_of_string = None self._array_array_of_integer = None @@ -157,8 +162,11 @@ def __eq__(self, other): if not isinstance(other, ArrayTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ArrayTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/capitalization.py b/samples/client/petstore/python-tornado/petstore_api/models/capitalization.py index 0da6b77e84dc..cef34c5f6dc3 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/capitalization.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/capitalization.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Capitalization(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Capitalization(object): 'att_name': 'ATT_NAME' } - def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None): # noqa: E501 + def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None, local_vars_configuration=None): # noqa: E501 """Capitalization - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._small_camel = None self._capital_camel = None @@ -237,8 +242,11 @@ def __eq__(self, other): if not isinstance(other, Capitalization): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Capitalization): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/cat.py b/samples/client/petstore/python-tornado/petstore_api/models/cat.py index 216e5123538c..e39c1c82508c 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/cat.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/cat.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Cat(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Cat(object): 'declawed': 'declawed' } - def __init__(self, declawed=None): # noqa: E501 + def __init__(self, declawed=None, local_vars_configuration=None): # noqa: E501 """Cat - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._declawed = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, Cat): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Cat): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/cat_all_of.py b/samples/client/petstore/python-tornado/petstore_api/models/cat_all_of.py index 3c90df84ec3a..7e90fab93489 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/cat_all_of.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/cat_all_of.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class CatAllOf(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class CatAllOf(object): 'declawed': 'declawed' } - def __init__(self, declawed=None): # noqa: E501 + def __init__(self, declawed=None, local_vars_configuration=None): # noqa: E501 """CatAllOf - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._declawed = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, CatAllOf): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, CatAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/category.py b/samples/client/petstore/python-tornado/petstore_api/models/category.py index 0e23c409e50a..b47c148953ea 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/category.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/category.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Category(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Category(object): 'name': 'name' } - def __init__(self, id=None, name='default-name'): # noqa: E501 + def __init__(self, id=None, name='default-name', local_vars_configuration=None): # noqa: E501 """Category - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._name = None @@ -90,7 +95,7 @@ def name(self, name): :param name: The name of this Category. # noqa: E501 :type: str """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -132,8 +137,11 @@ def __eq__(self, other): if not isinstance(other, Category): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Category): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/class_model.py b/samples/client/petstore/python-tornado/petstore_api/models/class_model.py index 88562beff8b1..ef6060ffa70d 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/class_model.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/class_model.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ClassModel(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ClassModel(object): '_class': '_class' } - def __init__(self, _class=None): # noqa: E501 + def __init__(self, _class=None, local_vars_configuration=None): # noqa: E501 """ClassModel - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__class = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, ClassModel): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassModel): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/client.py b/samples/client/petstore/python-tornado/petstore_api/models/client.py index b7083fd9bd75..ee5dbf1c43a1 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/client.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/client.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Client(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Client(object): 'client': 'client' } - def __init__(self, client=None): # noqa: E501 + def __init__(self, client=None, local_vars_configuration=None): # noqa: E501 """Client - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._client = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, Client): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Client): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/dog.py b/samples/client/petstore/python-tornado/petstore_api/models/dog.py index c325cb252c32..eacb63eedb09 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/dog.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/dog.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Dog(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class Dog(object): 'breed': 'breed' } - def __init__(self, breed=None): # noqa: E501 + def __init__(self, breed=None, local_vars_configuration=None): # noqa: E501 """Dog - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._breed = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, Dog): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Dog): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/dog_all_of.py b/samples/client/petstore/python-tornado/petstore_api/models/dog_all_of.py index b6328b05589e..48e048557085 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/dog_all_of.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/dog_all_of.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class DogAllOf(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class DogAllOf(object): 'breed': 'breed' } - def __init__(self, breed=None): # noqa: E501 + def __init__(self, breed=None, local_vars_configuration=None): # noqa: E501 """DogAllOf - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._breed = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, DogAllOf): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, DogAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/enum_arrays.py b/samples/client/petstore/python-tornado/petstore_api/models/enum_arrays.py index 00aa21d04da8..481283a05c32 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/enum_arrays.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/enum_arrays.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class EnumArrays(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class EnumArrays(object): 'array_enum': 'array_enum' } - def __init__(self, just_symbol=None, array_enum=None): # noqa: E501 + def __init__(self, just_symbol=None, array_enum=None, local_vars_configuration=None): # noqa: E501 """EnumArrays - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._just_symbol = None self._array_enum = None @@ -71,7 +76,7 @@ def just_symbol(self, just_symbol): :type: str """ allowed_values = [">=", "$"] # noqa: E501 - if just_symbol not in allowed_values: + if self.local_vars_configuration.client_side_validation and just_symbol not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `just_symbol` ({0}), must be one of {1}" # noqa: E501 .format(just_symbol, allowed_values) @@ -98,7 +103,8 @@ def array_enum(self, array_enum): :type: list[str] """ allowed_values = ["fish", "crab"] # noqa: E501 - if not set(array_enum).issubset(set(allowed_values)): + if (self.local_vars_configuration.client_side_validation and + not set(array_enum).issubset(set(allowed_values))): raise ValueError( "Invalid values for `array_enum` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(array_enum) - set(allowed_values))), # noqa: E501 @@ -144,8 +150,11 @@ def __eq__(self, other): if not isinstance(other, EnumArrays): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumArrays): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/enum_class.py b/samples/client/petstore/python-tornado/petstore_api/models/enum_class.py index 3c1aa279755b..8bc627578608 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/enum_class.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/enum_class.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class EnumClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class EnumClass(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """EnumClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +89,11 @@ def __eq__(self, other): if not isinstance(other, EnumClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/enum_test.py b/samples/client/petstore/python-tornado/petstore_api/models/enum_test.py index 11e5020363ec..464281b3ec0e 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/enum_test.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/enum_test.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class EnumTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -46,8 +48,11 @@ class EnumTest(object): 'outer_enum': 'outerEnum' } - def __init__(self, enum_string=None, enum_string_required=None, enum_integer=None, enum_number=None, outer_enum=None): # noqa: E501 + def __init__(self, enum_string=None, enum_string_required=None, enum_integer=None, enum_number=None, outer_enum=None, local_vars_configuration=None): # noqa: E501 """EnumTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._enum_string = None self._enum_string_required = None @@ -85,7 +90,7 @@ def enum_string(self, enum_string): :type: str """ allowed_values = ["UPPER", "lower", ""] # noqa: E501 - if enum_string not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_string not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_string` ({0}), must be one of {1}" # noqa: E501 .format(enum_string, allowed_values) @@ -111,10 +116,10 @@ def enum_string_required(self, enum_string_required): :param enum_string_required: The enum_string_required of this EnumTest. # noqa: E501 :type: str """ - if enum_string_required is None: + if self.local_vars_configuration.client_side_validation and enum_string_required is None: # noqa: E501 raise ValueError("Invalid value for `enum_string_required`, must not be `None`") # noqa: E501 allowed_values = ["UPPER", "lower", ""] # noqa: E501 - if enum_string_required not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_string_required not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_string_required` ({0}), must be one of {1}" # noqa: E501 .format(enum_string_required, allowed_values) @@ -141,7 +146,7 @@ def enum_integer(self, enum_integer): :type: int """ allowed_values = [1, -1] # noqa: E501 - if enum_integer not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_integer not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_integer` ({0}), must be one of {1}" # noqa: E501 .format(enum_integer, allowed_values) @@ -168,7 +173,7 @@ def enum_number(self, enum_number): :type: float """ allowed_values = [1.1, -1.2] # noqa: E501 - if enum_number not in allowed_values: + if self.local_vars_configuration.client_side_validation and enum_number not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `enum_number` ({0}), must be one of {1}" # noqa: E501 .format(enum_number, allowed_values) @@ -234,8 +239,11 @@ def __eq__(self, other): if not isinstance(other, EnumTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnumTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/file.py b/samples/client/petstore/python-tornado/petstore_api/models/file.py index 475f86b799f7..282df2957e67 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/file.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/file.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class File(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class File(object): 'source_uri': 'sourceURI' } - def __init__(self, source_uri=None): # noqa: E501 + def __init__(self, source_uri=None, local_vars_configuration=None): # noqa: E501 """File - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._source_uri = None self.discriminator = None @@ -107,8 +112,11 @@ def __eq__(self, other): if not isinstance(other, File): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, File): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/file_schema_test_class.py b/samples/client/petstore/python-tornado/petstore_api/models/file_schema_test_class.py index 9f3b5bdc1793..de7f865b47e2 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/file_schema_test_class.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/file_schema_test_class.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class FileSchemaTestClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class FileSchemaTestClass(object): 'files': 'files' } - def __init__(self, file=None, files=None): # noqa: E501 + def __init__(self, file=None, files=None, local_vars_configuration=None): # noqa: E501 """FileSchemaTestClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._file = None self._files = None @@ -131,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, FileSchemaTestClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, FileSchemaTestClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/format_test.py b/samples/client/petstore/python-tornado/petstore_api/models/format_test.py index 1451cdcd6af0..6396c442f624 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/format_test.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/format_test.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class FormatTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -64,8 +66,11 @@ class FormatTest(object): 'big_decimal': 'BigDecimal' } - def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None, big_decimal=None): # noqa: E501 + def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None, big_decimal=None, local_vars_configuration=None): # noqa: E501 """FormatTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._integer = None self._int32 = None @@ -126,9 +131,11 @@ def integer(self, integer): :param integer: The integer of this FormatTest. # noqa: E501 :type: int """ - if integer is not None and integer > 100: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + integer is not None and integer > 100): # noqa: E501 raise ValueError("Invalid value for `integer`, must be a value less than or equal to `100`") # noqa: E501 - if integer is not None and integer < 10: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + integer is not None and integer < 10): # noqa: E501 raise ValueError("Invalid value for `integer`, must be a value greater than or equal to `10`") # noqa: E501 self._integer = integer @@ -151,9 +158,11 @@ def int32(self, int32): :param int32: The int32 of this FormatTest. # noqa: E501 :type: int """ - if int32 is not None and int32 > 200: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + int32 is not None and int32 > 200): # noqa: E501 raise ValueError("Invalid value for `int32`, must be a value less than or equal to `200`") # noqa: E501 - if int32 is not None and int32 < 20: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + int32 is not None and int32 < 20): # noqa: E501 raise ValueError("Invalid value for `int32`, must be a value greater than or equal to `20`") # noqa: E501 self._int32 = int32 @@ -197,11 +206,13 @@ def number(self, number): :param number: The number of this FormatTest. # noqa: E501 :type: float """ - if number is None: + if self.local_vars_configuration.client_side_validation and number is None: # noqa: E501 raise ValueError("Invalid value for `number`, must not be `None`") # noqa: E501 - if number is not None and number > 543.2: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + number is not None and number > 543.2): # noqa: E501 raise ValueError("Invalid value for `number`, must be a value less than or equal to `543.2`") # noqa: E501 - if number is not None and number < 32.1: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + number is not None and number < 32.1): # noqa: E501 raise ValueError("Invalid value for `number`, must be a value greater than or equal to `32.1`") # noqa: E501 self._number = number @@ -224,9 +235,11 @@ def float(self, float): :param float: The float of this FormatTest. # noqa: E501 :type: float """ - if float is not None and float > 987.6: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + float is not None and float > 987.6): # noqa: E501 raise ValueError("Invalid value for `float`, must be a value less than or equal to `987.6`") # noqa: E501 - if float is not None and float < 54.3: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + float is not None and float < 54.3): # noqa: E501 raise ValueError("Invalid value for `float`, must be a value greater than or equal to `54.3`") # noqa: E501 self._float = float @@ -249,9 +262,11 @@ def double(self, double): :param double: The double of this FormatTest. # noqa: E501 :type: float """ - if double is not None and double > 123.4: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + double is not None and double > 123.4): # noqa: E501 raise ValueError("Invalid value for `double`, must be a value less than or equal to `123.4`") # noqa: E501 - if double is not None and double < 67.8: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + double is not None and double < 67.8): # noqa: E501 raise ValueError("Invalid value for `double`, must be a value greater than or equal to `67.8`") # noqa: E501 self._double = double @@ -274,7 +289,8 @@ def string(self, string): :param string: The string of this FormatTest. # noqa: E501 :type: str """ - if string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE): # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE)): # noqa: E501 raise ValueError(r"Invalid value for `string`, must be a follow pattern or equal to `/[a-z]/i`") # noqa: E501 self._string = string @@ -297,9 +313,10 @@ def byte(self, byte): :param byte: The byte of this FormatTest. # noqa: E501 :type: str """ - if byte is None: + if self.local_vars_configuration.client_side_validation and byte is None: # noqa: E501 raise ValueError("Invalid value for `byte`, must not be `None`") # noqa: E501 - if byte is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', byte): # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + byte is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', byte)): # noqa: E501 raise ValueError(r"Invalid value for `byte`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`") # noqa: E501 self._byte = byte @@ -343,7 +360,7 @@ def date(self, date): :param date: The date of this FormatTest. # noqa: E501 :type: date """ - if date is None: + if self.local_vars_configuration.client_side_validation and date is None: # noqa: E501 raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501 self._date = date @@ -408,11 +425,13 @@ def password(self, password): :param password: The password of this FormatTest. # noqa: E501 :type: str """ - if password is None: + if self.local_vars_configuration.client_side_validation and password is None: # noqa: E501 raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 - if password is not None and len(password) > 64: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) > 64): raise ValueError("Invalid value for `password`, length must be less than or equal to `64`") # noqa: E501 - if password is not None and len(password) < 10: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) < 10): raise ValueError("Invalid value for `password`, length must be greater than or equal to `10`") # noqa: E501 self._password = password @@ -475,8 +494,11 @@ def __eq__(self, other): if not isinstance(other, FormatTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, FormatTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/has_only_read_only.py b/samples/client/petstore/python-tornado/petstore_api/models/has_only_read_only.py index 7c8d921a2d8d..5fc2f8a9ebdd 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/has_only_read_only.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/has_only_read_only.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class HasOnlyReadOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class HasOnlyReadOnly(object): 'foo': 'foo' } - def __init__(self, bar=None, foo=None): # noqa: E501 + def __init__(self, bar=None, foo=None, local_vars_configuration=None): # noqa: E501 """HasOnlyReadOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._bar = None self._foo = None @@ -131,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, HasOnlyReadOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, HasOnlyReadOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/list.py b/samples/client/petstore/python-tornado/petstore_api/models/list.py index 74fc3719aa03..d58d13e90fbc 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/list.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/list.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class List(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class List(object): '_123_list': '123-list' } - def __init__(self, _123_list=None): # noqa: E501 + def __init__(self, _123_list=None, local_vars_configuration=None): # noqa: E501 """List - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__123_list = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, List): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, List): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/map_test.py b/samples/client/petstore/python-tornado/petstore_api/models/map_test.py index cdfb9365297c..b170dce412c7 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/map_test.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/map_test.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class MapTest(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -44,8 +46,11 @@ class MapTest(object): 'indirect_map': 'indirect_map' } - def __init__(self, map_map_of_string=None, map_of_enum_string=None, direct_map=None, indirect_map=None): # noqa: E501 + def __init__(self, map_map_of_string=None, map_of_enum_string=None, direct_map=None, indirect_map=None, local_vars_configuration=None): # noqa: E501 """MapTest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._map_map_of_string = None self._map_of_enum_string = None @@ -102,7 +107,8 @@ def map_of_enum_string(self, map_of_enum_string): :type: dict(str, str) """ allowed_values = ["UPPER", "lower"] # noqa: E501 - if not set(map_of_enum_string.keys()).issubset(set(allowed_values)): + if (self.local_vars_configuration.client_side_validation and + not set(map_of_enum_string.keys()).issubset(set(allowed_values))): raise ValueError( "Invalid keys in `map_of_enum_string` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(map_of_enum_string.keys()) - set(allowed_values))), # noqa: E501 @@ -190,8 +196,11 @@ def __eq__(self, other): if not isinstance(other, MapTest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MapTest): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python-tornado/petstore_api/models/mixed_properties_and_additional_properties_class.py index 41a916eac10f..5da34f8830e8 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class MixedPropertiesAndAdditionalPropertiesClass(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class MixedPropertiesAndAdditionalPropertiesClass(object): 'map': 'map' } - def __init__(self, uuid=None, date_time=None, map=None): # noqa: E501 + def __init__(self, uuid=None, date_time=None, map=None, local_vars_configuration=None): # noqa: E501 """MixedPropertiesAndAdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._uuid = None self._date_time = None @@ -157,8 +162,11 @@ def __eq__(self, other): if not isinstance(other, MixedPropertiesAndAdditionalPropertiesClass): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MixedPropertiesAndAdditionalPropertiesClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/model200_response.py b/samples/client/petstore/python-tornado/petstore_api/models/model200_response.py index 563b82b59391..841ce1f18f3d 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/model200_response.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/model200_response.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Model200Response(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Model200Response(object): '_class': 'class' } - def __init__(self, name=None, _class=None): # noqa: E501 + def __init__(self, name=None, _class=None, local_vars_configuration=None): # noqa: E501 """Model200Response - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.__class = None @@ -131,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, Model200Response): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Model200Response): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/model_return.py b/samples/client/petstore/python-tornado/petstore_api/models/model_return.py index 098012015988..fdd8d72314ad 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/model_return.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/model_return.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ModelReturn(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class ModelReturn(object): '_return': 'return' } - def __init__(self, _return=None): # noqa: E501 + def __init__(self, _return=None, local_vars_configuration=None): # noqa: E501 """ModelReturn - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.__return = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, ModelReturn): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ModelReturn): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/name.py b/samples/client/petstore/python-tornado/petstore_api/models/name.py index 43014d0fb643..bb2c1fbd73cc 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/name.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/name.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Name(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -44,8 +46,11 @@ class Name(object): '_123_number': '123Number' } - def __init__(self, name=None, snake_case=None, _property=None, _123_number=None): # noqa: E501 + def __init__(self, name=None, snake_case=None, _property=None, _123_number=None, local_vars_configuration=None): # noqa: E501 """Name - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self._snake_case = None @@ -79,7 +84,7 @@ def name(self, name): :param name: The name of this Name. # noqa: E501 :type: int """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -184,8 +189,11 @@ def __eq__(self, other): if not isinstance(other, Name): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Name): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/number_only.py b/samples/client/petstore/python-tornado/petstore_api/models/number_only.py index b6f3d1c1b65c..99b2424852fb 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/number_only.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/number_only.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class NumberOnly(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class NumberOnly(object): 'just_number': 'JustNumber' } - def __init__(self, just_number=None): # noqa: E501 + def __init__(self, just_number=None, local_vars_configuration=None): # noqa: E501 """NumberOnly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._just_number = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, NumberOnly): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, NumberOnly): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/order.py b/samples/client/petstore/python-tornado/petstore_api/models/order.py index 8b64e3a35832..8c863cce8fe5 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/order.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/order.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Order(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Order(object): 'complete': 'complete' } - def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False): # noqa: E501 + def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False, local_vars_configuration=None): # noqa: E501 """Order - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._pet_id = None @@ -177,7 +182,7 @@ def status(self, status): :type: str """ allowed_values = ["placed", "approved", "delivered"] # noqa: E501 - if status not in allowed_values: + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 .format(status, allowed_values) @@ -243,8 +248,11 @@ def __eq__(self, other): if not isinstance(other, Order): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Order): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/outer_composite.py b/samples/client/petstore/python-tornado/petstore_api/models/outer_composite.py index dccd67055bed..c11859114a57 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/outer_composite.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/outer_composite.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class OuterComposite(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -42,8 +44,11 @@ class OuterComposite(object): 'my_boolean': 'my_boolean' } - def __init__(self, my_number=None, my_string=None, my_boolean=None): # noqa: E501 + def __init__(self, my_number=None, my_string=None, my_boolean=None, local_vars_configuration=None): # noqa: E501 """OuterComposite - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._my_number = None self._my_string = None @@ -157,8 +162,11 @@ def __eq__(self, other): if not isinstance(other, OuterComposite): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OuterComposite): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/outer_enum.py b/samples/client/petstore/python-tornado/petstore_api/models/outer_enum.py index a6697a0b1522..8fbfeb7aaea5 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/outer_enum.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/outer_enum.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class OuterEnum(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class OuterEnum(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """OuterEnum - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +89,11 @@ def __eq__(self, other): if not isinstance(other, OuterEnum): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OuterEnum): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/pet.py b/samples/client/petstore/python-tornado/petstore_api/models/pet.py index 870608e17ac3..edbf73f53127 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/pet.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/pet.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Pet(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class Pet(object): 'status': 'status' } - def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None): # noqa: E501 + def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None, local_vars_configuration=None): # noqa: E501 """Pet - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._category = None @@ -130,7 +135,7 @@ def name(self, name): :param name: The name of this Pet. # noqa: E501 :type: str """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -153,7 +158,7 @@ def photo_urls(self, photo_urls): :param photo_urls: The photo_urls of this Pet. # noqa: E501 :type: list[str] """ - if photo_urls is None: + if self.local_vars_configuration.client_side_validation and photo_urls is None: # noqa: E501 raise ValueError("Invalid value for `photo_urls`, must not be `None`") # noqa: E501 self._photo_urls = photo_urls @@ -200,7 +205,7 @@ def status(self, status): :type: str """ allowed_values = ["available", "pending", "sold"] # noqa: E501 - if status not in allowed_values: + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 .format(status, allowed_values) @@ -245,8 +250,11 @@ def __eq__(self, other): if not isinstance(other, Pet): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Pet): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/read_only_first.py b/samples/client/petstore/python-tornado/petstore_api/models/read_only_first.py index 3dfb7c7f6267..a84679e98dee 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/read_only_first.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/read_only_first.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class ReadOnlyFirst(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class ReadOnlyFirst(object): 'baz': 'baz' } - def __init__(self, bar=None, baz=None): # noqa: E501 + def __init__(self, bar=None, baz=None, local_vars_configuration=None): # noqa: E501 """ReadOnlyFirst - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._bar = None self._baz = None @@ -131,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, ReadOnlyFirst): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ReadOnlyFirst): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/special_model_name.py b/samples/client/petstore/python-tornado/petstore_api/models/special_model_name.py index 2fd6378fcdc5..396e75bcee5c 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/special_model_name.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/special_model_name.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class SpecialModelName(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -38,8 +40,11 @@ class SpecialModelName(object): 'special_property_name': '$special[property.name]' } - def __init__(self, special_property_name=None): # noqa: E501 + def __init__(self, special_property_name=None, local_vars_configuration=None): # noqa: E501 """SpecialModelName - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._special_property_name = None self.discriminator = None @@ -105,8 +110,11 @@ def __eq__(self, other): if not isinstance(other, SpecialModelName): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, SpecialModelName): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/tag.py b/samples/client/petstore/python-tornado/petstore_api/models/tag.py index cb9c22d9f53a..d6137fdd47f0 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/tag.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/tag.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class Tag(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,8 +42,11 @@ class Tag(object): 'name': 'name' } - def __init__(self, id=None, name=None): # noqa: E501 + def __init__(self, id=None, name=None, local_vars_configuration=None): # noqa: E501 """Tag - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._name = None @@ -131,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, Tag): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Tag): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/type_holder_default.py b/samples/client/petstore/python-tornado/petstore_api/models/type_holder_default.py index d7c207cb5f63..8163ea77aa73 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/type_holder_default.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/type_holder_default.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class TypeHolderDefault(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -46,8 +48,11 @@ class TypeHolderDefault(object): 'array_item': 'array_item' } - def __init__(self, string_item='what', number_item=None, integer_item=None, bool_item=True, array_item=None): # noqa: E501 + def __init__(self, string_item='what', number_item=None, integer_item=None, bool_item=True, array_item=None, local_vars_configuration=None): # noqa: E501 """TypeHolderDefault - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._string_item = None self._number_item = None @@ -80,7 +85,7 @@ def string_item(self, string_item): :param string_item: The string_item of this TypeHolderDefault. # noqa: E501 :type: str """ - if string_item is None: + if self.local_vars_configuration.client_side_validation and string_item is None: # noqa: E501 raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501 self._string_item = string_item @@ -103,7 +108,7 @@ def number_item(self, number_item): :param number_item: The number_item of this TypeHolderDefault. # noqa: E501 :type: float """ - if number_item is None: + if self.local_vars_configuration.client_side_validation and number_item is None: # noqa: E501 raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501 self._number_item = number_item @@ -126,7 +131,7 @@ def integer_item(self, integer_item): :param integer_item: The integer_item of this TypeHolderDefault. # noqa: E501 :type: int """ - if integer_item is None: + if self.local_vars_configuration.client_side_validation and integer_item is None: # noqa: E501 raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501 self._integer_item = integer_item @@ -149,7 +154,7 @@ def bool_item(self, bool_item): :param bool_item: The bool_item of this TypeHolderDefault. # noqa: E501 :type: bool """ - if bool_item is None: + if self.local_vars_configuration.client_side_validation and bool_item is None: # noqa: E501 raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501 self._bool_item = bool_item @@ -172,7 +177,7 @@ def array_item(self, array_item): :param array_item: The array_item of this TypeHolderDefault. # noqa: E501 :type: list[int] """ - if array_item is None: + if self.local_vars_configuration.client_side_validation and array_item is None: # noqa: E501 raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501 self._array_item = array_item @@ -214,8 +219,11 @@ def __eq__(self, other): if not isinstance(other, TypeHolderDefault): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, TypeHolderDefault): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/type_holder_example.py b/samples/client/petstore/python-tornado/petstore_api/models/type_holder_example.py index 745fe95da2c0..34481fd21e31 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/type_holder_example.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/type_holder_example.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class TypeHolderExample(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -48,8 +50,11 @@ class TypeHolderExample(object): 'array_item': 'array_item' } - def __init__(self, string_item=None, number_item=None, float_item=None, integer_item=None, bool_item=None, array_item=None): # noqa: E501 + def __init__(self, string_item=None, number_item=None, float_item=None, integer_item=None, bool_item=None, array_item=None, local_vars_configuration=None): # noqa: E501 """TypeHolderExample - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._string_item = None self._number_item = None @@ -84,7 +89,7 @@ def string_item(self, string_item): :param string_item: The string_item of this TypeHolderExample. # noqa: E501 :type: str """ - if string_item is None: + if self.local_vars_configuration.client_side_validation and string_item is None: # noqa: E501 raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501 self._string_item = string_item @@ -107,7 +112,7 @@ def number_item(self, number_item): :param number_item: The number_item of this TypeHolderExample. # noqa: E501 :type: float """ - if number_item is None: + if self.local_vars_configuration.client_side_validation and number_item is None: # noqa: E501 raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501 self._number_item = number_item @@ -130,7 +135,7 @@ def float_item(self, float_item): :param float_item: The float_item of this TypeHolderExample. # noqa: E501 :type: float """ - if float_item is None: + if self.local_vars_configuration.client_side_validation and float_item is None: # noqa: E501 raise ValueError("Invalid value for `float_item`, must not be `None`") # noqa: E501 self._float_item = float_item @@ -153,7 +158,7 @@ def integer_item(self, integer_item): :param integer_item: The integer_item of this TypeHolderExample. # noqa: E501 :type: int """ - if integer_item is None: + if self.local_vars_configuration.client_side_validation and integer_item is None: # noqa: E501 raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501 self._integer_item = integer_item @@ -176,7 +181,7 @@ def bool_item(self, bool_item): :param bool_item: The bool_item of this TypeHolderExample. # noqa: E501 :type: bool """ - if bool_item is None: + if self.local_vars_configuration.client_side_validation and bool_item is None: # noqa: E501 raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501 self._bool_item = bool_item @@ -199,7 +204,7 @@ def array_item(self, array_item): :param array_item: The array_item of this TypeHolderExample. # noqa: E501 :type: list[int] """ - if array_item is None: + if self.local_vars_configuration.client_side_validation and array_item is None: # noqa: E501 raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501 self._array_item = array_item @@ -241,8 +246,11 @@ def __eq__(self, other): if not isinstance(other, TypeHolderExample): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, TypeHolderExample): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/user.py b/samples/client/petstore/python-tornado/petstore_api/models/user.py index f46f5165dfd6..de88bda4cde7 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/user.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/user.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class User(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -52,8 +54,11 @@ class User(object): 'user_status': 'userStatus' } - def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None): # noqa: E501 + def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None, local_vars_configuration=None): # noqa: E501 """User - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._username = None @@ -289,8 +294,11 @@ def __eq__(self, other): if not isinstance(other, User): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, User): + return True + + return self.to_dict() != other.to_dict() diff --git a/samples/client/petstore/python-tornado/petstore_api/models/xml_item.py b/samples/client/petstore/python-tornado/petstore_api/models/xml_item.py index eaceeb5ef45d..52ecc9aa5225 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/xml_item.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/xml_item.py @@ -15,6 +15,8 @@ import six +from petstore_api.configuration import Configuration + class XmlItem(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -94,8 +96,11 @@ class XmlItem(object): 'prefix_ns_wrapped_array': 'prefix_ns_wrapped_array' } - def __init__(self, attribute_string=None, attribute_number=None, attribute_integer=None, attribute_boolean=None, wrapped_array=None, name_string=None, name_number=None, name_integer=None, name_boolean=None, name_array=None, name_wrapped_array=None, prefix_string=None, prefix_number=None, prefix_integer=None, prefix_boolean=None, prefix_array=None, prefix_wrapped_array=None, namespace_string=None, namespace_number=None, namespace_integer=None, namespace_boolean=None, namespace_array=None, namespace_wrapped_array=None, prefix_ns_string=None, prefix_ns_number=None, prefix_ns_integer=None, prefix_ns_boolean=None, prefix_ns_array=None, prefix_ns_wrapped_array=None): # noqa: E501 + def __init__(self, attribute_string=None, attribute_number=None, attribute_integer=None, attribute_boolean=None, wrapped_array=None, name_string=None, name_number=None, name_integer=None, name_boolean=None, name_array=None, name_wrapped_array=None, prefix_string=None, prefix_number=None, prefix_integer=None, prefix_boolean=None, prefix_array=None, prefix_wrapped_array=None, namespace_string=None, namespace_number=None, namespace_integer=None, namespace_boolean=None, namespace_array=None, namespace_wrapped_array=None, prefix_ns_string=None, prefix_ns_number=None, prefix_ns_integer=None, prefix_ns_boolean=None, prefix_ns_array=None, prefix_ns_wrapped_array=None, local_vars_configuration=None): # noqa: E501 """XmlItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._attribute_string = None self._attribute_number = None @@ -833,8 +838,11 @@ def __eq__(self, other): if not isinstance(other, XmlItem): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, XmlItem): + return True + + return self.to_dict() != other.to_dict() From 60d601ee26c255746a0b45262cb1055aca6526a9 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 17 Oct 2019 02:34:04 +0800 Subject: [PATCH 030/142] [Python] Minor fix to code format (#4172) * test python e501 fix * 2 spaces * fix format with noqa: E501 * fix format, update samples --- .../src/main/resources/python/model.mustache | 4 ++-- .../python-asyncio/petstore_api/models/enum_arrays.py | 2 +- .../petstore/python-asyncio/petstore_api/models/map_test.py | 2 +- .../petstore/python-experimental/.openapi-generator/VERSION | 2 +- .../petstore/python-experimental/docs/HasOnlyReadOnly.md | 4 ++-- samples/client/petstore/python-experimental/docs/Name.md | 4 ++-- .../client/petstore/python-experimental/docs/ReadOnlyFirst.md | 2 +- .../python-experimental/petstore_api/configuration.py | 2 ++ .../python-tornado/petstore_api/models/enum_arrays.py | 2 +- .../petstore/python-tornado/petstore_api/models/map_test.py | 2 +- .../client/petstore/python/petstore_api/models/enum_arrays.py | 2 +- .../client/petstore/python/petstore_api/models/map_test.py | 2 +- .../client/petstore/python/petstore_api/models/enum_arrays.py | 2 +- .../petstore/python/petstore_api/models/inline_object2.py | 2 +- .../client/petstore/python/petstore_api/models/map_test.py | 2 +- 15 files changed, 19 insertions(+), 17 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/model.mustache b/modules/openapi-generator/src/main/resources/python/model.mustache index e2c39f3d6b3b..17264bb46b0d 100644 --- a/modules/openapi-generator/src/main/resources/python/model.mustache +++ b/modules/openapi-generator/src/main/resources/python/model.mustache @@ -115,7 +115,7 @@ class {{classname}}(object): allowed_values = [{{#isNullable}}None,{{/isNullable}}{{#allowableValues}}{{#values}}{{#items.isString}}"{{/items.isString}}{{{this}}}{{#items.isString}}"{{/items.isString}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] # noqa: E501 {{#isListContainer}} if (self.local_vars_configuration.client_side_validation and - not set({{{name}}}).issubset(set(allowed_values))): + not set({{{name}}}).issubset(set(allowed_values))): # noqa: E501 raise ValueError( "Invalid values for `{{{name}}}` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set({{{name}}}) - set(allowed_values))), # noqa: E501 @@ -124,7 +124,7 @@ class {{classname}}(object): {{/isListContainer}} {{#isMapContainer}} if (self.local_vars_configuration.client_side_validation and - not set({{{name}}}.keys()).issubset(set(allowed_values))): + not set({{{name}}}.keys()).issubset(set(allowed_values))): # noqa: E501 raise ValueError( "Invalid keys in `{{{name}}}` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set({{{name}}}.keys()) - set(allowed_values))), # noqa: E501 diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/enum_arrays.py b/samples/client/petstore/python-asyncio/petstore_api/models/enum_arrays.py index 481283a05c32..819ff322157d 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/enum_arrays.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/enum_arrays.py @@ -104,7 +104,7 @@ def array_enum(self, array_enum): """ allowed_values = ["fish", "crab"] # noqa: E501 if (self.local_vars_configuration.client_side_validation and - not set(array_enum).issubset(set(allowed_values))): + not set(array_enum).issubset(set(allowed_values))): # noqa: E501 raise ValueError( "Invalid values for `array_enum` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(array_enum) - set(allowed_values))), # noqa: E501 diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/map_test.py b/samples/client/petstore/python-asyncio/petstore_api/models/map_test.py index b170dce412c7..f0cfba5073b0 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/map_test.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/map_test.py @@ -108,7 +108,7 @@ def map_of_enum_string(self, map_of_enum_string): """ allowed_values = ["UPPER", "lower"] # noqa: E501 if (self.local_vars_configuration.client_side_validation and - not set(map_of_enum_string.keys()).issubset(set(allowed_values))): + not set(map_of_enum_string.keys()).issubset(set(allowed_values))): # noqa: E501 raise ValueError( "Invalid keys in `map_of_enum_string` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(map_of_enum_string.keys()) - set(allowed_values))), # noqa: E501 diff --git a/samples/client/petstore/python-experimental/.openapi-generator/VERSION b/samples/client/petstore/python-experimental/.openapi-generator/VERSION index 0e97bd19efbf..c3a2c7076fa8 100644 --- a/samples/client/petstore/python-experimental/.openapi-generator/VERSION +++ b/samples/client/petstore/python-experimental/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-experimental/docs/HasOnlyReadOnly.md b/samples/client/petstore/python-experimental/docs/HasOnlyReadOnly.md index 44ad450b52c5..f731a42eab54 100644 --- a/samples/client/petstore/python-experimental/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/python-experimental/docs/HasOnlyReadOnly.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **str** | | [optional] -**foo** | **str** | | [optional] +**bar** | **str** | | [optional] [readonly] +**foo** | **str** | | [optional] [readonly] [[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-experimental/docs/Name.md b/samples/client/petstore/python-experimental/docs/Name.md index 542da3f04768..17dc7a38fe69 100644 --- a/samples/client/petstore/python-experimental/docs/Name.md +++ b/samples/client/petstore/python-experimental/docs/Name.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **int** | | -**snake_case** | **int** | | [optional] +**snake_case** | **int** | | [optional] [readonly] **_property** | **str** | | [optional] -**_123_number** | **int** | | [optional] +**_123_number** | **int** | | [optional] [readonly] [[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-experimental/docs/ReadOnlyFirst.md b/samples/client/petstore/python-experimental/docs/ReadOnlyFirst.md index 93fed253d01c..6bc1447c1d71 100644 --- a/samples/client/petstore/python-experimental/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/python-experimental/docs/ReadOnlyFirst.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **str** | | [optional] +**bar** | **str** | | [optional] [readonly] **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-experimental/petstore_api/configuration.py b/samples/client/petstore/python-experimental/petstore_api/configuration.py index 459ff6a3ca25..5e9d7b5d41d3 100644 --- a/samples/client/petstore/python-experimental/petstore_api/configuration.py +++ b/samples/client/petstore/python-experimental/petstore_api/configuration.py @@ -138,6 +138,8 @@ def __init__(self, host="http://petstore.swagger.io:80/v2", self.retries = None """Adding retries to override urllib3 default value 3 """ + # Disable client side validation + self.client_side_validation = True @property def logger_file(self): diff --git a/samples/client/petstore/python-tornado/petstore_api/models/enum_arrays.py b/samples/client/petstore/python-tornado/petstore_api/models/enum_arrays.py index 481283a05c32..819ff322157d 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/enum_arrays.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/enum_arrays.py @@ -104,7 +104,7 @@ def array_enum(self, array_enum): """ allowed_values = ["fish", "crab"] # noqa: E501 if (self.local_vars_configuration.client_side_validation and - not set(array_enum).issubset(set(allowed_values))): + not set(array_enum).issubset(set(allowed_values))): # noqa: E501 raise ValueError( "Invalid values for `array_enum` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(array_enum) - set(allowed_values))), # noqa: E501 diff --git a/samples/client/petstore/python-tornado/petstore_api/models/map_test.py b/samples/client/petstore/python-tornado/petstore_api/models/map_test.py index b170dce412c7..f0cfba5073b0 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/map_test.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/map_test.py @@ -108,7 +108,7 @@ def map_of_enum_string(self, map_of_enum_string): """ allowed_values = ["UPPER", "lower"] # noqa: E501 if (self.local_vars_configuration.client_side_validation and - not set(map_of_enum_string.keys()).issubset(set(allowed_values))): + not set(map_of_enum_string.keys()).issubset(set(allowed_values))): # noqa: E501 raise ValueError( "Invalid keys in `map_of_enum_string` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(map_of_enum_string.keys()) - set(allowed_values))), # noqa: E501 diff --git a/samples/client/petstore/python/petstore_api/models/enum_arrays.py b/samples/client/petstore/python/petstore_api/models/enum_arrays.py index 481283a05c32..819ff322157d 100644 --- a/samples/client/petstore/python/petstore_api/models/enum_arrays.py +++ b/samples/client/petstore/python/petstore_api/models/enum_arrays.py @@ -104,7 +104,7 @@ def array_enum(self, array_enum): """ allowed_values = ["fish", "crab"] # noqa: E501 if (self.local_vars_configuration.client_side_validation and - not set(array_enum).issubset(set(allowed_values))): + not set(array_enum).issubset(set(allowed_values))): # noqa: E501 raise ValueError( "Invalid values for `array_enum` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(array_enum) - set(allowed_values))), # noqa: E501 diff --git a/samples/client/petstore/python/petstore_api/models/map_test.py b/samples/client/petstore/python/petstore_api/models/map_test.py index b170dce412c7..f0cfba5073b0 100644 --- a/samples/client/petstore/python/petstore_api/models/map_test.py +++ b/samples/client/petstore/python/petstore_api/models/map_test.py @@ -108,7 +108,7 @@ def map_of_enum_string(self, map_of_enum_string): """ allowed_values = ["UPPER", "lower"] # noqa: E501 if (self.local_vars_configuration.client_side_validation and - not set(map_of_enum_string.keys()).issubset(set(allowed_values))): + not set(map_of_enum_string.keys()).issubset(set(allowed_values))): # noqa: E501 raise ValueError( "Invalid keys in `map_of_enum_string` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(map_of_enum_string.keys()) - set(allowed_values))), # noqa: E501 diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py b/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py index 481283a05c32..819ff322157d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py @@ -104,7 +104,7 @@ def array_enum(self, array_enum): """ allowed_values = ["fish", "crab"] # noqa: E501 if (self.local_vars_configuration.client_side_validation and - not set(array_enum).issubset(set(allowed_values))): + not set(array_enum).issubset(set(allowed_values))): # noqa: E501 raise ValueError( "Invalid values for `array_enum` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(array_enum) - set(allowed_values))), # noqa: E501 diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object2.py b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object2.py index 4e30b86dc22e..f904d0a24d5d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/inline_object2.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/inline_object2.py @@ -79,7 +79,7 @@ def enum_form_string_array(self, enum_form_string_array): """ allowed_values = [">", "$"] # noqa: E501 if (self.local_vars_configuration.client_side_validation and - not set(enum_form_string_array).issubset(set(allowed_values))): + not set(enum_form_string_array).issubset(set(allowed_values))): # noqa: E501 raise ValueError( "Invalid values for `enum_form_string_array` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(enum_form_string_array) - set(allowed_values))), # noqa: E501 diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py index b170dce412c7..f0cfba5073b0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py @@ -108,7 +108,7 @@ def map_of_enum_string(self, map_of_enum_string): """ allowed_values = ["UPPER", "lower"] # noqa: E501 if (self.local_vars_configuration.client_side_validation and - not set(map_of_enum_string.keys()).issubset(set(allowed_values))): + not set(map_of_enum_string.keys()).issubset(set(allowed_values))): # noqa: E501 raise ValueError( "Invalid keys in `map_of_enum_string` [{0}], must be a subset of [{1}]" # noqa: E501 .format(", ".join(map(str, set(map_of_enum_string.keys()) - set(allowed_values))), # noqa: E501 From 0e1ce6bb63cc37b1448909dc3d5b4de8edbc3bfd Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Wed, 16 Oct 2019 18:04:44 -0400 Subject: [PATCH 031/142] [docs] Custom template clarifications and other minor enhancements (#4167) * [docs] Updating docsite outputs to be browsable on Github as well * Fix links to other files Suffix `.md` was needed to make links works * [docs] Add clarification to differences between customization and templating docs * [docs] Collapsible side bar, scroll to top, minor enhancements --- bin/utils/export_generator.sh | 2 +- docs/customization.md | 5 +- docs/generators.md | 240 +- docs/generators/ada-server.md | 2 - docs/generators/ada.md | 2 - docs/generators/android.md | 2 - docs/generators/apache2.md | 2 - docs/generators/apex.md | 2 - docs/generators/asciidoc.md | 2 - docs/generators/aspnetcore.md | 2 - docs/generators/avro-schema.md | 2 - docs/generators/bash.md | 2 - docs/generators/c.md | 2 - docs/generators/clojure.md | 2 - docs/generators/cpp-pistache-server.md | 2 - docs/generators/cpp-qt5-client.md | 2 - docs/generators/cpp-qt5-qhttpengine-server.md | 2 - docs/generators/cpp-restbed-server.md | 2 - docs/generators/cpp-restsdk.md | 2 - docs/generators/cpp-tizen.md | 2 - docs/generators/csharp-dotnet2.md | 2 - docs/generators/csharp-nancyfx.md | 2 - docs/generators/csharp-netcore.md | 2 - docs/generators/csharp.md | 2 - docs/generators/cwiki.md | 2 - docs/generators/dart-dio.md | 2 - docs/generators/dart-jaguar.md | 2 - docs/generators/dart.md | 2 - docs/generators/dynamic-html.md | 2 - docs/generators/eiffel.md | 2 - docs/generators/elixir.md | 2 - docs/generators/elm.md | 2 - docs/generators/erlang-client.md | 2 - docs/generators/erlang-proper.md | 2 - docs/generators/erlang-server.md | 2 - docs/generators/flash.md | 2 - docs/generators/fsharp-functions.md | 2 - docs/generators/fsharp-giraffe-server.md | 2 - docs/generators/go-experimental.md | 2 - docs/generators/go-gin-server.md | 2 - docs/generators/go-server.md | 2 - docs/generators/go.md | 2 - .../graphql-nodejs-express-server.md | 2 - docs/generators/graphql-schema.md | 2 - docs/generators/groovy.md | 2 - docs/generators/haskell-http-client.md | 2 - docs/generators/haskell.md | 2 - docs/generators/html.md | 2 - docs/generators/html2.md | 2 - docs/generators/java-inflector.md | 2 - docs/generators/java-msf4j.md | 2 - docs/generators/java-pkmst.md | 2 - docs/generators/java-play-framework.md | 2 - docs/generators/java-undertow-server.md | 2 - docs/generators/java-vertx.md | 2 - docs/generators/java.md | 2 - docs/generators/javascript-closure-angular.md | 2 - docs/generators/javascript-flowtyped.md | 2 - docs/generators/javascript.md | 2 - docs/generators/jaxrs-cxf-cdi.md | 2 - docs/generators/jaxrs-cxf-client.md | 2 - docs/generators/jaxrs-cxf-extended.md | 2 - docs/generators/jaxrs-cxf.md | 2 - docs/generators/jaxrs-jersey.md | 2 - docs/generators/jaxrs-resteasy-eap.md | 2 - docs/generators/jaxrs-resteasy.md | 2 - docs/generators/jaxrs-spec.md | 2 - docs/generators/jmeter.md | 2 - docs/generators/kotlin-server.md | 2 - docs/generators/kotlin-spring.md | 2 - docs/generators/kotlin-vertx.md | 2 - docs/generators/kotlin.md | 2 - docs/generators/lua.md | 2 - docs/generators/mysql-schema.md | 2 - docs/generators/nim.md | 2 - docs/generators/nodejs-express-server.md | 2 - docs/generators/nodejs-server-deprecated.md | 2 - docs/generators/objc.md | 2 - docs/generators/ocaml.md | 2 - docs/generators/openapi-yaml.md | 2 - docs/generators/openapi.md | 2 - docs/generators/perl.md | 2 - docs/generators/php-laravel.md | 2 - docs/generators/php-lumen.md | 2 - docs/generators/php-silex.md | 2 - docs/generators/php-slim.md | 2 - docs/generators/php-symfony.md | 2 - docs/generators/php-ze-ph.md | 2 - docs/generators/php.md | 2 - docs/generators/powershell.md | 2 - docs/generators/protobuf-schema.md | 2 - docs/generators/python-aiohttp.md | 2 - docs/generators/python-blueplanet.md | 2 - docs/generators/python-experimental.md | 2 - docs/generators/python-flask.md | 2 - docs/generators/python.md | 2 - docs/generators/r.md | 2 - docs/generators/ruby-on-rails.md | 2 - docs/generators/ruby-sinatra.md | 2 - docs/generators/ruby.md | 2 - docs/generators/rust-server.md | 2 - docs/generators/rust.md | 2 - docs/generators/scala-akka.md | 2 - docs/generators/scala-finch.md | 2 - docs/generators/scala-gatling.md | 2 - .../generators/scala-httpclient-deprecated.md | 2 - docs/generators/scala-lagom-server.md | 2 - docs/generators/scala-play-server.md | 2 - docs/generators/scalatra.md | 2 - docs/generators/scalaz.md | 2 - docs/generators/spring.md | 2 - docs/generators/swift2-deprecated.md | 2 - docs/generators/swift3-deprecated.md | 2 - docs/generators/swift4.md | 2 - docs/generators/typescript-angular.md | 2 - docs/generators/typescript-angularjs.md | 2 - docs/generators/typescript-aurelia.md | 2 - docs/generators/typescript-axios.md | 2 - docs/generators/typescript-fetch.md | 2 - docs/generators/typescript-inversify.md | 2 - docs/generators/typescript-jquery.md | 2 - docs/generators/typescript-node.md | 2 - docs/generators/typescript-rxjs.md | 2 - docs/templating.md | 2 + .../openapitools/codegen/cmd/ConfigHelp.java | 5 +- .../codegen/cmd/ListGenerators.java | 2 +- website/i18n/en.json | 372 +++- website/package.json | 6 +- website/sidebars.json | 2 - website/siteConfig.js | 7 + website/yarn.lock | 1959 +++++++++++------ 131 files changed, 1707 insertions(+), 1135 deletions(-) diff --git a/bin/utils/export_generator.sh b/bin/utils/export_generator.sh index d3836715df49..6ec536aa28ed 100755 --- a/bin/utils/export_generator.sh +++ b/bin/utils/export_generator.sh @@ -14,4 +14,4 @@ fi executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" -java -jar ${executable} config-help -g ${NAME} --named-header --format markdown --markdown-header -o docs/generators/${NAME}.md +java -jar ${executable} config-help -g "${NAME}" --named-header --format markdown --markdown-header -o "docs/generators/${NAME}.md" diff --git a/docs/customization.md b/docs/customization.md index 6b14fedd206a..0f868529a6c7 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -3,9 +3,10 @@ id: customization title: Customization --- -## Creating a new template + +## Custom Generator (and Template) -If none of the templates suit your needs, you can create a brand new template. OpenAPI Generator can help with this, using the `meta` command: +If none of the built-in generators suit your needs and you need to do more than just modify the mustache templates to tweak generated code, you can create a brand new generator and its associated templates. OpenAPI Generator can help with this, using the `meta` command: ```sh java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar meta \ diff --git a/docs/generators.md b/docs/generators.md index 5f3814379fe7..849200fecb3f 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -6,138 +6,138 @@ title: Generators List The following generators are available: ## CLIENT generators -* [ada](generators/ada) -* [android](generators/android) -* [apex](generators/apex) -* [bash](generators/bash) -* [c](generators/c) -* [clojure](generators/clojure) -* [cpp-qt5-client](generators/cpp-qt5-client) -* [cpp-restsdk](generators/cpp-restsdk) -* [cpp-tizen](generators/cpp-tizen) -* [csharp](generators/csharp) -* [csharp-dotnet2 (deprecated)](generators/csharp-dotnet2) -* [csharp-netcore](generators/csharp-netcore) -* [dart](generators/dart) -* [dart-dio](generators/dart-dio) -* [dart-jaguar](generators/dart-jaguar) -* [eiffel](generators/eiffel) -* [elixir](generators/elixir) -* [elm](generators/elm) -* [erlang-client](generators/erlang-client) -* [erlang-proper](generators/erlang-proper) -* [flash](generators/flash) -* [go](generators/go) -* [go-experimental (experimental)](generators/go-experimental) -* [groovy](generators/groovy) -* [haskell-http-client](generators/haskell-http-client) -* [java](generators/java) -* [javascript](generators/javascript) -* [javascript-closure-angular](generators/javascript-closure-angular) -* [javascript-flowtyped](generators/javascript-flowtyped) -* [jaxrs-cxf-client](generators/jaxrs-cxf-client) -* [jmeter](generators/jmeter) -* [kotlin](generators/kotlin) -* [lua](generators/lua) -* [nim (beta)](generators/nim) -* [objc](generators/objc) -* [ocaml](generators/ocaml) -* [perl](generators/perl) -* [php](generators/php) -* [powershell](generators/powershell) -* [python](generators/python) -* [python-experimental (experimental)](generators/python-experimental) -* [r](generators/r) -* [ruby](generators/ruby) -* [rust](generators/rust) -* [scala-akka](generators/scala-akka) -* [scala-gatling](generators/scala-gatling) -* [scala-httpclient-deprecated (deprecated)](generators/scala-httpclient-deprecated) -* [scalaz](generators/scalaz) -* [swift2-deprecated (deprecated)](generators/swift2-deprecated) -* [swift3-deprecated (deprecated)](generators/swift3-deprecated) -* [swift4](generators/swift4) -* [typescript-angular](generators/typescript-angular) -* [typescript-angularjs](generators/typescript-angularjs) -* [typescript-aurelia](generators/typescript-aurelia) -* [typescript-axios](generators/typescript-axios) -* [typescript-fetch](generators/typescript-fetch) -* [typescript-inversify](generators/typescript-inversify) -* [typescript-jquery](generators/typescript-jquery) -* [typescript-node](generators/typescript-node) -* [typescript-rxjs](generators/typescript-rxjs) +* [ada](generators/ada.md) +* [android](generators/android.md) +* [apex](generators/apex.md) +* [bash](generators/bash.md) +* [c](generators/c.md) +* [clojure](generators/clojure.md) +* [cpp-qt5-client](generators/cpp-qt5-client.md) +* [cpp-restsdk](generators/cpp-restsdk.md) +* [cpp-tizen](generators/cpp-tizen.md) +* [csharp](generators/csharp.md) +* [csharp-dotnet2 (deprecated)](generators/csharp-dotnet2.md) +* [csharp-netcore](generators/csharp-netcore.md) +* [dart](generators/dart.md) +* [dart-dio](generators/dart-dio.md) +* [dart-jaguar](generators/dart-jaguar.md) +* [eiffel](generators/eiffel.md) +* [elixir](generators/elixir.md) +* [elm](generators/elm.md) +* [erlang-client](generators/erlang-client.md) +* [erlang-proper](generators/erlang-proper.md) +* [flash](generators/flash.md) +* [go](generators/go.md) +* [go-experimental (experimental)](generators/go-experimental.md) +* [groovy](generators/groovy.md) +* [haskell-http-client](generators/haskell-http-client.md) +* [java](generators/java.md) +* [javascript](generators/javascript.md) +* [javascript-closure-angular](generators/javascript-closure-angular.md) +* [javascript-flowtyped](generators/javascript-flowtyped.md) +* [jaxrs-cxf-client](generators/jaxrs-cxf-client.md) +* [jmeter](generators/jmeter.md) +* [kotlin](generators/kotlin.md) +* [lua](generators/lua.md) +* [nim (beta)](generators/nim.md) +* [objc](generators/objc.md) +* [ocaml](generators/ocaml.md) +* [perl](generators/perl.md) +* [php](generators/php.md) +* [powershell](generators/powershell.md) +* [python](generators/python.md) +* [python-experimental (experimental)](generators/python-experimental.md) +* [r](generators/r.md) +* [ruby](generators/ruby.md) +* [rust](generators/rust.md) +* [scala-akka](generators/scala-akka.md) +* [scala-gatling](generators/scala-gatling.md) +* [scala-httpclient-deprecated (deprecated)](generators/scala-httpclient-deprecated.md) +* [scalaz](generators/scalaz.md) +* [swift2-deprecated (deprecated)](generators/swift2-deprecated.md) +* [swift3-deprecated (deprecated)](generators/swift3-deprecated.md) +* [swift4](generators/swift4.md) +* [typescript-angular](generators/typescript-angular.md) +* [typescript-angularjs](generators/typescript-angularjs.md) +* [typescript-aurelia](generators/typescript-aurelia.md) +* [typescript-axios](generators/typescript-axios.md) +* [typescript-fetch](generators/typescript-fetch.md) +* [typescript-inversify](generators/typescript-inversify.md) +* [typescript-jquery](generators/typescript-jquery.md) +* [typescript-node](generators/typescript-node.md) +* [typescript-rxjs](generators/typescript-rxjs.md) ## SERVER generators -* [ada-server](generators/ada-server) -* [aspnetcore](generators/aspnetcore) -* [cpp-pistache-server](generators/cpp-pistache-server) -* [cpp-qt5-qhttpengine-server](generators/cpp-qt5-qhttpengine-server) -* [cpp-restbed-server](generators/cpp-restbed-server) -* [csharp-nancyfx](generators/csharp-nancyfx) -* [erlang-server](generators/erlang-server) -* [fsharp-functions (beta)](generators/fsharp-functions) -* [fsharp-giraffe-server (beta)](generators/fsharp-giraffe-server) -* [go-gin-server](generators/go-gin-server) -* [go-server](generators/go-server) -* [graphql-nodejs-express-server](generators/graphql-nodejs-express-server) -* [haskell](generators/haskell) -* [java-inflector](generators/java-inflector) -* [java-msf4j](generators/java-msf4j) -* [java-pkmst](generators/java-pkmst) -* [java-play-framework](generators/java-play-framework) -* [java-undertow-server](generators/java-undertow-server) -* [java-vertx](generators/java-vertx) -* [jaxrs-cxf](generators/jaxrs-cxf) -* [jaxrs-cxf-cdi](generators/jaxrs-cxf-cdi) -* [jaxrs-cxf-extended](generators/jaxrs-cxf-extended) -* [jaxrs-jersey](generators/jaxrs-jersey) -* [jaxrs-resteasy](generators/jaxrs-resteasy) -* [jaxrs-resteasy-eap](generators/jaxrs-resteasy-eap) -* [jaxrs-spec](generators/jaxrs-spec) -* [kotlin-server](generators/kotlin-server) -* [kotlin-spring](generators/kotlin-spring) -* [kotlin-vertx (beta)](generators/kotlin-vertx) -* [nodejs-express-server (beta)](generators/nodejs-express-server) -* [nodejs-server-deprecated (deprecated)](generators/nodejs-server-deprecated) -* [php-laravel](generators/php-laravel) -* [php-lumen](generators/php-lumen) -* [php-silex](generators/php-silex) -* [php-slim](generators/php-slim) -* [php-symfony](generators/php-symfony) -* [php-ze-ph](generators/php-ze-ph) -* [python-aiohttp](generators/python-aiohttp) -* [python-blueplanet](generators/python-blueplanet) -* [python-flask](generators/python-flask) -* [ruby-on-rails](generators/ruby-on-rails) -* [ruby-sinatra](generators/ruby-sinatra) -* [rust-server](generators/rust-server) -* [scala-finch](generators/scala-finch) -* [scala-lagom-server](generators/scala-lagom-server) -* [scala-play-server](generators/scala-play-server) -* [scalatra](generators/scalatra) -* [spring](generators/spring) +* [ada-server](generators/ada-server.md) +* [aspnetcore](generators/aspnetcore.md) +* [cpp-pistache-server](generators/cpp-pistache-server.md) +* [cpp-qt5-qhttpengine-server](generators/cpp-qt5-qhttpengine-server.md) +* [cpp-restbed-server](generators/cpp-restbed-server.md) +* [csharp-nancyfx](generators/csharp-nancyfx.md) +* [erlang-server](generators/erlang-server.md) +* [fsharp-functions (beta)](generators/fsharp-functions.md) +* [fsharp-giraffe-server (beta)](generators/fsharp-giraffe-server.md) +* [go-gin-server](generators/go-gin-server.md) +* [go-server](generators/go-server.md) +* [graphql-nodejs-express-server](generators/graphql-nodejs-express-server.md) +* [haskell](generators/haskell.md) +* [java-inflector](generators/java-inflector.md) +* [java-msf4j](generators/java-msf4j.md) +* [java-pkmst](generators/java-pkmst.md) +* [java-play-framework](generators/java-play-framework.md) +* [java-undertow-server](generators/java-undertow-server.md) +* [java-vertx](generators/java-vertx.md) +* [jaxrs-cxf](generators/jaxrs-cxf.md) +* [jaxrs-cxf-cdi](generators/jaxrs-cxf-cdi.md) +* [jaxrs-cxf-extended](generators/jaxrs-cxf-extended.md) +* [jaxrs-jersey](generators/jaxrs-jersey.md) +* [jaxrs-resteasy](generators/jaxrs-resteasy.md) +* [jaxrs-resteasy-eap](generators/jaxrs-resteasy-eap.md) +* [jaxrs-spec](generators/jaxrs-spec.md) +* [kotlin-server](generators/kotlin-server.md) +* [kotlin-spring](generators/kotlin-spring.md) +* [kotlin-vertx (beta)](generators/kotlin-vertx.md) +* [nodejs-express-server (beta)](generators/nodejs-express-server.md) +* [nodejs-server-deprecated (deprecated)](generators/nodejs-server-deprecated.md) +* [php-laravel](generators/php-laravel.md) +* [php-lumen](generators/php-lumen.md) +* [php-silex](generators/php-silex.md) +* [php-slim](generators/php-slim.md) +* [php-symfony](generators/php-symfony.md) +* [php-ze-ph](generators/php-ze-ph.md) +* [python-aiohttp](generators/python-aiohttp.md) +* [python-blueplanet](generators/python-blueplanet.md) +* [python-flask](generators/python-flask.md) +* [ruby-on-rails](generators/ruby-on-rails.md) +* [ruby-sinatra](generators/ruby-sinatra.md) +* [rust-server](generators/rust-server.md) +* [scala-finch](generators/scala-finch.md) +* [scala-lagom-server](generators/scala-lagom-server.md) +* [scala-play-server](generators/scala-play-server.md) +* [scalatra](generators/scalatra.md) +* [spring](generators/spring.md) ## DOCUMENTATION generators -* [asciidoc](generators/asciidoc) -* [cwiki](generators/cwiki) -* [dynamic-html](generators/dynamic-html) -* [html](generators/html) -* [html2](generators/html2) -* [openapi](generators/openapi) -* [openapi-yaml](generators/openapi-yaml) +* [asciidoc](generators/asciidoc.md) +* [cwiki](generators/cwiki.md) +* [dynamic-html](generators/dynamic-html.md) +* [html](generators/html.md) +* [html2](generators/html2.md) +* [openapi](generators/openapi.md) +* [openapi-yaml](generators/openapi-yaml.md) ## SCHEMA generators -* [avro-schema (beta)](generators/avro-schema) -* [mysql-schema](generators/mysql-schema) +* [avro-schema (beta)](generators/avro-schema.md) +* [mysql-schema](generators/mysql-schema.md) ## CONFIG generators -* [apache2](generators/apache2) -* [graphql-schema](generators/graphql-schema) -* [protobuf-schema (beta)](generators/protobuf-schema) +* [apache2](generators/apache2.md) +* [graphql-schema](generators/graphql-schema.md) +* [protobuf-schema (beta)](generators/protobuf-schema.md) diff --git a/docs/generators/ada-server.md b/docs/generators/ada-server.md index a49975a36f40..c775d88e23eb 100644 --- a/docs/generators/ada-server.md +++ b/docs/generators/ada-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-ada-server title: Config Options for ada-server sidebar_label: ada-server --- diff --git a/docs/generators/ada.md b/docs/generators/ada.md index ae6eb354c5be..6cd00504f8be 100644 --- a/docs/generators/ada.md +++ b/docs/generators/ada.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-ada title: Config Options for ada sidebar_label: ada --- diff --git a/docs/generators/android.md b/docs/generators/android.md index e35957538f46..a71797f303d8 100644 --- a/docs/generators/android.md +++ b/docs/generators/android.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-android title: Config Options for android sidebar_label: android --- diff --git a/docs/generators/apache2.md b/docs/generators/apache2.md index d85036b228bc..2cefacb29662 100644 --- a/docs/generators/apache2.md +++ b/docs/generators/apache2.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-config-apache2 title: Config Options for apache2 sidebar_label: apache2 --- diff --git a/docs/generators/apex.md b/docs/generators/apex.md index f90183b34a91..82314835f38c 100644 --- a/docs/generators/apex.md +++ b/docs/generators/apex.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-apex title: Config Options for apex sidebar_label: apex --- diff --git a/docs/generators/asciidoc.md b/docs/generators/asciidoc.md index d33cab1f7eb2..d006841c6937 100644 --- a/docs/generators/asciidoc.md +++ b/docs/generators/asciidoc.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-documentation-asciidoc title: Config Options for asciidoc sidebar_label: asciidoc --- diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md index 387832c1ab2a..761ba0f0c4cf 100644 --- a/docs/generators/aspnetcore.md +++ b/docs/generators/aspnetcore.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-aspnetcore title: Config Options for aspnetcore sidebar_label: aspnetcore --- diff --git a/docs/generators/avro-schema.md b/docs/generators/avro-schema.md index 9b06b1c6d4dc..f8f924aaf843 100644 --- a/docs/generators/avro-schema.md +++ b/docs/generators/avro-schema.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-schema-avro-schema title: Config Options for avro-schema sidebar_label: avro-schema --- diff --git a/docs/generators/bash.md b/docs/generators/bash.md index 4f8635935485..35e442ddd83f 100644 --- a/docs/generators/bash.md +++ b/docs/generators/bash.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-bash title: Config Options for bash sidebar_label: bash --- diff --git a/docs/generators/c.md b/docs/generators/c.md index 0a910b40d2a3..f7be8e3b0b40 100644 --- a/docs/generators/c.md +++ b/docs/generators/c.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-c title: Config Options for c sidebar_label: c --- diff --git a/docs/generators/clojure.md b/docs/generators/clojure.md index 239b3b441418..353866157344 100644 --- a/docs/generators/clojure.md +++ b/docs/generators/clojure.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-clojure title: Config Options for clojure sidebar_label: clojure --- diff --git a/docs/generators/cpp-pistache-server.md b/docs/generators/cpp-pistache-server.md index 2ffeb59cc7db..b925ffc17506 100644 --- a/docs/generators/cpp-pistache-server.md +++ b/docs/generators/cpp-pistache-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-cpp-pistache-server title: Config Options for cpp-pistache-server sidebar_label: cpp-pistache-server --- diff --git a/docs/generators/cpp-qt5-client.md b/docs/generators/cpp-qt5-client.md index fb3cd1884442..4d98d7b3700d 100644 --- a/docs/generators/cpp-qt5-client.md +++ b/docs/generators/cpp-qt5-client.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-cpp-qt5-client title: Config Options for cpp-qt5-client sidebar_label: cpp-qt5-client --- diff --git a/docs/generators/cpp-qt5-qhttpengine-server.md b/docs/generators/cpp-qt5-qhttpengine-server.md index 171c325638f5..19f7852a0948 100644 --- a/docs/generators/cpp-qt5-qhttpengine-server.md +++ b/docs/generators/cpp-qt5-qhttpengine-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-cpp-qt5-qhttpengine-server title: Config Options for cpp-qt5-qhttpengine-server sidebar_label: cpp-qt5-qhttpengine-server --- diff --git a/docs/generators/cpp-restbed-server.md b/docs/generators/cpp-restbed-server.md index d5afa990cfb7..1dde3705336d 100644 --- a/docs/generators/cpp-restbed-server.md +++ b/docs/generators/cpp-restbed-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-cpp-restbed-server title: Config Options for cpp-restbed-server sidebar_label: cpp-restbed-server --- diff --git a/docs/generators/cpp-restsdk.md b/docs/generators/cpp-restsdk.md index 1ff8eeafce07..0518392adf5d 100644 --- a/docs/generators/cpp-restsdk.md +++ b/docs/generators/cpp-restsdk.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-cpp-restsdk title: Config Options for cpp-restsdk sidebar_label: cpp-restsdk --- diff --git a/docs/generators/cpp-tizen.md b/docs/generators/cpp-tizen.md index aaf57194b8a5..5fd840afc636 100644 --- a/docs/generators/cpp-tizen.md +++ b/docs/generators/cpp-tizen.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-cpp-tizen title: Config Options for cpp-tizen sidebar_label: cpp-tizen --- diff --git a/docs/generators/csharp-dotnet2.md b/docs/generators/csharp-dotnet2.md index 319b2b190f59..b4d4ffccf955 100644 --- a/docs/generators/csharp-dotnet2.md +++ b/docs/generators/csharp-dotnet2.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-csharp-dotnet2 title: Config Options for csharp-dotnet2 sidebar_label: csharp-dotnet2 --- diff --git a/docs/generators/csharp-nancyfx.md b/docs/generators/csharp-nancyfx.md index 69d0504926e2..b436a6b4b299 100644 --- a/docs/generators/csharp-nancyfx.md +++ b/docs/generators/csharp-nancyfx.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-csharp-nancyfx title: Config Options for csharp-nancyfx sidebar_label: csharp-nancyfx --- diff --git a/docs/generators/csharp-netcore.md b/docs/generators/csharp-netcore.md index 405630750054..62b36ff6769c 100644 --- a/docs/generators/csharp-netcore.md +++ b/docs/generators/csharp-netcore.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-csharp-netcore title: Config Options for csharp-netcore sidebar_label: csharp-netcore --- diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md index 5425987a753f..bac7b07b4d45 100644 --- a/docs/generators/csharp.md +++ b/docs/generators/csharp.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-csharp title: Config Options for csharp sidebar_label: csharp --- diff --git a/docs/generators/cwiki.md b/docs/generators/cwiki.md index b53ea9d11bdb..94f69357276a 100644 --- a/docs/generators/cwiki.md +++ b/docs/generators/cwiki.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-documentation-cwiki title: Config Options for cwiki sidebar_label: cwiki --- diff --git a/docs/generators/dart-dio.md b/docs/generators/dart-dio.md index dde7792b2943..0841a791b9d4 100644 --- a/docs/generators/dart-dio.md +++ b/docs/generators/dart-dio.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-dart-dio title: Config Options for dart-dio sidebar_label: dart-dio --- diff --git a/docs/generators/dart-jaguar.md b/docs/generators/dart-jaguar.md index f5f4a62e4482..5aced1755630 100644 --- a/docs/generators/dart-jaguar.md +++ b/docs/generators/dart-jaguar.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-dart-jaguar title: Config Options for dart-jaguar sidebar_label: dart-jaguar --- diff --git a/docs/generators/dart.md b/docs/generators/dart.md index b66afda1c5fb..07002e849381 100644 --- a/docs/generators/dart.md +++ b/docs/generators/dart.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-dart title: Config Options for dart sidebar_label: dart --- diff --git a/docs/generators/dynamic-html.md b/docs/generators/dynamic-html.md index 0d9709da958b..02869930abd9 100644 --- a/docs/generators/dynamic-html.md +++ b/docs/generators/dynamic-html.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-documentation-dynamic-html title: Config Options for dynamic-html sidebar_label: dynamic-html --- diff --git a/docs/generators/eiffel.md b/docs/generators/eiffel.md index 9f3a27dca16b..fb6b8d9cb981 100644 --- a/docs/generators/eiffel.md +++ b/docs/generators/eiffel.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-eiffel title: Config Options for eiffel sidebar_label: eiffel --- diff --git a/docs/generators/elixir.md b/docs/generators/elixir.md index bcf7e8ccf2de..276eb44397b9 100644 --- a/docs/generators/elixir.md +++ b/docs/generators/elixir.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-elixir title: Config Options for elixir sidebar_label: elixir --- diff --git a/docs/generators/elm.md b/docs/generators/elm.md index 2782d13e9ff9..922560cd6d35 100644 --- a/docs/generators/elm.md +++ b/docs/generators/elm.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-elm title: Config Options for elm sidebar_label: elm --- diff --git a/docs/generators/erlang-client.md b/docs/generators/erlang-client.md index 7ff4cd412842..675e15f80f35 100644 --- a/docs/generators/erlang-client.md +++ b/docs/generators/erlang-client.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-erlang-client title: Config Options for erlang-client sidebar_label: erlang-client --- diff --git a/docs/generators/erlang-proper.md b/docs/generators/erlang-proper.md index 1038343f8e8a..57187fdf4942 100644 --- a/docs/generators/erlang-proper.md +++ b/docs/generators/erlang-proper.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-erlang-proper title: Config Options for erlang-proper sidebar_label: erlang-proper --- diff --git a/docs/generators/erlang-server.md b/docs/generators/erlang-server.md index f469fc445e00..8e109cd37dd3 100644 --- a/docs/generators/erlang-server.md +++ b/docs/generators/erlang-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-erlang-server title: Config Options for erlang-server sidebar_label: erlang-server --- diff --git a/docs/generators/flash.md b/docs/generators/flash.md index b91ea54475c0..53312f0fb409 100644 --- a/docs/generators/flash.md +++ b/docs/generators/flash.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-flash title: Config Options for flash sidebar_label: flash --- diff --git a/docs/generators/fsharp-functions.md b/docs/generators/fsharp-functions.md index b7a8ee78257b..be33609bb51a 100644 --- a/docs/generators/fsharp-functions.md +++ b/docs/generators/fsharp-functions.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-fsharp-functions title: Config Options for fsharp-functions sidebar_label: fsharp-functions --- diff --git a/docs/generators/fsharp-giraffe-server.md b/docs/generators/fsharp-giraffe-server.md index 6d965b22513e..bec1994334a6 100644 --- a/docs/generators/fsharp-giraffe-server.md +++ b/docs/generators/fsharp-giraffe-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-fsharp-giraffe-server title: Config Options for fsharp-giraffe-server sidebar_label: fsharp-giraffe-server --- diff --git a/docs/generators/go-experimental.md b/docs/generators/go-experimental.md index dc84d5336f87..1c1264023123 100644 --- a/docs/generators/go-experimental.md +++ b/docs/generators/go-experimental.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-go-experimental title: Config Options for go-experimental sidebar_label: go-experimental --- diff --git a/docs/generators/go-gin-server.md b/docs/generators/go-gin-server.md index 6c1fa05997a4..445f3c2d165a 100644 --- a/docs/generators/go-gin-server.md +++ b/docs/generators/go-gin-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-go-gin-server title: Config Options for go-gin-server sidebar_label: go-gin-server --- diff --git a/docs/generators/go-server.md b/docs/generators/go-server.md index aa3bcc45d5a6..a2094d82603a 100644 --- a/docs/generators/go-server.md +++ b/docs/generators/go-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-go-server title: Config Options for go-server sidebar_label: go-server --- diff --git a/docs/generators/go.md b/docs/generators/go.md index 4fc2af486dca..f9de91d1b9a9 100644 --- a/docs/generators/go.md +++ b/docs/generators/go.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-go title: Config Options for go sidebar_label: go --- diff --git a/docs/generators/graphql-nodejs-express-server.md b/docs/generators/graphql-nodejs-express-server.md index 5b91534f5d83..3ab10107cff5 100644 --- a/docs/generators/graphql-nodejs-express-server.md +++ b/docs/generators/graphql-nodejs-express-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-graphql-nodejs-express-server title: Config Options for graphql-nodejs-express-server sidebar_label: graphql-nodejs-express-server --- diff --git a/docs/generators/graphql-schema.md b/docs/generators/graphql-schema.md index a6d39fd6243a..83b90af0bef5 100644 --- a/docs/generators/graphql-schema.md +++ b/docs/generators/graphql-schema.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-config-graphql-schema title: Config Options for graphql-schema sidebar_label: graphql-schema --- diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index e5ac52bafbab..7dcf10b07770 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-groovy title: Config Options for groovy sidebar_label: groovy --- diff --git a/docs/generators/haskell-http-client.md b/docs/generators/haskell-http-client.md index b26bd8be10eb..8f5285cb245a 100644 --- a/docs/generators/haskell-http-client.md +++ b/docs/generators/haskell-http-client.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-haskell-http-client title: Config Options for haskell-http-client sidebar_label: haskell-http-client --- diff --git a/docs/generators/haskell.md b/docs/generators/haskell.md index 3692c19bb3fb..96cfde1fa948 100644 --- a/docs/generators/haskell.md +++ b/docs/generators/haskell.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-haskell title: Config Options for haskell sidebar_label: haskell --- diff --git a/docs/generators/html.md b/docs/generators/html.md index 92344614c4e9..a85ea85aef5d 100644 --- a/docs/generators/html.md +++ b/docs/generators/html.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-documentation-html title: Config Options for html sidebar_label: html --- diff --git a/docs/generators/html2.md b/docs/generators/html2.md index aef588fb5e1e..d1726b72a54f 100644 --- a/docs/generators/html2.md +++ b/docs/generators/html2.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-documentation-html2 title: Config Options for html2 sidebar_label: html2 --- diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index 6ec301dc8095..4d3c774468ef 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-java-inflector title: Config Options for java-inflector sidebar_label: java-inflector --- diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index bc9bb52f2fbc..543aa97f828e 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-java-msf4j title: Config Options for java-msf4j sidebar_label: java-msf4j --- diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index 0c8fd296c3b6..6d33790e60c8 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-java-pkmst title: Config Options for java-pkmst sidebar_label: java-pkmst --- diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index 242f25b22131..b7fa80b5823b 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-java-play-framework title: Config Options for java-play-framework sidebar_label: java-play-framework --- diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index dc99309dbdf9..c620227b1ee5 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-java-undertow-server title: Config Options for java-undertow-server sidebar_label: java-undertow-server --- diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index e3d2946a3a90..e285f021a16a 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-java-vertx title: Config Options for java-vertx sidebar_label: java-vertx --- diff --git a/docs/generators/java.md b/docs/generators/java.md index 6637e95eed1b..2ac7fbeaab57 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-java title: Config Options for java sidebar_label: java --- diff --git a/docs/generators/javascript-closure-angular.md b/docs/generators/javascript-closure-angular.md index eef6edb7c79e..d736d131cf33 100644 --- a/docs/generators/javascript-closure-angular.md +++ b/docs/generators/javascript-closure-angular.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-javascript-closure-angular title: Config Options for javascript-closure-angular sidebar_label: javascript-closure-angular --- diff --git a/docs/generators/javascript-flowtyped.md b/docs/generators/javascript-flowtyped.md index 18c53c560d3b..946c1d086cae 100644 --- a/docs/generators/javascript-flowtyped.md +++ b/docs/generators/javascript-flowtyped.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-javascript-flowtyped title: Config Options for javascript-flowtyped sidebar_label: javascript-flowtyped --- diff --git a/docs/generators/javascript.md b/docs/generators/javascript.md index 6185e55ffdb5..3fcf9cc6c09b 100644 --- a/docs/generators/javascript.md +++ b/docs/generators/javascript.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-javascript title: Config Options for javascript sidebar_label: javascript --- diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index 65def9116833..e90da21468bc 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-jaxrs-cxf-cdi title: Config Options for jaxrs-cxf-cdi sidebar_label: jaxrs-cxf-cdi --- diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index af5175db6229..8b9ea2186ace 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-jaxrs-cxf-client title: Config Options for jaxrs-cxf-client sidebar_label: jaxrs-cxf-client --- diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index e81cde7b5133..df0d2004bd0a 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-jaxrs-cxf-extended title: Config Options for jaxrs-cxf-extended sidebar_label: jaxrs-cxf-extended --- diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index 346dce1aa941..bae14d53f147 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-jaxrs-cxf title: Config Options for jaxrs-cxf sidebar_label: jaxrs-cxf --- diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index a3172382b7cd..16419d4bf5f3 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-jaxrs-jersey title: Config Options for jaxrs-jersey sidebar_label: jaxrs-jersey --- diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index 7924fb953cd9..615d5702600d 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-jaxrs-resteasy-eap title: Config Options for jaxrs-resteasy-eap sidebar_label: jaxrs-resteasy-eap --- diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index c85dc5cc3082..885caa889622 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-jaxrs-resteasy title: Config Options for jaxrs-resteasy sidebar_label: jaxrs-resteasy --- diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index 1bf741aad866..e70657aa2fcc 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-jaxrs-spec title: Config Options for jaxrs-spec sidebar_label: jaxrs-spec --- diff --git a/docs/generators/jmeter.md b/docs/generators/jmeter.md index 6771efad160c..9872d3b347bb 100644 --- a/docs/generators/jmeter.md +++ b/docs/generators/jmeter.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-jmeter title: Config Options for jmeter sidebar_label: jmeter --- diff --git a/docs/generators/kotlin-server.md b/docs/generators/kotlin-server.md index 54e62dcf2087..eb66b331ffac 100644 --- a/docs/generators/kotlin-server.md +++ b/docs/generators/kotlin-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-kotlin-server title: Config Options for kotlin-server sidebar_label: kotlin-server --- diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md index ca5e09b8fbcf..843d17801282 100644 --- a/docs/generators/kotlin-spring.md +++ b/docs/generators/kotlin-spring.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-kotlin-spring title: Config Options for kotlin-spring sidebar_label: kotlin-spring --- diff --git a/docs/generators/kotlin-vertx.md b/docs/generators/kotlin-vertx.md index 03e2d0dd1fc8..6c50f140b784 100644 --- a/docs/generators/kotlin-vertx.md +++ b/docs/generators/kotlin-vertx.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-kotlin-vertx title: Config Options for kotlin-vertx sidebar_label: kotlin-vertx --- diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md index 522abb3ed862..ec9a4e0332a7 100644 --- a/docs/generators/kotlin.md +++ b/docs/generators/kotlin.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-kotlin title: Config Options for kotlin sidebar_label: kotlin --- diff --git a/docs/generators/lua.md b/docs/generators/lua.md index 6e9a4ce3f846..b466a5a70f07 100644 --- a/docs/generators/lua.md +++ b/docs/generators/lua.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-lua title: Config Options for lua sidebar_label: lua --- diff --git a/docs/generators/mysql-schema.md b/docs/generators/mysql-schema.md index 987e18c1cc3f..63a48d23da0d 100644 --- a/docs/generators/mysql-schema.md +++ b/docs/generators/mysql-schema.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-schema-mysql-schema title: Config Options for mysql-schema sidebar_label: mysql-schema --- diff --git a/docs/generators/nim.md b/docs/generators/nim.md index 228226876af6..b7bdcee5d804 100644 --- a/docs/generators/nim.md +++ b/docs/generators/nim.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-nim title: Config Options for nim sidebar_label: nim --- diff --git a/docs/generators/nodejs-express-server.md b/docs/generators/nodejs-express-server.md index 25a84db36d68..bbe2659c2132 100644 --- a/docs/generators/nodejs-express-server.md +++ b/docs/generators/nodejs-express-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-nodejs-express-server title: Config Options for nodejs-express-server sidebar_label: nodejs-express-server --- diff --git a/docs/generators/nodejs-server-deprecated.md b/docs/generators/nodejs-server-deprecated.md index c8741e58f4cb..13c9424641ff 100644 --- a/docs/generators/nodejs-server-deprecated.md +++ b/docs/generators/nodejs-server-deprecated.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-nodejs-server-deprecated title: Config Options for nodejs-server-deprecated sidebar_label: nodejs-server-deprecated --- diff --git a/docs/generators/objc.md b/docs/generators/objc.md index 46d3244a130b..dff34b94fa12 100644 --- a/docs/generators/objc.md +++ b/docs/generators/objc.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-objc title: Config Options for objc sidebar_label: objc --- diff --git a/docs/generators/ocaml.md b/docs/generators/ocaml.md index 7397b1c31bf9..e95ed3c59f2a 100644 --- a/docs/generators/ocaml.md +++ b/docs/generators/ocaml.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-ocaml title: Config Options for ocaml sidebar_label: ocaml --- diff --git a/docs/generators/openapi-yaml.md b/docs/generators/openapi-yaml.md index 5bc5c746885e..5c551d773521 100644 --- a/docs/generators/openapi-yaml.md +++ b/docs/generators/openapi-yaml.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-documentation-openapi-yaml title: Config Options for openapi-yaml sidebar_label: openapi-yaml --- diff --git a/docs/generators/openapi.md b/docs/generators/openapi.md index 0846d577084c..c0181ddce0d4 100644 --- a/docs/generators/openapi.md +++ b/docs/generators/openapi.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-documentation-openapi title: Config Options for openapi sidebar_label: openapi --- diff --git a/docs/generators/perl.md b/docs/generators/perl.md index b4ef17875f5e..2cac430a5879 100644 --- a/docs/generators/perl.md +++ b/docs/generators/perl.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-perl title: Config Options for perl sidebar_label: perl --- diff --git a/docs/generators/php-laravel.md b/docs/generators/php-laravel.md index 858cad93726c..580869441aa9 100644 --- a/docs/generators/php-laravel.md +++ b/docs/generators/php-laravel.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-php-laravel title: Config Options for php-laravel sidebar_label: php-laravel --- diff --git a/docs/generators/php-lumen.md b/docs/generators/php-lumen.md index cd3bbd9d6726..286804540aa0 100644 --- a/docs/generators/php-lumen.md +++ b/docs/generators/php-lumen.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-php-lumen title: Config Options for php-lumen sidebar_label: php-lumen --- diff --git a/docs/generators/php-silex.md b/docs/generators/php-silex.md index e417df414b02..61241269f856 100644 --- a/docs/generators/php-silex.md +++ b/docs/generators/php-silex.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-php-silex title: Config Options for php-silex sidebar_label: php-silex --- diff --git a/docs/generators/php-slim.md b/docs/generators/php-slim.md index 5209c1017116..d9e188a425e1 100644 --- a/docs/generators/php-slim.md +++ b/docs/generators/php-slim.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-php-slim title: Config Options for php-slim sidebar_label: php-slim --- diff --git a/docs/generators/php-symfony.md b/docs/generators/php-symfony.md index d1d86710b90a..04693e48d6fd 100644 --- a/docs/generators/php-symfony.md +++ b/docs/generators/php-symfony.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-php-symfony title: Config Options for php-symfony sidebar_label: php-symfony --- diff --git a/docs/generators/php-ze-ph.md b/docs/generators/php-ze-ph.md index 1c571774935d..0eab64888b38 100644 --- a/docs/generators/php-ze-ph.md +++ b/docs/generators/php-ze-ph.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-php-ze-ph title: Config Options for php-ze-ph sidebar_label: php-ze-ph --- diff --git a/docs/generators/php.md b/docs/generators/php.md index 934853a1573f..24c3028d1393 100644 --- a/docs/generators/php.md +++ b/docs/generators/php.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-php title: Config Options for php sidebar_label: php --- diff --git a/docs/generators/powershell.md b/docs/generators/powershell.md index 2468c0a0853c..bef12a7aaf56 100644 --- a/docs/generators/powershell.md +++ b/docs/generators/powershell.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-powershell title: Config Options for powershell sidebar_label: powershell --- diff --git a/docs/generators/protobuf-schema.md b/docs/generators/protobuf-schema.md index 87507ed7c8f2..68edd8d6e21e 100644 --- a/docs/generators/protobuf-schema.md +++ b/docs/generators/protobuf-schema.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-config-protobuf-schema title: Config Options for protobuf-schema sidebar_label: protobuf-schema --- diff --git a/docs/generators/python-aiohttp.md b/docs/generators/python-aiohttp.md index a2ef0d34ffa7..0a9ad07aee85 100644 --- a/docs/generators/python-aiohttp.md +++ b/docs/generators/python-aiohttp.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-python-aiohttp title: Config Options for python-aiohttp sidebar_label: python-aiohttp --- diff --git a/docs/generators/python-blueplanet.md b/docs/generators/python-blueplanet.md index b5b9e8a05ef7..ae30ec6f0c66 100644 --- a/docs/generators/python-blueplanet.md +++ b/docs/generators/python-blueplanet.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-python-blueplanet title: Config Options for python-blueplanet sidebar_label: python-blueplanet --- diff --git a/docs/generators/python-experimental.md b/docs/generators/python-experimental.md index c36f84b4a057..65aaee198574 100644 --- a/docs/generators/python-experimental.md +++ b/docs/generators/python-experimental.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-python-experimental title: Config Options for python-experimental sidebar_label: python-experimental --- diff --git a/docs/generators/python-flask.md b/docs/generators/python-flask.md index 32d1d913be99..f01e68d72136 100644 --- a/docs/generators/python-flask.md +++ b/docs/generators/python-flask.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-python-flask title: Config Options for python-flask sidebar_label: python-flask --- diff --git a/docs/generators/python.md b/docs/generators/python.md index ea43f3be0c26..023e92b66716 100644 --- a/docs/generators/python.md +++ b/docs/generators/python.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-python title: Config Options for python sidebar_label: python --- diff --git a/docs/generators/r.md b/docs/generators/r.md index 9d6f83350a19..fa257ae0ed84 100644 --- a/docs/generators/r.md +++ b/docs/generators/r.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-r title: Config Options for r sidebar_label: r --- diff --git a/docs/generators/ruby-on-rails.md b/docs/generators/ruby-on-rails.md index 8f7425fb0f77..d55421f8d624 100644 --- a/docs/generators/ruby-on-rails.md +++ b/docs/generators/ruby-on-rails.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-ruby-on-rails title: Config Options for ruby-on-rails sidebar_label: ruby-on-rails --- diff --git a/docs/generators/ruby-sinatra.md b/docs/generators/ruby-sinatra.md index c14f4e4c182d..f46767a20927 100644 --- a/docs/generators/ruby-sinatra.md +++ b/docs/generators/ruby-sinatra.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-ruby-sinatra title: Config Options for ruby-sinatra sidebar_label: ruby-sinatra --- diff --git a/docs/generators/ruby.md b/docs/generators/ruby.md index a6af465e75f3..54e03f1b804c 100644 --- a/docs/generators/ruby.md +++ b/docs/generators/ruby.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-ruby title: Config Options for ruby sidebar_label: ruby --- diff --git a/docs/generators/rust-server.md b/docs/generators/rust-server.md index ebffe75be40e..9671d82b9fa7 100644 --- a/docs/generators/rust-server.md +++ b/docs/generators/rust-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-rust-server title: Config Options for rust-server sidebar_label: rust-server --- diff --git a/docs/generators/rust.md b/docs/generators/rust.md index 8841b9012381..2f1aa5d74719 100644 --- a/docs/generators/rust.md +++ b/docs/generators/rust.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-rust title: Config Options for rust sidebar_label: rust --- diff --git a/docs/generators/scala-akka.md b/docs/generators/scala-akka.md index 28229859c83a..ed8b8c74843e 100644 --- a/docs/generators/scala-akka.md +++ b/docs/generators/scala-akka.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-scala-akka title: Config Options for scala-akka sidebar_label: scala-akka --- diff --git a/docs/generators/scala-finch.md b/docs/generators/scala-finch.md index 7680f37b1108..2a38482084d8 100644 --- a/docs/generators/scala-finch.md +++ b/docs/generators/scala-finch.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-scala-finch title: Config Options for scala-finch sidebar_label: scala-finch --- diff --git a/docs/generators/scala-gatling.md b/docs/generators/scala-gatling.md index aa2fda8f9cd3..d4247564fbc1 100644 --- a/docs/generators/scala-gatling.md +++ b/docs/generators/scala-gatling.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-scala-gatling title: Config Options for scala-gatling sidebar_label: scala-gatling --- diff --git a/docs/generators/scala-httpclient-deprecated.md b/docs/generators/scala-httpclient-deprecated.md index 4d39df493527..bd2736346742 100644 --- a/docs/generators/scala-httpclient-deprecated.md +++ b/docs/generators/scala-httpclient-deprecated.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-scala-httpclient-deprecated title: Config Options for scala-httpclient-deprecated sidebar_label: scala-httpclient-deprecated --- diff --git a/docs/generators/scala-lagom-server.md b/docs/generators/scala-lagom-server.md index f6b6a51df529..36fb95eac677 100644 --- a/docs/generators/scala-lagom-server.md +++ b/docs/generators/scala-lagom-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-scala-lagom-server title: Config Options for scala-lagom-server sidebar_label: scala-lagom-server --- diff --git a/docs/generators/scala-play-server.md b/docs/generators/scala-play-server.md index e7b3a46bf6f3..81ade4afdd4c 100644 --- a/docs/generators/scala-play-server.md +++ b/docs/generators/scala-play-server.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-scala-play-server title: Config Options for scala-play-server sidebar_label: scala-play-server --- diff --git a/docs/generators/scalatra.md b/docs/generators/scalatra.md index 64d8e2ca9871..dba381ee6fa6 100644 --- a/docs/generators/scalatra.md +++ b/docs/generators/scalatra.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-scalatra title: Config Options for scalatra sidebar_label: scalatra --- diff --git a/docs/generators/scalaz.md b/docs/generators/scalaz.md index 5ced2bc64d59..787c221928ad 100644 --- a/docs/generators/scalaz.md +++ b/docs/generators/scalaz.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-scalaz title: Config Options for scalaz sidebar_label: scalaz --- diff --git a/docs/generators/spring.md b/docs/generators/spring.md index 51e46424f06d..c122ddcb4deb 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-server-spring title: Config Options for spring sidebar_label: spring --- diff --git a/docs/generators/swift2-deprecated.md b/docs/generators/swift2-deprecated.md index 51e222c2cd0d..4fa404bfc2cd 100644 --- a/docs/generators/swift2-deprecated.md +++ b/docs/generators/swift2-deprecated.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-swift2-deprecated title: Config Options for swift2-deprecated sidebar_label: swift2-deprecated --- diff --git a/docs/generators/swift3-deprecated.md b/docs/generators/swift3-deprecated.md index 1041bf635945..73eff0f12f61 100644 --- a/docs/generators/swift3-deprecated.md +++ b/docs/generators/swift3-deprecated.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-swift3-deprecated title: Config Options for swift3-deprecated sidebar_label: swift3-deprecated --- diff --git a/docs/generators/swift4.md b/docs/generators/swift4.md index f1035b6db24e..3136fb0a7c6b 100644 --- a/docs/generators/swift4.md +++ b/docs/generators/swift4.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-swift4 title: Config Options for swift4 sidebar_label: swift4 --- diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index 598f6c4a549a..69104b5212b1 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-typescript-angular title: Config Options for typescript-angular sidebar_label: typescript-angular --- diff --git a/docs/generators/typescript-angularjs.md b/docs/generators/typescript-angularjs.md index da03265443dc..ea20c438bf29 100644 --- a/docs/generators/typescript-angularjs.md +++ b/docs/generators/typescript-angularjs.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-typescript-angularjs title: Config Options for typescript-angularjs sidebar_label: typescript-angularjs --- diff --git a/docs/generators/typescript-aurelia.md b/docs/generators/typescript-aurelia.md index 49e909d194f8..74d84d9a0d74 100644 --- a/docs/generators/typescript-aurelia.md +++ b/docs/generators/typescript-aurelia.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-typescript-aurelia title: Config Options for typescript-aurelia sidebar_label: typescript-aurelia --- diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index efd9e5b4b559..db4f9b84b35a 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-typescript-axios title: Config Options for typescript-axios sidebar_label: typescript-axios --- diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md index ecac8db58980..6f806f268a62 100644 --- a/docs/generators/typescript-fetch.md +++ b/docs/generators/typescript-fetch.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-typescript-fetch title: Config Options for typescript-fetch sidebar_label: typescript-fetch --- diff --git a/docs/generators/typescript-inversify.md b/docs/generators/typescript-inversify.md index 21e7c7dd3262..1209dbde068d 100644 --- a/docs/generators/typescript-inversify.md +++ b/docs/generators/typescript-inversify.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-typescript-inversify title: Config Options for typescript-inversify sidebar_label: typescript-inversify --- diff --git a/docs/generators/typescript-jquery.md b/docs/generators/typescript-jquery.md index dd635959395d..b3ca91bcefda 100644 --- a/docs/generators/typescript-jquery.md +++ b/docs/generators/typescript-jquery.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-typescript-jquery title: Config Options for typescript-jquery sidebar_label: typescript-jquery --- diff --git a/docs/generators/typescript-node.md b/docs/generators/typescript-node.md index 60dd406eb308..2d3358b566c2 100644 --- a/docs/generators/typescript-node.md +++ b/docs/generators/typescript-node.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-typescript-node title: Config Options for typescript-node sidebar_label: typescript-node --- diff --git a/docs/generators/typescript-rxjs.md b/docs/generators/typescript-rxjs.md index b2db2dc057bd..e2b08652946b 100644 --- a/docs/generators/typescript-rxjs.md +++ b/docs/generators/typescript-rxjs.md @@ -1,6 +1,4 @@ - --- -id: generator-opts-client-typescript-rxjs title: Config Options for typescript-rxjs sidebar_label: typescript-rxjs --- diff --git a/docs/templating.md b/docs/templating.md index 287f8060c997..04c512e7c1c1 100644 --- a/docs/templating.md +++ b/docs/templating.md @@ -5,6 +5,8 @@ title: Using Templates It's easy to work with templates for codegen! +For maybe 90% of use cases, you will only need to modify the mustache template files to create your own custom generated code. If you need to include additional files in your generated output, manipulate the OpenAPI document inputs, or implement your own vendor extensions or other logic, you'll want to read [customization](./customization.md) after you read this document. Be sure to start here first, because templating is the easier concept and you'll need it for more advanced use cases. + The generator workflow has [transforming logic](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages) as well as templates for each generation of code. Each generator will create a data structure from the OpenAPI document; OpenAPI 2.0 and OpenAPI 3.x documents are normalized into the same API model within the generator. This model is then applied to the templates. While generators do not need to perform transformations, it's often necessary in order to add more advanced support for your language or framework. You may need to refer to the generator implementation to understand some of the logic while creating or customizing templates (see [ScalaFinchServerCodegen.java](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java) for an advanced example). diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java index 698e400c5d40..dfd9296eef47 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java @@ -148,16 +148,13 @@ private void generateYamlSample(StringBuilder sb, CodegenConfig config) { } private void generateMarkdownHelp(StringBuilder sb, CodegenConfig config) { - sb.append(newline); - if (Boolean.TRUE.equals(markdownHeader)) { sb.append("---").append(newline); - sb.append("id: generator-opts-").append(config.getTag().toValue()).append("-") - .append(config.getName()).append(newline); sb.append("title: Config Options for ").append(generatorName).append(newline); sb.append("sidebar_label: ").append(generatorName).append(newline); sb.append("---").append(newline); } else { + sb.append(newline); sb.append("## CONFIG OPTIONS"); if (Boolean.TRUE.equals(namedHeader)) { diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java index 340afe93395a..a9270dc41d6c 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java @@ -96,7 +96,7 @@ private void appendForType(StringBuilder sb, CodegenType type, String typeName, GeneratorMetadata meta = generator.getGeneratorMetadata(); if (docusaurus) { sb.append("* "); - String id = "generators/" + generator.getName(); + String id = "generators/" + generator.getName() + ".md"; sb.append("[").append(generator.getName()); if (meta != null && meta.getStability() != null && meta.getStability() != Stability.STABLE) { diff --git a/website/i18n/en.json b/website/i18n/en.json index f7ba090bb22f..523607df864d 100644 --- a/website/i18n/en.json +++ b/website/i18n/en.json @@ -44,373 +44,511 @@ "title": "Generators List" }, "generators/ada-server": { - "title": "generators/ada-server" + "title": "Config Options for ada-server", + "sidebar_label": "ada-server" }, "generators/ada": { - "title": "generators/ada" + "title": "Config Options for ada", + "sidebar_label": "ada" }, "generators/android": { - "title": "generators/android" + "title": "Config Options for android", + "sidebar_label": "android" }, "generators/apache2": { - "title": "generators/apache2" + "title": "Config Options for apache2", + "sidebar_label": "apache2" }, "generators/apex": { - "title": "generators/apex" + "title": "Config Options for apex", + "sidebar_label": "apex" + }, + "generators/asciidoc": { + "title": "Config Options for asciidoc", + "sidebar_label": "asciidoc" }, "generators/aspnetcore": { - "title": "generators/aspnetcore" + "title": "Config Options for aspnetcore", + "sidebar_label": "aspnetcore" }, "generators/avro-schema": { - "title": "generators/avro-schema" + "title": "Config Options for avro-schema", + "sidebar_label": "avro-schema" }, "generators/bash": { - "title": "generators/bash" + "title": "Config Options for bash", + "sidebar_label": "bash" }, "generators/c": { - "title": "generators/c" + "title": "Config Options for c", + "sidebar_label": "c" }, "generators/clojure": { - "title": "generators/clojure" + "title": "Config Options for clojure", + "sidebar_label": "clojure" }, "generators/cpp-pistache-server": { - "title": "generators/cpp-pistache-server" + "title": "Config Options for cpp-pistache-server", + "sidebar_label": "cpp-pistache-server" }, "generators/cpp-qt5-client": { - "title": "generators/cpp-qt5-client" + "title": "Config Options for cpp-qt5-client", + "sidebar_label": "cpp-qt5-client" }, "generators/cpp-qt5-qhttpengine-server": { - "title": "generators/cpp-qt5-qhttpengine-server" + "title": "Config Options for cpp-qt5-qhttpengine-server", + "sidebar_label": "cpp-qt5-qhttpengine-server" }, "generators/cpp-restbed-server": { - "title": "generators/cpp-restbed-server" + "title": "Config Options for cpp-restbed-server", + "sidebar_label": "cpp-restbed-server" }, "generators/cpp-restsdk": { - "title": "generators/cpp-restsdk" + "title": "Config Options for cpp-restsdk", + "sidebar_label": "cpp-restsdk" }, "generators/cpp-tizen": { - "title": "generators/cpp-tizen" + "title": "Config Options for cpp-tizen", + "sidebar_label": "cpp-tizen" }, "generators/csharp-dotnet2": { - "title": "generators/csharp-dotnet2" + "title": "Config Options for csharp-dotnet2", + "sidebar_label": "csharp-dotnet2" }, "generators/csharp-nancyfx": { - "title": "generators/csharp-nancyfx" + "title": "Config Options for csharp-nancyfx", + "sidebar_label": "csharp-nancyfx" }, "generators/csharp-netcore": { - "title": "generators/csharp-netcore" + "title": "Config Options for csharp-netcore", + "sidebar_label": "csharp-netcore" }, "generators/csharp-refactor": { "title": "generators/csharp-refactor" }, "generators/csharp": { - "title": "generators/csharp" + "title": "Config Options for csharp", + "sidebar_label": "csharp" }, "generators/cwiki": { - "title": "generators/cwiki" - }, - "generators/dart-jaguar": { - "title": "generators/dart-jaguar" + "title": "Config Options for cwiki", + "sidebar_label": "cwiki" }, "generators/dart-dio": { - "title": "generators/dart-dio" + "title": "Config Options for dart-dio", + "sidebar_label": "dart-dio" + }, + "generators/dart-jaguar": { + "title": "Config Options for dart-jaguar", + "sidebar_label": "dart-jaguar" }, "generators/dart": { - "title": "generators/dart" + "title": "Config Options for dart", + "sidebar_label": "dart" }, "generators/dynamic-html": { - "title": "generators/dynamic-html" + "title": "Config Options for dynamic-html", + "sidebar_label": "dynamic-html" }, "generators/eiffel": { - "title": "generators/eiffel" + "title": "Config Options for eiffel", + "sidebar_label": "eiffel" }, "generators/elixir": { - "title": "generators/elixir" + "title": "Config Options for elixir", + "sidebar_label": "elixir" }, "generators/elm": { - "title": "generators/elm" + "title": "Config Options for elm", + "sidebar_label": "elm" }, "generators/erlang-client": { - "title": "generators/erlang-client" + "title": "Config Options for erlang-client", + "sidebar_label": "erlang-client" }, "generators/erlang-proper": { - "title": "generators/erlang-proper" + "title": "Config Options for erlang-proper", + "sidebar_label": "erlang-proper" }, "generators/erlang-server": { - "title": "generators/erlang-server" + "title": "Config Options for erlang-server", + "sidebar_label": "erlang-server" }, "generators/flash": { - "title": "generators/flash" + "title": "Config Options for flash", + "sidebar_label": "flash" + }, + "generators/fsharp-functions": { + "title": "Config Options for fsharp-functions", + "sidebar_label": "fsharp-functions" }, "generators/fsharp-giraffe-server": { - "title": "generators/fsharp-giraffe-server" + "title": "Config Options for fsharp-giraffe-server", + "sidebar_label": "fsharp-giraffe-server" }, "generators/fsharp-giraffe": { "title": "generators/fsharp-giraffe" }, "generators/go-experimental": { - "title": "generators/go-experimental" + "title": "Config Options for go-experimental", + "sidebar_label": "go-experimental" }, "generators/go-gin-server": { - "title": "generators/go-gin-server" + "title": "Config Options for go-gin-server", + "sidebar_label": "go-gin-server" }, "generators/go-server": { - "title": "generators/go-server" + "title": "Config Options for go-server", + "sidebar_label": "go-server" }, "generators/go": { - "title": "generators/go" + "title": "Config Options for go", + "sidebar_label": "go" }, "generators/graphql-nodejs-express-server": { - "title": "generators/graphql-nodejs-express-server" + "title": "Config Options for graphql-nodejs-express-server", + "sidebar_label": "graphql-nodejs-express-server" }, "generators/graphql-schema": { - "title": "generators/graphql-schema" + "title": "Config Options for graphql-schema", + "sidebar_label": "graphql-schema" }, "generators/graphql-server": { "title": "generators/graphql-server" }, "generators/groovy": { - "title": "generators/groovy" + "title": "Config Options for groovy", + "sidebar_label": "groovy" + }, + "generators/grpc-schema": { + "title": "generators/grpc-schema" }, "generators/haskell-http-client": { - "title": "generators/haskell-http-client" + "title": "Config Options for haskell-http-client", + "sidebar_label": "haskell-http-client" }, "generators/haskell": { - "title": "generators/haskell" + "title": "Config Options for haskell", + "sidebar_label": "haskell" }, "generators/html": { - "title": "generators/html" + "title": "Config Options for html", + "sidebar_label": "html" }, "generators/html2": { - "title": "generators/html2" + "title": "Config Options for html2", + "sidebar_label": "html2" }, "generators/java-inflector": { - "title": "generators/java-inflector" + "title": "Config Options for java-inflector", + "sidebar_label": "java-inflector" }, "generators/java-msf4j": { - "title": "generators/java-msf4j" + "title": "Config Options for java-msf4j", + "sidebar_label": "java-msf4j" }, "generators/java-pkmst": { - "title": "generators/java-pkmst" + "title": "Config Options for java-pkmst", + "sidebar_label": "java-pkmst" }, "generators/java-play-framework": { - "title": "generators/java-play-framework" + "title": "Config Options for java-play-framework", + "sidebar_label": "java-play-framework" }, "generators/java-undertow-server": { - "title": "generators/java-undertow-server" + "title": "Config Options for java-undertow-server", + "sidebar_label": "java-undertow-server" }, "generators/java-vertx": { - "title": "generators/java-vertx" + "title": "Config Options for java-vertx", + "sidebar_label": "java-vertx" }, "generators/java": { - "title": "generators/java" + "title": "Config Options for java", + "sidebar_label": "java" }, "generators/javascript-closure-angular": { - "title": "generators/javascript-closure-angular" + "title": "Config Options for javascript-closure-angular", + "sidebar_label": "javascript-closure-angular" }, "generators/javascript-flowtyped": { - "title": "generators/javascript-flowtyped" + "title": "Config Options for javascript-flowtyped", + "sidebar_label": "javascript-flowtyped" }, "generators/javascript": { - "title": "generators/javascript" + "title": "Config Options for javascript", + "sidebar_label": "javascript" }, "generators/jaxrs-cxf-cdi": { - "title": "generators/jaxrs-cxf-cdi" + "title": "Config Options for jaxrs-cxf-cdi", + "sidebar_label": "jaxrs-cxf-cdi" }, "generators/jaxrs-cxf-client": { - "title": "generators/jaxrs-cxf-client" + "title": "Config Options for jaxrs-cxf-client", + "sidebar_label": "jaxrs-cxf-client" }, "generators/jaxrs-cxf-extended": { - "title": "generators/jaxrs-cxf-extended" + "title": "Config Options for jaxrs-cxf-extended", + "sidebar_label": "jaxrs-cxf-extended" }, "generators/jaxrs-cxf": { - "title": "generators/jaxrs-cxf" + "title": "Config Options for jaxrs-cxf", + "sidebar_label": "jaxrs-cxf" }, "generators/jaxrs-jersey": { - "title": "generators/jaxrs-jersey" + "title": "Config Options for jaxrs-jersey", + "sidebar_label": "jaxrs-jersey" }, "generators/jaxrs-resteasy-eap": { - "title": "generators/jaxrs-resteasy-eap" + "title": "Config Options for jaxrs-resteasy-eap", + "sidebar_label": "jaxrs-resteasy-eap" }, "generators/jaxrs-resteasy": { - "title": "generators/jaxrs-resteasy" + "title": "Config Options for jaxrs-resteasy", + "sidebar_label": "jaxrs-resteasy" }, "generators/jaxrs-spec": { - "title": "generators/jaxrs-spec" + "title": "Config Options for jaxrs-spec", + "sidebar_label": "jaxrs-spec" }, "generators/jmeter": { - "title": "generators/jmeter" + "title": "Config Options for jmeter", + "sidebar_label": "jmeter" }, "generators/kotlin-server": { - "title": "generators/kotlin-server" + "title": "Config Options for kotlin-server", + "sidebar_label": "kotlin-server" }, "generators/kotlin-spring": { - "title": "generators/kotlin-spring" + "title": "Config Options for kotlin-spring", + "sidebar_label": "kotlin-spring" + }, + "generators/kotlin-vertx": { + "title": "Config Options for kotlin-vertx", + "sidebar_label": "kotlin-vertx" }, "generators/kotlin": { - "title": "generators/kotlin" + "title": "Config Options for kotlin", + "sidebar_label": "kotlin" }, "generators/lua": { - "title": "generators/lua" + "title": "Config Options for lua", + "sidebar_label": "lua" }, "generators/mysql-schema": { - "title": "generators/mysql-schema" + "title": "Config Options for mysql-schema", + "sidebar_label": "mysql-schema" + }, + "generators/nim": { + "title": "Config Options for nim", + "sidebar_label": "nim" }, "generators/nodejs-express-server": { - "title": "generators/nodejs-express-server" + "title": "Config Options for nodejs-express-server", + "sidebar_label": "nodejs-express-server" }, "generators/nodejs-server-deprecated": { - "title": "generators/nodejs-server-deprecated" + "title": "Config Options for nodejs-server-deprecated", + "sidebar_label": "nodejs-server-deprecated" }, "generators/nodejs-server": { "title": "generators/nodejs-server" }, "generators/objc": { - "title": "generators/objc" + "title": "Config Options for objc", + "sidebar_label": "objc" }, "generators/ocaml-client": { "title": "generators/ocaml-client" }, "generators/ocaml": { - "title": "generators/ocaml" + "title": "Config Options for ocaml", + "sidebar_label": "ocaml" }, "generators/openapi-yaml": { - "title": "generators/openapi-yaml" + "title": "Config Options for openapi-yaml", + "sidebar_label": "openapi-yaml" }, "generators/openapi": { - "title": "generators/openapi" + "title": "Config Options for openapi", + "sidebar_label": "openapi" }, "generators/perl": { - "title": "generators/perl" + "title": "Config Options for perl", + "sidebar_label": "perl" }, "generators/php-laravel": { - "title": "generators/php-laravel" + "title": "Config Options for php-laravel", + "sidebar_label": "php-laravel" }, "generators/php-lumen": { - "title": "generators/php-lumen" + "title": "Config Options for php-lumen", + "sidebar_label": "php-lumen" }, "generators/php-silex": { - "title": "generators/php-silex" + "title": "Config Options for php-silex", + "sidebar_label": "php-silex" }, "generators/php-slim": { - "title": "generators/php-slim" + "title": "Config Options for php-slim", + "sidebar_label": "php-slim" }, "generators/php-symfony": { - "title": "generators/php-symfony" + "title": "Config Options for php-symfony", + "sidebar_label": "php-symfony" }, "generators/php-ze-ph": { - "title": "generators/php-ze-ph" + "title": "Config Options for php-ze-ph", + "sidebar_label": "php-ze-ph" }, "generators/php": { - "title": "generators/php" + "title": "Config Options for php", + "sidebar_label": "php" }, "generators/powershell": { - "title": "generators/powershell" + "title": "Config Options for powershell", + "sidebar_label": "powershell" + }, + "generators/protobuf-schema": { + "title": "Config Options for protobuf-schema", + "sidebar_label": "protobuf-schema" }, "generators/python-aiohttp": { - "title": "generators/python-aiohttp" + "title": "Config Options for python-aiohttp", + "sidebar_label": "python-aiohttp" }, "generators/python-blueplanet": { - "title": "generators/python-blueplanet" + "title": "Config Options for python-blueplanet", + "sidebar_label": "python-blueplanet" }, "generators/python-experimental": { - "title": "generators/python-experimental" + "title": "Config Options for python-experimental", + "sidebar_label": "python-experimental" }, "generators/python-flask": { - "title": "generators/python-flask" + "title": "Config Options for python-flask", + "sidebar_label": "python-flask" }, "generators/python": { - "title": "generators/python" + "title": "Config Options for python", + "sidebar_label": "python" }, "generators/r": { - "title": "generators/r" + "title": "Config Options for r", + "sidebar_label": "r" }, "generators/README": { "title": "generators/README" }, "generators/ruby-on-rails": { - "title": "generators/ruby-on-rails" + "title": "Config Options for ruby-on-rails", + "sidebar_label": "ruby-on-rails" }, "generators/ruby-sinatra": { - "title": "generators/ruby-sinatra" + "title": "Config Options for ruby-sinatra", + "sidebar_label": "ruby-sinatra" }, "generators/ruby": { - "title": "generators/ruby" + "title": "Config Options for ruby", + "sidebar_label": "ruby" }, "generators/rust-server": { - "title": "generators/rust-server" + "title": "Config Options for rust-server", + "sidebar_label": "rust-server" }, "generators/rust": { - "title": "generators/rust" + "title": "Config Options for rust", + "sidebar_label": "rust" }, "generators/scala-akka": { - "title": "generators/scala-akka" + "title": "Config Options for scala-akka", + "sidebar_label": "scala-akka" }, "generators/scala-finch": { - "title": "generators/scala-finch" + "title": "Config Options for scala-finch", + "sidebar_label": "scala-finch" }, "generators/scala-gatling": { - "title": "generators/scala-gatling" + "title": "Config Options for scala-gatling", + "sidebar_label": "scala-gatling" }, "generators/scala-httpclient-deprecated": { - "title": "generators/scala-httpclient-deprecated" + "title": "Config Options for scala-httpclient-deprecated", + "sidebar_label": "scala-httpclient-deprecated" }, "generators/scala-httpclient": { "title": "generators/scala-httpclient" }, "generators/scala-lagom-server": { - "title": "generators/scala-lagom-server" + "title": "Config Options for scala-lagom-server", + "sidebar_label": "scala-lagom-server" }, "generators/scala-play-framework": { "title": "generators/scala-play-framework" }, "generators/scala-play-server": { - "title": "generators/scala-play-server" + "title": "Config Options for scala-play-server", + "sidebar_label": "scala-play-server" }, "generators/scalatra": { - "title": "generators/scalatra" + "title": "Config Options for scalatra", + "sidebar_label": "scalatra" }, "generators/scalaz": { - "title": "generators/scalaz" + "title": "Config Options for scalaz", + "sidebar_label": "scalaz" }, "generators/spring": { - "title": "generators/spring" + "title": "Config Options for spring", + "sidebar_label": "spring" }, "generators/swift2-deprecated": { - "title": "generators/swift2-deprecated" + "title": "Config Options for swift2-deprecated", + "sidebar_label": "swift2-deprecated" }, "generators/swift3-deprecated": { - "title": "generators/swift3-deprecated" + "title": "Config Options for swift3-deprecated", + "sidebar_label": "swift3-deprecated" }, "generators/swift4": { - "title": "generators/swift4" + "title": "Config Options for swift4", + "sidebar_label": "swift4" }, "generators/typescript-angular": { - "title": "generators/typescript-angular" + "title": "Config Options for typescript-angular", + "sidebar_label": "typescript-angular" }, "generators/typescript-angularjs": { - "title": "generators/typescript-angularjs" + "title": "Config Options for typescript-angularjs", + "sidebar_label": "typescript-angularjs" }, "generators/typescript-aurelia": { - "title": "generators/typescript-aurelia" + "title": "Config Options for typescript-aurelia", + "sidebar_label": "typescript-aurelia" }, "generators/typescript-axios": { - "title": "generators/typescript-axios" + "title": "Config Options for typescript-axios", + "sidebar_label": "typescript-axios" }, "generators/typescript-fetch": { - "title": "generators/typescript-fetch" + "title": "Config Options for typescript-fetch", + "sidebar_label": "typescript-fetch" }, "generators/typescript-inversify": { - "title": "generators/typescript-inversify" + "title": "Config Options for typescript-inversify", + "sidebar_label": "typescript-inversify" }, "generators/typescript-jquery": { - "title": "generators/typescript-jquery" + "title": "Config Options for typescript-jquery", + "sidebar_label": "typescript-jquery" }, "generators/typescript-node": { - "title": "generators/typescript-node" + "title": "Config Options for typescript-node", + "sidebar_label": "typescript-node" }, "generators/typescript-rxjs": { - "title": "generators/typescript-rxjs" + "title": "Config Options for typescript-rxjs", + "sidebar_label": "typescript-rxjs" }, "installation": { "title": "CLI Installation" diff --git a/website/package.json b/website/package.json index f7df0effefc0..fe0519b7f465 100644 --- a/website/package.json +++ b/website/package.json @@ -9,11 +9,11 @@ "rename-version": "docusaurus-rename-version" }, "devDependencies": { - "docusaurus": "^1.11.1" + "docusaurus": "^1.13.0" }, "dependencies": { "js-yaml": "^3.12.0", - "lodash.template": "^4.5.0", - "lodash.merge": "^4.6.2" + "lodash.merge": "^4.6.2", + "lodash.template": "^4.5.0" } } diff --git a/website/sidebars.json b/website/sidebars.json index fbc57e083631..c4bb33d573d2 100755 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -23,12 +23,10 @@ "swagger-codegen-migration", "fork-qna" ], - "Releases": [ "release-summary", "release-3-0-0" ], - "API": [ "generators" ] diff --git a/website/siteConfig.js b/website/siteConfig.js index 98a32f37d91c..2918fe67ed6c 100755 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -31,6 +31,8 @@ const siteConfig = { gaTrackingId: 'UA-132927057-1', + docsSideNavCollapsible: true, + // For no header links in the top nav bar -> headerLinks: [], headerLinks: [ {doc: 'installation', label: 'Get Started'}, @@ -101,6 +103,11 @@ const siteConfig = { // Show documentation's last update time. enableUpdateTime: true, + scrollToTop: true, + scrollToTopOptions: { + zIndex: 100, + }, + // You may provide arbitrary config keys to be used as needed by your // template. For example, if you need your repo's URL... repoUrl: 'https://github.com/OpenAPITools/openapi-generator', diff --git a/website/yarn.lock b/website/yarn.lock index db52f3b285da..bf67884eef3f 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -2,6 +2,13 @@ # yarn lockfile v1 +"@babel/code-frame@7.5.5", "@babel/code-frame@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" + integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== + dependencies: + "@babel/highlight" "^7.0.0" + "@babel/code-frame@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" @@ -9,22 +16,22 @@ dependencies: "@babel/highlight" "^7.0.0" -"@babel/core@^7.0.0": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.2.2.tgz#07adba6dde27bb5ad8d8672f15fde3e08184a687" - integrity sha512-59vB0RWt09cAct5EIe58+NzGP4TFSD3Bz//2/ELy3ZeTeKF6VTD1AXlH8BGGbCX0PuobZBsIzO7IAI9PH67eKw== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.2.2" - "@babel/helpers" "^7.2.0" - "@babel/parser" "^7.2.2" - "@babel/template" "^7.2.2" - "@babel/traverse" "^7.2.2" - "@babel/types" "^7.2.2" +"@babel/core@^7.5.5": + version "7.6.4" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.6.4.tgz#6ebd9fe00925f6c3e177bb726a188b5f578088ff" + integrity sha512-Rm0HGw101GY8FTzpWSyRbki/jzq+/PkNQJ+nSulrdY6gFGOsNseCqD6KHRYe2E+EdzuBdr2pxCp6s4Uk6eJ+XQ== + dependencies: + "@babel/code-frame" "^7.5.5" + "@babel/generator" "^7.6.4" + "@babel/helpers" "^7.6.2" + "@babel/parser" "^7.6.4" + "@babel/template" "^7.6.0" + "@babel/traverse" "^7.6.3" + "@babel/types" "^7.6.3" convert-source-map "^1.1.0" debug "^4.1.0" json5 "^2.1.0" - lodash "^4.17.10" + lodash "^4.17.13" resolve "^1.3.2" semver "^5.4.1" source-map "^0.5.0" @@ -40,6 +47,16 @@ source-map "^0.5.0" trim-right "^1.0.1" +"@babel/generator@^7.6.3", "@babel/generator@^7.6.4": + version "7.6.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.4.tgz#a4f8437287bf9671b07f483b76e3bb731bc97671" + integrity sha512-jsBuXkFoZxk0yWLyGI9llT9oiQ2FeTASmRFE32U+aaDTfoE92t78eroO7PTpU/OrYq38hlcDM6vbfLDaOLy+7w== + dependencies: + "@babel/types" "^7.6.3" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + "@babel/helper-annotate-as-pure@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" @@ -63,34 +80,35 @@ "@babel/types" "^7.0.0" esutils "^2.0.0" -"@babel/helper-call-delegate@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.1.0.tgz#6a957f105f37755e8645343d3038a22e1449cc4a" - integrity sha512-YEtYZrw3GUK6emQHKthltKNZwszBcHK58Ygcis+gVUrF4/FmTVr5CCqQNSfmvg2y+YDEANyYoaLz/SHsnusCwQ== +"@babel/helper-call-delegate@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.4.4.tgz#87c1f8ca19ad552a736a7a27b1c1fcf8b1ff1f43" + integrity sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ== dependencies: - "@babel/helper-hoist-variables" "^7.0.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/helper-hoist-variables" "^7.4.4" + "@babel/traverse" "^7.4.4" + "@babel/types" "^7.4.4" -"@babel/helper-create-class-features-plugin@^7.2.3": - version "7.2.3" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.2.3.tgz#f6e719abb90cb7f4a69591e35fd5eb89047c4a7c" - integrity sha512-xO/3Gn+2C7/eOUeb0VRnSP1+yvWHNxlpAot1eMhtoKDCN7POsyQP5excuT5UsV5daHxMWBeIIOeI5cmB8vMRgQ== +"@babel/helper-create-class-features-plugin@^7.5.5": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.6.0.tgz#769711acca889be371e9bc2eb68641d55218021f" + integrity sha512-O1QWBko4fzGju6VoVvrZg0RROCVifcLxiApnGP3OWfWzvxRZFCoBD81K5ur5e3bVY2Vf/5rIJm8cqPKn8HUJng== dependencies: "@babel/helper-function-name" "^7.1.0" - "@babel/helper-member-expression-to-functions" "^7.0.0" + "@babel/helper-member-expression-to-functions" "^7.5.5" "@babel/helper-optimise-call-expression" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.2.3" + "@babel/helper-replace-supers" "^7.5.5" + "@babel/helper-split-export-declaration" "^7.4.4" -"@babel/helper-define-map@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz#3b74caec329b3c80c116290887c0dd9ae468c20c" - integrity sha512-yPPcW8dc3gZLN+U1mhYV91QU3n5uTbx7DUdf8NnPbjS0RMwBuHi9Xt2MUgppmNz7CJxTBWsGczTiEp1CSOTPRg== +"@babel/helper-define-map@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.5.5.tgz#3dec32c2046f37e09b28c93eb0b103fd2a25d369" + integrity sha512-fTfxx7i0B5NJqvUOBBGREnrqbTxRh7zinBANpZXAVDlsZxYdclDp467G1sQ8VZYMnAURY3RpBUAgOYT9GfzHBg== dependencies: "@babel/helper-function-name" "^7.1.0" - "@babel/types" "^7.0.0" - lodash "^4.17.10" + "@babel/types" "^7.5.5" + lodash "^4.17.13" "@babel/helper-explode-assignable-expression@^7.1.0": version "7.1.0" @@ -116,19 +134,19 @@ dependencies: "@babel/types" "^7.0.0" -"@babel/helper-hoist-variables@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz#46adc4c5e758645ae7a45deb92bab0918c23bb88" - integrity sha512-Ggv5sldXUeSKsuzLkddtyhyHe2YantsxWKNi7A+7LeD12ExRDWTRk29JCXpaHPAbMaIPZSil7n+lq78WY2VY7w== +"@babel/helper-hoist-variables@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz#0298b5f25c8c09c53102d52ac4a98f773eb2850a" + integrity sha512-VYk2/H/BnYbZDDg39hr3t2kKyifAm1W6zHRfhx8jGjIHpQEBv9dry7oQ2f3+J703TLu69nYdxsovl0XYfcnK4w== dependencies: - "@babel/types" "^7.0.0" + "@babel/types" "^7.4.4" -"@babel/helper-member-expression-to-functions@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz#8cd14b0a0df7ff00f009e7d7a436945f47c7a16f" - integrity sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg== +"@babel/helper-member-expression-to-functions@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.5.5.tgz#1fb5b8ec4453a93c439ee9fe3aeea4a84b76b590" + integrity sha512-5qZ3D1uMclSNqYcXqiHoA0meVdv+xUEex9em2fqMnrk/scphGlGgg66zjMrPJESPwrFJ6sbfFQYUSa0Mz7FabA== dependencies: - "@babel/types" "^7.0.0" + "@babel/types" "^7.5.5" "@babel/helper-module-imports@^7.0.0": version "7.0.0" @@ -149,6 +167,18 @@ "@babel/types" "^7.2.2" lodash "^4.17.10" +"@babel/helper-module-transforms@^7.4.4": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.5.5.tgz#f84ff8a09038dcbca1fd4355661a500937165b4a" + integrity sha512-jBeCvETKuJqeiaCdyaheF40aXnnU1+wkSiUs/IQg3tB85up1LyL8x77ClY8qJpuRJUcXQo+ZtdNESmZl4j56Pw== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-simple-access" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/template" "^7.4.4" + "@babel/types" "^7.5.5" + lodash "^4.17.13" + "@babel/helper-optimise-call-expression@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz#a2920c5702b073c15de51106200aa8cad20497d5" @@ -168,6 +198,13 @@ dependencies: lodash "^4.17.10" +"@babel/helper-regex@^7.4.4": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.5.5.tgz#0aa6824f7100a2e0e89c1527c23936c152cab351" + integrity sha512-CkCYQLkfkiugbRDO8eZn6lRuR8kzZoGXCg3149iTk5se7g6qykSpy3+hELSwquhu+TgHn8nkLiBwHvNX8Hofcw== + dependencies: + lodash "^4.17.13" + "@babel/helper-remap-async-to-generator@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz#361d80821b6f38da75bd3f0785ece20a88c5fe7f" @@ -179,15 +216,15 @@ "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" -"@babel/helper-replace-supers@^7.1.0", "@babel/helper-replace-supers@^7.2.3": - version "7.2.3" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.2.3.tgz#19970020cf22677d62b3a689561dbd9644d8c5e5" - integrity sha512-GyieIznGUfPXPWu0yLS6U55Mz67AZD9cUk0BfirOWlPrXlBcan9Gz+vHGz+cPfuoweZSnPzPIm67VtQM0OWZbA== +"@babel/helper-replace-supers@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.5.5.tgz#f84ce43df031222d2bad068d2626cb5799c34bc2" + integrity sha512-XvRFWrNnlsow2u7jXDuH4jDDctkxbS7gXssrP4q2nUD606ukXHRvydj346wmNg+zAgpFx4MWf4+usfC93bElJg== dependencies: - "@babel/helper-member-expression-to-functions" "^7.0.0" + "@babel/helper-member-expression-to-functions" "^7.5.5" "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/traverse" "^7.2.3" - "@babel/types" "^7.0.0" + "@babel/traverse" "^7.5.5" + "@babel/types" "^7.5.5" "@babel/helper-simple-access@^7.1.0": version "7.1.0" @@ -204,6 +241,13 @@ dependencies: "@babel/types" "^7.0.0" +"@babel/helper-split-export-declaration@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz#ff94894a340be78f53f06af038b205c49d993677" + integrity sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q== + dependencies: + "@babel/types" "^7.4.4" + "@babel/helper-wrap-function@^7.1.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz#c4e0012445769e2815b55296ead43a958549f6fa" @@ -214,14 +258,14 @@ "@babel/traverse" "^7.1.0" "@babel/types" "^7.2.0" -"@babel/helpers@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.2.0.tgz#8335f3140f3144270dc63c4732a4f8b0a50b7a21" - integrity sha512-Fr07N+ea0dMcMN8nFpuK6dUIT7/ivt9yKQdEEnjVS83tG2pHwPi03gYmk/tyuwONnZ+sY+GFFPlWGgCtW1hF9A== +"@babel/helpers@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.6.2.tgz#681ffe489ea4dcc55f23ce469e58e59c1c045153" + integrity sha512-3/bAUL8zZxYs1cdX2ilEE0WobqbCmKWr/889lf2SS0PpDcpEIY8pb1CCyz0pEcX3pEb+MCbks1jIokz2xLtGTA== dependencies: - "@babel/template" "^7.1.2" - "@babel/traverse" "^7.1.5" - "@babel/types" "^7.2.0" + "@babel/template" "^7.6.0" + "@babel/traverse" "^7.6.2" + "@babel/types" "^7.6.0" "@babel/highlight@^7.0.0": version "7.0.0" @@ -237,6 +281,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.2.3.tgz#32f5df65744b70888d17872ec106b02434ba1489" integrity sha512-0LyEcVlfCoFmci8mXx8A5oIkpkOgyo8dRHtxBnK9RRBwxO2+JZPNsqtVEZQ7mJFPxnXF9lfmU24mHOPI0qnlkA== +"@babel/parser@^7.6.0", "@babel/parser@^7.6.3", "@babel/parser@^7.6.4": + version "7.6.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.4.tgz#cb9b36a7482110282d5cb6dd424ec9262b473d81" + integrity sha512-D8RHPW5qd0Vbyo3qb+YjO5nvUVRTXFLQ/FsDxJU2Nqz4uB5EnUN0ZQSEYpvTIbRuttig1XbHWU5oMeQwQSAA+A== + "@babel/plugin-proposal-async-generator-functions@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e" @@ -246,13 +295,21 @@ "@babel/helper-remap-async-to-generator" "^7.1.0" "@babel/plugin-syntax-async-generators" "^7.2.0" -"@babel/plugin-proposal-class-properties@^7.0.0": - version "7.2.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.2.3.tgz#c9e1294363b346cff333007a92080f3203698461" - integrity sha512-FVuQngLoN2iDrpW7LmhPZ2sO4DJxf35FOcwidwB9Ru9tMvI5URthnkVHuG14IStV+TzkMTyLMoOUlSTtrdVwqw== +"@babel/plugin-proposal-class-properties@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.5.5.tgz#a974cfae1e37c3110e71f3c6a2e48b8e71958cd4" + integrity sha512-AF79FsnWFxjlaosgdi421vmYG6/jg79bVD0dpD44QdgobzHKuLZ6S3vl8la9qIeSwGi8i1fS0O1mfuDAAdo1/A== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.5.5" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-proposal-dynamic-import@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.5.0.tgz#e532202db4838723691b10a67b8ce509e397c506" + integrity sha512-x/iMjggsKTFHYC6g11PL7Qy58IK8H5zqfm9e6hu4z1iH2IRyAp9u9dL80zA6R76yFovETFLKz2VJIC2iIPBuFw== dependencies: - "@babel/helper-create-class-features-plugin" "^7.2.3" "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-dynamic-import" "^7.2.0" "@babel/plugin-proposal-json-strings@^7.2.0": version "7.2.0" @@ -262,10 +319,10 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-json-strings" "^7.2.0" -"@babel/plugin-proposal-object-rest-spread@^7.0.0", "@babel/plugin-proposal-object-rest-spread@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.2.0.tgz#88f5fec3e7ad019014c97f7ee3c992f0adbf7fb8" - integrity sha512-1L5mWLSvR76XYUQJXkd/EEQgjq8HHRP6lQuZTTg0VA4tTGPpGemmCdAfQIz1rzEuWAm+ecP8PyyEm30jC1eQCg== +"@babel/plugin-proposal-object-rest-spread@^7.5.5", "@babel/plugin-proposal-object-rest-spread@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.6.2.tgz#8ffccc8f3a6545e9f78988b6bf4fe881b88e8096" + integrity sha512-LDBXlmADCsMZV1Y9OQwMc0MyGZ8Ta/zlD9N67BfQT8uYwkRswiu2hU6nJKrjrt/58aH/vqfQlR/9yId/7A2gWw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-object-rest-spread" "^7.2.0" @@ -278,14 +335,14 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" -"@babel/plugin-proposal-unicode-property-regex@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.2.0.tgz#abe7281fe46c95ddc143a65e5358647792039520" - integrity sha512-LvRVYb7kikuOtIoUeWTkOxQEV1kYvL5B6U3iWEGCzPNRus1MzJweFqORTj+0jkxozkTSYNJozPOddxmqdqsRpw== +"@babel/plugin-proposal-unicode-property-regex@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.6.2.tgz#05413762894f41bfe42b9a5e80919bd575dcc802" + integrity sha512-NxHETdmpeSCtiatMRYWVJo7266rrvAC3DTeG5exQBIH/fMIUK7ejDNznBbn3HQl/o9peymRRg7Yqkx6PdUXmMw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" - regexpu-core "^4.2.0" + "@babel/helper-regex" "^7.4.4" + regexpu-core "^4.6.0" "@babel/plugin-syntax-async-generators@^7.2.0": version "7.2.0" @@ -294,6 +351,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-syntax-dynamic-import@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.2.0.tgz#69c159ffaf4998122161ad8ebc5e6d1f55df8612" + integrity sha512-mVxuJ0YroI/h/tbFTPGZR8cv6ai+STMKNBq0f8hFxsxWjl94qqhsb+wXbpNMDPU3cfR1TIsVFzU3nXyZMqyK4w== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-json-strings@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz#72bd13f6ffe1d25938129d2a186b11fd62951470" @@ -329,10 +393,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-async-to-generator@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.2.0.tgz#68b8a438663e88519e65b776f8938f3445b1a2ff" - integrity sha512-CEHzg4g5UraReozI9D4fblBYABs7IM6UerAVG7EJVrTLC5keh00aEuLUT+O40+mJCEzaXkYfTCUKIyeDfMOFFQ== +"@babel/plugin-transform-async-to-generator@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.5.0.tgz#89a3848a0166623b5bc481164b5936ab947e887e" + integrity sha512-mqvkzwIGkq0bEF1zLRRiTdjfomZJDV33AH3oQzHVGkI2VzEmXLpKKOBvEVaFZBJdN0XTyH38s9j/Kiqr68dggg== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -345,26 +409,26 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-block-scoping@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.2.0.tgz#f17c49d91eedbcdf5dd50597d16f5f2f770132d4" - integrity sha512-vDTgf19ZEV6mx35yiPJe4fS02mPQUUcBNwWQSZFXSzTSbsJFQvHt7DqyS3LK8oOWALFOsJ+8bbqBgkirZteD5Q== +"@babel/plugin-transform-block-scoping@^7.6.3": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.6.3.tgz#6e854e51fbbaa84351b15d4ddafe342f3a5d542a" + integrity sha512-7hvrg75dubcO3ZI2rjYTzUrEuh1E9IyDEhhB6qfcooxhDA33xx2MasuLVgdxzcP6R/lipAC6n9ub9maNW6RKdw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - lodash "^4.17.10" + lodash "^4.17.13" -"@babel/plugin-transform-classes@^7.2.0": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.2.2.tgz#6c90542f210ee975aa2aa8c8b5af7fa73a126953" - integrity sha512-gEZvgTy1VtcDOaQty1l10T3jQmJKlNVxLDCs+3rCVPr6nMkODLELxViq5X9l+rfxbie3XrfrMCYYY6eX3aOcOQ== +"@babel/plugin-transform-classes@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.5.5.tgz#d094299d9bd680a14a2a0edae38305ad60fb4de9" + integrity sha512-U2htCNK/6e9K7jGyJ++1p5XRU+LJjrwtoiVn9SzRlDT2KubcZ11OOwy3s24TjHxPgxNwonCYP7U2K51uVYCMDg== dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-define-map" "^7.1.0" + "@babel/helper-define-map" "^7.5.5" "@babel/helper-function-name" "^7.1.0" "@babel/helper-optimise-call-expression" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.0.0" + "@babel/helper-replace-supers" "^7.5.5" + "@babel/helper-split-export-declaration" "^7.4.4" globals "^11.1.0" "@babel/plugin-transform-computed-properties@^7.2.0": @@ -374,26 +438,26 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-destructuring@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.2.0.tgz#e75269b4b7889ec3a332cd0d0c8cff8fed0dc6f3" - integrity sha512-coVO2Ayv7g0qdDbrNiadE4bU7lvCd9H539m2gMknyVjjMdwF/iCOM7R+E8PkntoqLkltO0rk+3axhpp/0v68VQ== +"@babel/plugin-transform-destructuring@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.6.0.tgz#44bbe08b57f4480094d57d9ffbcd96d309075ba6" + integrity sha512-2bGIS5P1v4+sWTCnKNDZDxbGvEqi0ijeqM/YqHtVGrvG2y0ySgnEEhXErvE9dA0bnIzY9bIzdFK0jFA46ASIIQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-dotall-regex@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.2.0.tgz#f0aabb93d120a8ac61e925ea0ba440812dbe0e49" - integrity sha512-sKxnyHfizweTgKZf7XsXu/CNupKhzijptfTM+bozonIuyVrLWVUvYjE2bhuSBML8VQeMxq4Mm63Q9qvcvUcciQ== +"@babel/plugin-transform-dotall-regex@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.6.2.tgz#44abb948b88f0199a627024e1508acaf8dc9b2f9" + integrity sha512-KGKT9aqKV+9YMZSkowzYoYEiHqgaDhGmPNZlZxX6UeHC4z30nC1J9IrZuGqbYFB1jaIGdv91ujpze0exiVK8bA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" - regexpu-core "^4.1.3" + "@babel/helper-regex" "^7.4.4" + regexpu-core "^4.6.0" -"@babel/plugin-transform-duplicate-keys@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.2.0.tgz#d952c4930f312a4dbfff18f0b2914e60c35530b3" - integrity sha512-q+yuxW4DsTjNceUiTzK0L+AfQ0zD9rWaTLiUqHA8p0gxx7lu1EylenfzjeIWNkPy6e/0VG/Wjw9uf9LueQwLOw== +"@babel/plugin-transform-duplicate-keys@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.5.0.tgz#c5dbf5106bf84cdf691222c0974c12b1df931853" + integrity sha512-igcziksHizyQPlX9gfSjHkE2wmoCH3evvD2qR5w29/Dk0SMKE/eOI7f1HhBdNhR/zxJDqrgpoDTq5YSLH/XMsQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" @@ -405,17 +469,17 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-for-of@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.2.0.tgz#ab7468befa80f764bb03d3cb5eef8cc998e1cad9" - integrity sha512-Kz7Mt0SsV2tQk6jG5bBv5phVbkd0gd27SgYD4hH1aLMJRchM0dzHaXvrWhVZ+WxAlDoAKZ7Uy3jVTW2mKXQ1WQ== +"@babel/plugin-transform-for-of@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.4.tgz#0267fc735e24c808ba173866c6c4d1440fc3c556" + integrity sha512-9T/5Dlr14Z9TIEXLXkt8T1DU7F24cbhwhMNUziN3hB1AXoZcdzPcTiKGRn/6iOymDqtTKWnr/BtRKN9JwbKtdQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-function-name@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.2.0.tgz#f7930362829ff99a3174c39f0afcc024ef59731a" - integrity sha512-kWgksow9lHdvBC2Z4mxTsvc7YdY7w/V6B2vy9cTIPtLEE9NhwoWivaxdNM/S37elu5bqlLP/qOY906LukO9lkQ== +"@babel/plugin-transform-function-name@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.4.tgz#e1436116abb0610c2259094848754ac5230922ad" + integrity sha512-iU9pv7U+2jC9ANQkKeNF6DrPy4GBa4NWQtl6dHB4Pb3izX2JOEvDTFarlNsBj/63ZEzNNIAMs3Qw4fNCcSOXJA== dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -427,30 +491,40 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-modules-amd@^7.2.0": +"@babel/plugin-transform-member-expression-literals@^7.2.0": version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz#82a9bce45b95441f617a24011dc89d12da7f4ee6" - integrity sha512-mK2A8ucqz1qhrdqjS9VMIDfIvvT2thrEsIQzbaTdc5QFzhDjQv2CkJJ5f6BXIkgbmaoax3zBr2RyvV/8zeoUZw== + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.2.0.tgz#fa10aa5c58a2cb6afcf2c9ffa8cb4d8b3d489a2d" + integrity sha512-HiU3zKkSU6scTidmnFJ0bMX8hz5ixC93b4MHMiYebmk2lUVNGOboPsqQvx5LzooihijUoLR/v7Nc1rbBtnc7FA== dependencies: - "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-modules-commonjs@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.2.0.tgz#c4f1933f5991d5145e9cfad1dfd848ea1727f404" - integrity sha512-V6y0uaUQrQPXUrmj+hgnks8va2L0zcZymeU7TtWEgdRLNkceafKXEduv7QzgQAE4lT+suwooG9dC7LFhdRAbVQ== +"@babel/plugin-transform-modules-amd@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.5.0.tgz#ef00435d46da0a5961aa728a1d2ecff063e4fb91" + integrity sha512-n20UsQMKnWrltocZZm24cRURxQnWIvsABPJlw/fvoy9c6AgHZzoelAIzajDHAQrDpuKFFPPcFGd7ChsYuIUMpg== dependencies: "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" + babel-plugin-dynamic-import-node "^2.3.0" + +"@babel/plugin-transform-modules-commonjs@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.6.0.tgz#39dfe957de4420445f1fcf88b68a2e4aa4515486" + integrity sha512-Ma93Ix95PNSEngqomy5LSBMAQvYKVe3dy+JlVJSHEXZR5ASL9lQBedMiCyVtmTLraIDVRE3ZjTZvmXXD2Ozw3g== + dependencies: + "@babel/helper-module-transforms" "^7.4.4" + "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-simple-access" "^7.1.0" + babel-plugin-dynamic-import-node "^2.3.0" -"@babel/plugin-transform-modules-systemjs@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.2.0.tgz#912bfe9e5ff982924c81d0937c92d24994bb9068" - integrity sha512-aYJwpAhoK9a+1+O625WIjvMY11wkB/ok0WClVwmeo3mCjcNRjt+/8gHWrB5i+00mUju0gWsBkQnPpdvQ7PImmQ== +"@babel/plugin-transform-modules-systemjs@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.5.0.tgz#e75266a13ef94202db2a0620977756f51d52d249" + integrity sha512-Q2m56tyoQWmuNGxEtUyeEkm6qJYFqs4c+XyXH5RAuYxObRNz9Zgj/1g2GMnjYp2EUyEy7YTrxliGCXzecl/vJg== dependencies: - "@babel/helper-hoist-variables" "^7.0.0" + "@babel/helper-hoist-variables" "^7.4.4" "@babel/helper-plugin-utils" "^7.0.0" + babel-plugin-dynamic-import-node "^2.3.0" "@babel/plugin-transform-modules-umd@^7.2.0": version "7.2.0" @@ -460,30 +534,44 @@ "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-new-target@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0.tgz#ae8fbd89517fa7892d20e6564e641e8770c3aa4a" - integrity sha512-yin069FYjah+LbqfGeTfzIBODex/e++Yfa0rH0fpfam9uTbuEeEOx5GLGr210ggOV77mVRNoeqSYqeuaqSzVSw== +"@babel/plugin-transform-named-capturing-groups-regex@^7.6.3": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.6.3.tgz#aaa6e409dd4fb2e50b6e2a91f7e3a3149dbce0cf" + integrity sha512-jTkk7/uE6H2s5w6VlMHeWuH+Pcy2lmdwFoeWCVnvIrDUnB5gQqTVI8WfmEAhF2CDEarGrknZcmSFg1+bkfCoSw== + dependencies: + regexpu-core "^4.6.0" + +"@babel/plugin-transform-new-target@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.4.tgz#18d120438b0cc9ee95a47f2c72bc9768fbed60a5" + integrity sha512-r1z3T2DNGQwwe2vPGZMBNjioT2scgWzK9BCnDEh+46z8EEwXBq24uRzd65I7pjtugzPSj921aM15RpESgzsSuA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-object-super@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz#b35d4c10f56bab5d650047dad0f1d8e8814b6598" - integrity sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg== +"@babel/plugin-transform-object-super@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.5.5.tgz#c70021df834073c65eb613b8679cc4a381d1a9f9" + integrity sha512-un1zJQAhSosGFBduPgN/YFNvWVpRuHKU7IHBglLoLZsGmruJPOo6pbInneflUdmq7YvSVqhpPs5zdBvLnteltQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.1.0" + "@babel/helper-replace-supers" "^7.5.5" -"@babel/plugin-transform-parameters@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.2.0.tgz#0d5ad15dc805e2ea866df4dd6682bfe76d1408c2" - integrity sha512-kB9+hhUidIgUoBQ0MsxMewhzr8i60nMa2KgeJKQWYrqQpqcBYtnpR+JgkadZVZoaEZ/eKu9mclFaVwhRpLNSzA== +"@babel/plugin-transform-parameters@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.4.tgz#7556cf03f318bd2719fe4c922d2d808be5571e16" + integrity sha512-oMh5DUO1V63nZcu/ZVLQFqiihBGo4OpxJxR1otF50GMeCLiRx5nUdtokd+u9SuVJrvvuIh9OosRFPP4pIPnwmw== dependencies: - "@babel/helper-call-delegate" "^7.1.0" + "@babel/helper-call-delegate" "^7.4.4" "@babel/helper-get-function-arity" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-transform-property-literals@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.2.0.tgz#03e33f653f5b25c4eb572c98b9485055b389e905" + integrity sha512-9q7Dbk4RhgcLp8ebduOpCbtjh7C0itoLYHXd9ueASKAG/is5PQtMR5VJGka9NKqGhYEGn5ITahd4h9QeBMylWQ== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-transform-react-display-name@^7.0.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.2.0.tgz#ebfaed87834ce8dc4279609a4f0c324c156e3eb0" @@ -516,12 +604,19 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-jsx" "^7.2.0" -"@babel/plugin-transform-regenerator@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0.tgz#5b41686b4ed40bef874d7ed6a84bdd849c13e0c1" - integrity sha512-sj2qzsEx8KDVv1QuJc/dEfilkg3RRPvPYx/VnKLtItVQRWt1Wqf5eVCOLZm29CiGFfYYsA3VPjfizTCV0S0Dlw== +"@babel/plugin-transform-regenerator@^7.4.5": + version "7.4.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.5.tgz#629dc82512c55cee01341fb27bdfcb210354680f" + integrity sha512-gBKRh5qAaCWntnd09S8QC7r3auLCqq5DI6O0DlfoyDjslSBVqBibrMdsqO+Uhmx3+BlOmE/Kw1HFxmGbv0N9dA== + dependencies: + regenerator-transform "^0.14.0" + +"@babel/plugin-transform-reserved-words@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.2.0.tgz#4792af87c998a49367597d07fedf02636d2e1634" + integrity sha512-fz43fqW8E1tAB3DKF19/vxbpib1fuyCwSPE418ge5ZxILnBhWyhtPgz8eh1RCGGJlwvksHkyxMxh0eenFi+kFw== dependencies: - regenerator-transform "^0.13.3" + "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-shorthand-properties@^7.2.0": version "7.2.0" @@ -530,10 +625,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-spread@^7.2.0": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz#3103a9abe22f742b6d406ecd3cd49b774919b406" - integrity sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w== +"@babel/plugin-transform-spread@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.6.2.tgz#fc77cf798b24b10c46e1b51b1b88c2bf661bb8dd" + integrity sha512-DpSvPFryKdK1x+EDJYCy28nmAaIMdxmhot62jAXF/o99iA33Zj2Lmcp3vDmz+MUh0LNYVPvfj5iC3feb3/+PFg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" @@ -545,10 +640,10 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" -"@babel/plugin-transform-template-literals@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.2.0.tgz#d87ed01b8eaac7a92473f608c97c089de2ba1e5b" - integrity sha512-FkPix00J9A/XWXv4VoKJBMeSkyY9x/TqIh76wzcdfl57RJJcf8CehQ08uwfhCDNtRQYtHQKBTwKZDEyjE13Lwg== +"@babel/plugin-transform-template-literals@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.4.4.tgz#9d28fea7bbce637fb7612a0750989d8321d4bcb0" + integrity sha512-mQrEC4TWkhLN0z8ygIvEL9ZEToPhG5K7KDW3pzGqOfIGZ28Jb0POUkeWcoz8HnHvhFy6dwAT1j8OzqN8s804+g== dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -560,69 +655,78 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-unicode-regex@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.2.0.tgz#4eb8db16f972f8abb5062c161b8b115546ade08b" - integrity sha512-m48Y0lMhrbXEJnVUaYly29jRXbQ3ksxPrS1Tg8t+MHqzXhtBYAvI51euOBaoAlZLPHsieY9XPVMf80a5x0cPcA== +"@babel/plugin-transform-unicode-regex@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.6.2.tgz#b692aad888a7e8d8b1b214be6b9dc03d5031f698" + integrity sha512-orZI6cWlR3nk2YmYdb0gImrgCUwb5cBUwjf6Ks6dvNVvXERkwtJWOQaEOjPiu0Gu1Tq6Yq/hruCZZOOi9F34Dw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" - regexpu-core "^4.1.3" + "@babel/helper-regex" "^7.4.4" + regexpu-core "^4.6.0" -"@babel/polyfill@^7.0.0": - version "7.2.5" - resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.2.5.tgz#6c54b964f71ad27edddc567d065e57e87ed7fa7d" - integrity sha512-8Y/t3MWThtMLYr0YNC/Q76tqN1w30+b0uQMeFUYauG2UGTR19zyUtFrAzT23zNtBxPp+LbE5E/nwV/q/r3y6ug== +"@babel/polyfill@^7.4.4": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.6.0.tgz#6d89203f8b6cd323e8d946e47774ea35dc0619cc" + integrity sha512-q5BZJI0n/B10VaQQvln1IlDK3BTBJFbADx7tv+oXDPIDZuTo37H5Adb9jhlXm/fEN4Y7/64qD9mnrJJG7rmaTw== dependencies: - core-js "^2.5.7" - regenerator-runtime "^0.12.0" + core-js "^2.6.5" + regenerator-runtime "^0.13.2" -"@babel/preset-env@^7.0.0": - version "7.2.3" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.2.3.tgz#948c8df4d4609c99c7e0130169f052ea6a7a8933" - integrity sha512-AuHzW7a9rbv5WXmvGaPX7wADxFkZIqKlbBh1dmZUQp4iwiPpkE/Qnrji6SC4UQCQzvWY/cpHET29eUhXS9cLPw== +"@babel/preset-env@^7.5.5": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.6.3.tgz#9e1bf05a2e2d687036d24c40e4639dc46cef2271" + integrity sha512-CWQkn7EVnwzlOdR5NOm2+pfgSNEZmvGjOhlCHBDq0J8/EStr+G+FvPEiz9B56dR6MoiUFjXhfE4hjLoAKKJtIQ== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-proposal-async-generator-functions" "^7.2.0" + "@babel/plugin-proposal-dynamic-import" "^7.5.0" "@babel/plugin-proposal-json-strings" "^7.2.0" - "@babel/plugin-proposal-object-rest-spread" "^7.2.0" + "@babel/plugin-proposal-object-rest-spread" "^7.6.2" "@babel/plugin-proposal-optional-catch-binding" "^7.2.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.2.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.6.2" "@babel/plugin-syntax-async-generators" "^7.2.0" + "@babel/plugin-syntax-dynamic-import" "^7.2.0" + "@babel/plugin-syntax-json-strings" "^7.2.0" "@babel/plugin-syntax-object-rest-spread" "^7.2.0" "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" "@babel/plugin-transform-arrow-functions" "^7.2.0" - "@babel/plugin-transform-async-to-generator" "^7.2.0" + "@babel/plugin-transform-async-to-generator" "^7.5.0" "@babel/plugin-transform-block-scoped-functions" "^7.2.0" - "@babel/plugin-transform-block-scoping" "^7.2.0" - "@babel/plugin-transform-classes" "^7.2.0" + "@babel/plugin-transform-block-scoping" "^7.6.3" + "@babel/plugin-transform-classes" "^7.5.5" "@babel/plugin-transform-computed-properties" "^7.2.0" - "@babel/plugin-transform-destructuring" "^7.2.0" - "@babel/plugin-transform-dotall-regex" "^7.2.0" - "@babel/plugin-transform-duplicate-keys" "^7.2.0" + "@babel/plugin-transform-destructuring" "^7.6.0" + "@babel/plugin-transform-dotall-regex" "^7.6.2" + "@babel/plugin-transform-duplicate-keys" "^7.5.0" "@babel/plugin-transform-exponentiation-operator" "^7.2.0" - "@babel/plugin-transform-for-of" "^7.2.0" - "@babel/plugin-transform-function-name" "^7.2.0" + "@babel/plugin-transform-for-of" "^7.4.4" + "@babel/plugin-transform-function-name" "^7.4.4" "@babel/plugin-transform-literals" "^7.2.0" - "@babel/plugin-transform-modules-amd" "^7.2.0" - "@babel/plugin-transform-modules-commonjs" "^7.2.0" - "@babel/plugin-transform-modules-systemjs" "^7.2.0" + "@babel/plugin-transform-member-expression-literals" "^7.2.0" + "@babel/plugin-transform-modules-amd" "^7.5.0" + "@babel/plugin-transform-modules-commonjs" "^7.6.0" + "@babel/plugin-transform-modules-systemjs" "^7.5.0" "@babel/plugin-transform-modules-umd" "^7.2.0" - "@babel/plugin-transform-new-target" "^7.0.0" - "@babel/plugin-transform-object-super" "^7.2.0" - "@babel/plugin-transform-parameters" "^7.2.0" - "@babel/plugin-transform-regenerator" "^7.0.0" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.6.3" + "@babel/plugin-transform-new-target" "^7.4.4" + "@babel/plugin-transform-object-super" "^7.5.5" + "@babel/plugin-transform-parameters" "^7.4.4" + "@babel/plugin-transform-property-literals" "^7.2.0" + "@babel/plugin-transform-regenerator" "^7.4.5" + "@babel/plugin-transform-reserved-words" "^7.2.0" "@babel/plugin-transform-shorthand-properties" "^7.2.0" - "@babel/plugin-transform-spread" "^7.2.0" + "@babel/plugin-transform-spread" "^7.6.2" "@babel/plugin-transform-sticky-regex" "^7.2.0" - "@babel/plugin-transform-template-literals" "^7.2.0" + "@babel/plugin-transform-template-literals" "^7.4.4" "@babel/plugin-transform-typeof-symbol" "^7.2.0" - "@babel/plugin-transform-unicode-regex" "^7.2.0" - browserslist "^4.3.4" + "@babel/plugin-transform-unicode-regex" "^7.6.2" + "@babel/types" "^7.6.3" + browserslist "^4.6.0" + core-js-compat "^3.1.1" invariant "^2.2.2" js-levenshtein "^1.1.3" - semver "^5.3.0" + semver "^5.5.0" "@babel/preset-react@^7.0.0": version "7.0.0" @@ -635,20 +739,18 @@ "@babel/plugin-transform-react-jsx-self" "^7.0.0" "@babel/plugin-transform-react-jsx-source" "^7.0.0" -"@babel/register@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.0.0.tgz#fa634bae1bfa429f60615b754fc1f1d745edd827" - integrity sha512-f/+CRmaCe7rVEvcvPvxeA8j5aJhHC3aJie7YuqcMDhUOuyWLA7J/aNrTaHIzoWPEhpHA54mec4Mm8fv8KBlv3g== +"@babel/register@^7.5.5": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.6.2.tgz#25765a922202cb06f8bdac5a3b1e70cd6bf3dd45" + integrity sha512-xgZk2LRZvt6i2SAUWxc7ellk4+OYRgS3Zpsnr13nMS1Qo25w21Uu8o6vTOAqNaxiqrnv30KTYzh9YWY2k21CeQ== dependencies: - core-js "^2.5.7" - find-cache-dir "^1.0.0" - home-or-tmp "^3.0.0" - lodash "^4.17.10" + find-cache-dir "^2.0.0" + lodash "^4.17.13" mkdirp "^0.5.1" pirates "^4.0.0" source-map-support "^0.5.9" -"@babel/template@^7.1.0", "@babel/template@^7.1.2", "@babel/template@^7.2.2": +"@babel/template@^7.1.0", "@babel/template@^7.2.2": version "7.2.2" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.2.2.tgz#005b3fdf0ed96e88041330379e0da9a708eb2907" integrity sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g== @@ -657,7 +759,16 @@ "@babel/parser" "^7.2.2" "@babel/types" "^7.2.2" -"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.1.5", "@babel/traverse@^7.2.2", "@babel/traverse@^7.2.3": +"@babel/template@^7.4.4", "@babel/template@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.6.0.tgz#7f0159c7f5012230dad64cca42ec9bdb5c9536e6" + integrity sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ== + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.6.0" + "@babel/types" "^7.6.0" + +"@babel/traverse@^7.1.0": version "7.2.3" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.2.3.tgz#7ff50cefa9c7c0bd2d81231fdac122f3957748d8" integrity sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw== @@ -672,7 +783,22 @@ globals "^11.1.0" lodash "^4.17.10" -"@babel/types@^7.0.0", "@babel/types@^7.1.2", "@babel/types@^7.2.0", "@babel/types@^7.2.2": +"@babel/traverse@^7.4.4", "@babel/traverse@^7.5.5", "@babel/traverse@^7.6.2", "@babel/traverse@^7.6.3": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.6.3.tgz#66d7dba146b086703c0fb10dd588b7364cec47f9" + integrity sha512-unn7P4LGsijIxaAJo/wpoU11zN+2IaClkQAxcJWBNCMS6cmVh802IyLHNkAjQ0iYnRS3nnxk5O3fuXW28IMxTw== + dependencies: + "@babel/code-frame" "^7.5.5" + "@babel/generator" "^7.6.3" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/parser" "^7.6.3" + "@babel/types" "^7.6.3" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + +"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.2.2": version "7.2.2" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.2.2.tgz#44e10fc24e33af524488b716cdaee5360ea8ed1e" integrity sha512-fKCuD6UFUMkR541eDWL+2ih/xFZBXPOg/7EQFeTluMDebfqR4jrpaCjLhkWlQS4hT6nRa2PMEgXKbRB5/H2fpg== @@ -681,6 +807,15 @@ lodash "^4.17.10" to-fast-properties "^2.0.0" +"@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.6.0", "@babel/types@^7.6.3": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.6.3.tgz#3f07d96f854f98e2fbd45c64b0cb942d11e8ba09" + integrity sha512-CqbcpTxMcpuQTMhjI37ZHVgjBkysg5icREQIEZ0eG1yCNwg3oy+5AaLiOKmjsCj6nqOsa6Hf0ObjRVwokb7srA== + dependencies: + esutils "^2.0.2" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" @@ -709,6 +844,11 @@ resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.1.tgz#48fd98c1561fe718b61733daed46ff115b496e18" integrity sha512-eqz8c/0kwNi/OEHQfvIuJVLTst3in0e7uTKeuY+WL/zfKn0xVujOTp42bS/vUUokhK5P2BppLd9JXMOMHcgbjA== +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + accepts@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" @@ -717,7 +857,12 @@ accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" -address@1.0.3, address@^1.0.1: +address@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/address/-/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6" + integrity sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA== + +address@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/address/-/address-1.0.3.tgz#b5f50631f8d6cec8bd20c963963afb55e06cbce9" integrity sha512-z55ocwKBRLryBs394Sm3ushTtBeg6VAeuku7utSoSnsJKvKcnXFIyC6vh27n3rXyxSgkJBBCAvyOn7gSUcTYjg== @@ -737,10 +882,10 @@ alphanum-sort@^1.0.0: resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= -ansi-escapes@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" - integrity sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw== +ansi-escapes@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== ansi-red@^0.1.1: version "0.1.1" @@ -759,6 +904,11 @@ ansi-regex@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -776,14 +926,27 @@ ansi-wrap@0.1.0: resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" integrity sha1-qCJQ3bABXponyoLoLqYDu/pF768= -anymatch@^3.0.1: - version "3.0.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.0.3.tgz#2fb624fe0e84bccab00afee3d0006ed310f22f09" - integrity sha512-c6IvoeBECQlMVuYUjSwimnhmztImpErfxJzWZhIQinIvQWoGOnB0dLIgifbPHQt5heS6mNlaZG16f06H3C8t1g== +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + +anymatch@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" + integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== dependencies: normalize-path "^3.0.0" picomatch "^2.0.4" +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== + arch@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/arch/-/arch-2.1.1.tgz#8f5c2731aa35a30929221bb0640eed65175ec84e" @@ -796,7 +959,15 @@ archive-type@^4.0.0: dependencies: file-type "^4.2.0" -argparse@^1.0.7: +are-we-there-yet@~1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" + integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +argparse@^1.0.10, argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== @@ -826,11 +997,6 @@ arr-union@^3.1.0: resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= -array-filter@~0.0.0: - version "0.0.1" - resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec" - integrity sha1-fajPLiZijtcygDWB/SH2fKzS7uw= - array-find-index@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" @@ -841,16 +1007,6 @@ array-flatten@1.1.1: resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= -array-map@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662" - integrity sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI= - -array-reduce@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b" - integrity sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys= - array-union@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" @@ -895,10 +1051,17 @@ assign-symbols@^1.0.0: resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= -async@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= +async-each@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" + integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== + +async@^2.6.2: + version "2.6.3" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" + integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== + dependencies: + lodash "^4.17.14" asynckit@^0.4.0: version "0.4.0" @@ -915,18 +1078,25 @@ autolinker@~0.15.0: resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-0.15.3.tgz#342417d8f2f3461b14cf09088d5edf8791dc9832" integrity sha1-NCQX2PLzRhsUzwkIjV7fh5HcmDI= -autoprefixer@^9.6.0: - version "9.6.1" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.1.tgz#51967a02d2d2300bb01866c1611ec8348d355a47" - integrity sha512-aVo5WxR3VyvyJxcJC3h4FKfwCQvQWb1tSI5VHNibddCVWrcD1NvlxEweg3TSgiPztMnWfjpy2FURKA2kvDE+Tw== +autolinker@~0.28.0: + version "0.28.1" + resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-0.28.1.tgz#0652b491881879f0775dace0cdca3233942a4e47" + integrity sha1-BlK0kYgYefB3XazgzcoyM5QqTkc= dependencies: - browserslist "^4.6.3" - caniuse-lite "^1.0.30000980" + gulp-header "^1.7.1" + +autoprefixer@^9.6.1: + version "9.6.5" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.5.tgz#98f4afe7e93cccf323287515d426019619775e5e" + integrity sha512-rGd50YV8LgwFQ2WQp4XzOTG69u1qQsXn0amww7tjqV5jJuNazgFKYEVItEBngyyvVITKOg20zr2V+9VsrXJQ2g== + dependencies: + browserslist "^4.7.0" + caniuse-lite "^1.0.30000999" chalk "^2.4.2" normalize-range "^0.1.2" num2fraction "^1.2.2" - postcss "^7.0.17" - postcss-value-parser "^4.0.0" + postcss "^7.0.18" + postcss-value-parser "^4.0.2" aws-sign2@~0.7.0: version "0.7.0" @@ -938,7 +1108,7 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== -babel-code-frame@6.26.0: +babel-code-frame@^6.22.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= @@ -947,7 +1117,14 @@ babel-code-frame@6.26.0: esutils "^2.0.2" js-tokens "^3.0.2" -babylon@^6.17.4: +babel-plugin-dynamic-import-node@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f" + integrity sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ== + dependencies: + object.assign "^4.1.0" + +babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== @@ -982,6 +1159,11 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" +big.js@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== + bin-build@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bin-build/-/bin-build-3.0.0.tgz#c5780a25a8a9f966d8244217e6c1f5082a143861" @@ -1030,6 +1212,11 @@ bin-wrapper@^4.0.0: os-filter-obj "^2.0.0" pify "^4.0.1" +binary-extensions@^1.0.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" + integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== + binary-extensions@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" @@ -1074,7 +1261,7 @@ boolbase@^1.0.0, boolbase@~1.0.0: resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= -brace-expansion@^1.0.0, brace-expansion@^1.1.7: +brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== @@ -1082,7 +1269,7 @@ brace-expansion@^1.0.0, brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^2.3.1: +braces@^2.3.1, braces@^2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== @@ -1098,14 +1285,23 @@ braces@^2.3.1: split-string "^3.0.2" to-regex "^3.0.1" -braces@^3.0.2: +braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== dependencies: fill-range "^7.0.1" -browserslist@^4.0.0, browserslist@^4.6.3: +browserslist@4.7.0, browserslist@^4.6.0, browserslist@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.0.tgz#9ee89225ffc07db03409f2fee524dc8227458a17" + integrity sha512-9rGNDtnj+HaahxiVV38Gn8n8Lr8REKsel68v1sPFfIGEK6uSXTY3h9acgiT1dZVtOOUtifo/Dn8daDQ5dUgVsA== + dependencies: + caniuse-lite "^1.0.30000989" + electron-to-chromium "^1.3.247" + node-releases "^1.1.29" + +browserslist@^4.0.0: version "4.6.4" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.6.4.tgz#fd0638b3f8867fec2c604ed0ed9300379f8ec7c2" integrity sha512-ErJT8qGfRt/VWHSr1HeqZzz50DvxHtr1fVL1m5wf20aGrG8e1ce8fpZ2EjZEfs09DDZYSvtRaDlMpWslBf8Low== @@ -1114,15 +1310,6 @@ browserslist@^4.0.0, browserslist@^4.6.3: electron-to-chromium "^1.3.188" node-releases "^1.1.25" -browserslist@^4.3.4: - version "4.3.6" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.3.6.tgz#0f9d9081afc66b36f477c6bdf3813f784f42396a" - integrity sha512-kMGKs4BTzRWviZ8yru18xBpx+CyHG9eqgRbj9XbE3IMgtczf4aiA0Y1YCpVdvUieKGZ03kolSPXqTcscBCb9qw== - dependencies: - caniuse-lite "^1.0.30000921" - electron-to-chromium "^1.3.92" - node-releases "^1.1.1" - buffer-alloc-unsafe@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" @@ -1249,15 +1436,15 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000981: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981: version "1.0.30000983" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000983.tgz#ab3c70061ca2a3467182a10ac75109b199b647f8" integrity sha512-/llD1bZ6qwNkt41AsvjsmwNOoA4ZB+8iqmf5LVyeSXuBODT/hAMFNVOh84NdUzoiYiSKqo5vQ3ZzeYHSi/olDQ== -caniuse-lite@^1.0.30000921: - version "1.0.30000923" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000923.tgz#148f9bda508024b5ce957b463ae2e8302b451bb2" - integrity sha512-j5ur7eeluOFjjPUkydtXP4KFAsmH3XaQNch5tvWSO+dLHYt5PE+VgJZLWtbVOodfWij6m6zas28T4gB/cLYq1w== +caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30000999: + version "1.0.30000999" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000999.tgz#427253a69ad7bea4aa8d8345687b8eec51ca0e43" + integrity sha512-1CUyKyecPeksKwXZvYw0tEoaMCo/RwBlXmEtN5vVnabvO0KPd9RQLcaAuR9/1F+KDMv6esmOFWlsXuzDk+8rxg== caseless@~0.12.0: version "0.12.0" @@ -1274,7 +1461,16 @@ caw@^2.0.0, caw@^2.0.1: tunnel-agent "^0.6.0" url-to-options "^1.0.1" -chalk@1.1.3, chalk@^1.0.0, chalk@^1.1.3: +chalk@2.4.2, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^1.0.0, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= @@ -1294,19 +1490,10 @@ chalk@^2.0.0, chalk@^2.4.1: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chardet@^0.4.0: - version "0.4.2" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" - integrity sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I= +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== cheerio@0.22.0: version "0.22.0" @@ -1330,20 +1517,44 @@ cheerio@0.22.0: lodash.reject "^4.4.0" lodash.some "^4.4.0" -chokidar@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.0.2.tgz#0d1cd6d04eb2df0327446188cd13736a3367d681" - integrity sha512-c4PR2egjNjI1um6bamCQ6bUNPDiyofNQruHvKgHQ4gDUP/ITSVSzNsiI5OWtHOsX323i5ha/kk4YmOZ1Ktg7KA== +chokidar@^2.0.4: + version "2.1.8" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" + integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== dependencies: - anymatch "^3.0.1" - braces "^3.0.2" - glob-parent "^5.0.0" - is-binary-path "^2.1.0" - is-glob "^4.0.1" + anymatch "^2.0.0" + async-each "^1.0.1" + braces "^2.3.2" + glob-parent "^3.1.0" + inherits "^2.0.3" + is-binary-path "^1.0.0" + is-glob "^4.0.0" normalize-path "^3.0.0" - readdirp "^3.1.1" + path-is-absolute "^1.0.0" + readdirp "^2.2.1" + upath "^1.1.1" + optionalDependencies: + fsevents "^1.2.7" + +chokidar@^3.0.2: + version "3.2.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.2.1.tgz#4634772a1924512d990d4505957bf3a510611387" + integrity sha512-/j5PPkb5Feyps9e+jo07jUZGvkB5Aj953NrI4s8xSVScrAo/RHeILrtdb4uzR7N6aaFFxxJ+gt8mA8HfNpw76w== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.1.3" optionalDependencies: - fsevents "^2.0.6" + fsevents "~2.1.0" + +chownr@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142" + integrity sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw== class-utils@^0.3.5: version "0.3.6" @@ -1397,6 +1608,11 @@ coa@^2.0.2, coa@~2.0.1: chalk "^2.4.1" q "^1.1.2" +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= + coffee-script@^1.12.4: version "1.12.7" resolved "https://registry.yarnpkg.com/coffee-script/-/coffee-script-1.12.7.tgz#c05dae0cb79591d05b3070a8433a98c9a89ccc53" @@ -1505,6 +1721,13 @@ concat-stream@^1.5.2: readable-stream "^2.2.2" typedarray "^0.0.6" +concat-with-sourcemaps@*: + version "1.1.0" + resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e" + integrity sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg== + dependencies: + source-map "^0.6.1" + config-chain@^1.1.11: version "1.1.12" resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" @@ -1513,6 +1736,11 @@ config-chain@^1.1.11: ini "^1.3.4" proto-list "~1.2.1" +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= + console-stream@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/console-stream/-/console-stream-0.1.1.tgz#a095fe07b20465955f2fafd28b5d72bccd949d44" @@ -1557,10 +1785,18 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= -core-js@^2.5.7: - version "2.6.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.1.tgz#87416ae817de957a3f249b3b5ca475d4aaed6042" - integrity sha512-L72mmmEayPJBejKIWe2pYtGis5r0tQ5NaJekdhyXgeMQTpJoBsH0NL4ElY2LfSoV15xeQWKQ+XTTOZdyero5Xg== +core-js-compat@^3.1.1: + version "3.3.2" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.3.2.tgz#1096c989c1b929ede06b5b6b4768dc4439078c03" + integrity sha512-gfiK4QnNXhnnHVOIZst2XHdFfdMTPxtR0EGs0TdILMlGIft+087oH6/Sw2xTTIjpWXC9vEwsJA8VG3XTGcmO5g== + dependencies: + browserslist "^4.7.0" + semver "^6.3.0" + +core-js@^2.6.5: + version "2.6.10" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.10.tgz#8a5b8391f8cc7013da703411ce5b585706300d7f" + integrity sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA== core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -1577,16 +1813,7 @@ cosmiconfig@^5.0.0: js-yaml "^3.13.1" parse-json "^4.0.0" -cross-spawn@5.1.0, cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - -cross-spawn@^6.0.0, cross-spawn@^6.0.5: +cross-spawn@6.0.5, cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== @@ -1597,6 +1824,15 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + crowdin-cli@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/crowdin-cli/-/crowdin-cli-0.3.0.tgz#eac9989a6fe7feaaf33090397afc187c67b46191" @@ -1738,7 +1974,7 @@ cssnano-util-same-parent@^4.0.0: resolved "https://registry.yarnpkg.com/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz#574082fb2859d2db433855835d9a8456ea18bbf3" integrity sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q== -cssnano@^4.1.0: +cssnano@^4.1.10: version "4.1.10" resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-4.1.10.tgz#0ac41f0b13d13d465487e111b778d42da631b8b2" integrity sha512-5wny+F6H4/8RgNlaqab4ktc3e0/blKutmq8yNlBFXA//nSFFAqAngjNVRzUvCgYROULmZZUoosL/KSoZo5aUaQ== @@ -1769,19 +2005,21 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -debug@0.7.4: - version "0.7.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-0.7.4.tgz#06e1ea8082c2cb14e39806e22e2f6f757f92af39" - integrity sha1-BuHqgILCyxTjmAbiLi9vdX+Srzk= - -debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.6: +debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" -debug@^3.1.0: +debug@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87" + integrity sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg== + dependencies: + ms "^2.1.1" + +debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== @@ -1865,10 +2103,15 @@ decompress@^4.0.0, decompress@^4.2.0: pify "^2.3.0" strip-dirs "^2.0.0" -deep-is@0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.2.tgz#9ced65ea0bc0b09f42a6d79c1b1903f9d913cc18" - integrity sha1-nO1l6gvAsJ9CptecGxkD+dkTzBg= +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +deep-is@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= define-properties@^1.1.2, define-properties@^1.1.3: version "1.1.3" @@ -1909,6 +2152,11 @@ delegate@^3.1.2: resolved "https://registry.yarnpkg.com/delegate/-/delegate-3.2.0.tgz#b66b71c3158522e8ab5744f720d8ca0c2af59166" integrity sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw== +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= + depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" @@ -1919,6 +2167,11 @@ destroy@~1.0.4: resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= + detect-port-alt@1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/detect-port-alt/-/detect-port-alt-1.1.6.tgz#24707deabe932d4a3cf621302027c2b266568275" @@ -1940,59 +2193,60 @@ dir-glob@2.0.0: arrify "^1.0.1" path-type "^3.0.0" -docusaurus@^1.11.1: - version "1.11.1" - resolved "https://registry.yarnpkg.com/docusaurus/-/docusaurus-1.11.1.tgz#786bae93946bc21ab7ef457c5672e2e2bd930b25" - integrity sha512-oIdftD4E8dnzXcNohTdE6MICsiJIR1pAmKa/sRHDiG3T3v8f2eiq9nt88CidSIPpyEw50TbCr3bOoExHS90UGg== - dependencies: - "@babel/core" "^7.0.0" - "@babel/plugin-proposal-class-properties" "^7.0.0" - "@babel/plugin-proposal-object-rest-spread" "^7.0.0" - "@babel/polyfill" "^7.0.0" - "@babel/preset-env" "^7.0.0" +docusaurus@^1.13.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/docusaurus/-/docusaurus-1.13.0.tgz#628c4491227ec422400b7421961b8603e389a2ae" + integrity sha512-3L/0p7CVM4jzAKoUzDDO4IFvLAJ6aA/8zin00tvLk32VQSdw+6S8JggE2ZFKOg+c+oxQ5MQUnsUxL/n5HyBtVg== + dependencies: + "@babel/core" "^7.5.5" + "@babel/plugin-proposal-class-properties" "^7.5.5" + "@babel/plugin-proposal-object-rest-spread" "^7.5.5" + "@babel/polyfill" "^7.4.4" + "@babel/preset-env" "^7.5.5" "@babel/preset-react" "^7.0.0" - "@babel/register" "^7.0.0" - "@babel/traverse" "^7.0.0" - "@babel/types" "^7.1.2" - autoprefixer "^9.6.0" - babylon "^6.17.4" + "@babel/register" "^7.5.5" + "@babel/traverse" "^7.5.5" + "@babel/types" "^7.5.5" + autoprefixer "^9.6.1" + babylon "^6.18.0" chalk "^2.4.2" - chokidar "^3.0.1" + chokidar "^3.0.2" classnames "^2.2.6" color "^2.0.1" commander "^2.20.0" cross-spawn "^6.0.5" crowdin-cli "^0.3.0" - cssnano "^4.1.0" - escape-string-regexp "^1.0.5" + cssnano "^4.1.10" + escape-string-regexp "^2.0.0" express "^4.17.1" feed "^1.1.0" - fs-extra "^5.0.0" - gaze "^1.1.2" + fs-extra "^8.1.0" + gaze "^1.1.3" glob "^7.1.3" - highlight.js "^9.12.0" + highlight.js "^9.15.8" imagemin "^6.0.0" imagemin-gifsicle "^6.0.1" imagemin-jpegtran "^6.0.0" imagemin-optipng "^6.0.0" imagemin-svgo "^7.0.0" - lodash "^4.17.11" + lodash "^4.17.15" markdown-toc "^1.2.0" mkdirp "^0.5.1" - portfinder "^1.0.17" - postcss "^7.0.1" - prismjs "^1.15.0" - react "^16.5.0" - react-dev-utils "^5.0.2" - react-dom "^16.5.0" - remarkable "^1.7.1" - request "^2.87.0" + portfinder "^1.0.21" + postcss "^7.0.17" + prismjs "^1.17.1" + react "^16.8.4" + react-dev-utils "^9.0.1" + react-dom "^16.8.4" + remarkable "^1.7.4" + request "^2.88.0" shelljs "^0.8.3" - sitemap "^1.13.0" - tcp-port-used "^0.1.2" + sitemap "^3.2.2" + striptags "^3.1.1" + tcp-port-used "^1.0.1" tiny-lr "^1.1.1" tree-node-cli "^1.2.5" - truncate-html "^1.0.1" + truncate-html "^1.0.2" dom-serializer@0, dom-serializer@~0.1.0: version "0.1.0" @@ -2105,10 +2359,15 @@ electron-to-chromium@^1.3.188: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.190.tgz#5bf599519983bfffd9d4387817039a3ed7ca085f" integrity sha512-cs9WnTnGBGnYYVFMCtLmr9jXNTOkdp95RLz5VhwzDn7dErg1Lnt9o4d01gEH69XlmRKWUr91Yu1hA+Hi8qW0PA== -electron-to-chromium@^1.3.92: - version "1.3.96" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.96.tgz#25770ec99b8b07706dedf3a5f43fa50cb54c4f9a" - integrity sha512-ZUXBUyGLeoJxp4Nt6G/GjBRLnyz8IKQGexZ2ndWaoegThgMGFO1tdDYID5gBV32/1S83osjJHyfzvanE/8HY4Q== +electron-to-chromium@^1.3.247: + version "1.3.282" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.282.tgz#16118ae9c79a32ea93a17591d5b16e28d10fc08d" + integrity sha512-irSaDeCGgfMu1OA30bhqIBr+dx+pDJjRbwCpob7YWqVZbzXblybNzPGklVnWqv4EXxbkEAzQYqiNCqNTgu00lQ== + +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= encodeurl@~1.0.2: version "1.0.2" @@ -2184,6 +2443,11 @@ escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1 resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= +escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + esprima@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" @@ -2199,12 +2463,12 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= -eventsource@0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-0.1.6.tgz#0acede849ed7dd1ccc32c811bb11b944d4f29232" - integrity sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI= +eventsource@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-1.0.7.tgz#8fbc72c93fcd34088090bc0a4e64f4b5cee6d8d0" + integrity sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ== dependencies: - original ">=0.0.5" + original "^1.0.0" exec-buffer@^3.0.0: version "3.2.0" @@ -2270,13 +2534,6 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" -expand-tilde@^2.0.0, expand-tilde@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" - integrity sha1-l+gBqgUt8CRU3kawK/YhZCzchQI= - dependencies: - homedir-polyfill "^1.0.1" - express@^4.17.1: version "4.17.1" resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" @@ -2348,13 +2605,13 @@ extend@~3.0.2: resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== -external-editor@^2.0.4: - version "2.2.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" - integrity sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A== +external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== dependencies: - chardet "^0.4.0" - iconv-lite "^0.4.17" + chardet "^0.7.0" + iconv-lite "^0.4.24" tmp "^0.0.33" extglob@^2.0.4: @@ -2410,10 +2667,10 @@ faye-websocket@~0.10.0: dependencies: websocket-driver ">=0.5.1" -faye-websocket@~0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.1.tgz#f0efe18c4f56e4f40afc7e06c719fd5ee6188f38" - integrity sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg= +faye-websocket@~0.11.1: + version "0.11.3" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e" + integrity sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA== dependencies: websocket-driver ">=0.5.1" @@ -2490,10 +2747,10 @@ filenamify@^2.0.0: strip-outer "^1.0.0" trim-repeated "^1.0.0" -filesize@3.5.11: - version "3.5.11" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.5.11.tgz#1919326749433bb3cf77368bd158caabcc19e9ee" - integrity sha512-ZH7loueKBoDb7yG9esn1U+fgq7BzlzW6NRi5/rMdxIZ05dj7GFD/Xc5rq2CDt5Yq86CyfSYVyx4242QQNZbx1g== +filesize@3.6.1: + version "3.6.1" + resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317" + integrity sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg== fill-range@^2.1.0: version "2.2.4" @@ -2536,14 +2793,21 @@ finalhandler@~1.1.2: statuses "~1.5.0" unpipe "~1.0.0" -find-cache-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" - integrity sha1-kojj6ePMN0hxfTnq3hfPcfww7m8= +find-cache-dir@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" + integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== dependencies: commondir "^1.0.1" - make-dir "^1.0.0" - pkg-dir "^2.0.0" + make-dir "^2.0.0" + pkg-dir "^3.0.0" + +find-up@3.0.0, find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" find-up@^1.0.0: version "1.1.2" @@ -2578,6 +2842,20 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= +fork-ts-checker-webpack-plugin@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-1.5.0.tgz#ce1d77190b44d81a761b10b6284a373795e41f0c" + integrity sha512-zEhg7Hz+KhZlBhILYpXy+Beu96gwvkROWJiTXOCyOOMMrdBIRPvsBpBqgTI4jfJGrJXcqGwJR8zsBGDmzY0jsA== + dependencies: + babel-code-frame "^6.22.0" + chalk "^2.4.1" + chokidar "^2.0.4" + micromatch "^3.1.10" + minimatch "^3.0.4" + semver "^5.6.0" + tapable "^1.0.0" + worker-rpc "^0.1.0" + form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -2617,31 +2895,60 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== -fs-extra@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-5.0.0.tgz#414d0110cdd06705734d055652c5411260c31abd" - integrity sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ== +fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== dependencies: - graceful-fs "^4.1.2" + graceful-fs "^4.2.0" jsonfile "^4.0.0" universalify "^0.1.0" +fs-minipass@^1.2.5: + version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== + dependencies: + minipass "^2.6.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@^2.0.6: - version "2.0.7" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.0.7.tgz#382c9b443c6cbac4c57187cdda23aa3bf1ccfc2a" - integrity sha512-a7YT0SV3RB+DjYcppwVDLtn13UQnmg0SWZS7ezZD0UjnLwXmy8Zm21GMVGLaFGimIqcvyMQaOJBrop8MyOp1kQ== +fsevents@^1.2.7: + version "1.2.9" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f" + integrity sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw== + dependencies: + nan "^2.12.1" + node-pre-gyp "^0.12.0" + +fsevents@~2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.1.tgz#74c64e21df71721845d0c44fe54b7f56b82995a9" + integrity sha512-4FRPXWETxtigtJW/gxzEDsX1LVbPAM93VleB83kZB+ellqbHMkyt2aJfuzNLRvFPnGi6bcE5SvfxgbXPeKteJw== function-bind@^1.1.0, function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== -gaze@^1.1.2: +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +gaze@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.3.tgz#c441733e13b927ac8c0ff0b4c3b033f28812924a" integrity sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g== @@ -2710,10 +3017,10 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.0.0.tgz#1dc99f0f39b006d3e92c2c284068382f0c20e954" - integrity sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg== +glob-parent@~5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2" + integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw== dependencies: is-glob "^4.0.1" @@ -2746,32 +3053,28 @@ glob@^7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -global-modules@1.0.0, global-modules@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" - integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== +global-modules@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" + integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== dependencies: - global-prefix "^1.0.1" - is-windows "^1.0.1" - resolve-dir "^1.0.0" + global-prefix "^3.0.0" -global-prefix@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" - integrity sha1-2/dDxsFJklk8ZVVoy2btMsASLr4= +global-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" + integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== dependencies: - expand-tilde "^2.0.2" - homedir-polyfill "^1.0.1" - ini "^1.3.4" - is-windows "^1.0.1" - which "^1.2.14" + ini "^1.3.5" + kind-of "^6.0.2" + which "^1.3.1" globals@^11.1.0: version "11.9.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.9.0.tgz#bde236808e987f290768a93d065060d78e6ab249" integrity sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg== -globby@^8.0.1: +globby@8.0.2, globby@^8.0.1: version "8.0.2" resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.2.tgz#5697619ccd95c5275dbb2d6faa42087c1a941d8d" integrity sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w== @@ -2848,6 +3151,11 @@ graceful-fs@^4.1.10: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b" integrity sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg== +graceful-fs@^4.1.11, graceful-fs@^4.2.0: + version "4.2.2" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.2.tgz#6f0952605d0140c1cfdb138ed005775b92d67b02" + integrity sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q== + graceful-fs@^4.1.2, graceful-fs@^4.1.6: version "4.1.15" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" @@ -2869,12 +3177,22 @@ gray-matter@^2.1.0: js-yaml "^3.8.1" toml "^2.3.2" -gzip-size@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-3.0.0.tgz#546188e9bdc337f673772f81660464b389dce520" - integrity sha1-VGGI6b3DN/Zzdy+BZgRks4nc5SA= +gulp-header@^1.7.1: + version "1.8.12" + resolved "https://registry.yarnpkg.com/gulp-header/-/gulp-header-1.8.12.tgz#ad306be0066599127281c4f8786660e705080a84" + integrity sha512-lh9HLdb53sC7XIZOYzTXM4lFuXElv3EVkSDhsd7DoJBj7hm+Ni7D3qYbb+Rr8DuM8nRanBvkVO9d7askreXGnQ== + dependencies: + concat-with-sourcemaps "*" + lodash.template "^4.4.0" + through2 "^2.0.0" + +gzip-size@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.1.1.tgz#cb9bee692f87c0612b232840a873904e4c135274" + integrity sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA== dependencies: duplexer "^0.1.1" + pify "^4.0.1" har-schema@^2.0.0: version "2.0.0" @@ -2918,6 +3236,11 @@ has-to-string-tag-x@^1.2.0: dependencies: has-symbol-support-x "^1.4.1" +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= + has-value@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" @@ -2961,22 +3284,10 @@ hex-color-regex@^1.1.0: resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== -highlight.js@^9.12.0: - version "9.13.1" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.13.1.tgz#054586d53a6863311168488a0f58d6c505ce641e" - integrity sha512-Sc28JNQNDzaH6PORtRLMvif9RSn1mYuOoX3omVjnb0+HbpPygU2ALBI0R/wsiqCb4/fcp07Gdo8g+fhtFrQl6A== - -home-or-tmp@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-3.0.0.tgz#57a8fe24cf33cdd524860a15821ddc25c86671fb" - integrity sha1-V6j+JM8zzdUkhgoVgh3cJchmcfs= - -homedir-polyfill@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc" - integrity sha1-TCu8inWJmP7r9e1oWA921GdotLw= - dependencies: - parse-passwd "^1.0.0" +highlight.js@^9.15.8: + version "9.15.10" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.15.10.tgz#7b18ed75c90348c045eef9ed08ca1319a2219ad2" + integrity sha512-RoV7OkQm0T3os3Dd2VHLNMoaoDVx77Wygln3n9l5YV172XonWG6rgQD3XnF/BuFFZw9A0TJgmMSO8FEWQgvcXw== hosted-git-info@^2.1.4: version "2.7.1" @@ -3051,7 +3362,7 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -iconv-lite@0.4.24, iconv-lite@^0.4.17: +iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -3063,6 +3374,13 @@ ieee754@^1.1.4: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== +ignore-walk@^3.0.1: + version "3.0.3" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" + integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== + dependencies: + minimatch "^3.0.4" + ignore@^3.3.5: version "3.3.10" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" @@ -3115,6 +3433,11 @@ imagemin@^6.0.0: pify "^4.0.1" replace-ext "^1.0.0" +immer@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/immer/-/immer-1.10.0.tgz#bad67605ba9c810275d91e1c2a47d4582e98286d" + integrity sha512-O3sR1/opvCDGLEVcvrGTMtLac8GJ5IwZC4puPrLuRj3l7ICKvkmA0vGuU9OW8mV9WIBRnaxp5GJh9IEAaNOoYg== + import-fresh@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" @@ -3158,29 +3481,28 @@ inherits@2.0.4: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -ini@^1.3.4: +ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== -inquirer@3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" - integrity sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ== +inquirer@6.5.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.0.tgz#2303317efc9a4ea7ec2e2df6f86569b734accf42" + integrity sha512-scfHejeG/lVZSpvCXpsB4j/wQNPM5JC8kiElOI0OUTwmc1RTpXr4H32/HOlQHcZiYl2z2VElwuCVDRG8vFmbnA== dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.0" + ansi-escapes "^3.2.0" + chalk "^2.4.2" cli-cursor "^2.1.0" cli-width "^2.0.0" - external-editor "^2.0.4" + external-editor "^3.0.3" figures "^2.0.0" - lodash "^4.3.0" + lodash "^4.17.12" mute-stream "0.0.7" run-async "^2.2.0" - rx-lite "^4.0.8" - rx-lite-aggregates "^4.0.8" + rxjs "^6.4.0" string-width "^2.1.0" - strip-ansi "^4.0.0" + strip-ansi "^5.1.0" through "^2.3.6" interpret@^1.0.0: @@ -3203,6 +3525,11 @@ invariant@^2.2.2: dependencies: loose-envify "^1.0.0" +ip-regex@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" + integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= + ipaddr.js@1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.0.tgz#37df74e430a0e47550fe54a2defe30d8acd95f65" @@ -3237,7 +3564,14 @@ is-arrayish@^0.3.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== -is-binary-path@^2.1.0: +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= + dependencies: + binary-extensions "^1.0.0" + +is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== @@ -3339,6 +3673,13 @@ is-finite@^1.0.0: dependencies: number-is-nan "^1.0.0" +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= + dependencies: + number-is-nan "^1.0.0" + is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" @@ -3358,7 +3699,7 @@ is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" -is-glob@^4.0.0, is-glob@^4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== @@ -3448,10 +3789,10 @@ is-retry-allowed@^1.0.0, is-retry-allowed@^1.1.0: resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" integrity sha1-EaBgVotnM5REAz0BJaYaINVk+zQ= -is-root@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-root/-/is-root-1.0.0.tgz#07b6c233bc394cd9d02ba15c966bd6660d6342d5" - integrity sha1-B7bCM7w5TNnQK6FclmvWZg1jQtU= +is-root@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c" + integrity sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg== is-stream@^1.0.0, is-stream@^1.1.0: version "1.1.0" @@ -3477,12 +3818,17 @@ is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= +is-url@^1.2.2: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52" + integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww== + is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= -is-windows@^1.0.1, is-windows@^1.0.2: +is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== @@ -3492,12 +3838,14 @@ is-wsl@^1.1.0: resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= -is2@0.0.9: - version "0.0.9" - resolved "https://registry.yarnpkg.com/is2/-/is2-0.0.9.tgz#119556d1d1651a41ba105af803267c80b299f629" - integrity sha1-EZVW0dFlGkG6EFr4AyZ8gLKZ9ik= +is2@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is2/-/is2-2.0.1.tgz#8ac355644840921ce435d94f05d3a94634d3481a" + integrity sha512-+WaJvnaA7aJySz2q/8sLjMb2Mw14KTplHmSwcSpZ/fWJPkUmqw3YTzSWbPJ7OAwRvdYTWF2Wg+yYJ1AdP5Z8CA== dependencies: - deep-is "0.1.2" + deep-is "^0.1.3" + ip-regex "^2.1.0" + is-url "^1.2.2" isarray@1.0.0, isarray@~1.0.0: version "1.0.0" @@ -3619,6 +3967,13 @@ json3@^3.3.2: resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" integrity sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE= +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + json5@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850" @@ -3633,11 +3988,6 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= - jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" @@ -3712,6 +4062,15 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" +loader-utils@1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" + integrity sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA== + dependencies: + big.js "^5.2.2" + emojis-list "^2.0.0" + json5 "^1.0.1" + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -3720,6 +4079,14 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + lodash._reinterpolate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" @@ -3735,6 +4102,11 @@ lodash.bind@^4.1.4: resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35" integrity sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU= +lodash.chunk@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.chunk/-/lodash.chunk-4.2.0.tgz#66e5ce1f76ed27b4303d8c6512e8d1216e8106bc" + integrity sha1-ZuXOH3btJ7QwPYxlEujRIW6BBrw= + lodash.defaults@^4.0.1: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" @@ -3775,6 +4147,11 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== +lodash.padstart@^4.6.1: + version "4.6.1" + resolved "https://registry.yarnpkg.com/lodash.padstart/-/lodash.padstart-4.6.1.tgz#d2e3eebff0d9d39ad50f5cbd1b52a7bce6bb611b" + integrity sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs= + lodash.pick@^4.2.1: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" @@ -3795,7 +4172,12 @@ lodash.some@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" integrity sha1-G7nzFO9ri63tE7VJFpsqlF62jk0= -lodash.template@^4.5.0: +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= + +lodash.template@^4.4.0, lodash.template@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== @@ -3815,11 +4197,16 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@^4.17.10, lodash@^4.17.11, lodash@^4.3.0, lodash@~4.17.10: +lodash@^4.17.10, lodash@~4.17.10: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== +lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== + logalot@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/logalot/-/logalot-2.1.0.tgz#5f8e8c90d304edf12530951a5554abb8c5e3f552" @@ -3883,6 +4270,14 @@ make-dir@^1.0.0, make-dir@^1.2.0: dependencies: pify "^3.0.0" +make-dir@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -3969,7 +4364,12 @@ methods@~1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= -micromatch@^3.1.10: +microevent.ts@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/microevent.ts/-/microevent.ts-0.1.1.tgz#70b09b83f43df5172d0205a63025bce0f7357fa0" + integrity sha512-jo1OfR4TaEwd5HOrt5+tAZ9mqT4jmpNAusXtyfNzqVm9uiSYFZlKM1wYL4oU7azZW/PxQW53wM0S6OR1JHNa2g== + +micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -4027,14 +4427,7 @@ mimic-response@^1.0.0: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== -minimatch@3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" - integrity sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q= - dependencies: - brace-expansion "^1.0.0" - -minimatch@^3.0.4, minimatch@~3.0.2: +minimatch@3.0.4, minimatch@^3.0.4, minimatch@~3.0.2: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== @@ -4051,6 +4444,21 @@ minimist@^1.1.3, minimist@^1.2.0: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= +minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.2.1: + version "1.3.3" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== + dependencies: + minipass "^2.9.0" + mixin-deep@^1.1.3: version "1.3.1" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" @@ -4067,7 +4475,7 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.5.x, mkdirp@^0.5.1, mkdirp@~0.5.1: +mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= @@ -4089,6 +4497,11 @@ mute-stream@0.0.7: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= +nan@^2.12.1: + version "2.14.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" + integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -4106,6 +4519,15 @@ nanomatch@^1.2.9: snapdragon "^0.8.1" to-regex "^3.0.1" +needle@^2.2.1: + version "2.4.0" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c" + integrity sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg== + dependencies: + debug "^3.2.6" + iconv-lite "^0.4.4" + sax "^1.2.4" + negotiator@0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" @@ -4121,12 +4543,21 @@ node-modules-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= -node-releases@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.2.tgz#93c17fba5eec8650ad908de5433fa8763baebe4d" - integrity sha512-j1gEV/zX821yxdWp/1vBMN0pSUjuH9oGUdLCb4PfUko6ZW7KdRs3Z+QGGwDUhYtSpQvdVVyLd2V0YvLsmdg5jQ== +node-pre-gyp@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149" + integrity sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A== dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.1" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.2.7" + rimraf "^2.6.1" semver "^5.3.0" + tar "^4" node-releases@^1.1.25: version "1.1.25" @@ -4135,6 +4566,21 @@ node-releases@^1.1.25: dependencies: semver "^5.3.0" +node-releases@^1.1.29: + version "1.1.35" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.35.tgz#32a74a3cd497aa77f23d509f483475fd160e4c48" + integrity sha512-JGcM/wndCN/2elJlU0IGdVEJQQnJwsLbgPCFd2pY7V0mxf17bZ0Gb/lgOtL29ZQhvEX5shnVhxQyZz3ex94N8w== + dependencies: + semver "^6.3.0" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= + dependencies: + abbrev "1" + osenv "^0.1.4" + normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: version "2.4.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" @@ -4145,7 +4591,14 @@ normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-path@^3.0.0: +normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== @@ -4169,6 +4622,11 @@ normalize-url@^3.0.0: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== +npm-bundled@^1.0.1: + version "1.0.6" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd" + integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g== + npm-conf@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/npm-conf/-/npm-conf-1.1.3.tgz#256cc47bd0e218c259c4e9550bf413bc2192aff9" @@ -4177,6 +4635,14 @@ npm-conf@^1.1.0: config-chain "^1.1.11" pify "^3.0.0" +npm-packlist@^1.1.6: + version "1.4.6" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.6.tgz#53ba3ed11f8523079f1457376dd379ee4ea42ff4" + integrity sha512-u65uQdb+qwtGvEJh/DgQgW1Xg7sqeNbmxYyrvlNznaVTjV3E5P6F/EFjM+BVHXl7JJlsdG8A64M0XI8FI/IOlg== + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" @@ -4184,6 +4650,16 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + nth-check@^1.0.2, nth-check@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" @@ -4220,6 +4696,11 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" +object-keys@^1.0.11: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + object-keys@^1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" @@ -4232,6 +4713,16 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" +object.assign@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + object.getownpropertydescriptors@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" @@ -4288,10 +4779,10 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" -opn@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/opn/-/opn-5.2.0.tgz#71fdf934d6827d676cecbea1531f95d354641225" - integrity sha512-Jd/GpzPyHF4P2/aNOVmS3lfMSWV9J7cOhCG1s08XCEAsPkB7lp6ddiU0J7XzyQRDUh8BqJ7PchfINjR8jyofRQ== +open@^6.3.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/open/-/open-6.4.0.tgz#5c13e96d0dc894686164f18965ecfe889ecfc8a9" + integrity sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg== dependencies: is-wsl "^1.1.0" @@ -4304,7 +4795,7 @@ optipng-bin@^5.0.0: bin-wrapper "^4.0.0" logalot "^2.0.0" -original@>=0.0.5: +original@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/original/-/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f" integrity sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg== @@ -4318,11 +4809,24 @@ os-filter-obj@^2.0.0: dependencies: arch "^2.1.0" -os-tmpdir@~1.0.2: +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + +os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + p-cancelable@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" @@ -4364,6 +4868,13 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" +p-limit@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.1.tgz#aa07a788cc3151c939b5131f63570f0dd2009537" + integrity sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg== + dependencies: + p-try "^2.0.0" + p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" @@ -4371,6 +4882,13 @@ p-locate@^2.0.0: dependencies: p-limit "^1.1.0" +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + p-map-series@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-1.0.0.tgz#bf98fe575705658a9e1351befb85ae4c1f07bdca" @@ -4407,6 +4925,11 @@ p-try@^1.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" @@ -4422,11 +4945,6 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" -parse-passwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" - integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= - parseurl@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" @@ -4539,21 +5057,28 @@ pirates@^4.0.0: dependencies: node-modules-regexp "^1.0.0" -pkg-dir@^2.0.0: +pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== + dependencies: + find-up "^3.0.0" + +pkg-up@2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" - integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= + resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" + integrity sha1-yBmscoBZpGHKscOImivjxJoATX8= dependencies: find-up "^2.1.0" -portfinder@^1.0.17: - version "1.0.20" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.20.tgz#bea68632e54b2e13ab7b0c4775e9b41bf270e44a" - integrity sha512-Yxe4mTyDzTd59PZJY4ojZR8F+E5e97iq2ZOHPz3HDgSvYC5siNad2tLooQ5y5QHyQhc3xVqvyk/eNA3wuoa7Sw== +portfinder@^1.0.21: + version "1.0.25" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca" + integrity sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg== dependencies: - async "^1.5.2" - debug "^2.2.0" - mkdirp "0.5.x" + async "^2.6.2" + debug "^3.1.1" + mkdirp "^0.5.1" posix-character-classes@^0.1.0: version "0.1.1" @@ -4831,10 +5356,10 @@ postcss-value-parser@^3.0.0, postcss-value-parser@^3.3.1: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== -postcss-value-parser@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.0.tgz#99a983d365f7b2ad8d0f9b8c3094926eab4b936d" - integrity sha512-ESPktioptiSUchCKgggAkzdmkgzKfmp0EU8jXH+5kbIUB+unr0Y4CY9SRMvibuvYUBjNh1ACLbxqYNpdTQOteQ== +postcss-value-parser@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz#482282c09a42706d1fc9a069b73f44ec08391dc9" + integrity sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ== postcss@^7.0.0, postcss@^7.0.17, postcss@^7.0.5: version "7.0.17" @@ -4854,6 +5379,15 @@ postcss@^7.0.1: source-map "^0.6.1" supports-color "^5.5.0" +postcss@^7.0.18: + version "7.0.18" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.18.tgz#4b9cda95ae6c069c67a4d933029eddd4838ac233" + integrity sha512-/7g1QXXgegpF+9GJj4iN7ChGF40sYuGYJ8WZu8DZWnmhQ/G36hfdk3q9LBJmoK+lZ+yzZ5KYpOoxq7LF1BxE8g== + dependencies: + chalk "^2.4.2" + source-map "^0.6.1" + supports-color "^6.1.0" + prepend-http@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" @@ -4864,10 +5398,10 @@ prepend-http@^2.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= -prismjs@^1.15.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.15.0.tgz#8801d332e472091ba8def94976c8877ad60398d9" - integrity sha512-Lf2JrFYx8FanHrjoV5oL8YHCclLQgbJcVZR+gikGGMqz6ub5QVWDTM6YIwm3BuPxM/LOV+rKns3LssXNLIf+DA== +prismjs@^1.17.1: + version "1.17.1" + resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.17.1.tgz#e669fcbd4cdd873c35102881c33b14d0d68519be" + integrity sha512-PrEDJAFdUGbOP6xK/UsfkC5ghJsPJviKgnQOoxaDbBjwc8op68Quupwt1DeAFoG8GImPhiKXAvvsH7wDSLsu1Q== optionalDependencies: clipboard "^2.0.0" @@ -4930,11 +5464,6 @@ punycode@^2.1.0: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -q@0.9.7: - version "0.9.7" - resolved "https://registry.yarnpkg.com/q/-/q-0.9.7.tgz#4de2e6cb3b29088c9e4cbc03bf9d42fb96ce2f75" - integrity sha1-TeLmyzspCIyeTLwDv51C+5bOL3U= - q@^1.1.2: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -5001,54 +5530,70 @@ raw-body@~1.1.0: bytes "1" string_decoder "0.10" -react-dev-utils@^5.0.2: - version "5.0.3" - resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-5.0.3.tgz#92f97668f03deb09d7fa11ea288832a8c756e35e" - integrity sha512-Mvs6ofsc2xTjeZIrMaIfbXfsPVrbdVy/cVqq6SAacnqfMlcBpDuivhWZ1ODGeJ8HgmyWTLH971PYjj/EPCDVAw== +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== dependencies: - address "1.0.3" - babel-code-frame "6.26.0" - chalk "1.1.3" - cross-spawn "5.1.0" + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +react-dev-utils@^9.0.1: + version "9.1.0" + resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-9.1.0.tgz#3ad2bb8848a32319d760d0a84c56c14bdaae5e81" + integrity sha512-X2KYF/lIGyGwP/F/oXgGDF24nxDA2KC4b7AFto+eqzc/t838gpSGiaU8trTqHXOohuLxxc5qi1eDzsl9ucPDpg== + dependencies: + "@babel/code-frame" "7.5.5" + address "1.1.2" + browserslist "4.7.0" + chalk "2.4.2" + cross-spawn "6.0.5" detect-port-alt "1.1.6" escape-string-regexp "1.0.5" - filesize "3.5.11" - global-modules "1.0.0" - gzip-size "3.0.0" - inquirer "3.3.0" - is-root "1.0.0" - opn "5.2.0" - react-error-overlay "^4.0.1" - recursive-readdir "2.2.1" - shell-quote "1.6.1" - sockjs-client "1.1.5" - strip-ansi "3.0.1" + filesize "3.6.1" + find-up "3.0.0" + fork-ts-checker-webpack-plugin "1.5.0" + global-modules "2.0.0" + globby "8.0.2" + gzip-size "5.1.1" + immer "1.10.0" + inquirer "6.5.0" + is-root "2.1.0" + loader-utils "1.2.3" + open "^6.3.0" + pkg-up "2.0.0" + react-error-overlay "^6.0.3" + recursive-readdir "2.2.2" + shell-quote "1.7.2" + sockjs-client "1.4.0" + strip-ansi "5.2.0" text-table "0.2.0" -react-dom@^16.5.0: - version "16.7.0" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.7.0.tgz#a17b2a7ca89ee7390bc1ed5eb81783c7461748b8" - integrity sha512-D0Ufv1ExCAmF38P2Uh1lwpminZFRXEINJe53zRAbm4KPwSyd6DY/uDoS0Blj9jvPpn1+wivKpZYc8aAAN/nAkg== +react-dom@^16.8.4: + version "16.10.2" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.10.2.tgz#4840bce5409176bc3a1f2bd8cb10b92db452fda6" + integrity sha512-kWGDcH3ItJK4+6Pl9DZB16BXYAZyrYQItU4OMy0jAkv5aNqc+mAKb4TpFtAteI6TJZu+9ZlNhaeNQSVQDHJzkw== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" prop-types "^15.6.2" - scheduler "^0.12.0" + scheduler "^0.16.2" -react-error-overlay@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-4.0.1.tgz#417addb0814a90f3a7082eacba7cee588d00da89" - integrity sha512-xXUbDAZkU08aAkjtUvldqbvI04ogv+a1XdHxvYuHPYKIVk/42BIOD0zSKTHAWV4+gDy3yGm283z2072rA2gdtw== +react-error-overlay@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.3.tgz#c378c4b0a21e88b2e159a3e62b2f531fd63bf60d" + integrity sha512-bOUvMWFQVk5oz8Ded9Xb7WVdEi3QGLC8tH7HmYP0Fdp4Bn3qw0tRFmr5TW6mvahzvmrK4a6bqWGfCevBflP+Xw== -react@^16.5.0: - version "16.7.0" - resolved "https://registry.yarnpkg.com/react/-/react-16.7.0.tgz#b674ec396b0a5715873b350446f7ea0802ab6381" - integrity sha512-StCz3QY8lxTb5cl2HJxjwLFOXPIFQp+p+hxQfc8WE0QiLfCtIlKj8/+5tjjKm8uSTlAW+fCPaavGFS06V9Ar3A== +react@^16.8.4: + version "16.10.2" + resolved "https://registry.yarnpkg.com/react/-/react-16.10.2.tgz#a5ede5cdd5c536f745173c8da47bda64797a4cf0" + integrity sha512-MFVIq0DpIhrHFyqLU0S3+4dIcBhhOvBE8bJ/5kHPVOVaGdo0KuiQzpcjCPsf585WvhypqtrMILyoE2th6dT+Lw== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" prop-types "^15.6.2" - scheduler "^0.12.0" read-pkg-up@^1.0.1: version "1.0.1" @@ -5067,7 +5612,7 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" -readable-stream@^2.0.0, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5: +readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@~2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== @@ -5089,10 +5634,19 @@ readable-stream@^3.0.6: string_decoder "^1.1.1" util-deprecate "^1.0.1" -readdirp@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.1.1.tgz#b158123ac343c8b0f31d65680269cc0fc1025db1" - integrity sha512-XXdSXZrQuvqoETj50+JAitxz1UPdt5dupjT6T5nVB+WvjMv2XKYj+s7hPeAVCXvmJrL36O4YYyWlIC3an2ePiQ== +readdirp@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== + dependencies: + graceful-fs "^4.1.11" + micromatch "^3.1.10" + readable-stream "^2.0.2" + +readdirp@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.1.3.tgz#d6e011ed5b9240a92f08651eeb40f7942ceb6cc1" + integrity sha512-ZOsfTGkjO2kqeR5Mzr5RYDbTGYneSkdNKX2fOX2P5jF7vMrd/GNnIAUtDldeHHumHUCQ3V05YfWUdxMPAsRu9Q== dependencies: picomatch "^2.0.4" @@ -5103,12 +5657,12 @@ rechoir@^0.6.2: dependencies: resolve "^1.1.6" -recursive-readdir@2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.1.tgz#90ef231d0778c5ce093c9a48d74e5c5422d13a99" - integrity sha1-kO8jHQd4xc4JPJpI105cVCLROpk= +recursive-readdir@2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.2.tgz#9946fb3274e1628de6e36b2f6714953b4845094f" + integrity sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg== dependencies: - minimatch "3.0.3" + minimatch "3.0.4" redent@^1.0.0: version "1.0.0" @@ -5118,10 +5672,10 @@ redent@^1.0.0: indent-string "^2.1.0" strip-indent "^1.0.1" -regenerate-unicode-properties@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz#107405afcc4a190ec5ed450ecaa00ed0cafa7a4c" - integrity sha512-s5NGghCE4itSlUS+0WUj88G6cfMVMmH8boTPNvABf8od+2dhT9WDlWu8n01raQAJZMOK8Ch6jSexaRO7swd6aw== +regenerate-unicode-properties@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz#ef51e0f0ea4ad424b77bf7cb41f3e015c70a3f0e" + integrity sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA== dependencies: regenerate "^1.4.0" @@ -5130,15 +5684,15 @@ regenerate@^1.4.0: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== -regenerator-runtime@^0.12.0: - version "0.12.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de" - integrity sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg== - -regenerator-transform@^0.13.3: +regenerator-runtime@^0.13.2: version "0.13.3" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.3.tgz#264bd9ff38a8ce24b06e0636496b2c856b57bcbb" - integrity sha512-5ipTrZFSq5vU2YoGoww4uaRVAK4wyYC4TSICibbfEPOruUu8FFP7ErV0BjmbIOEpn3O/k9na9UEdYR/3m7N6uA== + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5" + integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw== + +regenerator-transform@^0.14.0: + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.1.tgz#3b2fce4e1ab7732c08f665dfdb314749c7ddd2fb" + integrity sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ== dependencies: private "^0.1.6" @@ -5150,17 +5704,17 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexpu-core@^4.1.3, regexpu-core@^4.2.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.4.0.tgz#8d43e0d1266883969720345e70c275ee0aec0d32" - integrity sha512-eDDWElbwwI3K0Lo6CqbQbA6FwgtCz4kYTarrri1okfkRLZAqstU+B3voZBCjg8Fl6iq0gXrJG6MvRgLthfvgOA== +regexpu-core@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.6.0.tgz#2037c18b327cfce8a6fea2a4ec441f2432afb8b6" + integrity sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg== dependencies: regenerate "^1.4.0" - regenerate-unicode-properties "^7.0.0" + regenerate-unicode-properties "^8.1.0" regjsgen "^0.5.0" regjsparser "^0.6.0" unicode-match-property-ecmascript "^1.0.4" - unicode-match-property-value-ecmascript "^1.0.2" + unicode-match-property-value-ecmascript "^1.1.0" regjsgen@^0.5.0: version "0.5.0" @@ -5182,6 +5736,19 @@ remarkable@^1.7.1: argparse "~0.1.15" autolinker "~0.15.0" +remarkable@^1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/remarkable/-/remarkable-1.7.4.tgz#19073cb960398c87a7d6546eaa5e50d2022fcd00" + integrity sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg== + dependencies: + argparse "^1.0.10" + autolinker "~0.28.0" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= + repeat-element@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" @@ -5204,7 +5771,7 @@ replace-ext@^1.0.0: resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" integrity sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs= -request@^2.53.0, request@^2.87.0: +request@^2.53.0, request@^2.88.0: version "2.88.0" resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== @@ -5235,14 +5802,6 @@ requires-port@^1.0.0: resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= -resolve-dir@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" - integrity sha1-eaQGRMNivoLybv/nOcm7U4IEb0M= - dependencies: - expand-tilde "^2.0.0" - global-modules "^1.0.0" - resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" @@ -5297,6 +5856,13 @@ rimraf@^2.5.4: dependencies: glob "^7.0.5" +rimraf@^2.6.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + run-async@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" @@ -5304,17 +5870,12 @@ run-async@^2.2.0: dependencies: is-promise "^2.1.0" -rx-lite-aggregates@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" - integrity sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74= +rxjs@^6.4.0: + version "6.5.3" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.3.tgz#510e26317f4db91a7eb1de77d9dd9ba0a4899a3a" + integrity sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA== dependencies: - rx-lite "*" - -rx-lite@*, rx-lite@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" - integrity sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ= + tslib "^1.9.0" safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" @@ -5338,15 +5899,15 @@ safe-regex@^1.1.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -sax@~1.2.4: +sax@^1.2.4, sax@~1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -scheduler@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.12.0.tgz#8ab17699939c0aedc5a196a657743c496538647b" - integrity sha512-t7MBR28Akcp4Jm+QoR63XgAi9YgCUmgvDHqf5otgAj4QvdoBE4ImCX0ffehefePPG+aitiYHp0g/mW6s4Tp+dw== +scheduler@^0.16.2: + version "0.16.2" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.16.2.tgz#f74cd9d33eff6fc554edfb79864868e4819132c1" + integrity sha512-BqYVWqwz6s1wZMhjFvLfVR5WXP7ZY32M/wYPo04CcuPM7XZEbV2TBNW7Z0UkguPTl0dWMA59VbNXxK6q+pHItg== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" @@ -5385,6 +5946,11 @@ semver@^5.6.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== +semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + send@0.17.1: version "0.17.1" resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" @@ -5414,6 +5980,11 @@ serve-static@1.14.1: parseurl "~1.3.3" send "0.17.1" +set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + set-getter@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/set-getter/-/set-getter-0.1.0.tgz#d769c182c9d5a51f409145f2fba82e5e86e80376" @@ -5448,15 +6019,10 @@ shebang-regex@^1.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= -shell-quote@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767" - integrity sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c= - dependencies: - array-filter "~0.0.0" - array-map "~0.0.0" - array-reduce "~0.0.0" - jsonify "~0.0.0" +shell-quote@1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2" + integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg== shelljs@^0.8.3: version "0.8.3" @@ -5479,13 +6045,15 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" -sitemap@^1.13.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/sitemap/-/sitemap-1.13.0.tgz#569cbe2180202926a62a266cd3de09c9ceb43f83" - integrity sha1-Vpy+IYAgKSamKiZs094Jyc60P4M= +sitemap@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/sitemap/-/sitemap-3.2.2.tgz#3f77c358fa97b555c879e457098e39910095c62b" + integrity sha512-TModL/WU4m2q/mQcrDgNANn0P4LwprM9MMvG4hu5zP4c6IIKs2YLTu6nXXnNr8ODW/WFtxKggiJ1EGn2W0GNmg== dependencies: - underscore "^1.7.0" - url-join "^1.1.0" + lodash.chunk "^4.2.0" + lodash.padstart "^4.6.1" + whatwg-url "^7.0.0" + xmlbuilder "^13.0.0" slash@^1.0.0: version "1.0.0" @@ -5522,17 +6090,17 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" -sockjs-client@1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.1.5.tgz#1bb7c0f7222c40f42adf14f4442cbd1269771a83" - integrity sha1-G7fA9yIsQPQq3xT0RCy9Eml3GoM= +sockjs-client@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.4.0.tgz#c9f2568e19c8fd8173b4997ea3420e0bb306c7d5" + integrity sha512-5zaLyO8/nri5cua0VtOrFXBPK1jbL4+1cebT/mmKA1E1ZXOvJrII75bPu0l0k843G/+iAbhEqzyKr0w/eCCj7g== dependencies: - debug "^2.6.6" - eventsource "0.1.6" - faye-websocket "~0.11.0" - inherits "^2.0.1" + debug "^3.2.5" + eventsource "^1.0.7" + faye-websocket "~0.11.1" + inherits "^2.0.3" json3 "^3.3.2" - url-parse "^1.1.8" + url-parse "^1.4.3" sort-keys-length@^1.0.0: version "1.0.1" @@ -5679,7 +6247,16 @@ string-template@~0.2.1: resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" integrity sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0= -string-width@^2.1.0: +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2", string-width@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== @@ -5706,7 +6283,14 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -strip-ansi@3.0.1, strip-ansi@^3.0.0: +strip-ansi@5.2.0, strip-ansi@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= @@ -5751,6 +6335,11 @@ strip-indent@^1.0.1: dependencies: get-stdin "^4.0.1" +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + strip-outer@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631" @@ -5758,6 +6347,11 @@ strip-outer@^1.0.0: dependencies: escape-string-regexp "^1.0.2" +striptags@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/striptags/-/striptags-3.1.1.tgz#c8c3e7fdd6fb4bb3a32a3b752e5b5e3e38093ebd" + integrity sha1-yMPn/db7S7OjKjt1LltePjgJPr0= + stylehacks@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-4.0.3.tgz#6718fcaf4d1e07d8a1318690881e8d96726a71d5" @@ -5826,6 +6420,11 @@ svgo@^1.0.5: unquote "~1.1.1" util.promisify "~1.0.0" +tapable@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" + integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== + tar-stream@^1.5.2: version "1.6.2" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" @@ -5839,14 +6438,26 @@ tar-stream@^1.5.2: to-buffer "^1.1.1" xtend "^4.0.0" -tcp-port-used@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/tcp-port-used/-/tcp-port-used-0.1.2.tgz#9450e8768c83b416fd4d1a6a9449eeccbf496c29" - integrity sha1-lFDodoyDtBb9TRpqlEnuzL9JbCk= +tar@^4: + version "4.4.13" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" + integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== dependencies: - debug "0.7.4" - is2 "0.0.9" - q "0.9.7" + chownr "^1.1.1" + fs-minipass "^1.2.5" + minipass "^2.8.6" + minizlib "^1.2.1" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.3" + +tcp-port-used@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tcp-port-used/-/tcp-port-used-1.0.1.tgz#46061078e2d38c73979a2c2c12b5a674e6689d70" + integrity sha512-rwi5xJeU6utXoEIiMvVBMc9eJ2/ofzB+7nLOdnZuFTmNCLqRiQh2sMG9MqCxHU/69VC/Fwp5dV9306Qd54ll1Q== + dependencies: + debug "4.1.0" + is2 "2.0.1" temp-dir@^1.0.0: version "1.0.0" @@ -5866,6 +6477,14 @@ text-table@0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= +through2@^2.0.0: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + through@^2.3.6, through@^2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" @@ -5965,6 +6584,13 @@ tough-cookie@~2.4.3: psl "^1.1.24" punycode "^1.4.1" +tr46@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" + integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= + dependencies: + punycode "^2.1.0" + tree-node-cli@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/tree-node-cli/-/tree-node-cli-1.2.5.tgz#afd75437976bbf2cc0c52b9949798e7530e8fd8c" @@ -5989,14 +6615,19 @@ trim-right@^1.0.1: resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= -truncate-html@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/truncate-html/-/truncate-html-1.0.1.tgz#6f1d03cbb2308bfda266f9ce8f25e62c66919d4f" - integrity sha512-4Yw02HZAhGTGZsW2aNB7GtoF/SG4yPVlS4V42tehY1ZorZhIIZpdUuocdGB7W30J8WHzgOYmyhBzMTx/362Cew== +truncate-html@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/truncate-html/-/truncate-html-1.0.3.tgz#0166dfc7890626130c2e4174c6b73d4d63993e5f" + integrity sha512-1o1prdRv+iehXcGwn29YgXU17DotHkr+OK3ijVEG7FGMwHNG9RyobXwimw6djDvbIc24rhmz3tjNNvNESjkNkQ== dependencies: "@types/cheerio" "^0.22.8" cheerio "0.22.0" +tslib@^1.9.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" + integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== + tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -6035,11 +6666,6 @@ underscore.string@~2.4.0: resolved "https://registry.yarnpkg.com/underscore.string/-/underscore.string-2.4.0.tgz#8cdd8fbac4e2d2ea1e7e2e8097c42f442280f85b" integrity sha1-jN2PusTi0uoefi6Al8QvRCKA+Fs= -underscore@^1.7.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" - integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== - underscore@~1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.7.0.tgz#6bbaf0877500d36be34ecaa584e0db9fef035209" @@ -6058,10 +6684,10 @@ unicode-match-property-ecmascript@^1.0.4: unicode-canonical-property-names-ecmascript "^1.0.4" unicode-property-aliases-ecmascript "^1.0.4" -unicode-match-property-value-ecmascript@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz#9f1dc76926d6ccf452310564fd834ace059663d4" - integrity sha512-Rx7yODZC1L/T8XKo/2kNzVAQaRE88AaMvI1EF/Xnj3GW2wzN6fop9DDWuFAKUVFH7vozkz26DzP0qyWLKLIVPQ== +unicode-match-property-value-ecmascript@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz#5b4b426e08d13a80365e0d657ac7a6c1ec46a277" + integrity sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g== unicode-property-aliases-ecmascript@^1.0.4: version "1.0.4" @@ -6111,6 +6737,11 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" +upath@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" + integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== + uri-js@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" @@ -6123,11 +6754,6 @@ urix@^0.1.0: resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= -url-join@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/url-join/-/url-join-1.1.0.tgz#741c6c2f4596c4830d6718460920d0c92202dc78" - integrity sha1-dBxsL0WWxIMNZxhGCSDQySIC3Hg= - url-parse-lax@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" @@ -6142,7 +6768,7 @@ url-parse-lax@^3.0.0: dependencies: prepend-http "^2.0.0" -url-parse@^1.1.8, url-parse@^1.4.3: +url-parse@^1.4.3: version "1.4.4" resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.4.tgz#cac1556e95faa0303691fec5cf9d5a1bc34648f8" integrity sha512-/92DTTorg4JjktLNLe6GPS2/RvAd/RGr6LuktmWSMLEOa6rjnlrFXNgSbSmkNvCoL2T028A0a1JaJLzRMlFoHg== @@ -6210,6 +6836,11 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" +webidl-conversions@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== + websocket-driver@>=0.5.1: version "0.7.0" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.0.tgz#0caf9d2d755d93aee049d4bdd0d3fe2cca2a24eb" @@ -6223,18 +6854,41 @@ websocket-extensions@>=0.1.1: resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" integrity sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg== -which@^1.2.14, which@^1.2.9: +whatwg-url@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.0.0.tgz#fde926fa54a599f3adf82dff25a9f7be02dc6edd" + integrity sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ== + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" + +which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" +wide-align@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + wordwrap@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" integrity sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8= +worker-rpc@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/worker-rpc/-/worker-rpc-0.1.1.tgz#cb565bd6d7071a8f16660686051e969ad32f54d5" + integrity sha512-P1WjMrUB3qgJNI9jfmpZ/htmBEjFh//6l/5y8SD9hg1Ef5zTTVVoRjTrTEzPrNBQvmhMxkoTsjOXN10GWU7aCg== + dependencies: + microevent.ts "~0.1.1" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -6245,16 +6899,31 @@ xml@^1.0.1: resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" integrity sha1-eLpyAgApxbyHuKgaPPzXS0ovweU= +xmlbuilder@^13.0.0: + version "13.0.2" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-13.0.2.tgz#02ae33614b6a047d1c32b5389c1fdacb2bce47a7" + integrity sha512-Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ== + xtend@^4.0.0, xtend@~4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= +xtend@~4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= +yallist@^3.0.0, yallist@^3.0.3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + yamljs@^0.2.1: version "0.2.10" resolved "https://registry.yarnpkg.com/yamljs/-/yamljs-0.2.10.tgz#481cc7c25ca73af59f591f0c96e3ce56c757a40f" From 9eb3c4fa7ad0be7944d8cf392c1590ef22b0cae1 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 17 Oct 2019 11:15:17 +0800 Subject: [PATCH 032/142] Add Petstore samples for dart-dio (#4162) * Add samples for dart-dio * use dartmft --- bin/dart-dio-petstore.sh | 34 +++++++++++++++++++ bin/windows/dart-dio-petstore.bat | 10 ++++++ .../dart-dio/.openapi-generator/VERSION | 2 +- samples/client/petstore/dart-dio/README.md | 1 - .../petstore/dart-dio/lib/api/pet_api.dart | 16 ++++----- .../petstore/dart-dio/lib/api/store_api.dart | 19 ++++++----- .../petstore/dart-dio/lib/api/user_api.dart | 16 ++++----- 7 files changed, 71 insertions(+), 27 deletions(-) create mode 100755 bin/dart-dio-petstore.sh create mode 100755 bin/windows/dart-dio-petstore.bat diff --git a/bin/dart-dio-petstore.sh b/bin/dart-dio-petstore.sh new file mode 100755 index 000000000000..724c0f9b0879 --- /dev/null +++ b/bin/dart-dio-petstore.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" + +# Generate non-browserClient +ags="generate -t modules/openapi-generator/src/main/resources/dart-dio -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart-dio -o samples/client/petstore/dart-dio/ --additional-properties hideGenerationTimestamp=true $@" + +java $JAVA_OPTS -jar $executable $ags diff --git a/bin/windows/dart-dio-petstore.bat b/bin/windows/dart-dio-petstore.bat new file mode 100755 index 000000000000..6905d6554687 --- /dev/null +++ b/bin/windows/dart-dio-petstore.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g dart-dio -o samples\client\petstore\dart-dio --additional-properties hideGenerationTimestamp=true +java %JAVA_OPTS% -jar %executable% %ags% + diff --git a/samples/client/petstore/dart-dio/.openapi-generator/VERSION b/samples/client/petstore/dart-dio/.openapi-generator/VERSION index 0e97bd19efbf..c3a2c7076fa8 100644 --- a/samples/client/petstore/dart-dio/.openapi-generator/VERSION +++ b/samples/client/petstore/dart-dio/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart-dio/README.md b/samples/client/petstore/dart-dio/README.md index ded15d6b9238..761bbe9d322e 100644 --- a/samples/client/petstore/dart-dio/README.md +++ b/samples/client/petstore/dart-dio/README.md @@ -4,7 +4,6 @@ This is a sample server Petstore server. For this sample, you can use the api ke This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0.0 -- Build date: 2019-10-03T14:20:56.615+13:00[Pacific/Auckland] - Build package: org.openapitools.codegen.languages.DartDioClientCodegen ## Requirements diff --git a/samples/client/petstore/dart-dio/lib/api/pet_api.dart b/samples/client/petstore/dart-dio/lib/api/pet_api.dart index fee534d8540c..5e5659a76399 100644 --- a/samples/client/petstore/dart-dio/lib/api/pet_api.dart +++ b/samples/client/petstore/dart-dio/lib/api/pet_api.dart @@ -27,7 +27,7 @@ class PetApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -67,7 +67,7 @@ class PetApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; headerParams["api_key"] = apiKey; @@ -102,7 +102,7 @@ class PetApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams["status"] = status; @@ -155,7 +155,7 @@ class PetApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams["tags"] = tags; @@ -209,7 +209,7 @@ class PetApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -258,7 +258,7 @@ class PetApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -299,7 +299,7 @@ class PetApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -336,7 +336,7 @@ class PetApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); diff --git a/samples/client/petstore/dart-dio/lib/api/store_api.dart b/samples/client/petstore/dart-dio/lib/api/store_api.dart index 440dcd604b8a..9bfe53108d54 100644 --- a/samples/client/petstore/dart-dio/lib/api/store_api.dart +++ b/samples/client/petstore/dart-dio/lib/api/store_api.dart @@ -14,14 +14,15 @@ class StoreApi { StoreApi(this._dio, this._serializers); /// Delete purchase order by ID - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - Future deleteOrder(String orderId, { CancelToken cancelToken, Map headers,}) async { - String path = "/store/order/{orderId}".replaceAll("{" + "orderId" + "}", orderId.toString()); + /// + /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + FuturedeleteOrder(String orderId,{ CancelToken cancelToken, Map headers,}) async { + + String path = "/store/order/{orderId}".replaceAll("{" + "orderId" + "}", orderId.toString()); - // query params + // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -51,7 +52,7 @@ class StoreApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -95,7 +96,7 @@ class StoreApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -139,7 +140,7 @@ class StoreApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); diff --git a/samples/client/petstore/dart-dio/lib/api/user_api.dart b/samples/client/petstore/dart-dio/lib/api/user_api.dart index d30d72c38039..62a77bbdce98 100644 --- a/samples/client/petstore/dart-dio/lib/api/user_api.dart +++ b/samples/client/petstore/dart-dio/lib/api/user_api.dart @@ -25,7 +25,7 @@ class UserApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -63,7 +63,7 @@ class UserApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -103,7 +103,7 @@ class UserApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -144,7 +144,7 @@ class UserApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -179,7 +179,7 @@ class UserApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -229,7 +229,7 @@ class UserApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams["username"] = username; @@ -280,7 +280,7 @@ class UserApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); @@ -316,7 +316,7 @@ class UserApi { // query params Map queryParams = {}; - Map headerParams = Map.from(headers); + Map headerParams = Map.from(headers ?? {}); Map formParams = {}; queryParams.removeWhere((key, value) => value == null); From c32fa5d0120c8d2ddbb9f810af8640f301060d39 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 17 Oct 2019 12:43:31 +0800 Subject: [PATCH 033/142] Add a link to a PoniCode blog post (#4173) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9ead17a9b646..5cff582daa80 100644 --- a/README.md +++ b/README.md @@ -645,6 +645,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2019-09-23 - [swaggerからOpenApi GeneratorでSpringのコードを自動生成](https://qiita.com/littleFeet/items/492df2ad68a0799a5e5e) by [@littleFeet](https://qiita.com/littleFeet) at [Qiita](https://qiita.com/) - 2019-10-09 - [openapi-generator で生成した Go クライアントで Bearer 認証をする](https://autopp-tech.hatenablog.com/entry/2019/10/09/222039) by [Akira Tanimura](https://github.com/autopp) - 2019-10-12 - [OpenApi自动生成client](https://blog.csdn.net/wxid2798226/article/details/102527467) by [郑泽洲](https://me.csdn.net/wxid2798226) +- 2019-10-16 - [How to ship APIs faster?](https://medium.com/@accounts_76224/how-to-ship-apis-faster-cabef2f819e4) by [Simon Guilliams @ PoniCode](https://ponicode.dev) ## [6 - About Us](#table-of-contents) From f901a84743212cb6581f9a58d89291699b709da9 Mon Sep 17 00:00:00 2001 From: sunn <33183834+etherealjoy@users.noreply.github.com> Date: Thu, 17 Oct 2019 11:48:35 +0200 Subject: [PATCH 034/142] Update tests to prevent memory leakage (#4164) Install C and C++ tools in Travis --- .travis.yml | 15 ++-- pom.xml | 2 +- .../petstore/cpp-qt5/PetStore/PetApiTests.cpp | 68 +++++++--------- .../petstore/cpp-qt5/PetStore/PetApiTests.h | 3 +- .../cpp-qt5/PetStore/StoreApiTests.cpp | 32 ++++---- .../petstore/cpp-qt5/PetStore/StoreApiTests.h | 4 +- .../cpp-qt5/PetStore/UserApiTests.cpp | 78 ++++++++----------- .../petstore/cpp-qt5/PetStore/UserApiTests.h | 3 +- .../petstore/cpp-qt5/build-and-test.bash | 64 ++++++++------- 9 files changed, 122 insertions(+), 147 deletions(-) diff --git a/.travis.yml b/.travis.yml index 50ec571010bd..30ae30d2013f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -94,16 +94,11 @@ before_install: # - Rely on `kerl` for [pre-compiled versions available](https://docs.travis-ci.com/user/languages/erlang#Choosing-OTP-releases-to-test-against). Rely on installation path chosen by [`travis-erlang-builder`](https://github.com/travis-ci/travis-erlang-builder/blob/e6d016b1a91ca7ecac5a5a46395bde917ea13d36/bin/compile#L18). # - . ~/otp/18.2.1/activate && erl -version #- curl -f -L -o ./rebar3 https://s3.amazonaws.com/rebar3/rebar3 && chmod +x ./rebar3 && ./rebar3 version && export PATH="${TRAVIS_BUILD_DIR}:$PATH" - # install valgrind for C++ memory test - - sudo apt-get install valgrind - # install Qt 5.10 - # comment out the following due to failure in downloading http://ppa.launchpad.net/beineri/opt-qt-5.10.1-trusty/ubuntu/dists/xenial/main/binary-amd64/Packages - #- sudo add-apt-repository --yes ppa:beineri/opt-qt-5.10.1-trusty - #- sudo apt-get update -qq - #- sudo apt-get install qt510-meta-minimal - #- source /opt/qt510/bin/qt510-env.sh - #- qmake -v - + # install C++ tools + - sudo apt install -y --no-install-recommends valgrind cmake build-essential + # install Qt5 + - sudo apt install -y --no-install-recommends qt5-default + - cmake --version # show host table to confirm petstore.swagger.io is mapped to localhost - cat /etc/hosts # show java version diff --git a/pom.xml b/pom.xml index f0cab9a0efef..3f66bee41fb8 100644 --- a/pom.xml +++ b/pom.xml @@ -1037,7 +1037,7 @@ samples/server/petstore/python-aiohttp samples/client/petstore/c - + samples/client/petstore/cpp-qt5 samples/client/petstore/elm-0.18 samples/client/petstore/rust diff --git a/samples/client/petstore/cpp-qt5/PetStore/PetApiTests.cpp b/samples/client/petstore/cpp-qt5/PetStore/PetApiTests.cpp index c5cf825ceb32..72f68c1dbd67 100644 --- a/samples/client/petstore/cpp-qt5/PetStore/PetApiTests.cpp +++ b/samples/client/petstore/cpp-qt5/PetStore/PetApiTests.cpp @@ -3,12 +3,6 @@ #include #include -OAIPetApi* PetApiTests::getApi() { - auto api = new OAIPetApi(); - api->setHost("http://petstore.swagger.io"); - return api; -} - OAIPet PetApiTests::createRandomPet() { OAIPet pet; qint64 id = QDateTime::currentMSecsSinceEpoch(); @@ -19,11 +13,12 @@ OAIPet PetApiTests::createRandomPet() { } void PetApiTests::findPetsByStatusTest() { - OAIPetApi* api = getApi(); + OAIPetApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool petFound = false; - connect(api, &OAIPetApi::findPetsByStatusSignal, [&](QList pets) { + connect(&api, &OAIPetApi::findPetsByStatusSignal, [&](QList pets) { petFound = true; foreach(OAIPet pet, pets) { QVERIFY(pet.getStatus().startsWith("available") || pet.getStatus().startsWith("sold")); @@ -31,19 +26,19 @@ void PetApiTests::findPetsByStatusTest() { loop.quit(); }); - api->findPetsByStatus({"available", "sold"}); + api.findPetsByStatus({"available", "sold"}); QTimer::singleShot(5000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(petFound, "didn't finish within timeout"); - delete api; } void PetApiTests::createAndGetPetTest() { - OAIPetApi* api = getApi(); + OAIPetApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool petCreated = false; - connect(api, &OAIPetApi::addPetSignal, [&]() { + connect(&api, &OAIPetApi::addPetSignal, [&]() { // pet created petCreated = true; loop.quit(); @@ -52,30 +47,30 @@ void PetApiTests::createAndGetPetTest() { OAIPet pet = createRandomPet(); qint64 id = pet.getId(); - api->addPet(pet); + api.addPet(pet); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(petCreated, "didn't finish within timeout"); bool petFetched = false; - connect(api, &OAIPetApi::getPetByIdSignal, [&](OAIPet pet) { + connect(&api, &OAIPetApi::getPetByIdSignal, [&](OAIPet pet) { QVERIFY(pet.getId() > 0); QVERIFY(pet.getStatus().compare("freaky") == 0); loop.quit(); petFetched = true; }); - api->getPetById(id); + api.getPetById(id); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(petFetched, "didn't finish within timeout"); - delete api; } void PetApiTests::updatePetTest() { - OAIPetApi* api = getApi(); + OAIPetApi api; + api.setHost(PetStoreHost); OAIPet pet = createRandomPet(); OAIPet petToCheck; @@ -83,13 +78,13 @@ void PetApiTests::updatePetTest() { QEventLoop loop; bool petAdded = false; - connect(api, &OAIPetApi::addPetSignal, [&](){ + connect(&api, &OAIPetApi::addPetSignal, [&](){ petAdded = true; loop.quit(); }); // create pet - api->addPet(pet); + api.addPet(pet); QTimer::singleShot(5000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(petAdded, "didn't finish within timeout"); @@ -97,50 +92,49 @@ void PetApiTests::updatePetTest() { // fetch it bool petFetched = false; - connect(api, &OAIPetApi::getPetByIdSignal, this, [&](OAIPet pet) { + connect(&api, &OAIPetApi::getPetByIdSignal, this, [&](OAIPet pet) { petFetched = true; petToCheck = pet; loop.quit(); }); // create pet - api->getPetById(id); + api.getPetById(id); QTimer::singleShot(5000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(petFetched, "didn't finish within timeout"); // update it bool petUpdated = false; - connect(api, &OAIPetApi::updatePetSignal, [&]() { + connect(&api, &OAIPetApi::updatePetSignal, [&]() { petUpdated = true; loop.quit(); }); // update pet petToCheck.setStatus(QString("scary")); - api->updatePet(petToCheck); + api.updatePet(petToCheck); QTimer::singleShot(5000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(petUpdated, "didn't finish within timeout"); // check it bool petFetched2 = false; - connect(api, &OAIPetApi::getPetByIdSignal, [&](OAIPet pet) { + connect(&api, &OAIPetApi::getPetByIdSignal, [&](OAIPet pet) { petFetched2 = true; QVERIFY(pet.getId() == petToCheck.getId()); QVERIFY(pet.getStatus().compare(petToCheck.getStatus()) == 0); loop.quit(); }); - api->getPetById(id); + api.getPetById(id); QTimer::singleShot(5000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(petFetched2, "didn't finish within timeout"); - - delete api; } void PetApiTests::updatePetWithFormTest() { - OAIPetApi* api = getApi(); + OAIPetApi api; + api.setHost(PetStoreHost); OAIPet pet = createRandomPet(); OAIPet petToCheck; @@ -149,54 +143,52 @@ void PetApiTests::updatePetWithFormTest() { // create pet bool petAdded = false; - connect(api, &OAIPetApi::addPetSignal, [&](){ + connect(&api, &OAIPetApi::addPetSignal, [&](){ petAdded = true; loop.quit(); }); - api->addPet(pet); + api.addPet(pet); QTimer::singleShot(5000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(petAdded, "didn't finish within timeout"); // fetch it bool petFetched = false; - connect(api, &OAIPetApi::getPetByIdSignal, [&](OAIPet pet) { + connect(&api, &OAIPetApi::getPetByIdSignal, [&](OAIPet pet) { petFetched = true; petToCheck = pet; loop.quit(); }); - api->getPetById(id); + api.getPetById(id); QTimer::singleShot(5000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(petFetched, "didn't finish within timeout"); // update it bool petUpdated = false; - connect(api, &OAIPetApi::updatePetWithFormSignal, [&](){ + connect(&api, &OAIPetApi::updatePetWithFormSignal, [&](){ petUpdated = true; loop.quit(); }); QString name("gorilla"); - api->updatePetWithForm(id, name, nullptr); + api.updatePetWithForm(id, name, nullptr); QTimer::singleShot(5000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(petUpdated, "didn't finish within timeout"); // fetch it bool petUpdated2 = false; - connect(api, &OAIPetApi::getPetByIdSignal, [&](OAIPet pet) { + connect(&api, &OAIPetApi::getPetByIdSignal, [&](OAIPet pet) { petUpdated2 = true; QVERIFY(pet.getName().compare(QString("gorilla")) == 0); loop.quit(); }); - api->getPetById(id); + api.getPetById(id); QTimer::singleShot(5000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(petUpdated2, "didn't finish within timeout"); - - delete api; } diff --git a/samples/client/petstore/cpp-qt5/PetStore/PetApiTests.h b/samples/client/petstore/cpp-qt5/PetStore/PetApiTests.h index 2abf6bb17db3..3f1a68f4b14f 100644 --- a/samples/client/petstore/cpp-qt5/PetStore/PetApiTests.h +++ b/samples/client/petstore/cpp-qt5/PetStore/PetApiTests.h @@ -7,7 +7,6 @@ using namespace OpenAPI; class PetApiTests: public QObject { Q_OBJECT - OAIPetApi* getApi(); OAIPet createRandomPet(); private slots: @@ -15,4 +14,6 @@ private slots: void createAndGetPetTest(); void updatePetTest(); void updatePetWithFormTest(); +private: + const QString PetStoreHost = QStringLiteral("http://petstore.swagger.io"); }; diff --git a/samples/client/petstore/cpp-qt5/PetStore/StoreApiTests.cpp b/samples/client/petstore/cpp-qt5/PetStore/StoreApiTests.cpp index 1a2492d79044..9433d5be9579 100644 --- a/samples/client/petstore/cpp-qt5/PetStore/StoreApiTests.cpp +++ b/samples/client/petstore/cpp-qt5/PetStore/StoreApiTests.cpp @@ -4,25 +4,20 @@ #include #include -OAIStoreApi* StoreApiTests::getApi() { - auto api = new OAIStoreApi(); - api->setHost("http://petstore.swagger.io"); - return api; -} - void StoreApiTests::placeOrderTest() { - auto api = getApi(); + OAIStoreApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool orderPlaced = false; - connect(api, &OAIStoreApi::placeOrderSignal, [&](OAIOrder order) { + connect(&api, &OAIStoreApi::placeOrderSignal, [&](OAIOrder order) { orderPlaced = true; QVERIFY(order.getPetId() == 10000); QVERIFY((order.getId() == 500)); qDebug() << order.getShipDate(); loop.quit(); }); - connect(api, &OAIStoreApi::placeOrderSignalE, [&](){ + connect(&api, &OAIStoreApi::placeOrderSignalE, [&](){ QFAIL("shouldn't trigger error"); loop.quit(); }); @@ -34,20 +29,20 @@ void StoreApiTests::placeOrderTest() { order.setComplete(false); order.setStatus("shipping"); order.setShipDate(QDateTime::currentDateTime()); - api->placeOrder(order); + api.placeOrder(order); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(orderPlaced, "didn't finish within timeout"); - delete api; } void StoreApiTests::getOrderByIdTest() { - auto api = getApi(); + OAIStoreApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool orderFetched = false; - connect(api, &OAIStoreApi::getOrderByIdSignal, [&](OAIOrder order) { + connect(&api, &OAIStoreApi::getOrderByIdSignal, [&](OAIOrder order) { orderFetched = true; QVERIFY(order.getPetId() == 10000); QVERIFY((order.getId() == 500)); @@ -55,20 +50,20 @@ void StoreApiTests::getOrderByIdTest() { loop.quit(); }); - api->getOrderById(500); + api.getOrderById(500); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(orderFetched, "didn't finish within timeout"); - delete api; } void StoreApiTests::getInventoryTest() { - auto api = getApi(); + OAIStoreApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool inventoryFetched = false; - connect(api, &OAIStoreApi::getInventorySignal, [&](QMap status) { + connect(&api, &OAIStoreApi::getInventorySignal, [&](QMap status) { inventoryFetched = true; for(const auto& key : status.keys()) { qDebug() << (key) << " Quantities " << status.value(key); @@ -76,10 +71,9 @@ void StoreApiTests::getInventoryTest() { loop.quit(); }); - api->getInventory(); + api.getInventory(); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(inventoryFetched, "didn't finish within timeout"); - delete api; } diff --git a/samples/client/petstore/cpp-qt5/PetStore/StoreApiTests.h b/samples/client/petstore/cpp-qt5/PetStore/StoreApiTests.h index e4aafaeb1d73..40023ae6b873 100644 --- a/samples/client/petstore/cpp-qt5/PetStore/StoreApiTests.h +++ b/samples/client/petstore/cpp-qt5/PetStore/StoreApiTests.h @@ -7,10 +7,10 @@ using namespace OpenAPI; class StoreApiTests: public QObject { Q_OBJECT - OAIStoreApi* getApi(); - private slots: void placeOrderTest(); void getOrderByIdTest(); void getInventoryTest(); +private: + const QString PetStoreHost = QStringLiteral("http://petstore.swagger.io"); }; diff --git a/samples/client/petstore/cpp-qt5/PetStore/UserApiTests.cpp b/samples/client/petstore/cpp-qt5/PetStore/UserApiTests.cpp index 0712822f831b..68a28f40156e 100644 --- a/samples/client/petstore/cpp-qt5/PetStore/UserApiTests.cpp +++ b/samples/client/petstore/cpp-qt5/PetStore/UserApiTests.cpp @@ -4,12 +4,6 @@ #include #include -OAIUserApi* UserApiTests::getApi() { - auto api = new OAIUserApi(); - api->setHost("http://petstore.swagger.io"); - return api; -} - OAIUser UserApiTests::createRandomUser() { OAIUser user; user.setId(QDateTime::currentMSecsSinceEpoch()); @@ -24,29 +18,29 @@ OAIUser UserApiTests::createRandomUser() { } void UserApiTests::createUserTest(){ - auto api = getApi(); + OAIUserApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool userCreated = false; - connect(api, &OAIUserApi::createUserSignal, [&](){ + connect(&api, &OAIUserApi::createUserSignal, [&](){ userCreated = true; loop.quit(); }); - api->createUser(createRandomUser()); + api.createUser(createRandomUser()); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(userCreated, "didn't finish within timeout"); - - delete api; } void UserApiTests::createUsersWithArrayInputTest(){ - auto api = getApi(); + OAIUserApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool usersCreated = false; - connect(api, &OAIUserApi::createUsersWithArrayInputSignal, [&](){ + connect(&api, &OAIUserApi::createUsersWithArrayInputSignal, [&](){ usersCreated = true; loop.quit(); }); @@ -55,20 +49,19 @@ void UserApiTests::createUsersWithArrayInputTest(){ users.append(createRandomUser()); users.append(createRandomUser()); users.append(createRandomUser()); - api->createUsersWithArrayInput(users); + api.createUsersWithArrayInput(users); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(usersCreated, "didn't finish within timeout"); - - delete api; } void UserApiTests::createUsersWithListInputTest(){ - auto api = getApi(); + OAIUserApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool usersCreated = false; - connect(api, &OAIUserApi::createUsersWithListInputSignal, [&](){ + connect(&api, &OAIUserApi::createUsersWithListInputSignal, [&](){ usersCreated = true; loop.quit(); }); @@ -81,105 +74,98 @@ void UserApiTests::createUsersWithListInputTest(){ users.append(johndoe); users.append(rambo); users.append(createRandomUser()); - api->createUsersWithListInput(users); + api.createUsersWithListInput(users); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(usersCreated, "didn't finish within timeout"); - - delete api; } void UserApiTests::deleteUserTest(){ - auto api = getApi(); + OAIUserApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool userDeleted = false; - connect(api, &OAIUserApi::deleteUserSignal, [&](){ + connect(&api, &OAIUserApi::deleteUserSignal, [&](){ userDeleted = true; loop.quit(); }); - api->deleteUser("rambo"); + api.deleteUser("rambo"); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(userDeleted, "didn't finish within timeout"); - - delete api; } void UserApiTests::getUserByNameTest(){ - auto api = getApi(); + OAIUserApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool userFetched = false; - connect(api, &OAIUserApi::getUserByNameSignal, [&](OAIUser summary) { + connect(&api, &OAIUserApi::getUserByNameSignal, [&](OAIUser summary) { userFetched = true; qDebug() << summary.getUsername(); QVERIFY(summary.getUsername() == "johndoe"); loop.quit(); }); - api->getUserByName("johndoe"); + api.getUserByName("johndoe"); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(userFetched, "didn't finish within timeout"); - - delete api; } void UserApiTests::loginUserTest(){ - auto api = getApi(); + OAIUserApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool userLogged = false; - connect(api, &OAIUserApi::loginUserSignal, [&](QString summary) { + connect(&api, &OAIUserApi::loginUserSignal, [&](QString summary) { userLogged = true; qDebug() << summary; loop.quit(); }); - api->loginUser("johndoe", "123456789"); + api.loginUser("johndoe", "123456789"); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(userLogged, "didn't finish within timeout"); - - delete api; } void UserApiTests::logoutUserTest(){ - auto api = getApi(); + OAIUserApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool userLoggedOut = false; - connect(api, &OAIUserApi::logoutUserSignal, [&](){ + connect(&api, &OAIUserApi::logoutUserSignal, [&](){ userLoggedOut = true; loop.quit(); }); - api->logoutUser(); + api.logoutUser(); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(userLoggedOut, "didn't finish within timeout"); - - delete api; } void UserApiTests::updateUserTest(){ - auto api = getApi(); + OAIUserApi api; + api.setHost(PetStoreHost); QEventLoop loop; bool userUpdated = false; - connect(api, &OAIUserApi::updateUserSignal, [&]() { + connect(&api, &OAIUserApi::updateUserSignal, [&]() { userUpdated = true; loop.quit(); }); auto johndoe = createRandomUser(); johndoe.setUsername("johndoe"); - api->updateUser("johndoe", johndoe); + api.updateUser("johndoe", johndoe); QTimer::singleShot(14000, &loop, &QEventLoop::quit); loop.exec(); QVERIFY2(userUpdated, "didn't finish within timeout"); - - delete api; } diff --git a/samples/client/petstore/cpp-qt5/PetStore/UserApiTests.h b/samples/client/petstore/cpp-qt5/PetStore/UserApiTests.h index a748b4df9058..04dfcabd8538 100644 --- a/samples/client/petstore/cpp-qt5/PetStore/UserApiTests.h +++ b/samples/client/petstore/cpp-qt5/PetStore/UserApiTests.h @@ -7,7 +7,6 @@ using namespace OpenAPI; class UserApiTests: public QObject { Q_OBJECT - OAIUserApi* getApi(); OAIUser createRandomUser(); private slots: @@ -19,4 +18,6 @@ private slots: void loginUserTest(); void logoutUserTest(); void updateUserTest(); +private: + const QString PetStoreHost = QStringLiteral("http://petstore.swagger.io"); }; diff --git a/samples/client/petstore/cpp-qt5/build-and-test.bash b/samples/client/petstore/cpp-qt5/build-and-test.bash index ea8cbeb1357c..bcf96489533f 100755 --- a/samples/client/petstore/cpp-qt5/build-and-test.bash +++ b/samples/client/petstore/cpp-qt5/build-and-test.bash @@ -1,42 +1,48 @@ #!/bin/bash set -e +# export RUN_VALGRIND_TESTS=TRUE mkdir -p build cd build -qmake ../PetStore/PetStore.pro CONFIG+=debug +cmake .. make -valgrind --leak-check=full ./PetStore |& tee result.log || exit 1 - -echo "Make sure the tests are launched:" -testCount=$(cat result.log | grep 'Finished testing of' | wc -l) -if [ $testCount == 3 ] -then - echo "Ok" -else - echo "The tests were not run!!!" - exit 1 -fi - -echo "Make sure the tests passed:" -successCount=$(cat result.log | grep '0 failed' | wc -l) -if [ $successCount == 3 ] -then - echo "Ok" +if [[ -z "${RUN_VALGRIND_TESTS}" ]]; then + echo "Running Qt5 Petstore Tests" + ./cpp-qt5-petstore else - echo "The tests failed!!!" - exit 1 + echo "Running Qt5 Petstore Tests with Valgrind" + valgrind --leak-check=full ./cpp-qt5-petstore |& tee result.log || exit 1 + testCount=$(cat result.log | grep 'Finished testing of' | wc -l) + if [ $testCount == 3 ] + then + echo "Ok" + else + echo "The tests were not run!!!" + exit 1 + fi + + echo "Make sure the tests passed:" + successCount=$(cat result.log | grep '0 failed' | wc -l) + if [ $successCount == 3 ] + then + echo "Ok" + else + echo "The tests failed!!!" + exit 1 + fi + + echo "Check if no memory leaks occured:" + leakCount=$(cat result.log | grep 'lost: 0 bytes in 0 blocks' | wc -l) + if [ $leakCount == 3 ] + then + echo "Ok" + else + echo "There was memory leaks!!!" + exit 1 + fi fi -echo "Check if no memory leaks occured:" -leakCount=$(cat result.log | grep 'lost: 0 bytes in 0 blocks' | wc -l) -if [ $leakCount == 3 ] -then - echo "Ok" -else - echo "There was memory leaks!!!" - exit 1 -fi From 6af234f79a1c84976909b1b433625fc07aa5f2d7 Mon Sep 17 00:00:00 2001 From: siada Date: Thu, 17 Oct 2019 12:50:10 +0100 Subject: [PATCH 035/142] [typescript-inversify] Fix multipart form uploads (#4131) * Fix multipart form uploads * Update modules/openapi-generator/src/main/resources/typescript-inversify/HttpClient.mustache Co-Authored-By: Esteban Gehring * re-generate samples --- .../resources/typescript-inversify/HttpClient.mustache | 6 ++++++ .../resources/typescript-inversify/api.service.mustache | 7 ++++++- samples/client/petstore/typescript-inversify/HttpClient.ts | 6 ++++++ .../petstore/typescript-inversify/api/pet.service.ts | 6 +++--- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-inversify/HttpClient.mustache b/modules/openapi-generator/src/main/resources/typescript-inversify/HttpClient.mustache index a44d76453ca8..23c9363ff34d 100644 --- a/modules/openapi-generator/src/main/resources/typescript-inversify/HttpClient.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-inversify/HttpClient.mustache @@ -51,6 +51,12 @@ class HttpClient implements IHttpClient { }; private performNetworkCall(url: string, method: string, body?: any, headers?: Headers): Observable { + + // when using fetch & a multipart upload, the requests content-type is handled by the browser, so should be left unset otherwise the multipart boundry is not added + if(headers && headers["Content-Type"] === "multipart/form-data") { + delete headers["Content-Type"]; + } + let promise = window.fetch(url, { method: method, body: body, diff --git a/modules/openapi-generator/src/main/resources/typescript-inversify/api.service.mustache b/modules/openapi-generator/src/main/resources/typescript-inversify/api.service.mustache index 033de44d80b7..1e1c87b7525b 100644 --- a/modules/openapi-generator/src/main/resources/typescript-inversify/api.service.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-inversify/api.service.mustache @@ -152,7 +152,12 @@ export class {{classname}} { {{#hasFormParams}} let formData: FormData = new FormData(); + {{#isMultipart}} + headers['Content-Type'] = 'multipart/form-data'; + {{/isMultipart}} + {{^isMultipart}} headers['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'; + {{/isMultipart}} {{#formParams}} {{#isListContainer}} if ({{paramName}}) { @@ -174,7 +179,7 @@ export class {{classname}} { {{/formParams}} {{/hasFormParams}} - const response: Observable> = this.httpClient.{{httpMethod}}(`${this.basePath}{{{path}}}{{#hasQueryParams}}?${queryParameters.join('&')}{{/hasQueryParams}}`{{#bodyParam}}, {{paramName}} {{/bodyParam}}{{#hasFormParams}}, body{{/hasFormParams}}, headers); + const response: Observable> = this.httpClient.{{httpMethod}}(`${this.basePath}{{{path}}}{{#hasQueryParams}}?${queryParameters.join('&')}{{/hasQueryParams}}`{{#bodyParam}}, {{paramName}} {{/bodyParam}}{{#hasFormParams}}, formData{{/hasFormParams}}, headers); if (observe == 'body') { return response.pipe( map(httpResponse => <{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>(httpResponse.response)) diff --git a/samples/client/petstore/typescript-inversify/HttpClient.ts b/samples/client/petstore/typescript-inversify/HttpClient.ts index 4a9745c654d1..785d1db32f1e 100644 --- a/samples/client/petstore/typescript-inversify/HttpClient.ts +++ b/samples/client/petstore/typescript-inversify/HttpClient.ts @@ -46,6 +46,12 @@ class HttpClient implements IHttpClient { }; private performNetworkCall(url: string, method: string, body?: any, headers?: Headers): Observable { + + // when using fetch & a multipart upload, the requests content-type is handled by the browser, so should be left unset otherwise the multipart boundry is not added + if(headers && headers["Content-Type"] === "multipart/form-data") { + delete headers["Content-Type"]; + } + let promise = window.fetch(url, { method: method, body: body, diff --git a/samples/client/petstore/typescript-inversify/api/pet.service.ts b/samples/client/petstore/typescript-inversify/api/pet.service.ts index 37a5bf4004ca..167af86019df 100644 --- a/samples/client/petstore/typescript-inversify/api/pet.service.ts +++ b/samples/client/petstore/typescript-inversify/api/pet.service.ts @@ -276,7 +276,7 @@ export class PetService { formData.append('status', status); } - const response: Observable> = this.httpClient.post(`${this.basePath}/pet/${encodeURIComponent(String(petId))}`, body, headers); + const response: Observable> = this.httpClient.post(`${this.basePath}/pet/${encodeURIComponent(String(petId))}`, formData, headers); if (observe == 'body') { return response.pipe( map(httpResponse => (httpResponse.response)) @@ -311,7 +311,7 @@ export class PetService { headers['Accept'] = 'application/json'; let formData: FormData = new FormData(); - headers['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'; + headers['Content-Type'] = 'multipart/form-data'; if (additionalMetadata !== undefined) { formData.append('additionalMetadata', additionalMetadata); } @@ -319,7 +319,7 @@ export class PetService { formData.append('file', file); } - const response: Observable> = this.httpClient.post(`${this.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, body, headers); + const response: Observable> = this.httpClient.post(`${this.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, formData, headers); if (observe == 'body') { return response.pipe( map(httpResponse => (httpResponse.response)) From 080991823a9f26fab1e010529c7b4b2732ad5ce7 Mon Sep 17 00:00:00 2001 From: Colin Arnott Date: Thu, 17 Oct 2019 12:09:02 +0000 Subject: [PATCH 036/142] [Go] Upgrade dependencies (#4126) antihax/optional#1 added module support, and was tagged as a stable release. This change consumes that tag, and updates the psuedo-version for golang.org/x/oauth2. --- .../src/main/resources/go-experimental/go.mod.mustache | 6 ++++-- .../src/main/resources/go-experimental/go.sum | 10 +++++++--- .../src/main/resources/go/go.mod.mustache | 6 ++---- modules/openapi-generator/src/main/resources/go/go.sum | 8 ++++---- .../client/petstore/go-experimental/go-petstore/go.mod | 6 ++++-- .../client/petstore/go-experimental/go-petstore/go.sum | 10 +++++++--- samples/client/petstore/go/go-petstore-withXml/go.mod | 6 ++---- samples/client/petstore/go/go-petstore-withXml/go.sum | 8 ++++---- samples/client/petstore/go/go-petstore/go.mod | 6 ++---- samples/client/petstore/go/go-petstore/go.sum | 8 ++++---- 10 files changed, 40 insertions(+), 34 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/go-experimental/go.mod.mustache b/modules/openapi-generator/src/main/resources/go-experimental/go.mod.mustache index e02a1be201ba..d7aeada75774 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/go.mod.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/go.mod.mustache @@ -1,6 +1,8 @@ module {{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}} +go 1.13 + require ( - github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6 - golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a + github.com/antihax/optional v1.0.0 + golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 ) diff --git a/modules/openapi-generator/src/main/resources/go-experimental/go.sum b/modules/openapi-generator/src/main/resources/go-experimental/go.sum index e3c16fef3ac1..ce55b3c6a08f 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/go.sum +++ b/modules/openapi-generator/src/main/resources/go-experimental/go.sum @@ -1,11 +1,15 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/modules/openapi-generator/src/main/resources/go/go.mod.mustache b/modules/openapi-generator/src/main/resources/go/go.mod.mustache index cc360b34f49e..835028905992 100644 --- a/modules/openapi-generator/src/main/resources/go/go.mod.mustache +++ b/modules/openapi-generator/src/main/resources/go/go.mod.mustache @@ -1,8 +1,6 @@ module {{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}} -go 1.13 - require ( - github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 - golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a + github.com/antihax/optional v1.0.0 + golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 ) diff --git a/modules/openapi-generator/src/main/resources/go/go.sum b/modules/openapi-generator/src/main/resources/go/go.sum index 97b347238f4a..ce55b3c6a08f 100644 --- a/modules/openapi-generator/src/main/resources/go/go.sum +++ b/modules/openapi-generator/src/main/resources/go/go.sum @@ -1,13 +1,13 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 h1:uZuxRZCz65cG1o6K/xUqImNcYKtmk9ylqaH0itMSvzA= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/samples/client/petstore/go-experimental/go-petstore/go.mod b/samples/client/petstore/go-experimental/go-petstore/go.mod index 199809ed7066..b80383b722c9 100644 --- a/samples/client/petstore/go-experimental/go-petstore/go.mod +++ b/samples/client/petstore/go-experimental/go-petstore/go.mod @@ -1,6 +1,8 @@ module github.com/GIT_USER_ID/GIT_REPO_ID +go 1.13 + require ( - github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6 - golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a + github.com/antihax/optional v1.0.0 + golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 ) diff --git a/samples/client/petstore/go-experimental/go-petstore/go.sum b/samples/client/petstore/go-experimental/go-petstore/go.sum index e3c16fef3ac1..ce55b3c6a08f 100644 --- a/samples/client/petstore/go-experimental/go-petstore/go.sum +++ b/samples/client/petstore/go-experimental/go-petstore/go.sum @@ -1,11 +1,15 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/samples/client/petstore/go/go-petstore-withXml/go.mod b/samples/client/petstore/go/go-petstore-withXml/go.mod index c7c2a426e787..1af1846f9850 100644 --- a/samples/client/petstore/go/go-petstore-withXml/go.mod +++ b/samples/client/petstore/go/go-petstore-withXml/go.mod @@ -1,8 +1,6 @@ module github.com/GIT_USER_ID/GIT_REPO_ID -go 1.13 - require ( - github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 - golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a + github.com/antihax/optional v1.0.0 + golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 ) diff --git a/samples/client/petstore/go/go-petstore-withXml/go.sum b/samples/client/petstore/go/go-petstore-withXml/go.sum index 97b347238f4a..ce55b3c6a08f 100644 --- a/samples/client/petstore/go/go-petstore-withXml/go.sum +++ b/samples/client/petstore/go/go-petstore-withXml/go.sum @@ -1,13 +1,13 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 h1:uZuxRZCz65cG1o6K/xUqImNcYKtmk9ylqaH0itMSvzA= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/samples/client/petstore/go/go-petstore/go.mod b/samples/client/petstore/go/go-petstore/go.mod index c7c2a426e787..1af1846f9850 100644 --- a/samples/client/petstore/go/go-petstore/go.mod +++ b/samples/client/petstore/go/go-petstore/go.mod @@ -1,8 +1,6 @@ module github.com/GIT_USER_ID/GIT_REPO_ID -go 1.13 - require ( - github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 - golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a + github.com/antihax/optional v1.0.0 + golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 ) diff --git a/samples/client/petstore/go/go-petstore/go.sum b/samples/client/petstore/go/go-petstore/go.sum index 97b347238f4a..ce55b3c6a08f 100644 --- a/samples/client/petstore/go/go-petstore/go.sum +++ b/samples/client/petstore/go/go-petstore/go.sum @@ -1,13 +1,13 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 h1:uZuxRZCz65cG1o6K/xUqImNcYKtmk9ylqaH0itMSvzA= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= From b7eedda6964110053fe2ec67fedd6364a638d9fd Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 17 Oct 2019 20:13:38 +0800 Subject: [PATCH 037/142] update go openapi3 samples --- samples/openapi3/client/petstore/go/go-petstore/go.mod | 6 ++---- samples/openapi3/client/petstore/go/go-petstore/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/samples/openapi3/client/petstore/go/go-petstore/go.mod b/samples/openapi3/client/petstore/go/go-petstore/go.mod index c7c2a426e787..1af1846f9850 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/go.mod +++ b/samples/openapi3/client/petstore/go/go-petstore/go.mod @@ -1,8 +1,6 @@ module github.com/GIT_USER_ID/GIT_REPO_ID -go 1.13 - require ( - github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 - golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a + github.com/antihax/optional v1.0.0 + golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 ) diff --git a/samples/openapi3/client/petstore/go/go-petstore/go.sum b/samples/openapi3/client/petstore/go/go-petstore/go.sum index 97b347238f4a..ce55b3c6a08f 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/go.sum +++ b/samples/openapi3/client/petstore/go/go-petstore/go.sum @@ -1,13 +1,13 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 h1:uZuxRZCz65cG1o6K/xUqImNcYKtmk9ylqaH0itMSvzA= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= From f8d3b9826a76231dcdd8c267101af534fdabd634 Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 17 Oct 2019 15:18:32 +0200 Subject: [PATCH 038/142] docs: add link to a slideshare presentation (#4174) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5cff582daa80..30f0bf03f85e 100644 --- a/README.md +++ b/README.md @@ -643,6 +643,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2019-09-22 - [RESTful APIs: Tutorial of OpenAPI Specification](https://medium.com/@amirm.lavasani/restful-apis-tutorial-of-openapi-specification-eeada0e3901d) by [Amir Lavasani](https://medium.com/@amirm.lavasani) - 2019-09-22 - [Redefining SDKs as software diversity kits](https://devrel.net/dev-rel/redefining-sdks-as-software-diversity-kits) by [Sid Maestre (Xero)](https://twitter.com/sidneyallen) at [DevRelCon San Francisco 2019](https://sf2019.devrel.net/) - 2019-09-23 - [swaggerからOpenApi GeneratorでSpringのコードを自動生成](https://qiita.com/littleFeet/items/492df2ad68a0799a5e5e) by [@littleFeet](https://qiita.com/littleFeet) at [Qiita](https://qiita.com/) +- 2019-09-24 - [Eine Stunde was mit Api First!](https://www.slideshare.net/JanWeinschenker/eine-stunde-was-mit-api-first) by [@janweinschenker](https://twitter.com/janweinschenker) at [Java Forum Nord](https://javaforumnord.de/) - 2019-10-09 - [openapi-generator で生成した Go クライアントで Bearer 認証をする](https://autopp-tech.hatenablog.com/entry/2019/10/09/222039) by [Akira Tanimura](https://github.com/autopp) - 2019-10-12 - [OpenApi自动生成client](https://blog.csdn.net/wxid2798226/article/details/102527467) by [郑泽洲](https://me.csdn.net/wxid2798226) - 2019-10-16 - [How to ship APIs faster?](https://medium.com/@accounts_76224/how-to-ship-apis-faster-cabef2f819e4) by [Simon Guilliams @ PoniCode](https://ponicode.dev) From 3f3559020a660c8fe1cb848f2317a08850ca6429 Mon Sep 17 00:00:00 2001 From: Akihito Nakano Date: Fri, 18 Oct 2019 00:58:38 +0900 Subject: [PATCH 039/142] Add `style` and `explode` (#4042) * Add parameter * Set default value as Parameter.explode could be null * Fix typo * Add a link to the spec * Add tests * Delete unused import * Rename: shouldExplode -> isExplode * Include the new property --- .../codegen/CodegenParameter.java | 12 ++++-- .../openapitools/codegen/DefaultCodegen.java | 11 +++++- .../codegen/DefaultCodegenTest.java | 38 ++++++++++++++++--- .../src/test/resources/3_0/fromParameter.yaml | 35 +++++++++++++++++ 4 files changed, 85 insertions(+), 11 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/3_0/fromParameter.yaml diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java index 5963b8791b03..b42f6119996a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java @@ -26,9 +26,9 @@ public class CodegenParameter { public boolean isFormParam, isQueryParam, isPathParam, isHeaderParam, isCookieParam, isBodyParam, hasMore, isContainer, - secondaryParam, isCollectionFormatMulti, isPrimitiveType, isModel; + secondaryParam, isCollectionFormatMulti, isPrimitiveType, isModel, isExplode; public String baseName, paramName, dataType, datatypeWithEnum, dataFormat, - collectionFormat, description, unescapedDescription, baseType, defaultValue, enumName; + collectionFormat, description, unescapedDescription, baseType, defaultValue, enumName, style; public String example; // example value (x-example) public String jsonSchema; @@ -173,6 +173,7 @@ public CodegenParameter copy() { output.isFreeFormObject = this.isFreeFormObject; output.isListContainer = this.isListContainer; output.isMapContainer = this.isMapContainer; + output.isExplode = this.isExplode; return output; } @@ -247,7 +248,8 @@ public boolean equals(Object o) { Objects.equals(maxItems, that.maxItems) && Objects.equals(minItems, that.minItems) && Objects.equals(uniqueItems, that.uniqueItems) && - Objects.equals(multipleOf, that.multipleOf); + Objects.equals(multipleOf, that.multipleOf) && + Objects.equals(isExplode, that.isExplode); } @Override @@ -316,7 +318,8 @@ public int hashCode() { maxItems, minItems, uniqueItems, - multipleOf); + multipleOf, + isExplode); } @java.lang.Override @@ -386,6 +389,7 @@ public java.lang.String toString() { ", minItems=" + minItems + ", uniqueItems=" + uniqueItems + ", multipleOf=" + multipleOf + + ", isExplode=" + isExplode + '}'; } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index ab3ef8b418e3..eb3abe73b001 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -17,7 +17,6 @@ package org.openapitools.codegen; -import com.fasterxml.jackson.core.JsonProcessingException; import com.google.common.base.CaseFormat; import com.google.common.collect.ImmutableMap; import com.samskivert.mustache.Mustache; @@ -3099,7 +3098,15 @@ public CodegenParameter fromParameter(Parameter parameter, Set imports) // set default value codegenParameter.defaultValue = toDefaultValue(parameterSchema); - // TDOO revise collectionFormat + if (parameter.getStyle() != null) { + codegenParameter.style = parameter.getStyle().toString(); + } + + // the default value is false + // https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#user-content-parameterexplode + codegenParameter.isExplode = parameter.getExplode() == null ? false : parameter.getExplode(); + + // TODO revise collectionFormat String collectionFormat = null; if (ModelUtils.isArraySchema(parameterSchema)) { // for array parameter final ArraySchema arraySchema = (ArraySchema) parameterSchema; diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index e9965da17446..8914a7edfdb1 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -27,7 +27,6 @@ import io.swagger.v3.oas.models.PathItem; import io.swagger.v3.oas.models.headers.Header; import io.swagger.v3.oas.models.media.*; -import io.swagger.v3.oas.models.parameters.Parameter; import io.swagger.v3.oas.models.parameters.QueryParameter; import io.swagger.v3.oas.models.parameters.RequestBody; import io.swagger.v3.oas.models.responses.ApiResponse; @@ -43,13 +42,11 @@ import org.testng.Assert; import org.testng.annotations.Test; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertTrue; - import java.util.*; import java.util.stream.Collectors; +import static org.testng.Assert.*; + public class DefaultCodegenTest { @@ -1003,4 +1000,35 @@ public void convertApiNameWithSuffix() { assertEquals(codegen.toApiName(""), "DefaultApi"); } + public static class FromParameter { + private CodegenParameter codegenParameter(String path) { + final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/fromParameter.yaml"); + new InlineModelResolver().flatten(openAPI); + final DefaultCodegen codegen = new DefaultCodegen(); + codegen.setOpenAPI(openAPI); + + return codegen + .fromParameter( + openAPI + .getPaths() + .get(path) + .getGet() + .getParameters() + .get(0), + new HashSet<>() + ); + } + + @Test + public void setStyle() { + CodegenParameter parameter = codegenParameter("/set_style"); + assertEquals("form", parameter.style); + } + + @Test + public void setShouldExplode() { + CodegenParameter parameter = codegenParameter("/set_should_explode"); + assertTrue(parameter.isExplode); + } + } } diff --git a/modules/openapi-generator/src/test/resources/3_0/fromParameter.yaml b/modules/openapi-generator/src/test/resources/3_0/fromParameter.yaml new file mode 100644 index 000000000000..7977bee3bec3 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/fromParameter.yaml @@ -0,0 +1,35 @@ +openapi: 3.0.0 +servers: + - url: 'localhost:8080' +info: + version: 1.0.0 + title: OpenAPI Petstore + license: + name: Apache-2.0 + url: 'http://www.apache.org/licenses/LICENSE-2.0.html' +paths: + /set_style: + get: + operationId: setStyle + parameters: + - in: query + name: setStyleQuery + style: form + schema: + type: object + properties: + setStyleQueryParam: + type: string + /set_should_explode: + get: + operationId: setShouldExplode + parameters: + - in: query + name: setShouldExplodeQuery + style: form + explode: true + schema: + type: object + properties: + setShouldExplodeQueryParam: + type: string From c2ad14ea02f47dcca2acd8458428777b38e752fa Mon Sep 17 00:00:00 2001 From: Bruno Coelho <4brunu@users.noreply.github.com> Date: Fri, 18 Oct 2019 03:38:31 +0100 Subject: [PATCH 040/142] [swift4] Add swift package manager and update dependencies (#4141) * [swift4] add Swift Package Manager * [swift] update petstore projects * [swift4] try to run CI again --- .../codegen/languages/Swift4Codegen.java | 4 +- .../main/resources/swift4/Cartfile.mustache | 4 +- .../main/resources/swift4/Extensions.mustache | 4 +- .../resources/swift4/Package.swift.mustache | 33 + .../main/resources/swift4/Podspec.mustache | 4 +- .../src/main/resources/swift4/api.mustache | 6 +- .../swift4/default/.openapi-generator/VERSION | 2 +- .../petstore/swift4/default/Package.swift | 27 + .../PetstoreClient.xcodeproj/project.pbxproj | 556 ++++++++-------- .../xcschemes/PetstoreClient.xcscheme | 12 +- .../Pods/Alamofire/Source/Alamofire.swift | 27 +- .../Alamofire/Source/MultipartFormData.swift | 6 +- .../Source/NetworkReachabilityManager.swift | 6 +- .../Alamofire/Source/ParameterEncoding.swift | 3 +- .../Pods/Alamofire/Source/Request.swift | 6 +- .../Pods/Alamofire/Source/Response.swift | 12 +- .../Source/ResponseSerialization.swift | 54 +- .../Alamofire/Source/ServerTrustPolicy.swift | 1 - .../Alamofire/Source/SessionDelegate.swift | 36 +- .../Alamofire/Source/SessionManager.swift | 39 +- .../Pods/Alamofire/Source/TaskDelegate.swift | 30 +- .../Pods/Alamofire/Source/Timeline.swift | 3 +- .../Pods/Alamofire/Source/Validation.swift | 6 +- .../swift4/default/docs/HasOnlyReadOnly.md | 4 +- .../petstore/swift4/default/docs/Name.md | 4 +- .../swift4/default/docs/ReadOnlyFirst.md | 2 +- .../objcCompatible/.openapi-generator/VERSION | 2 +- .../swift4/objcCompatible/Package.swift | 27 + .../PetstoreClient.xcodeproj/project.pbxproj | 620 ++++++++--------- .../xcschemes/PetstoreClient.xcscheme | 12 +- .../objcCompatible/docs/HasOnlyReadOnly.md | 4 +- .../swift4/objcCompatible/docs/Name.md | 4 +- .../objcCompatible/docs/ReadOnlyFirst.md | 2 +- .../promisekit/.openapi-generator/VERSION | 2 +- .../petstore/swift4/promisekit/Cartfile | 2 +- .../petstore/swift4/promisekit/Package.swift | 28 + .../swift4/promisekit/PetstoreClient.podspec | 2 +- .../PetstoreClient.xcodeproj/project.pbxproj | 572 ++++++++-------- .../xcschemes/PetstoreClient.xcscheme | 12 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 4 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 48 +- .../APIs/FakeClassnameTags123API.swift | 4 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 36 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 16 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 32 +- .../Classes/OpenAPIs/Extensions.swift | 4 +- .../Pods/Alamofire/Source/Alamofire.swift | 27 +- .../Alamofire/Source/MultipartFormData.swift | 6 +- .../Source/NetworkReachabilityManager.swift | 6 +- .../Alamofire/Source/ParameterEncoding.swift | 3 +- .../Pods/Alamofire/Source/Request.swift | 6 +- .../Pods/Alamofire/Source/Response.swift | 12 +- .../Source/ResponseSerialization.swift | 54 +- .../Alamofire/Source/ServerTrustPolicy.swift | 1 - .../Alamofire/Source/SessionDelegate.swift | 36 +- .../Alamofire/Source/SessionManager.swift | 39 +- .../Pods/Alamofire/Source/TaskDelegate.swift | 30 +- .../Pods/Alamofire/Source/Timeline.swift | 3 +- .../Pods/Alamofire/Source/Validation.swift | 6 +- .../swift4/promisekit/docs/HasOnlyReadOnly.md | 4 +- .../petstore/swift4/promisekit/docs/Name.md | 4 +- .../swift4/promisekit/docs/ReadOnlyFirst.md | 2 +- .../swift4/rxswift/.openapi-generator/VERSION | 2 +- .../client/petstore/swift4/rxswift/Cartfile | 2 +- .../petstore/swift4/rxswift/Package.swift | 28 + .../swift4/rxswift/PetstoreClient.podspec | 2 +- .../PetstoreClient.xcodeproj/project.pbxproj | 628 +++++++++--------- .../xcschemes/PetstoreClient.xcscheme | 12 +- .../OpenAPIs/Models/StringBooleanMap.swift | 45 ++ .../Pods/Alamofire/Source/Alamofire.swift | 27 +- .../Alamofire/Source/MultipartFormData.swift | 6 +- .../Source/NetworkReachabilityManager.swift | 6 +- .../Alamofire/Source/ParameterEncoding.swift | 3 +- .../Pods/Alamofire/Source/Request.swift | 6 +- .../Pods/Alamofire/Source/Response.swift | 12 +- .../Source/ResponseSerialization.swift | 54 +- .../Alamofire/Source/ServerTrustPolicy.swift | 1 - .../Alamofire/Source/SessionDelegate.swift | 36 +- .../Alamofire/Source/SessionManager.swift | 39 +- .../Pods/Alamofire/Source/TaskDelegate.swift | 30 +- .../Pods/Alamofire/Source/Timeline.swift | 3 +- .../Pods/Alamofire/Source/Validation.swift | 6 +- .../RxSwift/Platform/DataStructures/Bag.swift | 20 +- .../DataStructures/InfiniteSequence.swift | 8 +- .../DataStructures/PriorityQueue.swift | 2 +- .../Platform/DataStructures/Queue.swift | 36 +- .../RxSwift/Platform/DeprecationWarner.swift | 9 +- .../RxSwift/Platform/Platform.Darwin.swift | 5 +- .../RxSwift/Platform/Platform.Linux.swift | 3 +- .../Pods/RxSwift/RxSwift/AnyObserver.swift | 10 +- .../Pods/RxSwift/RxSwift/Cancelable.swift | 2 +- .../RxSwift/Concurrency/AsyncLock.swift | 24 +- .../RxSwift/RxSwift/Concurrency/Lock.swift | 2 +- .../RxSwift/Concurrency/LockOwnerType.swift | 2 +- .../Concurrency/SynchronizedDisposeType.swift | 2 +- .../Concurrency/SynchronizedOnType.swift | 2 +- .../SynchronizedUnsubscribeType.swift | 2 +- .../RxSwift/ConnectableObservableType.swift | 2 +- .../Pods/RxSwift/RxSwift/Deprecated.swift | 4 - .../Disposables/AnonymousDisposable.swift | 2 +- .../Disposables/BinaryDisposable.swift | 2 +- .../Disposables/BooleanDisposable.swift | 10 +- .../Disposables/CompositeDisposable.swift | 34 +- .../RxSwift/Disposables/Disposables.swift | 1 - .../RxSwift/Disposables/DisposeBag.swift | 14 +- .../RxSwift/Disposables/DisposeBase.swift | 2 +- .../RxSwift/Disposables/NopDisposable.swift | 10 +- .../Disposables/RefCountDisposable.swift | 8 +- .../Disposables/ScheduledDisposable.swift | 2 +- .../Disposables/SerialDisposable.swift | 20 +- .../SingleAssignmentDisposable.swift | 2 +- .../Disposables/SubscriptionDisposable.swift | 2 +- .../Pods/RxSwift/RxSwift/Errors.swift | 4 +- .../Pods/RxSwift/RxSwift/Event.swift | 7 +- .../RxSwift/RxSwift/Extensions/Bag+Rx.swift | 1 - .../RxSwift/RxSwift/GroupedObservable.swift | 4 +- .../RxSwift/ImmediateSchedulerType.swift | 4 +- .../Pods/RxSwift/RxSwift/Observable.swift | 11 +- .../RxSwift/ObservableType+Extensions.swift | 24 +- .../Pods/RxSwift/RxSwift/ObservableType.swift | 4 +- .../RxSwift/RxSwift/Observables/AddRef.swift | 14 +- .../RxSwift/RxSwift/Observables/Amb.swift | 36 +- .../RxSwift/RxSwift/Observables/AsMaybe.swift | 4 +- .../RxSwift/Observables/AsSingle.swift | 7 +- .../RxSwift/RxSwift/Observables/Buffer.swift | 46 +- .../RxSwift/RxSwift/Observables/Catch.swift | 59 +- .../CombineLatest+Collection.swift | 45 +- .../Observables/CombineLatest+arity.swift | 44 +- .../RxSwift/Observables/CombineLatest.swift | 41 +- .../RxSwift/RxSwift/Observables/Concat.swift | 20 +- .../RxSwift/RxSwift/Observables/Create.swift | 2 +- .../RxSwift/Observables/Debounce.swift | 9 +- .../RxSwift/RxSwift/Observables/Debug.swift | 20 +- .../RxSwift/Observables/DefaultIfEmpty.swift | 8 +- .../RxSwift/Observables/Deferred.swift | 17 +- .../RxSwift/RxSwift/Observables/Delay.swift | 31 +- .../Observables/DelaySubscription.swift | 13 +- .../RxSwift/Observables/Dematerialize.swift | 6 +- .../Observables/DistinctUntilChanged.swift | 21 +- .../Pods/RxSwift/RxSwift/Observables/Do.swift | 15 +- .../RxSwift/Observables/ElementAt.swift | 18 +- .../RxSwift/Observables/Enumerated.swift | 5 +- .../RxSwift/RxSwift/Observables/Error.swift | 4 +- .../RxSwift/RxSwift/Observables/Filter.swift | 15 +- .../RxSwift/RxSwift/Observables/First.swift | 4 +- .../RxSwift/Observables/Generate.swift | 24 +- .../RxSwift/RxSwift/Observables/GroupBy.swift | 34 +- .../RxSwift/RxSwift/Observables/Just.swift | 6 +- .../RxSwift/RxSwift/Observables/Map.swift | 5 +- .../RxSwift/Observables/Materialize.swift | 4 +- .../RxSwift/RxSwift/Observables/Merge.swift | 102 ++- .../RxSwift/Observables/Multicast.swift | 27 +- .../RxSwift/Observables/ObserveOn.swift | 16 +- .../RxSwift/Observables/Optional.swift | 6 +- .../RxSwift/Observables/Producer.swift | 9 +- .../RxSwift/RxSwift/Observables/Range.swift | 15 +- .../RxSwift/RxSwift/Observables/Reduce.swift | 20 +- .../RxSwift/RxSwift/Observables/Repeat.swift | 12 +- .../RxSwift/Observables/RetryWhen.swift | 38 +- .../RxSwift/RxSwift/Observables/Sample.swift | 37 +- .../RxSwift/RxSwift/Observables/Scan.swift | 19 +- .../RxSwift/Observables/Sequence.swift | 5 +- .../Observables/ShareReplayScope.swift | 28 +- .../RxSwift/Observables/SingleAsync.swift | 19 +- .../RxSwift/RxSwift/Observables/Sink.swift | 2 +- .../RxSwift/RxSwift/Observables/Skip.swift | 43 +- .../RxSwift/Observables/SkipUntil.swift | 36 +- .../RxSwift/Observables/SkipWhile.swift | 2 +- .../RxSwift/Observables/SubscribeOn.swift | 22 +- .../RxSwift/RxSwift/Observables/Switch.swift | 40 +- .../RxSwift/Observables/SwitchIfEmpty.swift | 26 +- .../RxSwift/RxSwift/Observables/Take.swift | 53 +- .../RxSwift/Observables/TakeLast.swift | 14 +- .../RxSwift/Observables/TakeUntil.swift | 47 +- .../RxSwift/Observables/TakeWhile.swift | 14 +- .../RxSwift/Observables/Throttle.swift | 34 +- .../RxSwift/RxSwift/Observables/Timeout.swift | 45 +- .../RxSwift/RxSwift/Observables/Timer.swift | 7 +- .../RxSwift/RxSwift/Observables/ToArray.swift | 11 +- .../RxSwift/RxSwift/Observables/Using.swift | 23 +- .../RxSwift/RxSwift/Observables/Window.swift | 58 +- .../RxSwift/Observables/WithLatestFrom.swift | 35 +- .../RxSwift/Observables/Zip+Collection.swift | 55 +- .../RxSwift/Observables/Zip+arity.swift | 44 +- .../RxSwift/RxSwift/Observables/Zip.swift | 54 +- .../Pods/RxSwift/RxSwift/ObserverType.swift | 6 +- .../RxSwift/Observers/AnonymousObserver.swift | 12 +- .../RxSwift/Observers/ObserverBase.swift | 2 +- .../RxSwift/Observers/TailRecursiveSink.swift | 19 +- .../Pods/RxSwift/RxSwift/Rx.swift | 10 +- .../Pods/RxSwift/RxSwift/RxMutableBox.swift | 6 +- .../Pods/RxSwift/RxSwift/SchedulerType.swift | 10 +- .../ConcurrentDispatchQueueScheduler.swift | 12 +- .../Schedulers/ConcurrentMainScheduler.swift | 2 +- .../Schedulers/CurrentThreadScheduler.swift | 13 +- .../Schedulers/HistoricalScheduler.swift | 2 +- .../HistoricalSchedulerTimeConverter.swift | 2 +- .../Internal/DispatchQueueConfiguration.swift | 5 +- .../Internal/InvocableScheduledItem.swift | 2 +- .../Schedulers/Internal/ScheduledItem.swift | 12 +- .../Internal/ScheduledItemType.swift | 4 +- .../RxSwift/Schedulers/MainScheduler.swift | 2 +- .../Schedulers/OperationQueueScheduler.swift | 7 +- .../Schedulers/RecursiveScheduler.swift | 55 +- .../SerialDispatchQueueScheduler.swift | 14 +- .../Schedulers/VirtualTimeScheduler.swift | 25 +- .../RxSwift/Subjects/AsyncSubject.swift | 15 +- .../RxSwift/Subjects/BehaviorSubject.swift | 36 +- .../RxSwift/Subjects/PublishSubject.swift | 29 +- .../RxSwift/Subjects/ReplaySubject.swift | 76 +-- .../RxSwift/Subjects/SubjectType.swift | 6 +- .../RxSwift/Traits/Completable+AndThen.swift | 13 +- .../RxSwift/RxSwift/Traits/Completable.swift | 26 +- .../Pods/RxSwift/RxSwift/Traits/Maybe.swift | 20 +- .../ObservableType+PrimitiveSequence.swift | 2 +- .../Traits/PrimitiveSequence+Zip+arity.swift | 23 - .../RxSwift/Traits/PrimitiveSequence.swift | 11 +- .../Pods/RxSwift/RxSwift/Traits/Single.swift | 34 +- .../swift4/rxswift/docs/HasOnlyReadOnly.md | 4 +- .../petstore/swift4/rxswift/docs/Name.md | 4 +- .../swift4/rxswift/docs/ReadOnlyFirst.md | 2 +- .../unwrapRequired/.openapi-generator/VERSION | 2 +- .../swift4/unwrapRequired/Package.swift | 27 + .../PetstoreClient.xcodeproj/project.pbxproj | 620 ++++++++--------- .../xcschemes/PetstoreClient.xcscheme | 12 +- .../unwrapRequired/docs/HasOnlyReadOnly.md | 4 +- .../swift4/unwrapRequired/docs/Name.md | 4 +- .../unwrapRequired/docs/ReadOnlyFirst.md | 2 +- .../swift4/default/.openapi-generator/VERSION | 2 +- .../client/test/swift4/default/Package.swift | 27 + .../TestClient.xcodeproj/project.pbxproj | 568 ++++++++-------- .../xcschemes/TestClient.xcscheme | 12 +- .../Classes/OpenAPIs/APIHelper.swift | 11 +- .../TestClient/Classes/OpenAPIs/APIs.swift | 14 +- .../Classes/OpenAPIs/APIs/Swift4TestAPI.swift | 8 +- .../OpenAPIs/AlamofireImplementations.swift | 29 +- .../Classes/OpenAPIs/CodableHelper.swift | 10 +- .../Classes/OpenAPIs/Configuration.swift | 6 +- .../Classes/OpenAPIs/Extensions.swift | 20 +- .../OpenAPIs/JSONEncodableEncoding.swift | 2 +- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 8 +- .../TestClient/Classes/OpenAPIs/Models.swift | 4 +- .../OpenAPIs/Models/AllPrimitives.swift | 5 +- .../Classes/OpenAPIs/Models/BaseCard.swift | 3 - .../Classes/OpenAPIs/Models/ErrorInfo.swift | 3 - .../OpenAPIs/Models/GetAllModelsResult.swift | 3 - ...ithPropertiesAndAdditionalProperties.swift | 6 +- .../Classes/OpenAPIs/Models/PersonCard.swift | 3 - .../OpenAPIs/Models/PersonCardAllOf.swift | 4 - .../Classes/OpenAPIs/Models/PlaceCard.swift | 3 - .../OpenAPIs/Models/PlaceCardAllOf.swift | 4 - .../Classes/OpenAPIs/Models/SampleBase.swift | 3 - .../OpenAPIs/Models/SampleSubClass.swift | 3 - .../OpenAPIs/Models/SampleSubClassAllOf.swift | 4 - .../Classes/OpenAPIs/Models/StringEnum.swift | 1 - .../OpenAPIs/Models/VariableNameTest.swift | 5 +- 256 files changed, 3541 insertions(+), 3833 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/swift4/Package.swift.mustache create mode 100644 samples/client/petstore/swift4/default/Package.swift create mode 100644 samples/client/petstore/swift4/objcCompatible/Package.swift create mode 100644 samples/client/petstore/swift4/promisekit/Package.swift create mode 100644 samples/client/petstore/swift4/rxswift/Package.swift create mode 100644 samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift create mode 100644 samples/client/petstore/swift4/unwrapRequired/Package.swift create mode 100644 samples/client/test/swift4/default/Package.swift diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java index 759ce8fa1cef..da3b7078def1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java @@ -35,7 +35,6 @@ import static org.openapitools.codegen.utils.StringUtils.camelize; - public class Swift4Codegen extends DefaultCodegen implements CodegenConfig { private static final Logger LOGGER = LoggerFactory.getLogger(Swift4Codegen.class); @@ -388,6 +387,9 @@ public void processOpts() { supportingFiles.add(new SupportingFile("Cartfile.mustache", "", "Cartfile")); + supportingFiles.add(new SupportingFile("Package.swift.mustache", + "", + "Package.swift")); supportingFiles.add(new SupportingFile("APIHelper.mustache", sourceFolder, "APIHelper.swift")); diff --git a/modules/openapi-generator/src/main/resources/swift4/Cartfile.mustache b/modules/openapi-generator/src/main/resources/swift4/Cartfile.mustache index f71be5049a50..230311260231 100644 --- a/modules/openapi-generator/src/main/resources/swift4/Cartfile.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/Cartfile.mustache @@ -1,3 +1,3 @@ github "Alamofire/Alamofire" ~> 4.9.0{{#usePromiseKit}} -github "mxcl/PromiseKit" ~> 4.4{{/usePromiseKit}}{{#useRxSwift}} -github "ReactiveX/RxSwift" ~> 4.0{{/useRxSwift}} +github "mxcl/PromiseKit" ~> 6.11.0{{/usePromiseKit}}{{#useRxSwift}} +github "ReactiveX/RxSwift" ~> 4.5.0{{/useRxSwift}} diff --git a/modules/openapi-generator/src/main/resources/swift4/Extensions.mustache b/modules/openapi-generator/src/main/resources/swift4/Extensions.mustache index 61d55e8afec7..a4ed6ae9c02b 100644 --- a/modules/openapi-generator/src/main/resources/swift4/Extensions.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/Extensions.mustache @@ -182,9 +182,9 @@ extension KeyedDecodingContainerProtocol { let deferred = Promise>.pending() self.execute { (response: Response?, error: Error?) in if let response = response { - deferred.fulfill(response) + deferred.resolver.fulfill(response) } else { - deferred.reject(error!) + deferred.resolver.reject(error!) } } return deferred.promise diff --git a/modules/openapi-generator/src/main/resources/swift4/Package.swift.mustache b/modules/openapi-generator/src/main/resources/swift4/Package.swift.mustache new file mode 100644 index 000000000000..3ca1dfcbfa2d --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift4/Package.swift.mustache @@ -0,0 +1,33 @@ +// swift-tools-version:4.2 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "{{projectName}}", + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "{{projectName}}", + targets: ["{{projectName}}"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0"), + {{#usePromiseKit}} + .package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.11.0"), + {{/usePromiseKit}} + {{#useRxSwift}} + .package(url: "https://github.com/ReactiveX/RxSwift.git", from: "4.5.0"), + {{/useRxSwift}} + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "{{projectName}}", + dependencies: ["Alamofire"{{#usePromiseKit}}, "PromiseKit"{{/usePromiseKit}}{{#useRxSwift}}, "RxSwift"{{/useRxSwift}}], + path: "{{projectName}}/Classes" + ), + ] +) diff --git a/modules/openapi-generator/src/main/resources/swift4/Podspec.mustache b/modules/openapi-generator/src/main/resources/swift4/Podspec.mustache index e147c0d1ef58..e7377c7a22f3 100644 --- a/modules/openapi-generator/src/main/resources/swift4/Podspec.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/Podspec.mustache @@ -29,10 +29,10 @@ Pod::Spec.new do |s| {{/podDocumentationURL}} s.source_files = '{{projectName}}/Classes/**/*.swift' {{#usePromiseKit}} - s.dependency 'PromiseKit/CorePromise', '~> 4.4.0' + s.dependency 'PromiseKit/CorePromise', '~> 6.11.0' {{/usePromiseKit}} {{#useRxSwift}} - s.dependency 'RxSwift', '~> 4.0' + s.dependency 'RxSwift', '~> 4.5.0' {{/useRxSwift}} s.dependency 'Alamofire', '~> 4.9.0' end diff --git a/modules/openapi-generator/src/main/resources/swift4/api.mustache b/modules/openapi-generator/src/main/resources/swift4/api.mustache index c6eeab2d97e6..813518bfb05c 100644 --- a/modules/openapi-generator/src/main/resources/swift4/api.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/api.mustache @@ -70,16 +70,16 @@ open class {{classname}} { let deferred = Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>.pending() {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) {{#returnType}} } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() {{/returnType}} {{^returnType}} } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) {{/returnType}} } } diff --git a/samples/client/petstore/swift4/default/.openapi-generator/VERSION b/samples/client/petstore/swift4/default/.openapi-generator/VERSION index 0e97bd19efbf..c3a2c7076fa8 100644 --- a/samples/client/petstore/swift4/default/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/default/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/default/Package.swift b/samples/client/petstore/swift4/default/Package.swift new file mode 100644 index 000000000000..e5c5f0f33b82 --- /dev/null +++ b/samples/client/petstore/swift4/default/Package.swift @@ -0,0 +1,27 @@ +// swift-tools-version:4.2 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "PetstoreClient", + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "PetstoreClient", + targets: ["PetstoreClient"]) + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0") + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "PetstoreClient", + dependencies: ["Alamofire"], + path: "PetstoreClient/Classes" + ) + ] +) diff --git a/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/project.pbxproj index 6d0f6ef15b4b..334ca2d19247 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/project.pbxproj @@ -3,272 +3,272 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 51; objects = { /* Begin PBXBuildFile section */ - 02903CEC38DC202565BC08CB040AC4E9 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */; }; - 0462F801432CF94C7EF51D0532737A7E /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */; }; - 08D87E4FECF24910F0DA0F1D2E2D955A /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */; }; - 1143FFF06DEE01E5B0F1368AA05BE1B4 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */; }; - 122BBAE8245606CC040EEB6B9254E376 /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */; }; - 12327BF7304AA897C5D2A1250B1659B7 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */; }; - 12BB95C66D63090732BB9E0379836E3C /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */; }; - 16E9A5E22B4823DE282E7F4C18A21EA8 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */; }; - 18F19872A0DFB4CC3D9C696BBCA64EFD /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */; }; - 196E9846B27D736630CCF90497696859 /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */; }; - 271D94A05C47B602A2433B9CD3D9DCDC /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */; }; - 293F4E0FBFC8297E414A3CDBB7F29A96 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */; }; - 297E365D1E4672C43C56E0AFD855FFBF /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */; }; - 2A35688C985E9CB1EB7732AC2AD46B82 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */; }; - 2DF4544D4D3D6CF7047A59FB89ED31BD /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */; }; - 3251A3722981CE46261615CFBA96A08D /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */; }; - 36734C4EB3362A114A7CB5F25EE39E6D /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */; }; - 3D8E407B1DF4FA5A5F16B64E3A285781 /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */; }; - 41D8A105135868152A56E2AC475049BB /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */; }; - 42C51BC034E8B0CAA29A068F6B0DC815 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */; }; - 491676EC91BFEF95A12556888EED87B5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */; }; - 4C28BFEC5E7C8150DEFD83E09C1A1D32 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */; }; - 58F9704B295AC436D6FB98FA669E2344 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */; }; - 59C00CBB07761CAC8DCE7054E34AD5D9 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */; }; - 59C2F5495C98836BFA9E10BF5C13BC2C /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */; }; - 5ACDD7CC312167589335E9CA5998E770 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */; }; - 655AA371771C7BD72EE0AAC0C90DFFF0 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */; }; - 6600BB1500AE35A3C80F7C83F6444552 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */; }; - 6CD20EE568DDAD2304BF0C4B1A70C8DC /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */; }; - 7367A9D91D4B101F2D28AC56ED89F175 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */; }; - 82D4D0C8AD0354A700C8ACD421ABED55 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */; }; - 83A2D1863FB136C0DFC423319F4EED65 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */; }; - 92FB161BF1E57D11B116AF0292D5835C /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718FF4525C81 /* Client.swift */; }; - 97C99615237E1B662242E04F527B38B9 /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */; }; - A190AF5A3988639ED4B78163D0EA3CA4 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */; }; - A438970025AE69ED407BC1E67CC6359E /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */; }; - A9F1AAF6CE029DD3B4F8AC841F0B6BC6 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */; }; - AE9D2E1DB59AF6575AC4AC6756C5A937 /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */; }; - B399A1742F23330FDCA450EAB98F51F1 /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */; }; - BF7D58FBCF5E4D3F2932FCC0E62BED40 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */; }; - C15AC1CC631E96D0360EB8C15BF30452 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */; }; - C1CACABE18A7ADCE37D1CD9DC9128304 /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A4315C49A /* List.swift */; }; - C2EDEB747887399B13A6DFD72A219CB2 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */; }; - C329EE55B2FCC9174ED3B128D67C5E8C /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */; }; - D3A17B7FAFA8A7A210875BBCDCC30116 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; - D70EC94E346077DE1482231DD4498BED /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */; }; - DB1CE39011A741D07E187663291B5DE5 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */; }; - DB724C4F1AD5DF025B53A9A2E0A49E3D /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */; }; - DDBC3CF5E447D8D838F0FE200420EEE3 /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */; }; - DEC892724574BB29BD65869374F83982 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */; }; - E2C40F0E34DB8C21A806262C72841A51 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118F057604D /* SpecialModelName.swift */; }; - E51ADEC931806B20A041303E539A8BE2 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */; }; - F02BEF9A8503B3848B045370451E85F6 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4CF550442B /* Models.swift */; }; - F21D10C71A9DE7D0467AFD23FD391D2E /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08AA65292F7 /* Return.swift */; }; - FB4A053CDCD75E48B755CC22D463A3FC /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */; }; - FECA03F0388E84AE1B22638605D8AC9F /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */; }; + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; + 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */; }; + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; + 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */; }; + 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83D /* Alamofire.framework */; }; + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; + 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; + AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; - 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; - 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; - 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; - 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; - 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; - 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; - 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; - 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; - 386FD590658E90509C121118F057604D /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; - 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; - 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; - 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; - 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; - 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; - 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; - 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; - 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; - 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; - 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; - 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; - 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; - 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; - 7A6070F581E611FF44AFD40A4315C49A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; - 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; - 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; - 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; - 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; - 8699F7966F748ED026A6FB4CF550442B /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; - 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; - 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; - 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; - 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; - 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; - 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; - 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; - A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; - A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; - A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; - A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; - A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; - A913A57E72D723632E9A718FF4525C81 /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; - B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; - B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; - B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; - B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; - B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; - C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; - C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; - C81447828475F76C5CF4F08AA65292F7 /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; - E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; - EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; - ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; - F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; - F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; - FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; + 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; + 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; + 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; + 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; + 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; + 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; + 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; + 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; + 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; + 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; + 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; + 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; + 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; + 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; + 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; + A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; + A235FA3FDFB086CC69CDE83D /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; + A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; + B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; + B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; + C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; + E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - D1990C2A394CCF025EF98A2FB828C79A /* Frameworks */ = { + D1990C2A394CCF025EF98A2F /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4C28BFEC5E7C8150DEFD83E09C1A1D32 /* Alamofire.framework in Frameworks */, + 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 1E464C0937FE0D3A7A0FE29AF446553C /* Frameworks */ = { + 1E464C0937FE0D3A7A0FE29A /* Frameworks */ = { isa = PBXGroup; children = ( - 7861EE241895128F64DD787367B3022D /* Carthage */, + 7861EE241895128F64DD7873 /* Carthage */, ); name = Frameworks; sourceTree = ""; }; - 4FBDCF1330A9AB9122780DB3FA21DE4C /* Models */ = { + 4FBDCF1330A9AB9122780DB3 /* Models */ = { isa = PBXGroup; children = ( - 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */, - 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */, - 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */, - A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */, - 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */, - B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */, - F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */, - A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */, - 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */, - 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */, - 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */, - 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */, - A913A57E72D723632E9A718FF4525C81 /* Client.swift */, - C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */, - A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */, - 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */, - 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */, - FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */, - 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */, - 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */, - 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */, - 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */, - 7A6070F581E611FF44AFD40A4315C49A /* List.swift */, - 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */, - 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */, - 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */, - 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */, - B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */, - 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */, - F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */, - C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */, - ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */, - 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */, - C81447828475F76C5CF4F08AA65292F7 /* Return.swift */, - 386FD590658E90509C121118F057604D /* SpecialModelName.swift */, - 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */, - B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */, - EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */, - 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */, - E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */, + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, + 95568E7C35F119EB4A12B498 /* Animal.swift */, + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, + 212AA914B7F1793A4E32C119 /* Cat.swift */, + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, + 6F2985D01F8D60A4B1925C69 /* Category.swift */, + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, + A913A57E72D723632E9A718F /* Client.swift */, + C6C3E1129526A353B963EFD7 /* Dog.swift */, + A21A69C8402A60E01116ABBD /* DogAllOf.swift */, + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, + 3933D3B2A3AC4577094D0C23 /* File.swift */, + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, + 3156CE41C001C80379B84BDB /* FormatTest.swift */, + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, + 7A6070F581E611FF44AFD40A /* List.swift */, + 7986861626C2B1CB49AD7000 /* MapTest.swift */, + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, + 5AD994DFAA0DA93C188A4DBA /* Name.swift */, + B8E0B16084741FCB82389F58 /* NumberOnly.swift */, + 27B2E9EF856E89FEAA359A3A /* Order.swift */, + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, + C81447828475F76C5CF4F08A /* Return.swift */, + 386FD590658E90509C121118 /* SpecialModelName.swift */, + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, + B2896F8BFD1AA2965C8A3015 /* Tag.swift */, + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, + E5565A447062C7B8F695F451 /* User.swift */, ); path = Models; sourceTree = ""; }; - 5FBA6AE5F64CD737F88B4565AC3CCD3B = { + 5FBA6AE5F64CD737F88B4565 = { isa = PBXGroup; children = ( - 9B364C01750D7AA4F983B9E77B01BCC6 /* PetstoreClient */, - 1E464C0937FE0D3A7A0FE29AF446553C /* Frameworks */, - 857F0DEA1890CE66D6DAD556C55821A6 /* Products */, + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, + 1E464C0937FE0D3A7A0FE29A /* Frameworks */, + 857F0DEA1890CE66D6DAD556 /* Products */, ); sourceTree = ""; }; - 67BF3478113E6B4DF1C4E04F40BF58C4 /* OpenAPIs */ = { + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { isa = PBXGroup; children = ( - 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */, - 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */, - 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */, - 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */, - 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */, - B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */, - 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */, - 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */, - 8699F7966F748ED026A6FB4CF550442B /* Models.swift */, - F956D0CCAE23BCFD1C7BDD5D47944AA5 /* APIs */, - 4FBDCF1330A9AB9122780DB3FA21DE4C /* Models */, + 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */, + 897716962D472FE162B723CB /* APIHelper.swift */, + 37DF825B8F3BADA2B2537D17 /* APIs.swift */, + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, + 28A444949BBC254798C3B3DD /* Configuration.swift */, + B8C298FC8929DCB369053F11 /* Extensions.swift */, + 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */, + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, + 8699F7966F748ED026A6FB4C /* Models.swift */, + F956D0CCAE23BCFD1C7BDD5D /* APIs */, + 4FBDCF1330A9AB9122780DB3 /* Models */, ); path = OpenAPIs; sourceTree = ""; }; - 7861EE241895128F64DD787367B3022D /* Carthage */ = { + 7861EE241895128F64DD7873 /* Carthage */ = { isa = PBXGroup; children = ( - A012205B41CB71A62B86EECDEAFB0990 /* iOS */, + A012205B41CB71A62B86EECD /* iOS */, ); name = Carthage; path = Carthage/Build; sourceTree = ""; }; - 857F0DEA1890CE66D6DAD556C55821A6 /* Products */ = { + 857F0DEA1890CE66D6DAD556 /* Products */ = { isa = PBXGroup; children = ( - 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */, + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, ); name = Products; sourceTree = ""; }; - 9B364C01750D7AA4F983B9E77B01BCC6 /* PetstoreClient */ = { + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { isa = PBXGroup; children = ( - EF4C81BDD734856ED5023B777D35098B /* Classes */, + EF4C81BDD734856ED5023B77 /* Classes */, ); path = PetstoreClient; sourceTree = ""; }; - A012205B41CB71A62B86EECDEAFB0990 /* iOS */ = { + A012205B41CB71A62B86EECD /* iOS */ = { isa = PBXGroup; children = ( - A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */, + A235FA3FDFB086CC69CDE83D /* Alamofire.framework */, ); path = iOS; sourceTree = ""; }; - EF4C81BDD734856ED5023B777D35098B /* Classes */ = { + EF4C81BDD734856ED5023B77 /* Classes */ = { isa = PBXGroup; children = ( - 67BF3478113E6B4DF1C4E04F40BF58C4 /* OpenAPIs */, + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, ); path = Classes; sourceTree = ""; }; - F956D0CCAE23BCFD1C7BDD5D47944AA5 /* APIs */ = { + F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { isa = PBXGroup; children = ( - 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */, - 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */, - B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */, - 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */, - A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */, - 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */, + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, + 6E00950725DC44436C5E238C /* FakeAPI.swift */, + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, + 9A019F500E546A3292CE716A /* PetAPI.swift */, + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, ); path = APIs; sourceTree = ""; @@ -276,12 +276,12 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - C1282C2230015E0D204BEAEDDFB49453 /* PetstoreClient */ = { + C1282C2230015E0D204BEAED /* PetstoreClient */ = { isa = PBXNativeTarget; - buildConfigurationList = B46EDEB1A7F0D78FE6394544C60169D1 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; buildPhases = ( - E539708354CE60FE486F81EDE56D13C8 /* Sources */, - D1990C2A394CCF025EF98A2FB828C79A /* Frameworks */, + E539708354CE60FE486F81ED /* Sources */, + D1990C2A394CCF025EF98A2F /* Frameworks */, ); buildRules = ( ); @@ -289,100 +289,100 @@ ); name = PetstoreClient; productName = PetstoreClient; - productReference = 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */; + productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - E7D276EE2369D8C455513C2E05F9AED0 /* Project object */ = { + E7D276EE2369D8C455513C2E /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1000; + LastUpgradeCheck = 1020; }; - buildConfigurationList = ECAB17FF35111B5E14DAAC0883031714 /* Build configuration list for PBXProject "PetstoreClient" */; - compatibilityVersion = "Xcode 9.3"; + buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; + compatibilityVersion = "Xcode 10.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, ); - mainGroup = 5FBA6AE5F64CD737F88B4565AC3CCD3B; + mainGroup = 5FBA6AE5F64CD737F88B4565; projectDirPath = ""; projectRoot = ""; targets = ( - C1282C2230015E0D204BEAEDDFB49453 /* PetstoreClient */, + C1282C2230015E0D204BEAED /* PetstoreClient */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ - E539708354CE60FE486F81EDE56D13C8 /* Sources */ = { + E539708354CE60FE486F81ED /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2A35688C985E9CB1EB7732AC2AD46B82 /* APIHelper.swift in Sources */, - 0462F801432CF94C7EF51D0532737A7E /* APIs.swift in Sources */, - 12327BF7304AA897C5D2A1250B1659B7 /* AdditionalPropertiesClass.swift in Sources */, - 58F9704B295AC436D6FB98FA669E2344 /* AlamofireImplementations.swift in Sources */, - 02903CEC38DC202565BC08CB040AC4E9 /* Animal.swift in Sources */, - DB1CE39011A741D07E187663291B5DE5 /* AnimalFarm.swift in Sources */, - 83A2D1863FB136C0DFC423319F4EED65 /* AnotherFakeAPI.swift in Sources */, - 97C99615237E1B662242E04F527B38B9 /* ApiResponse.swift in Sources */, - 3251A3722981CE46261615CFBA96A08D /* ArrayOfArrayOfNumberOnly.swift in Sources */, - A190AF5A3988639ED4B78163D0EA3CA4 /* ArrayOfNumberOnly.swift in Sources */, - C2EDEB747887399B13A6DFD72A219CB2 /* ArrayTest.swift in Sources */, - 7367A9D91D4B101F2D28AC56ED89F175 /* Capitalization.swift in Sources */, - 18F19872A0DFB4CC3D9C696BBCA64EFD /* Cat.swift in Sources */, - 41D8A105135868152A56E2AC475049BB /* CatAllOf.swift in Sources */, - 42C51BC034E8B0CAA29A068F6B0DC815 /* Category.swift in Sources */, - 5ACDD7CC312167589335E9CA5998E770 /* ClassModel.swift in Sources */, - 92FB161BF1E57D11B116AF0292D5835C /* Client.swift in Sources */, - 6CD20EE568DDAD2304BF0C4B1A70C8DC /* CodableHelper.swift in Sources */, - DEC892724574BB29BD65869374F83982 /* Configuration.swift in Sources */, - D70EC94E346077DE1482231DD4498BED /* Dog.swift in Sources */, - 271D94A05C47B602A2433B9CD3D9DCDC /* DogAllOf.swift in Sources */, - A438970025AE69ED407BC1E67CC6359E /* EnumArrays.swift in Sources */, - 59C00CBB07761CAC8DCE7054E34AD5D9 /* EnumClass.swift in Sources */, - 08D87E4FECF24910F0DA0F1D2E2D955A /* EnumTest.swift in Sources */, - C329EE55B2FCC9174ED3B128D67C5E8C /* Extensions.swift in Sources */, - 297E365D1E4672C43C56E0AFD855FFBF /* FakeAPI.swift in Sources */, - A9F1AAF6CE029DD3B4F8AC841F0B6BC6 /* FakeClassnameTags123API.swift in Sources */, - FECA03F0388E84AE1B22638605D8AC9F /* File.swift in Sources */, - 491676EC91BFEF95A12556888EED87B5 /* FileSchemaTestClass.swift in Sources */, - 36734C4EB3362A114A7CB5F25EE39E6D /* FormatTest.swift in Sources */, - DDBC3CF5E447D8D838F0FE200420EEE3 /* HasOnlyReadOnly.swift in Sources */, - 16E9A5E22B4823DE282E7F4C18A21EA8 /* JSONEncodableEncoding.swift in Sources */, - 12BB95C66D63090732BB9E0379836E3C /* JSONEncodingHelper.swift in Sources */, - C1CACABE18A7ADCE37D1CD9DC9128304 /* List.swift in Sources */, - 655AA371771C7BD72EE0AAC0C90DFFF0 /* MapTest.swift in Sources */, - D3A17B7FAFA8A7A210875BBCDCC30116 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, - 2DF4544D4D3D6CF7047A59FB89ED31BD /* Model200Response.swift in Sources */, - F02BEF9A8503B3848B045370451E85F6 /* Models.swift in Sources */, - C15AC1CC631E96D0360EB8C15BF30452 /* Name.swift in Sources */, - AE9D2E1DB59AF6575AC4AC6756C5A937 /* NumberOnly.swift in Sources */, - 59C2F5495C98836BFA9E10BF5C13BC2C /* Order.swift in Sources */, - 82D4D0C8AD0354A700C8ACD421ABED55 /* OuterComposite.swift in Sources */, - 1143FFF06DEE01E5B0F1368AA05BE1B4 /* OuterEnum.swift in Sources */, - B399A1742F23330FDCA450EAB98F51F1 /* Pet.swift in Sources */, - 3D8E407B1DF4FA5A5F16B64E3A285781 /* PetAPI.swift in Sources */, - 293F4E0FBFC8297E414A3CDBB7F29A96 /* ReadOnlyFirst.swift in Sources */, - F21D10C71A9DE7D0467AFD23FD391D2E /* Return.swift in Sources */, - E2C40F0E34DB8C21A806262C72841A51 /* SpecialModelName.swift in Sources */, - 122BBAE8245606CC040EEB6B9254E376 /* StoreAPI.swift in Sources */, - 196E9846B27D736630CCF90497696859 /* StringBooleanMap.swift in Sources */, - E51ADEC931806B20A041303E539A8BE2 /* Tag.swift in Sources */, - 6600BB1500AE35A3C80F7C83F6444552 /* TypeHolderDefault.swift in Sources */, - FB4A053CDCD75E48B755CC22D463A3FC /* TypeHolderExample.swift in Sources */, - BF7D58FBCF5E4D3F2932FCC0E62BED40 /* User.swift in Sources */, - DB724C4F1AD5DF025B53A9A2E0A49E3D /* UserAPI.swift in Sources */, + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, + 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */, + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, + AD594BFB99E31A5E07579237 /* Client.swift in Sources */, + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, + 72547ECFB451A509409311EE /* Configuration.swift in Sources */, + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, + 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */, + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ - 3B2C02AFB91CB5C82766ED5CF21FF628 /* Release */ = { + 3B2C02AFB91CB5C82766ED5C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; @@ -399,7 +399,10 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -407,7 +410,7 @@ }; name = Release; }; - A9EB0A02B94C427CBACFEC7CFFC6A816 /* Debug */ = { + A9EB0A02B94C427CBACFEC7C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -462,11 +465,11 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; - DD3EEB93949E9EBA4437E9CDBF4A26F6 /* Debug */ = { + DD3EEB93949E9EBA4437E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; @@ -483,7 +486,10 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -491,7 +497,7 @@ }; name = Debug; }; - F81D4E5FECD46E9AA6DD2C299CEBEF64 /* Release */ = { + F81D4E5FECD46E9AA6DD2C29 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -536,8 +542,8 @@ GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; VALIDATE_PRODUCT = YES; }; name = Release; @@ -545,25 +551,25 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - B46EDEB1A7F0D78FE6394544C60169D1 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { isa = XCConfigurationList; buildConfigurations = ( - DD3EEB93949E9EBA4437E9CDBF4A26F6 /* Debug */, - 3B2C02AFB91CB5C82766ED5CF21FF628 /* Release */, + DD3EEB93949E9EBA4437E9CD /* Debug */, + 3B2C02AFB91CB5C82766ED5C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = ""; }; - ECAB17FF35111B5E14DAAC0883031714 /* Build configuration list for PBXProject "PetstoreClient" */ = { + ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { isa = XCConfigurationList; buildConfigurations = ( - A9EB0A02B94C427CBACFEC7CFFC6A816 /* Debug */, - F81D4E5FECD46E9AA6DD2C299CEBEF64 /* Release */, + A9EB0A02B94C427CBACFEC7C /* Debug */, + F81D4E5FECD46E9AA6DD2C29 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; /* End XCConfigurationList section */ }; - rootObject = E7D276EE2369D8C455513C2E05F9AED0 /* Project object */; + rootObject = E7D276EE2369D8C455513C2E /* Project object */; } diff --git a/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme index 7802e379453b..e8ac84fa9929 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme +++ b/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme @@ -1,6 +1,6 @@ @@ -32,7 +32,7 @@ @@ -42,6 +42,8 @@ + + @@ -77,7 +79,7 @@ runnableDebuggingMode = "0"> diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift index 20c3672fbaf2..036e1df7cd50 100644 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift @@ -135,8 +135,7 @@ public func request( parameters: Parameters? = nil, encoding: ParameterEncoding = URLEncoding.default, headers: HTTPHeaders? = nil) - -> DataRequest -{ + -> DataRequest { return SessionManager.default.request( url, method: method, @@ -183,8 +182,7 @@ public func download( encoding: ParameterEncoding = URLEncoding.default, headers: HTTPHeaders? = nil, to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest -{ + -> DownloadRequest { return SessionManager.default.download( url, method: method, @@ -209,8 +207,7 @@ public func download( public func download( _ urlRequest: URLRequestConvertible, to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest -{ + -> DownloadRequest { return SessionManager.default.download(urlRequest, to: destination) } @@ -239,8 +236,7 @@ public func download( public func download( resumingWith resumeData: Data, to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest -{ + -> DownloadRequest { return SessionManager.default.download(resumingWith: resumeData, to: destination) } @@ -263,8 +259,7 @@ public func upload( to url: URLConvertible, method: HTTPMethod = .post, headers: HTTPHeaders? = nil) - -> UploadRequest -{ + -> UploadRequest { return SessionManager.default.upload(fileURL, to: url, method: method, headers: headers) } @@ -297,8 +292,7 @@ public func upload( to url: URLConvertible, method: HTTPMethod = .post, headers: HTTPHeaders? = nil) - -> UploadRequest -{ + -> UploadRequest { return SessionManager.default.upload(data, to: url, method: method, headers: headers) } @@ -331,8 +325,7 @@ public func upload( to url: URLConvertible, method: HTTPMethod = .post, headers: HTTPHeaders? = nil) - -> UploadRequest -{ + -> UploadRequest { return SessionManager.default.upload(stream, to: url, method: method, headers: headers) } @@ -379,8 +372,7 @@ public func upload( to url: URLConvertible, method: HTTPMethod = .post, headers: HTTPHeaders? = nil, - encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) -{ + encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) { return SessionManager.default.upload( multipartFormData: multipartFormData, usingThreshold: encodingMemoryThreshold, @@ -416,8 +408,7 @@ public func upload( multipartFormData: @escaping (MultipartFormData) -> Void, usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, with urlRequest: URLRequestConvertible, - encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) -{ + encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) { return SessionManager.default.upload( multipartFormData: multipartFormData, usingThreshold: encodingMemoryThreshold, diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift index b840138ccc15..7df468a011c8 100644 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift @@ -275,8 +275,7 @@ open class MultipartFormData { } bodyContentLength = fileSize.uint64Value - } - catch { + } catch { setBodyPartError(withReason: .bodyPartFileSizeQueryFailedWithError(forURL: fileURL, error: error)) return } @@ -312,8 +311,7 @@ open class MultipartFormData { withLength length: UInt64, name: String, fileName: String, - mimeType: String) - { + mimeType: String) { let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) append(stream, withLength: length, headers: headers) } diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift index 398ca827c2b0..fa0647934f67 100644 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift @@ -148,8 +148,7 @@ open class NetworkReachabilityManager { context.info = Unmanaged.passUnretained(self).toOpaque() let callbackEnabled = SCNetworkReachabilitySetCallback( - reachability, - { (_, flags, info) in + reachability, { (_, flags, info) in let reachability = Unmanaged.fromOpaque(info!).takeUnretainedValue() reachability.notifyListener(flags) }, @@ -221,8 +220,7 @@ extension NetworkReachabilityManager.NetworkReachabilityStatus: Equatable {} public func ==( lhs: NetworkReachabilityManager.NetworkReachabilityStatus, rhs: NetworkReachabilityManager.NetworkReachabilityStatus) - -> Bool -{ + -> Bool { switch (lhs, rhs) { case (.unknown, .unknown): return true diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift index 6195809c5db9..dc8e75e847df 100644 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift @@ -435,8 +435,7 @@ public struct PropertyListEncoding: ParameterEncoding { /// - returns: The new `PropertyListEncoding` instance. public init( format: PropertyListSerialization.PropertyListFormat = .xml, - options: PropertyListSerialization.WriteOptions = 0) - { + options: PropertyListSerialization.WriteOptions = 0) { self.format = format self.options = options } diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Request.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Request.swift index 2be2ce0106fa..9cd75057cae2 100644 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Request.swift +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Request.swift @@ -161,8 +161,7 @@ open class Request { user: String, password: String, persistence: URLCredential.Persistence = .forSession) - -> Self - { + -> Self { let credential = URLCredential(user: user, password: password, persistence: persistence) return authenticate(usingCredential: credential) } @@ -544,8 +543,7 @@ open class DownloadRequest: Request { open class func suggestedDownloadDestination( for directory: FileManager.SearchPathDirectory = .documentDirectory, in domain: FileManager.SearchPathDomainMask = .userDomainMask) - -> DownloadFileDestination - { + -> DownloadFileDestination { return { temporaryURL, response in let directoryURLs = FileManager.default.urls(for: directory, in: domain) diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Response.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Response.swift index 747a471a55ba..88d09e33ff8e 100644 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Response.swift +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Response.swift @@ -58,8 +58,7 @@ public struct DefaultDataResponse { data: Data?, error: Error?, timeline: Timeline = Timeline(), - metrics: AnyObject? = nil) - { + metrics: AnyObject? = nil) { self.request = request self.response = response self.data = data @@ -109,8 +108,7 @@ public struct DataResponse { response: HTTPURLResponse?, data: Data?, result: Result, - timeline: Timeline = Timeline()) - { + timeline: Timeline = Timeline()) { self.request = request self.response = response self.data = data @@ -296,8 +294,7 @@ public struct DefaultDownloadResponse { resumeData: Data?, error: Error?, timeline: Timeline = Timeline(), - metrics: AnyObject? = nil) - { + metrics: AnyObject? = nil) { self.request = request self.response = response self.temporaryURL = temporaryURL @@ -359,8 +356,7 @@ public struct DownloadResponse { destinationURL: URL?, resumeData: Data?, result: Result, - timeline: Timeline = Timeline()) - { + timeline: Timeline = Timeline()) { self.request = request self.response = response self.temporaryURL = temporaryURL diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift index 9cc105a82057..b8f5b65b204d 100644 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift @@ -144,8 +144,7 @@ extension DataRequest { queue: DispatchQueue? = nil, responseSerializer: T, completionHandler: @escaping (DataResponse) -> Void) - -> Self - { + -> Self { delegate.queue.addOperation { let result = responseSerializer.serializeResponse( self.request, @@ -182,8 +181,7 @@ extension DownloadRequest { public func response( queue: DispatchQueue? = nil, completionHandler: @escaping (DefaultDownloadResponse) -> Void) - -> Self - { + -> Self { delegate.queue.addOperation { (queue ?? DispatchQueue.main).async { var downloadResponse = DefaultDownloadResponse( @@ -218,8 +216,7 @@ extension DownloadRequest { queue: DispatchQueue? = nil, responseSerializer: T, completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { + -> Self { delegate.queue.addOperation { let result = responseSerializer.serializeResponse( self.request, @@ -289,8 +286,7 @@ extension DataRequest { public func responseData( queue: DispatchQueue? = nil, completionHandler: @escaping (DataResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DataRequest.dataResponseSerializer(), @@ -329,8 +325,7 @@ extension DownloadRequest { public func responseData( queue: DispatchQueue? = nil, completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DownloadRequest.dataResponseSerializer(), @@ -356,8 +351,7 @@ extension Request { response: HTTPURLResponse?, data: Data?, error: Error?) - -> Result - { + -> Result { guard error == nil else { return .failure(error!) } if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success("") } @@ -411,8 +405,7 @@ extension DataRequest { queue: DispatchQueue? = nil, encoding: String.Encoding? = nil, completionHandler: @escaping (DataResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DataRequest.stringResponseSerializer(encoding: encoding), @@ -459,8 +452,7 @@ extension DownloadRequest { queue: DispatchQueue? = nil, encoding: String.Encoding? = nil, completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DownloadRequest.stringResponseSerializer(encoding: encoding), @@ -486,8 +478,7 @@ extension Request { response: HTTPURLResponse?, data: Data?, error: Error?) - -> Result - { + -> Result { guard error == nil else { return .failure(error!) } if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(NSNull()) } @@ -514,8 +505,7 @@ extension DataRequest { /// - returns: A JSON object response serializer. public static func jsonResponseSerializer( options: JSONSerialization.ReadingOptions = .allowFragments) - -> DataResponseSerializer - { + -> DataResponseSerializer { return DataResponseSerializer { _, response, data, error in return Request.serializeResponseJSON(options: options, response: response, data: data, error: error) } @@ -532,8 +522,7 @@ extension DataRequest { queue: DispatchQueue? = nil, options: JSONSerialization.ReadingOptions = .allowFragments, completionHandler: @escaping (DataResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DataRequest.jsonResponseSerializer(options: options), @@ -551,8 +540,7 @@ extension DownloadRequest { /// - returns: A JSON object response serializer. public static func jsonResponseSerializer( options: JSONSerialization.ReadingOptions = .allowFragments) - -> DownloadResponseSerializer - { + -> DownloadResponseSerializer { return DownloadResponseSerializer { _, response, fileURL, error in guard error == nil else { return .failure(error!) } @@ -580,8 +568,7 @@ extension DownloadRequest { queue: DispatchQueue? = nil, options: JSONSerialization.ReadingOptions = .allowFragments, completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DownloadRequest.jsonResponseSerializer(options: options), @@ -607,8 +594,7 @@ extension Request { response: HTTPURLResponse?, data: Data?, error: Error?) - -> Result - { + -> Result { guard error == nil else { return .failure(error!) } if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(NSNull()) } @@ -635,8 +621,7 @@ extension DataRequest { /// - returns: A property list object response serializer. public static func propertyListResponseSerializer( options: PropertyListSerialization.ReadOptions = []) - -> DataResponseSerializer - { + -> DataResponseSerializer { return DataResponseSerializer { _, response, data, error in return Request.serializeResponsePropertyList(options: options, response: response, data: data, error: error) } @@ -653,8 +638,7 @@ extension DataRequest { queue: DispatchQueue? = nil, options: PropertyListSerialization.ReadOptions = [], completionHandler: @escaping (DataResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DataRequest.propertyListResponseSerializer(options: options), @@ -672,8 +656,7 @@ extension DownloadRequest { /// - returns: A property list object response serializer. public static func propertyListResponseSerializer( options: PropertyListSerialization.ReadOptions = []) - -> DownloadResponseSerializer - { + -> DownloadResponseSerializer { return DownloadResponseSerializer { _, response, fileURL, error in guard error == nil else { return .failure(error!) } @@ -701,8 +684,7 @@ extension DownloadRequest { queue: DispatchQueue? = nil, options: PropertyListSerialization.ReadOptions = [], completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DownloadRequest.propertyListResponseSerializer(options: options), diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift index dea099e257ab..ad4d5632a019 100644 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift @@ -249,7 +249,6 @@ public enum ServerTrustPolicy { let unspecified = SecTrustResultType.unspecified let proceed = SecTrustResultType.proceed - isValid = result == unspecified || result == proceed } diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift index 4964f1eebfd7..5cf4a385b2a5 100644 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift @@ -255,8 +255,7 @@ extension SessionDelegate: URLSessionDelegate { open func urlSession( _ session: URLSession, didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { + completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { guard sessionDidReceiveChallengeWithCompletion == nil else { sessionDidReceiveChallengeWithCompletion?(session, challenge, completionHandler) return @@ -315,8 +314,7 @@ extension SessionDelegate: URLSessionTaskDelegate { task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, - completionHandler: @escaping (URLRequest?) -> Void) - { + completionHandler: @escaping (URLRequest?) -> Void) { guard taskWillPerformHTTPRedirectionWithCompletion == nil else { taskWillPerformHTTPRedirectionWithCompletion?(session, task, response, request, completionHandler) return @@ -342,8 +340,7 @@ extension SessionDelegate: URLSessionTaskDelegate { _ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { + completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { guard taskDidReceiveChallengeWithCompletion == nil else { taskDidReceiveChallengeWithCompletion?(session, task, challenge, completionHandler) return @@ -372,8 +369,7 @@ extension SessionDelegate: URLSessionTaskDelegate { open func urlSession( _ session: URLSession, task: URLSessionTask, - needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) - { + needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) { guard taskNeedNewBodyStreamWithCompletion == nil else { taskNeedNewBodyStreamWithCompletion?(session, task, completionHandler) return @@ -398,8 +394,7 @@ extension SessionDelegate: URLSessionTaskDelegate { task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { + totalBytesExpectedToSend: Int64) { if let taskDidSendBodyData = taskDidSendBodyData { taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) } else if let delegate = self[task]?.delegate as? UploadTaskDelegate { @@ -512,8 +507,7 @@ extension SessionDelegate: URLSessionDataDelegate { _ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, - completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) - { + completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) { guard dataTaskDidReceiveResponseWithCompletion == nil else { dataTaskDidReceiveResponseWithCompletion?(session, dataTask, response, completionHandler) return @@ -536,8 +530,7 @@ extension SessionDelegate: URLSessionDataDelegate { open func urlSession( _ session: URLSession, dataTask: URLSessionDataTask, - didBecome downloadTask: URLSessionDownloadTask) - { + didBecome downloadTask: URLSessionDownloadTask) { if let dataTaskDidBecomeDownloadTask = dataTaskDidBecomeDownloadTask { dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask) } else { @@ -573,8 +566,7 @@ extension SessionDelegate: URLSessionDataDelegate { _ session: URLSession, dataTask: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse, - completionHandler: @escaping (CachedURLResponse?) -> Void) - { + completionHandler: @escaping (CachedURLResponse?) -> Void) { guard dataTaskWillCacheResponseWithCompletion == nil else { dataTaskWillCacheResponseWithCompletion?(session, dataTask, proposedResponse, completionHandler) return @@ -608,8 +600,7 @@ extension SessionDelegate: URLSessionDownloadDelegate { open func urlSession( _ session: URLSession, downloadTask: URLSessionDownloadTask, - didFinishDownloadingTo location: URL) - { + didFinishDownloadingTo location: URL) { if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL { downloadTaskDidFinishDownloadingToURL(session, downloadTask, location) } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { @@ -632,8 +623,7 @@ extension SessionDelegate: URLSessionDownloadDelegate { downloadTask: URLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { + totalBytesExpectedToWrite: Int64) { if let downloadTaskDidWriteData = downloadTaskDidWriteData { downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { @@ -661,8 +651,7 @@ extension SessionDelegate: URLSessionDownloadDelegate { _ session: URLSession, downloadTask: URLSessionDownloadTask, didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { + expectedTotalBytes: Int64) { if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { @@ -716,8 +705,7 @@ extension SessionDelegate: URLSessionStreamDelegate { _ session: URLSession, streamTask: URLSessionStreamTask, didBecome inputStream: InputStream, - outputStream: OutputStream) - { + outputStream: OutputStream) { streamTaskDidBecomeInputAndOutputStreams?(session, streamTask, inputStream, outputStream) } } diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift index 02c36a76b7b4..19725f287e0c 100644 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift @@ -166,8 +166,7 @@ open class SessionManager { public init( configuration: URLSessionConfiguration = URLSessionConfiguration.default, delegate: SessionDelegate = SessionDelegate(), - serverTrustPolicyManager: ServerTrustPolicyManager? = nil) - { + serverTrustPolicyManager: ServerTrustPolicyManager? = nil) { self.delegate = delegate self.session = URLSession(configuration: configuration, delegate: delegate, delegateQueue: nil) @@ -185,8 +184,7 @@ open class SessionManager { public init?( session: URLSession, delegate: SessionDelegate, - serverTrustPolicyManager: ServerTrustPolicyManager? = nil) - { + serverTrustPolicyManager: ServerTrustPolicyManager? = nil) { guard delegate === session.delegate else { return nil } self.delegate = delegate @@ -229,8 +227,7 @@ open class SessionManager { parameters: Parameters? = nil, encoding: ParameterEncoding = URLEncoding.default, headers: HTTPHeaders? = nil) - -> DataRequest - { + -> DataRequest { var originalRequest: URLRequest? do { @@ -320,8 +317,7 @@ open class SessionManager { encoding: ParameterEncoding = URLEncoding.default, headers: HTTPHeaders? = nil, to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest - { + -> DownloadRequest { do { let urlRequest = try URLRequest(url: url, method: method, headers: headers) let encodedURLRequest = try encoding.encode(urlRequest, with: parameters) @@ -347,8 +343,7 @@ open class SessionManager { open func download( _ urlRequest: URLRequestConvertible, to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest - { + -> DownloadRequest { do { let urlRequest = try urlRequest.asURLRequest() return download(.request(urlRequest), to: destination) @@ -384,8 +379,7 @@ open class SessionManager { open func download( resumingWith resumeData: Data, to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest - { + -> DownloadRequest { return download(.resumeData(resumeData), to: destination) } @@ -394,8 +388,7 @@ open class SessionManager { private func download( _ downloadable: DownloadRequest.Downloadable, to destination: DownloadRequest.DownloadFileDestination?) - -> DownloadRequest - { + -> DownloadRequest { do { let task = try downloadable.task(session: session, adapter: adapter, queue: queue) let download = DownloadRequest(session: session, requestTask: .download(downloadable, task)) @@ -416,8 +409,7 @@ open class SessionManager { _ downloadable: DownloadRequest.Downloadable?, to destination: DownloadRequest.DownloadFileDestination?, failedWith error: Error) - -> DownloadRequest - { + -> DownloadRequest { var downloadTask: Request.RequestTask = .download(nil, nil) if let downloadable = downloadable { @@ -458,8 +450,7 @@ open class SessionManager { to url: URLConvertible, method: HTTPMethod = .post, headers: HTTPHeaders? = nil) - -> UploadRequest - { + -> UploadRequest { do { let urlRequest = try URLRequest(url: url, method: method, headers: headers) return upload(fileURL, with: urlRequest) @@ -504,8 +495,7 @@ open class SessionManager { to url: URLConvertible, method: HTTPMethod = .post, headers: HTTPHeaders? = nil) - -> UploadRequest - { + -> UploadRequest { do { let urlRequest = try URLRequest(url: url, method: method, headers: headers) return upload(data, with: urlRequest) @@ -550,8 +540,7 @@ open class SessionManager { to url: URLConvertible, method: HTTPMethod = .post, headers: HTTPHeaders? = nil) - -> UploadRequest - { + -> UploadRequest { do { let urlRequest = try URLRequest(url: url, method: method, headers: headers) return upload(stream, with: urlRequest) @@ -612,8 +601,7 @@ open class SessionManager { method: HTTPMethod = .post, headers: HTTPHeaders? = nil, queue: DispatchQueue? = nil, - encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) - { + encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) { do { let urlRequest = try URLRequest(url: url, method: method, headers: headers) @@ -657,8 +645,7 @@ open class SessionManager { usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, with urlRequest: URLRequestConvertible, queue: DispatchQueue? = nil, - encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) - { + encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) { DispatchQueue.global(qos: .utility).async { let formData = MultipartFormData() multipartFormData(formData) diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift index 5705737e49d7..a25d80271d31 100644 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift @@ -94,8 +94,7 @@ open class TaskDelegate: NSObject { task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, - completionHandler: @escaping (URLRequest?) -> Void) - { + completionHandler: @escaping (URLRequest?) -> Void) { var redirectRequest: URLRequest? = request if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { @@ -110,8 +109,7 @@ open class TaskDelegate: NSObject { _ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { + completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling var credential: URLCredential? @@ -150,8 +148,7 @@ open class TaskDelegate: NSObject { func urlSession( _ session: URLSession, task: URLSessionTask, - needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) - { + needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) { var bodyStream: InputStream? if let taskNeedNewBodyStream = taskNeedNewBodyStream { @@ -237,8 +234,7 @@ class DataTaskDelegate: TaskDelegate, URLSessionDataDelegate { _ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, - completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) - { + completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) { var disposition: URLSession.ResponseDisposition = .allow expectedContentLength = response.expectedContentLength @@ -253,8 +249,7 @@ class DataTaskDelegate: TaskDelegate, URLSessionDataDelegate { func urlSession( _ session: URLSession, dataTask: URLSessionDataTask, - didBecome downloadTask: URLSessionDownloadTask) - { + didBecome downloadTask: URLSessionDownloadTask) { dataTaskDidBecomeDownloadTask?(session, dataTask, downloadTask) } @@ -287,8 +282,7 @@ class DataTaskDelegate: TaskDelegate, URLSessionDataDelegate { _ session: URLSession, dataTask: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse, - completionHandler: @escaping (CachedURLResponse?) -> Void) - { + completionHandler: @escaping (CachedURLResponse?) -> Void) { var cachedResponse: CachedURLResponse? = proposedResponse if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { @@ -343,8 +337,7 @@ class DownloadTaskDelegate: TaskDelegate, URLSessionDownloadDelegate { func urlSession( _ session: URLSession, downloadTask: URLSessionDownloadTask, - didFinishDownloadingTo location: URL) - { + didFinishDownloadingTo location: URL) { temporaryURL = location guard @@ -379,8 +372,7 @@ class DownloadTaskDelegate: TaskDelegate, URLSessionDownloadDelegate { downloadTask: URLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { + totalBytesExpectedToWrite: Int64) { if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } if let downloadTaskDidWriteData = downloadTaskDidWriteData { @@ -405,8 +397,7 @@ class DownloadTaskDelegate: TaskDelegate, URLSessionDownloadDelegate { _ session: URLSession, downloadTask: URLSessionDownloadTask, didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { + expectedTotalBytes: Int64) { if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) } else { @@ -448,8 +439,7 @@ class UploadTaskDelegate: DataTaskDelegate { task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { + totalBytesExpectedToSend: Int64) { if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } if let taskDidSendBodyData = taskDidSendBodyData { diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift index 596c1bdc41f9..2c27dd29f74b 100644 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift @@ -64,8 +64,7 @@ public struct Timeline { requestStartTime: CFAbsoluteTime = 0.0, initialResponseTime: CFAbsoluteTime = 0.0, requestCompletedTime: CFAbsoluteTime = 0.0, - serializationCompletedTime: CFAbsoluteTime = 0.0) - { + serializationCompletedTime: CFAbsoluteTime = 0.0) { self.requestStartTime = requestStartTime self.initialResponseTime = initialResponseTime self.requestCompletedTime = requestCompletedTime diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift index 59e0bbb2b0e9..3c37e24d847f 100644 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift +++ b/samples/client/petstore/swift4/default/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift @@ -94,8 +94,7 @@ extension Request { statusCode acceptableStatusCodes: S, response: HTTPURLResponse) -> ValidationResult - where S.Iterator.Element == Int - { + where S.Iterator.Element == Int { if acceptableStatusCodes.contains(response.statusCode) { return .success } else { @@ -111,8 +110,7 @@ extension Request { response: HTTPURLResponse, data: Data?) -> ValidationResult - where S.Iterator.Element == String - { + where S.Iterator.Element == String { guard let data = data, data.count > 0 else { return .success } guard diff --git a/samples/client/petstore/swift4/default/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift4/default/docs/HasOnlyReadOnly.md index 45781360154c..57b6e3a17e67 100644 --- a/samples/client/petstore/swift4/default/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/swift4/default/docs/HasOnlyReadOnly.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] [[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/swift4/default/docs/Name.md b/samples/client/petstore/swift4/default/docs/Name.md index 2be75d062e47..f7b180292cd6 100644 --- a/samples/client/petstore/swift4/default/docs/Name.md +++ b/samples/client/petstore/swift4/default/docs/Name.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Int** | | -**snakeCase** | **Int** | | [optional] +**snakeCase** | **Int** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Int** | | [optional] +**_123number** | **Int** | | [optional] [readonly] [[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/swift4/default/docs/ReadOnlyFirst.md b/samples/client/petstore/swift4/default/docs/ReadOnlyFirst.md index e3f16038b970..ed537b87598b 100644 --- a/samples/client/petstore/swift4/default/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/swift4/default/docs/ReadOnlyFirst.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **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/swift4/objcCompatible/.openapi-generator/VERSION b/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION index 0e97bd19efbf..c3a2c7076fa8 100644 --- a/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/objcCompatible/Package.swift b/samples/client/petstore/swift4/objcCompatible/Package.swift new file mode 100644 index 000000000000..e5c5f0f33b82 --- /dev/null +++ b/samples/client/petstore/swift4/objcCompatible/Package.swift @@ -0,0 +1,27 @@ +// swift-tools-version:4.2 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "PetstoreClient", + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "PetstoreClient", + targets: ["PetstoreClient"]) + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0") + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "PetstoreClient", + dependencies: ["Alamofire"], + path: "PetstoreClient/Classes" + ) + ] +) diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/project.pbxproj index 55021e5d191a..b9d30943d8f3 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/project.pbxproj @@ -3,296 +3,296 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 51; objects = { /* Begin PBXBuildFile section */ - 02903CEC38DC202565BC08CB040AC4E9 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */; }; - 0462F801432CF94C7EF51D0532737A7E /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */; }; - 08D87E4FECF24910F0DA0F1D2E2D955A /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */; }; - 08F5828F0C2BCF07A9E4917DBBB993AE /* AdditionalPropertiesInteger.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA2F3566156A4ABC465F201B4A1F6227 /* AdditionalPropertiesInteger.swift */; }; - 1143FFF06DEE01E5B0F1368AA05BE1B4 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */; }; - 122BBAE8245606CC040EEB6B9254E376 /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */; }; - 12327BF7304AA897C5D2A1250B1659B7 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */; }; - 12BB95C66D63090732BB9E0379836E3C /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */; }; - 16E9A5E22B4823DE282E7F4C18A21EA8 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */; }; - 18F19872A0DFB4CC3D9C696BBCA64EFD /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */; }; - 196E9846B27D736630CCF90497696859 /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */; }; - 271D94A05C47B602A2433B9CD3D9DCDC /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */; }; - 293F4E0FBFC8297E414A3CDBB7F29A96 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */; }; - 297E365D1E4672C43C56E0AFD855FFBF /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */; }; - 2A35688C985E9CB1EB7732AC2AD46B82 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */; }; - 2DF4544D4D3D6CF7047A59FB89ED31BD /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */; }; - 3251A3722981CE46261615CFBA96A08D /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */; }; - 36734C4EB3362A114A7CB5F25EE39E6D /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */; }; - 39F9FBA1AC5C2612ECA1FF715EBFC287 /* AdditionalPropertiesString.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFE215C1B526E0418ED301B15357B970 /* AdditionalPropertiesString.swift */; }; - 3D8E407B1DF4FA5A5F16B64E3A285781 /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */; }; - 41D8A105135868152A56E2AC475049BB /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */; }; - 42C51BC034E8B0CAA29A068F6B0DC815 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */; }; - 491676EC91BFEF95A12556888EED87B5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */; }; - 4C28BFEC5E7C8150DEFD83E09C1A1D32 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */; }; - 52B5604F986335DB69CD2B430FB83BAB /* AdditionalPropertiesAnyType.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5AB1037D937AADF8B4A70C96D5E5D61 /* AdditionalPropertiesAnyType.swift */; }; - 58F9704B295AC436D6FB98FA669E2344 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */; }; - 59C00CBB07761CAC8DCE7054E34AD5D9 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */; }; - 59C2F5495C98836BFA9E10BF5C13BC2C /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */; }; - 59EAB3527305A37ED99FB210045B69EA /* AdditionalPropertiesNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E0512B3582586B4C0C598D5DB1C0D39 /* AdditionalPropertiesNumber.swift */; }; - 5ACDD7CC312167589335E9CA5998E770 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */; }; - 655AA371771C7BD72EE0AAC0C90DFFF0 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */; }; - 6600BB1500AE35A3C80F7C83F6444552 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */; }; - 6CD20EE568DDAD2304BF0C4B1A70C8DC /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */; }; - 7367A9D91D4B101F2D28AC56ED89F175 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */; }; - 82D4D0C8AD0354A700C8ACD421ABED55 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */; }; - 83A2D1863FB136C0DFC423319F4EED65 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */; }; - 92FB161BF1E57D11B116AF0292D5835C /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718FF4525C81 /* Client.swift */; }; - 97C99615237E1B662242E04F527B38B9 /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */; }; - 988F461F59E4E1091156840007CB3773 /* AdditionalPropertiesBoolean.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CC24C01A55F644957196F9F81D10F81 /* AdditionalPropertiesBoolean.swift */; }; - A190AF5A3988639ED4B78163D0EA3CA4 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */; }; - A438970025AE69ED407BC1E67CC6359E /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */; }; - A9F1AAF6CE029DD3B4F8AC841F0B6BC6 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */; }; - AE9D2E1DB59AF6575AC4AC6756C5A937 /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */; }; - B399A1742F23330FDCA450EAB98F51F1 /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */; }; - BB02FDCF1B2B0E457E1C2BF39FBB599D /* XmlItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2253391845B73B8BA3680491575CC07 /* XmlItem.swift */; }; - BF7D58FBCF5E4D3F2932FCC0E62BED40 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */; }; - C15AC1CC631E96D0360EB8C15BF30452 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */; }; - C1CACABE18A7ADCE37D1CD9DC9128304 /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A4315C49A /* List.swift */; }; - C2EDEB747887399B13A6DFD72A219CB2 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */; }; - C329EE55B2FCC9174ED3B128D67C5E8C /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */; }; - D3A17B7FAFA8A7A210875BBCDCC30116 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; - D68F23CD4B5178493CE7AE8DFB868EAE /* AdditionalPropertiesArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FEE553331890581C2FF366F9EA0956D /* AdditionalPropertiesArray.swift */; }; - D70EC94E346077DE1482231DD4498BED /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */; }; - DB1CE39011A741D07E187663291B5DE5 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */; }; - DB724C4F1AD5DF025B53A9A2E0A49E3D /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */; }; - DDBC3CF5E447D8D838F0FE200420EEE3 /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */; }; - DEC892724574BB29BD65869374F83982 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */; }; - E2C40F0E34DB8C21A806262C72841A51 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118F057604D /* SpecialModelName.swift */; }; - E51ADEC931806B20A041303E539A8BE2 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */; }; - E57CD12D2F500D40B4135D0F5ECA9866 /* AdditionalPropertiesObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72FEDC94BA0E37214D360871B284BC8A /* AdditionalPropertiesObject.swift */; }; - F02BEF9A8503B3848B045370451E85F6 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4CF550442B /* Models.swift */; }; - F21D10C71A9DE7D0467AFD23FD391D2E /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08AA65292F7 /* Return.swift */; }; - FB4A053CDCD75E48B755CC22D463A3FC /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */; }; - FECA03F0388E84AE1B22638605D8AC9F /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */; }; + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; + 1A3562EDD07FF7D64BCD7A59 /* AdditionalPropertiesObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72FEDC94BA0E37214D360871 /* AdditionalPropertiesObject.swift */; }; + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; + 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */; }; + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; + 3EA765BDC5A11401D8A16536 /* XmlItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2253391845B73B8BA368049 /* XmlItem.swift */; }; + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; + 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */; }; + 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83D /* Alamofire.framework */; }; + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; + 4884A65ABBA468278D2450FD /* AdditionalPropertiesString.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFE215C1B526E0418ED301B1 /* AdditionalPropertiesString.swift */; }; + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; + 7244DA68425DE3B3727C1990 /* AdditionalPropertiesNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E0512B3582586B4C0C598D5 /* AdditionalPropertiesNumber.swift */; }; + 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; + 7F7BE063B514EF4A90D75B7F /* AdditionalPropertiesInteger.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA2F3566156A4ABC465F201B /* AdditionalPropertiesInteger.swift */; }; + 83BBA452D761D61542F297CC /* AdditionalPropertiesArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FEE553331890581C2FF366F /* AdditionalPropertiesArray.swift */; }; + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; + AB3B26F5E373BC8C0A0A617E /* AdditionalPropertiesAnyType.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5AB1037D937AADF8B4A70C9 /* AdditionalPropertiesAnyType.swift */; }; + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; + AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; + EF35D2C67E3BC377DDCC99CB /* AdditionalPropertiesBoolean.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CC24C01A55F644957196F9F /* AdditionalPropertiesBoolean.swift */; }; + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; - 0CC24C01A55F644957196F9F81D10F81 /* AdditionalPropertiesBoolean.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesBoolean.swift; sourceTree = ""; }; - 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; - 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; - 1E0512B3582586B4C0C598D5DB1C0D39 /* AdditionalPropertiesNumber.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesNumber.swift; sourceTree = ""; }; - 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; - 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; - 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; - 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; - 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; - 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; - 386FD590658E90509C121118F057604D /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; - 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; - 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; - 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; - 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; - 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; - 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; - 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; - 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; - 4FEE553331890581C2FF366F9EA0956D /* AdditionalPropertiesArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesArray.swift; sourceTree = ""; }; - 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; - 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; - 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; - 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; - 72FEDC94BA0E37214D360871B284BC8A /* AdditionalPropertiesObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesObject.swift; sourceTree = ""; }; - 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; - 7A6070F581E611FF44AFD40A4315C49A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; - 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; - 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; - 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; - 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; - 8699F7966F748ED026A6FB4CF550442B /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; - 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; - 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; - 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; - 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; - 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; - 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; - 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; - A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; - A2253391845B73B8BA3680491575CC07 /* XmlItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XmlItem.swift; sourceTree = ""; }; - A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; - A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; - A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; - A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; - A913A57E72D723632E9A718FF4525C81 /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; - B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; - B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; - B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; - B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; - B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; - C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; - C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; - C81447828475F76C5CF4F08AA65292F7 /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; - E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; - EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; - ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; - F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; - F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; - F5AB1037D937AADF8B4A70C96D5E5D61 /* AdditionalPropertiesAnyType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesAnyType.swift; sourceTree = ""; }; - FA2F3566156A4ABC465F201B4A1F6227 /* AdditionalPropertiesInteger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesInteger.swift; sourceTree = ""; }; - FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; - FFE215C1B526E0418ED301B15357B970 /* AdditionalPropertiesString.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesString.swift; sourceTree = ""; }; + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; + 0CC24C01A55F644957196F9F /* AdditionalPropertiesBoolean.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesBoolean.swift; sourceTree = ""; }; + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; + 1E0512B3582586B4C0C598D5 /* AdditionalPropertiesNumber.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesNumber.swift; sourceTree = ""; }; + 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; + 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; + 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; + 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; + 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; + 4FEE553331890581C2FF366F /* AdditionalPropertiesArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesArray.swift; sourceTree = ""; }; + 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; + 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; + 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; + 72FEDC94BA0E37214D360871 /* AdditionalPropertiesObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesObject.swift; sourceTree = ""; }; + 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; + 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; + 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; + 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; + 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; + 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; + 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; + A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; + A2253391845B73B8BA368049 /* XmlItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XmlItem.swift; sourceTree = ""; }; + A235FA3FDFB086CC69CDE83D /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; + A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; + B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; + B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; + C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; + E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; + F5AB1037D937AADF8B4A70C9 /* AdditionalPropertiesAnyType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesAnyType.swift; sourceTree = ""; }; + FA2F3566156A4ABC465F201B /* AdditionalPropertiesInteger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesInteger.swift; sourceTree = ""; }; + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; + FFE215C1B526E0418ED301B1 /* AdditionalPropertiesString.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesString.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - D1990C2A394CCF025EF98A2FB828C79A /* Frameworks */ = { + D1990C2A394CCF025EF98A2F /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4C28BFEC5E7C8150DEFD83E09C1A1D32 /* Alamofire.framework in Frameworks */, + 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 1E464C0937FE0D3A7A0FE29AF446553C /* Frameworks */ = { + 1E464C0937FE0D3A7A0FE29A /* Frameworks */ = { isa = PBXGroup; children = ( - 7861EE241895128F64DD787367B3022D /* Carthage */, + 7861EE241895128F64DD7873 /* Carthage */, ); name = Frameworks; sourceTree = ""; }; - 4FBDCF1330A9AB9122780DB3FA21DE4C /* Models */ = { + 4FBDCF1330A9AB9122780DB3 /* Models */ = { isa = PBXGroup; children = ( - F5AB1037D937AADF8B4A70C96D5E5D61 /* AdditionalPropertiesAnyType.swift */, - 4FEE553331890581C2FF366F9EA0956D /* AdditionalPropertiesArray.swift */, - 0CC24C01A55F644957196F9F81D10F81 /* AdditionalPropertiesBoolean.swift */, - 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */, - FA2F3566156A4ABC465F201B4A1F6227 /* AdditionalPropertiesInteger.swift */, - 1E0512B3582586B4C0C598D5DB1C0D39 /* AdditionalPropertiesNumber.swift */, - 72FEDC94BA0E37214D360871B284BC8A /* AdditionalPropertiesObject.swift */, - FFE215C1B526E0418ED301B15357B970 /* AdditionalPropertiesString.swift */, - 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */, - 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */, - A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */, - 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */, - B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */, - F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */, - A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */, - 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */, - 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */, - 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */, - 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */, - A913A57E72D723632E9A718FF4525C81 /* Client.swift */, - C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */, - A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */, - 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */, - 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */, - FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */, - 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */, - 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */, - 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */, - 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */, - 7A6070F581E611FF44AFD40A4315C49A /* List.swift */, - 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */, - 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */, - 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */, - 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */, - B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */, - 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */, - F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */, - C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */, - ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */, - 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */, - C81447828475F76C5CF4F08AA65292F7 /* Return.swift */, - 386FD590658E90509C121118F057604D /* SpecialModelName.swift */, - 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */, - B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */, - EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */, - 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */, - E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */, - A2253391845B73B8BA3680491575CC07 /* XmlItem.swift */, + F5AB1037D937AADF8B4A70C9 /* AdditionalPropertiesAnyType.swift */, + 4FEE553331890581C2FF366F /* AdditionalPropertiesArray.swift */, + 0CC24C01A55F644957196F9F /* AdditionalPropertiesBoolean.swift */, + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, + FA2F3566156A4ABC465F201B /* AdditionalPropertiesInteger.swift */, + 1E0512B3582586B4C0C598D5 /* AdditionalPropertiesNumber.swift */, + 72FEDC94BA0E37214D360871 /* AdditionalPropertiesObject.swift */, + FFE215C1B526E0418ED301B1 /* AdditionalPropertiesString.swift */, + 95568E7C35F119EB4A12B498 /* Animal.swift */, + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, + 212AA914B7F1793A4E32C119 /* Cat.swift */, + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, + 6F2985D01F8D60A4B1925C69 /* Category.swift */, + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, + A913A57E72D723632E9A718F /* Client.swift */, + C6C3E1129526A353B963EFD7 /* Dog.swift */, + A21A69C8402A60E01116ABBD /* DogAllOf.swift */, + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, + 3933D3B2A3AC4577094D0C23 /* File.swift */, + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, + 3156CE41C001C80379B84BDB /* FormatTest.swift */, + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, + 7A6070F581E611FF44AFD40A /* List.swift */, + 7986861626C2B1CB49AD7000 /* MapTest.swift */, + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, + 5AD994DFAA0DA93C188A4DBA /* Name.swift */, + B8E0B16084741FCB82389F58 /* NumberOnly.swift */, + 27B2E9EF856E89FEAA359A3A /* Order.swift */, + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, + C81447828475F76C5CF4F08A /* Return.swift */, + 386FD590658E90509C121118 /* SpecialModelName.swift */, + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, + B2896F8BFD1AA2965C8A3015 /* Tag.swift */, + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, + E5565A447062C7B8F695F451 /* User.swift */, + A2253391845B73B8BA368049 /* XmlItem.swift */, ); path = Models; sourceTree = ""; }; - 5FBA6AE5F64CD737F88B4565AC3CCD3B = { + 5FBA6AE5F64CD737F88B4565 = { isa = PBXGroup; children = ( - 9B364C01750D7AA4F983B9E77B01BCC6 /* PetstoreClient */, - 1E464C0937FE0D3A7A0FE29AF446553C /* Frameworks */, - 857F0DEA1890CE66D6DAD556C55821A6 /* Products */, + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, + 1E464C0937FE0D3A7A0FE29A /* Frameworks */, + 857F0DEA1890CE66D6DAD556 /* Products */, ); sourceTree = ""; }; - 67BF3478113E6B4DF1C4E04F40BF58C4 /* OpenAPIs */ = { + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { isa = PBXGroup; children = ( - 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */, - 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */, - 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */, - 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */, - 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */, - B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */, - 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */, - 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */, - 8699F7966F748ED026A6FB4CF550442B /* Models.swift */, - F956D0CCAE23BCFD1C7BDD5D47944AA5 /* APIs */, - 4FBDCF1330A9AB9122780DB3FA21DE4C /* Models */, + 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */, + 897716962D472FE162B723CB /* APIHelper.swift */, + 37DF825B8F3BADA2B2537D17 /* APIs.swift */, + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, + 28A444949BBC254798C3B3DD /* Configuration.swift */, + B8C298FC8929DCB369053F11 /* Extensions.swift */, + 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */, + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, + 8699F7966F748ED026A6FB4C /* Models.swift */, + F956D0CCAE23BCFD1C7BDD5D /* APIs */, + 4FBDCF1330A9AB9122780DB3 /* Models */, ); path = OpenAPIs; sourceTree = ""; }; - 7861EE241895128F64DD787367B3022D /* Carthage */ = { + 7861EE241895128F64DD7873 /* Carthage */ = { isa = PBXGroup; children = ( - A012205B41CB71A62B86EECDEAFB0990 /* iOS */, + A012205B41CB71A62B86EECD /* iOS */, ); name = Carthage; path = Carthage/Build; sourceTree = ""; }; - 857F0DEA1890CE66D6DAD556C55821A6 /* Products */ = { + 857F0DEA1890CE66D6DAD556 /* Products */ = { isa = PBXGroup; children = ( - 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */, + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, ); name = Products; sourceTree = ""; }; - 9B364C01750D7AA4F983B9E77B01BCC6 /* PetstoreClient */ = { + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { isa = PBXGroup; children = ( - EF4C81BDD734856ED5023B777D35098B /* Classes */, + EF4C81BDD734856ED5023B77 /* Classes */, ); path = PetstoreClient; sourceTree = ""; }; - A012205B41CB71A62B86EECDEAFB0990 /* iOS */ = { + A012205B41CB71A62B86EECD /* iOS */ = { isa = PBXGroup; children = ( - A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */, + A235FA3FDFB086CC69CDE83D /* Alamofire.framework */, ); path = iOS; sourceTree = ""; }; - EF4C81BDD734856ED5023B777D35098B /* Classes */ = { + EF4C81BDD734856ED5023B77 /* Classes */ = { isa = PBXGroup; children = ( - 67BF3478113E6B4DF1C4E04F40BF58C4 /* OpenAPIs */, + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, ); path = Classes; sourceTree = ""; }; - F956D0CCAE23BCFD1C7BDD5D47944AA5 /* APIs */ = { + F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { isa = PBXGroup; children = ( - 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */, - 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */, - B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */, - 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */, - A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */, - 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */, + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, + 6E00950725DC44436C5E238C /* FakeAPI.swift */, + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, + 9A019F500E546A3292CE716A /* PetAPI.swift */, + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, ); path = APIs; sourceTree = ""; @@ -300,12 +300,12 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - C1282C2230015E0D204BEAEDDFB49453 /* PetstoreClient */ = { + C1282C2230015E0D204BEAED /* PetstoreClient */ = { isa = PBXNativeTarget; - buildConfigurationList = B46EDEB1A7F0D78FE6394544C60169D1 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; buildPhases = ( - E539708354CE60FE486F81EDE56D13C8 /* Sources */, - D1990C2A394CCF025EF98A2FB828C79A /* Frameworks */, + E539708354CE60FE486F81ED /* Sources */, + D1990C2A394CCF025EF98A2F /* Frameworks */, ); buildRules = ( ); @@ -313,108 +313,108 @@ ); name = PetstoreClient; productName = PetstoreClient; - productReference = 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */; + productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - E7D276EE2369D8C455513C2E05F9AED0 /* Project object */ = { + E7D276EE2369D8C455513C2E /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1000; + LastUpgradeCheck = 1020; }; - buildConfigurationList = ECAB17FF35111B5E14DAAC0883031714 /* Build configuration list for PBXProject "PetstoreClient" */; - compatibilityVersion = "Xcode 9.3"; + buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; + compatibilityVersion = "Xcode 10.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, ); - mainGroup = 5FBA6AE5F64CD737F88B4565AC3CCD3B; + mainGroup = 5FBA6AE5F64CD737F88B4565; projectDirPath = ""; projectRoot = ""; targets = ( - C1282C2230015E0D204BEAEDDFB49453 /* PetstoreClient */, + C1282C2230015E0D204BEAED /* PetstoreClient */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ - E539708354CE60FE486F81EDE56D13C8 /* Sources */ = { + E539708354CE60FE486F81ED /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2A35688C985E9CB1EB7732AC2AD46B82 /* APIHelper.swift in Sources */, - 0462F801432CF94C7EF51D0532737A7E /* APIs.swift in Sources */, - 52B5604F986335DB69CD2B430FB83BAB /* AdditionalPropertiesAnyType.swift in Sources */, - D68F23CD4B5178493CE7AE8DFB868EAE /* AdditionalPropertiesArray.swift in Sources */, - 988F461F59E4E1091156840007CB3773 /* AdditionalPropertiesBoolean.swift in Sources */, - 12327BF7304AA897C5D2A1250B1659B7 /* AdditionalPropertiesClass.swift in Sources */, - 08F5828F0C2BCF07A9E4917DBBB993AE /* AdditionalPropertiesInteger.swift in Sources */, - 59EAB3527305A37ED99FB210045B69EA /* AdditionalPropertiesNumber.swift in Sources */, - E57CD12D2F500D40B4135D0F5ECA9866 /* AdditionalPropertiesObject.swift in Sources */, - 39F9FBA1AC5C2612ECA1FF715EBFC287 /* AdditionalPropertiesString.swift in Sources */, - 58F9704B295AC436D6FB98FA669E2344 /* AlamofireImplementations.swift in Sources */, - 02903CEC38DC202565BC08CB040AC4E9 /* Animal.swift in Sources */, - DB1CE39011A741D07E187663291B5DE5 /* AnimalFarm.swift in Sources */, - 83A2D1863FB136C0DFC423319F4EED65 /* AnotherFakeAPI.swift in Sources */, - 97C99615237E1B662242E04F527B38B9 /* ApiResponse.swift in Sources */, - 3251A3722981CE46261615CFBA96A08D /* ArrayOfArrayOfNumberOnly.swift in Sources */, - A190AF5A3988639ED4B78163D0EA3CA4 /* ArrayOfNumberOnly.swift in Sources */, - C2EDEB747887399B13A6DFD72A219CB2 /* ArrayTest.swift in Sources */, - 7367A9D91D4B101F2D28AC56ED89F175 /* Capitalization.swift in Sources */, - 18F19872A0DFB4CC3D9C696BBCA64EFD /* Cat.swift in Sources */, - 41D8A105135868152A56E2AC475049BB /* CatAllOf.swift in Sources */, - 42C51BC034E8B0CAA29A068F6B0DC815 /* Category.swift in Sources */, - 5ACDD7CC312167589335E9CA5998E770 /* ClassModel.swift in Sources */, - 92FB161BF1E57D11B116AF0292D5835C /* Client.swift in Sources */, - 6CD20EE568DDAD2304BF0C4B1A70C8DC /* CodableHelper.swift in Sources */, - DEC892724574BB29BD65869374F83982 /* Configuration.swift in Sources */, - D70EC94E346077DE1482231DD4498BED /* Dog.swift in Sources */, - 271D94A05C47B602A2433B9CD3D9DCDC /* DogAllOf.swift in Sources */, - A438970025AE69ED407BC1E67CC6359E /* EnumArrays.swift in Sources */, - 59C00CBB07761CAC8DCE7054E34AD5D9 /* EnumClass.swift in Sources */, - 08D87E4FECF24910F0DA0F1D2E2D955A /* EnumTest.swift in Sources */, - C329EE55B2FCC9174ED3B128D67C5E8C /* Extensions.swift in Sources */, - 297E365D1E4672C43C56E0AFD855FFBF /* FakeAPI.swift in Sources */, - A9F1AAF6CE029DD3B4F8AC841F0B6BC6 /* FakeClassnameTags123API.swift in Sources */, - FECA03F0388E84AE1B22638605D8AC9F /* File.swift in Sources */, - 491676EC91BFEF95A12556888EED87B5 /* FileSchemaTestClass.swift in Sources */, - 36734C4EB3362A114A7CB5F25EE39E6D /* FormatTest.swift in Sources */, - DDBC3CF5E447D8D838F0FE200420EEE3 /* HasOnlyReadOnly.swift in Sources */, - 16E9A5E22B4823DE282E7F4C18A21EA8 /* JSONEncodableEncoding.swift in Sources */, - 12BB95C66D63090732BB9E0379836E3C /* JSONEncodingHelper.swift in Sources */, - C1CACABE18A7ADCE37D1CD9DC9128304 /* List.swift in Sources */, - 655AA371771C7BD72EE0AAC0C90DFFF0 /* MapTest.swift in Sources */, - D3A17B7FAFA8A7A210875BBCDCC30116 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, - 2DF4544D4D3D6CF7047A59FB89ED31BD /* Model200Response.swift in Sources */, - F02BEF9A8503B3848B045370451E85F6 /* Models.swift in Sources */, - C15AC1CC631E96D0360EB8C15BF30452 /* Name.swift in Sources */, - AE9D2E1DB59AF6575AC4AC6756C5A937 /* NumberOnly.swift in Sources */, - 59C2F5495C98836BFA9E10BF5C13BC2C /* Order.swift in Sources */, - 82D4D0C8AD0354A700C8ACD421ABED55 /* OuterComposite.swift in Sources */, - 1143FFF06DEE01E5B0F1368AA05BE1B4 /* OuterEnum.swift in Sources */, - B399A1742F23330FDCA450EAB98F51F1 /* Pet.swift in Sources */, - 3D8E407B1DF4FA5A5F16B64E3A285781 /* PetAPI.swift in Sources */, - 293F4E0FBFC8297E414A3CDBB7F29A96 /* ReadOnlyFirst.swift in Sources */, - F21D10C71A9DE7D0467AFD23FD391D2E /* Return.swift in Sources */, - E2C40F0E34DB8C21A806262C72841A51 /* SpecialModelName.swift in Sources */, - 122BBAE8245606CC040EEB6B9254E376 /* StoreAPI.swift in Sources */, - 196E9846B27D736630CCF90497696859 /* StringBooleanMap.swift in Sources */, - E51ADEC931806B20A041303E539A8BE2 /* Tag.swift in Sources */, - 6600BB1500AE35A3C80F7C83F6444552 /* TypeHolderDefault.swift in Sources */, - FB4A053CDCD75E48B755CC22D463A3FC /* TypeHolderExample.swift in Sources */, - BF7D58FBCF5E4D3F2932FCC0E62BED40 /* User.swift in Sources */, - DB724C4F1AD5DF025B53A9A2E0A49E3D /* UserAPI.swift in Sources */, - BB02FDCF1B2B0E457E1C2BF39FBB599D /* XmlItem.swift in Sources */, + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, + AB3B26F5E373BC8C0A0A617E /* AdditionalPropertiesAnyType.swift in Sources */, + 83BBA452D761D61542F297CC /* AdditionalPropertiesArray.swift in Sources */, + EF35D2C67E3BC377DDCC99CB /* AdditionalPropertiesBoolean.swift in Sources */, + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, + 7F7BE063B514EF4A90D75B7F /* AdditionalPropertiesInteger.swift in Sources */, + 7244DA68425DE3B3727C1990 /* AdditionalPropertiesNumber.swift in Sources */, + 1A3562EDD07FF7D64BCD7A59 /* AdditionalPropertiesObject.swift in Sources */, + 4884A65ABBA468278D2450FD /* AdditionalPropertiesString.swift in Sources */, + 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */, + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, + AD594BFB99E31A5E07579237 /* Client.swift in Sources */, + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, + 72547ECFB451A509409311EE /* Configuration.swift in Sources */, + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, + 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */, + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, + 3EA765BDC5A11401D8A16536 /* XmlItem.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ - 3B2C02AFB91CB5C82766ED5CF21FF628 /* Release */ = { + 3B2C02AFB91CB5C82766ED5C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; @@ -431,7 +431,10 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -439,7 +442,7 @@ }; name = Release; }; - A9EB0A02B94C427CBACFEC7CFFC6A816 /* Debug */ = { + A9EB0A02B94C427CBACFEC7C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -494,11 +497,11 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; - DD3EEB93949E9EBA4437E9CDBF4A26F6 /* Debug */ = { + DD3EEB93949E9EBA4437E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; @@ -515,7 +518,10 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -523,7 +529,7 @@ }; name = Debug; }; - F81D4E5FECD46E9AA6DD2C299CEBEF64 /* Release */ = { + F81D4E5FECD46E9AA6DD2C29 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -568,8 +574,8 @@ GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; VALIDATE_PRODUCT = YES; }; name = Release; @@ -577,25 +583,25 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - B46EDEB1A7F0D78FE6394544C60169D1 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { isa = XCConfigurationList; buildConfigurations = ( - DD3EEB93949E9EBA4437E9CDBF4A26F6 /* Debug */, - 3B2C02AFB91CB5C82766ED5CF21FF628 /* Release */, + DD3EEB93949E9EBA4437E9CD /* Debug */, + 3B2C02AFB91CB5C82766ED5C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = ""; }; - ECAB17FF35111B5E14DAAC0883031714 /* Build configuration list for PBXProject "PetstoreClient" */ = { + ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { isa = XCConfigurationList; buildConfigurations = ( - A9EB0A02B94C427CBACFEC7CFFC6A816 /* Debug */, - F81D4E5FECD46E9AA6DD2C299CEBEF64 /* Release */, + A9EB0A02B94C427CBACFEC7C /* Debug */, + F81D4E5FECD46E9AA6DD2C29 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; /* End XCConfigurationList section */ }; - rootObject = E7D276EE2369D8C455513C2E05F9AED0 /* Project object */; + rootObject = E7D276EE2369D8C455513C2E /* Project object */; } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme index 7802e379453b..e8ac84fa9929 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme @@ -1,6 +1,6 @@ @@ -32,7 +32,7 @@ @@ -42,6 +42,8 @@ + + @@ -77,7 +79,7 @@ runnableDebuggingMode = "0"> diff --git a/samples/client/petstore/swift4/objcCompatible/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift4/objcCompatible/docs/HasOnlyReadOnly.md index 45781360154c..57b6e3a17e67 100644 --- a/samples/client/petstore/swift4/objcCompatible/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/swift4/objcCompatible/docs/HasOnlyReadOnly.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] [[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/swift4/objcCompatible/docs/Name.md b/samples/client/petstore/swift4/objcCompatible/docs/Name.md index 2be75d062e47..f7b180292cd6 100644 --- a/samples/client/petstore/swift4/objcCompatible/docs/Name.md +++ b/samples/client/petstore/swift4/objcCompatible/docs/Name.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Int** | | -**snakeCase** | **Int** | | [optional] +**snakeCase** | **Int** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Int** | | [optional] +**_123number** | **Int** | | [optional] [readonly] [[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/swift4/objcCompatible/docs/ReadOnlyFirst.md b/samples/client/petstore/swift4/objcCompatible/docs/ReadOnlyFirst.md index e3f16038b970..ed537b87598b 100644 --- a/samples/client/petstore/swift4/objcCompatible/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/swift4/objcCompatible/docs/ReadOnlyFirst.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **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/swift4/promisekit/.openapi-generator/VERSION b/samples/client/petstore/swift4/promisekit/.openapi-generator/VERSION index 0e97bd19efbf..c3a2c7076fa8 100644 --- a/samples/client/petstore/swift4/promisekit/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/promisekit/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/promisekit/Cartfile b/samples/client/petstore/swift4/promisekit/Cartfile index 9835749b67f9..91e7f6005189 100644 --- a/samples/client/petstore/swift4/promisekit/Cartfile +++ b/samples/client/petstore/swift4/promisekit/Cartfile @@ -1,2 +1,2 @@ github "Alamofire/Alamofire" ~> 4.9.0 -github "mxcl/PromiseKit" ~> 4.4 +github "mxcl/PromiseKit" ~> 6.11.0 diff --git a/samples/client/petstore/swift4/promisekit/Package.swift b/samples/client/petstore/swift4/promisekit/Package.swift new file mode 100644 index 000000000000..7ba5c67b456c --- /dev/null +++ b/samples/client/petstore/swift4/promisekit/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version:4.2 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "PetstoreClient", + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "PetstoreClient", + targets: ["PetstoreClient"]) + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0"), + .package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.11.0") + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "PetstoreClient", + dependencies: ["Alamofire", "PromiseKit"], + path: "PetstoreClient/Classes" + ) + ] +) diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient.podspec b/samples/client/petstore/swift4/promisekit/PetstoreClient.podspec index 8648503b2189..373b3f26afc8 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient.podspec +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient.podspec @@ -10,6 +10,6 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'PetstoreClient' s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'PromiseKit/CorePromise', '~> 4.4.0' + s.dependency 'PromiseKit/CorePromise', '~> 6.11.0' s.dependency 'Alamofire', '~> 4.9.0' end diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift4/promisekit/PetstoreClient.xcodeproj/project.pbxproj index 89e8b9f23899..04f57402a188 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient.xcodeproj/project.pbxproj @@ -3,279 +3,279 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 51; objects = { /* Begin PBXBuildFile section */ - 02903CEC38DC202565BC08CB040AC4E9 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */; }; - 0462F801432CF94C7EF51D0532737A7E /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */; }; - 08D87E4FECF24910F0DA0F1D2E2D955A /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */; }; - 1143FFF06DEE01E5B0F1368AA05BE1B4 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */; }; - 122BBAE8245606CC040EEB6B9254E376 /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */; }; - 12327BF7304AA897C5D2A1250B1659B7 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */; }; - 12BB95C66D63090732BB9E0379836E3C /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */; }; - 16E9A5E22B4823DE282E7F4C18A21EA8 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */; }; - 18F19872A0DFB4CC3D9C696BBCA64EFD /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */; }; - 196E9846B27D736630CCF90497696859 /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */; }; - 271D94A05C47B602A2433B9CD3D9DCDC /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */; }; - 293F4E0FBFC8297E414A3CDBB7F29A96 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */; }; - 297E365D1E4672C43C56E0AFD855FFBF /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */; }; - 2A35688C985E9CB1EB7732AC2AD46B82 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */; }; - 2DF4544D4D3D6CF7047A59FB89ED31BD /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */; }; - 3251A3722981CE46261615CFBA96A08D /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */; }; - 36734C4EB3362A114A7CB5F25EE39E6D /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */; }; - 3D8E407B1DF4FA5A5F16B64E3A285781 /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */; }; - 41D8A105135868152A56E2AC475049BB /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */; }; - 42C51BC034E8B0CAA29A068F6B0DC815 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */; }; - 491676EC91BFEF95A12556888EED87B5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */; }; - 4C28BFEC5E7C8150DEFD83E09C1A1D32 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */; }; - 58F9704B295AC436D6FB98FA669E2344 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */; }; - 59C00CBB07761CAC8DCE7054E34AD5D9 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */; }; - 59C2F5495C98836BFA9E10BF5C13BC2C /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */; }; - 5ACDD7CC312167589335E9CA5998E770 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */; }; - 655AA371771C7BD72EE0AAC0C90DFFF0 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */; }; - 6600BB1500AE35A3C80F7C83F6444552 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */; }; - 6CD20EE568DDAD2304BF0C4B1A70C8DC /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */; }; - 7367A9D91D4B101F2D28AC56ED89F175 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */; }; - 82D4D0C8AD0354A700C8ACD421ABED55 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */; }; - 83A2D1863FB136C0DFC423319F4EED65 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */; }; - 92FB161BF1E57D11B116AF0292D5835C /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718FF4525C81 /* Client.swift */; }; - 97C99615237E1B662242E04F527B38B9 /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */; }; - A190AF5A3988639ED4B78163D0EA3CA4 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */; }; - A196B597ADCA20BEC280660B57FF7333 /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A586582C92491DF9C12D27E2CB7F0695 /* PromiseKit.framework */; }; - A438970025AE69ED407BC1E67CC6359E /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */; }; - A9F1AAF6CE029DD3B4F8AC841F0B6BC6 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */; }; - AE9D2E1DB59AF6575AC4AC6756C5A937 /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */; }; - B399A1742F23330FDCA450EAB98F51F1 /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */; }; - BB02FDCF1B2B0E457E1C2BF39FBB599D /* XmlItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2253391845B73B8BA3680491575CC07 /* XmlItem.swift */; }; - BF7D58FBCF5E4D3F2932FCC0E62BED40 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */; }; - C15AC1CC631E96D0360EB8C15BF30452 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */; }; - C1CACABE18A7ADCE37D1CD9DC9128304 /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A4315C49A /* List.swift */; }; - C2EDEB747887399B13A6DFD72A219CB2 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */; }; - C329EE55B2FCC9174ED3B128D67C5E8C /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */; }; - D3A17B7FAFA8A7A210875BBCDCC30116 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; - D70EC94E346077DE1482231DD4498BED /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */; }; - DB1CE39011A741D07E187663291B5DE5 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */; }; - DB724C4F1AD5DF025B53A9A2E0A49E3D /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */; }; - DDBC3CF5E447D8D838F0FE200420EEE3 /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */; }; - DEC892724574BB29BD65869374F83982 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */; }; - E2C40F0E34DB8C21A806262C72841A51 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118F057604D /* SpecialModelName.swift */; }; - E51ADEC931806B20A041303E539A8BE2 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */; }; - F02BEF9A8503B3848B045370451E85F6 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4CF550442B /* Models.swift */; }; - F21D10C71A9DE7D0467AFD23FD391D2E /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08AA65292F7 /* Return.swift */; }; - FB4A053CDCD75E48B755CC22D463A3FC /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */; }; - FECA03F0388E84AE1B22638605D8AC9F /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */; }; + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; + 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */; }; + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; + 3EA765BDC5A11401D8A16536 /* XmlItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2253391845B73B8BA368049 /* XmlItem.swift */; }; + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; + 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */; }; + 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83D /* Alamofire.framework */; }; + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; + 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; + 731043E4ECC8708558821B31 /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A586582C92491DF9C12D27E2 /* PromiseKit.framework */; }; + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; + AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; - 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; - 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; - 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; - 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; - 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; - 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; - 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; - 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; - 386FD590658E90509C121118F057604D /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; - 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; - 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; - 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; - 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; - 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; - 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; - 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; - 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; - 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; - 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; - 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; - 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; - 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; - 7A6070F581E611FF44AFD40A4315C49A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; - 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; - 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; - 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; - 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; - 8699F7966F748ED026A6FB4CF550442B /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; - 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; - 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; - 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; - 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; - 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; - 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; - 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; - A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; - A2253391845B73B8BA3680491575CC07 /* XmlItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XmlItem.swift; sourceTree = ""; }; - A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; - A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; - A586582C92491DF9C12D27E2CB7F0695 /* PromiseKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = PromiseKit.framework; sourceTree = ""; }; - A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; - A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; - A913A57E72D723632E9A718FF4525C81 /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; - B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; - B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; - B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; - B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; - B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; - C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; - C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; - C81447828475F76C5CF4F08AA65292F7 /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; - E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; - EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; - ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; - F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; - F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; - FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; + 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; + 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; + 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; + 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; + 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; + 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; + 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; + 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; + 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; + 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; + 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; + 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; + 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; + 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; + 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; + A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; + A2253391845B73B8BA368049 /* XmlItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XmlItem.swift; sourceTree = ""; }; + A235FA3FDFB086CC69CDE83D /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + A586582C92491DF9C12D27E2 /* PromiseKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = PromiseKit.framework; sourceTree = ""; }; + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; + A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; + B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; + B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; + C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; + E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - D1990C2A394CCF025EF98A2FB828C79A /* Frameworks */ = { + D1990C2A394CCF025EF98A2F /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4C28BFEC5E7C8150DEFD83E09C1A1D32 /* Alamofire.framework in Frameworks */, - A196B597ADCA20BEC280660B57FF7333 /* PromiseKit.framework in Frameworks */, + 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */, + 731043E4ECC8708558821B31 /* PromiseKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 1E464C0937FE0D3A7A0FE29AF446553C /* Frameworks */ = { + 1E464C0937FE0D3A7A0FE29A /* Frameworks */ = { isa = PBXGroup; children = ( - 7861EE241895128F64DD787367B3022D /* Carthage */, + 7861EE241895128F64DD7873 /* Carthage */, ); name = Frameworks; sourceTree = ""; }; - 4FBDCF1330A9AB9122780DB3FA21DE4C /* Models */ = { + 4FBDCF1330A9AB9122780DB3 /* Models */ = { isa = PBXGroup; children = ( - 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */, - 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */, - 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */, - A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */, - 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */, - B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */, - F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */, - A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */, - 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */, - 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */, - 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */, - 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */, - A913A57E72D723632E9A718FF4525C81 /* Client.swift */, - C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */, - A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */, - 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */, - 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */, - FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */, - 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */, - 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */, - 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */, - 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */, - 7A6070F581E611FF44AFD40A4315C49A /* List.swift */, - 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */, - 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */, - 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */, - 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */, - B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */, - 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */, - F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */, - C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */, - ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */, - 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */, - C81447828475F76C5CF4F08AA65292F7 /* Return.swift */, - 386FD590658E90509C121118F057604D /* SpecialModelName.swift */, - 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */, - B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */, - EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */, - 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */, - E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */, - A2253391845B73B8BA3680491575CC07 /* XmlItem.swift */, + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, + 95568E7C35F119EB4A12B498 /* Animal.swift */, + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, + 212AA914B7F1793A4E32C119 /* Cat.swift */, + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, + 6F2985D01F8D60A4B1925C69 /* Category.swift */, + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, + A913A57E72D723632E9A718F /* Client.swift */, + C6C3E1129526A353B963EFD7 /* Dog.swift */, + A21A69C8402A60E01116ABBD /* DogAllOf.swift */, + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, + 3933D3B2A3AC4577094D0C23 /* File.swift */, + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, + 3156CE41C001C80379B84BDB /* FormatTest.swift */, + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, + 7A6070F581E611FF44AFD40A /* List.swift */, + 7986861626C2B1CB49AD7000 /* MapTest.swift */, + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, + 5AD994DFAA0DA93C188A4DBA /* Name.swift */, + B8E0B16084741FCB82389F58 /* NumberOnly.swift */, + 27B2E9EF856E89FEAA359A3A /* Order.swift */, + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, + C81447828475F76C5CF4F08A /* Return.swift */, + 386FD590658E90509C121118 /* SpecialModelName.swift */, + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, + B2896F8BFD1AA2965C8A3015 /* Tag.swift */, + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, + E5565A447062C7B8F695F451 /* User.swift */, + A2253391845B73B8BA368049 /* XmlItem.swift */, ); path = Models; sourceTree = ""; }; - 5FBA6AE5F64CD737F88B4565AC3CCD3B = { + 5FBA6AE5F64CD737F88B4565 = { isa = PBXGroup; children = ( - 9B364C01750D7AA4F983B9E77B01BCC6 /* PetstoreClient */, - 1E464C0937FE0D3A7A0FE29AF446553C /* Frameworks */, - 857F0DEA1890CE66D6DAD556C55821A6 /* Products */, + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, + 1E464C0937FE0D3A7A0FE29A /* Frameworks */, + 857F0DEA1890CE66D6DAD556 /* Products */, ); sourceTree = ""; }; - 67BF3478113E6B4DF1C4E04F40BF58C4 /* OpenAPIs */ = { + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { isa = PBXGroup; children = ( - 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */, - 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */, - 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */, - 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */, - 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */, - B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */, - 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */, - 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */, - 8699F7966F748ED026A6FB4CF550442B /* Models.swift */, - F956D0CCAE23BCFD1C7BDD5D47944AA5 /* APIs */, - 4FBDCF1330A9AB9122780DB3FA21DE4C /* Models */, + 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */, + 897716962D472FE162B723CB /* APIHelper.swift */, + 37DF825B8F3BADA2B2537D17 /* APIs.swift */, + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, + 28A444949BBC254798C3B3DD /* Configuration.swift */, + B8C298FC8929DCB369053F11 /* Extensions.swift */, + 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */, + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, + 8699F7966F748ED026A6FB4C /* Models.swift */, + F956D0CCAE23BCFD1C7BDD5D /* APIs */, + 4FBDCF1330A9AB9122780DB3 /* Models */, ); path = OpenAPIs; sourceTree = ""; }; - 7861EE241895128F64DD787367B3022D /* Carthage */ = { + 7861EE241895128F64DD7873 /* Carthage */ = { isa = PBXGroup; children = ( - A012205B41CB71A62B86EECDEAFB0990 /* iOS */, + A012205B41CB71A62B86EECD /* iOS */, ); name = Carthage; path = Carthage/Build; sourceTree = ""; }; - 857F0DEA1890CE66D6DAD556C55821A6 /* Products */ = { + 857F0DEA1890CE66D6DAD556 /* Products */ = { isa = PBXGroup; children = ( - 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */, + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, ); name = Products; sourceTree = ""; }; - 9B364C01750D7AA4F983B9E77B01BCC6 /* PetstoreClient */ = { + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { isa = PBXGroup; children = ( - EF4C81BDD734856ED5023B777D35098B /* Classes */, + EF4C81BDD734856ED5023B77 /* Classes */, ); path = PetstoreClient; sourceTree = ""; }; - A012205B41CB71A62B86EECDEAFB0990 /* iOS */ = { + A012205B41CB71A62B86EECD /* iOS */ = { isa = PBXGroup; children = ( - A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */, - A586582C92491DF9C12D27E2CB7F0695 /* PromiseKit.framework */, + A235FA3FDFB086CC69CDE83D /* Alamofire.framework */, + A586582C92491DF9C12D27E2 /* PromiseKit.framework */, ); path = iOS; sourceTree = ""; }; - EF4C81BDD734856ED5023B777D35098B /* Classes */ = { + EF4C81BDD734856ED5023B77 /* Classes */ = { isa = PBXGroup; children = ( - 67BF3478113E6B4DF1C4E04F40BF58C4 /* OpenAPIs */, + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, ); path = Classes; sourceTree = ""; }; - F956D0CCAE23BCFD1C7BDD5D47944AA5 /* APIs */ = { + F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { isa = PBXGroup; children = ( - 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */, - 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */, - B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */, - 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */, - A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */, - 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */, + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, + 6E00950725DC44436C5E238C /* FakeAPI.swift */, + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, + 9A019F500E546A3292CE716A /* PetAPI.swift */, + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, ); path = APIs; sourceTree = ""; @@ -283,12 +283,12 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - C1282C2230015E0D204BEAEDDFB49453 /* PetstoreClient */ = { + C1282C2230015E0D204BEAED /* PetstoreClient */ = { isa = PBXNativeTarget; - buildConfigurationList = B46EDEB1A7F0D78FE6394544C60169D1 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; buildPhases = ( - E539708354CE60FE486F81EDE56D13C8 /* Sources */, - D1990C2A394CCF025EF98A2FB828C79A /* Frameworks */, + E539708354CE60FE486F81ED /* Sources */, + D1990C2A394CCF025EF98A2F /* Frameworks */, ); buildRules = ( ); @@ -296,101 +296,101 @@ ); name = PetstoreClient; productName = PetstoreClient; - productReference = 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */; + productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - E7D276EE2369D8C455513C2E05F9AED0 /* Project object */ = { + E7D276EE2369D8C455513C2E /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1000; + LastUpgradeCheck = 1020; }; - buildConfigurationList = ECAB17FF35111B5E14DAAC0883031714 /* Build configuration list for PBXProject "PetstoreClient" */; - compatibilityVersion = "Xcode 9.3"; + buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; + compatibilityVersion = "Xcode 10.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, ); - mainGroup = 5FBA6AE5F64CD737F88B4565AC3CCD3B; + mainGroup = 5FBA6AE5F64CD737F88B4565; projectDirPath = ""; projectRoot = ""; targets = ( - C1282C2230015E0D204BEAEDDFB49453 /* PetstoreClient */, + C1282C2230015E0D204BEAED /* PetstoreClient */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ - E539708354CE60FE486F81EDE56D13C8 /* Sources */ = { + E539708354CE60FE486F81ED /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2A35688C985E9CB1EB7732AC2AD46B82 /* APIHelper.swift in Sources */, - 0462F801432CF94C7EF51D0532737A7E /* APIs.swift in Sources */, - 12327BF7304AA897C5D2A1250B1659B7 /* AdditionalPropertiesClass.swift in Sources */, - 58F9704B295AC436D6FB98FA669E2344 /* AlamofireImplementations.swift in Sources */, - 02903CEC38DC202565BC08CB040AC4E9 /* Animal.swift in Sources */, - DB1CE39011A741D07E187663291B5DE5 /* AnimalFarm.swift in Sources */, - 83A2D1863FB136C0DFC423319F4EED65 /* AnotherFakeAPI.swift in Sources */, - 97C99615237E1B662242E04F527B38B9 /* ApiResponse.swift in Sources */, - 3251A3722981CE46261615CFBA96A08D /* ArrayOfArrayOfNumberOnly.swift in Sources */, - A190AF5A3988639ED4B78163D0EA3CA4 /* ArrayOfNumberOnly.swift in Sources */, - C2EDEB747887399B13A6DFD72A219CB2 /* ArrayTest.swift in Sources */, - 7367A9D91D4B101F2D28AC56ED89F175 /* Capitalization.swift in Sources */, - 18F19872A0DFB4CC3D9C696BBCA64EFD /* Cat.swift in Sources */, - 41D8A105135868152A56E2AC475049BB /* CatAllOf.swift in Sources */, - 42C51BC034E8B0CAA29A068F6B0DC815 /* Category.swift in Sources */, - 5ACDD7CC312167589335E9CA5998E770 /* ClassModel.swift in Sources */, - 92FB161BF1E57D11B116AF0292D5835C /* Client.swift in Sources */, - 6CD20EE568DDAD2304BF0C4B1A70C8DC /* CodableHelper.swift in Sources */, - DEC892724574BB29BD65869374F83982 /* Configuration.swift in Sources */, - D70EC94E346077DE1482231DD4498BED /* Dog.swift in Sources */, - 271D94A05C47B602A2433B9CD3D9DCDC /* DogAllOf.swift in Sources */, - A438970025AE69ED407BC1E67CC6359E /* EnumArrays.swift in Sources */, - 59C00CBB07761CAC8DCE7054E34AD5D9 /* EnumClass.swift in Sources */, - 08D87E4FECF24910F0DA0F1D2E2D955A /* EnumTest.swift in Sources */, - C329EE55B2FCC9174ED3B128D67C5E8C /* Extensions.swift in Sources */, - 297E365D1E4672C43C56E0AFD855FFBF /* FakeAPI.swift in Sources */, - A9F1AAF6CE029DD3B4F8AC841F0B6BC6 /* FakeClassnameTags123API.swift in Sources */, - FECA03F0388E84AE1B22638605D8AC9F /* File.swift in Sources */, - 491676EC91BFEF95A12556888EED87B5 /* FileSchemaTestClass.swift in Sources */, - 36734C4EB3362A114A7CB5F25EE39E6D /* FormatTest.swift in Sources */, - DDBC3CF5E447D8D838F0FE200420EEE3 /* HasOnlyReadOnly.swift in Sources */, - 16E9A5E22B4823DE282E7F4C18A21EA8 /* JSONEncodableEncoding.swift in Sources */, - 12BB95C66D63090732BB9E0379836E3C /* JSONEncodingHelper.swift in Sources */, - C1CACABE18A7ADCE37D1CD9DC9128304 /* List.swift in Sources */, - 655AA371771C7BD72EE0AAC0C90DFFF0 /* MapTest.swift in Sources */, - D3A17B7FAFA8A7A210875BBCDCC30116 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, - 2DF4544D4D3D6CF7047A59FB89ED31BD /* Model200Response.swift in Sources */, - F02BEF9A8503B3848B045370451E85F6 /* Models.swift in Sources */, - C15AC1CC631E96D0360EB8C15BF30452 /* Name.swift in Sources */, - AE9D2E1DB59AF6575AC4AC6756C5A937 /* NumberOnly.swift in Sources */, - 59C2F5495C98836BFA9E10BF5C13BC2C /* Order.swift in Sources */, - 82D4D0C8AD0354A700C8ACD421ABED55 /* OuterComposite.swift in Sources */, - 1143FFF06DEE01E5B0F1368AA05BE1B4 /* OuterEnum.swift in Sources */, - B399A1742F23330FDCA450EAB98F51F1 /* Pet.swift in Sources */, - 3D8E407B1DF4FA5A5F16B64E3A285781 /* PetAPI.swift in Sources */, - 293F4E0FBFC8297E414A3CDBB7F29A96 /* ReadOnlyFirst.swift in Sources */, - F21D10C71A9DE7D0467AFD23FD391D2E /* Return.swift in Sources */, - E2C40F0E34DB8C21A806262C72841A51 /* SpecialModelName.swift in Sources */, - 122BBAE8245606CC040EEB6B9254E376 /* StoreAPI.swift in Sources */, - 196E9846B27D736630CCF90497696859 /* StringBooleanMap.swift in Sources */, - E51ADEC931806B20A041303E539A8BE2 /* Tag.swift in Sources */, - 6600BB1500AE35A3C80F7C83F6444552 /* TypeHolderDefault.swift in Sources */, - FB4A053CDCD75E48B755CC22D463A3FC /* TypeHolderExample.swift in Sources */, - BF7D58FBCF5E4D3F2932FCC0E62BED40 /* User.swift in Sources */, - DB724C4F1AD5DF025B53A9A2E0A49E3D /* UserAPI.swift in Sources */, - BB02FDCF1B2B0E457E1C2BF39FBB599D /* XmlItem.swift in Sources */, + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, + 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */, + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, + AD594BFB99E31A5E07579237 /* Client.swift in Sources */, + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, + 72547ECFB451A509409311EE /* Configuration.swift in Sources */, + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, + 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */, + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, + 3EA765BDC5A11401D8A16536 /* XmlItem.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ - 3B2C02AFB91CB5C82766ED5CF21FF628 /* Release */ = { + 3B2C02AFB91CB5C82766ED5C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; @@ -407,7 +407,10 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -415,7 +418,7 @@ }; name = Release; }; - A9EB0A02B94C427CBACFEC7CFFC6A816 /* Debug */ = { + A9EB0A02B94C427CBACFEC7C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -470,11 +473,11 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; - DD3EEB93949E9EBA4437E9CDBF4A26F6 /* Debug */ = { + DD3EEB93949E9EBA4437E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; @@ -491,7 +494,10 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -499,7 +505,7 @@ }; name = Debug; }; - F81D4E5FECD46E9AA6DD2C299CEBEF64 /* Release */ = { + F81D4E5FECD46E9AA6DD2C29 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -544,8 +550,8 @@ GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; VALIDATE_PRODUCT = YES; }; name = Release; @@ -553,25 +559,25 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - B46EDEB1A7F0D78FE6394544C60169D1 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { isa = XCConfigurationList; buildConfigurations = ( - DD3EEB93949E9EBA4437E9CDBF4A26F6 /* Debug */, - 3B2C02AFB91CB5C82766ED5CF21FF628 /* Release */, + DD3EEB93949E9EBA4437E9CD /* Debug */, + 3B2C02AFB91CB5C82766ED5C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = ""; }; - ECAB17FF35111B5E14DAAC0883031714 /* Build configuration list for PBXProject "PetstoreClient" */ = { + ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { isa = XCConfigurationList; buildConfigurations = ( - A9EB0A02B94C427CBACFEC7CFFC6A816 /* Debug */, - F81D4E5FECD46E9AA6DD2C299CEBEF64 /* Release */, + A9EB0A02B94C427CBACFEC7C /* Debug */, + F81D4E5FECD46E9AA6DD2C29 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; /* End XCConfigurationList section */ }; - rootObject = E7D276EE2369D8C455513C2E05F9AED0 /* Project object */; + rootObject = E7D276EE2369D8C455513C2E /* Project object */; } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift4/promisekit/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme index 7802e379453b..e8ac84fa9929 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme @@ -1,6 +1,6 @@ @@ -32,7 +32,7 @@ @@ -42,6 +42,8 @@ + + @@ -77,7 +79,7 @@ runnableDebuggingMode = "0"> diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 2a2e7ab048a8..7aa5c9c54155 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -20,9 +20,9 @@ open class AnotherFakeAPI { let deferred = Promise.pending() call123testSpecialTagsWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index d0c22ac86965..d5c10dc11878 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -19,9 +19,9 @@ open class FakeAPI { let deferred = Promise.pending() fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -56,9 +56,9 @@ open class FakeAPI { let deferred = Promise.pending() fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -93,9 +93,9 @@ open class FakeAPI { let deferred = Promise.pending() fakeOuterNumberSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -130,9 +130,9 @@ open class FakeAPI { let deferred = Promise.pending() fakeOuterStringSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -167,9 +167,9 @@ open class FakeAPI { let deferred = Promise.pending() testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -203,9 +203,9 @@ open class FakeAPI { let deferred = Promise.pending() testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -242,9 +242,9 @@ open class FakeAPI { let deferred = Promise.pending() testClientModelWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -294,9 +294,9 @@ open class FakeAPI { let deferred = Promise.pending() testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -439,9 +439,9 @@ open class FakeAPI { let deferred = Promise.pending() testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -505,9 +505,9 @@ open class FakeAPI { let deferred = Promise.pending() testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -558,9 +558,9 @@ open class FakeAPI { let deferred = Promise.pending() testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -595,9 +595,9 @@ open class FakeAPI { let deferred = Promise.pending() testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index a6bb118c5823..309f70b47cf5 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -20,9 +20,9 @@ open class FakeClassnameTags123API { let deferred = Promise.pending() testClassnameWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 55d39cf88fd2..29f579c96146 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -20,9 +20,9 @@ open class PetAPI { let deferred = Promise.pending() addPetWithRequestBuilder(body: body).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -60,9 +60,9 @@ open class PetAPI { let deferred = Promise.pending() deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -116,9 +116,9 @@ open class PetAPI { let deferred = Promise<[Pet]>.pending() findPetsByStatusWithRequestBuilder(status: status).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -161,9 +161,9 @@ open class PetAPI { let deferred = Promise<[Pet]>.pending() findPetsByTagsWithRequestBuilder(tags: tags).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -206,9 +206,9 @@ open class PetAPI { let deferred = Promise.pending() getPetByIdWithRequestBuilder(petId: petId).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -251,9 +251,9 @@ open class PetAPI { let deferred = Promise.pending() updatePetWithRequestBuilder(body: body).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -292,9 +292,9 @@ open class PetAPI { let deferred = Promise.pending() updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -344,9 +344,9 @@ open class PetAPI { let deferred = Promise.pending() uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -398,9 +398,9 @@ open class PetAPI { let deferred = Promise.pending() uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index 05b2e4ce463f..41eb3f85acbe 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -20,9 +20,9 @@ open class StoreAPI { let deferred = Promise.pending() deleteOrderWithRequestBuilder(orderId: orderId).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -59,9 +59,9 @@ open class StoreAPI { let deferred = Promise<[String: Int]>.pending() getInventoryWithRequestBuilder().execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -100,9 +100,9 @@ open class StoreAPI { let deferred = Promise.pending() getOrderByIdWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -142,9 +142,9 @@ open class StoreAPI { let deferred = Promise.pending() placeOrderWithRequestBuilder(body: body).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index 3c10309130f3..40c2b88f21d8 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -20,9 +20,9 @@ open class UserAPI { let deferred = Promise.pending() createUserWithRequestBuilder(body: body).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -57,9 +57,9 @@ open class UserAPI { let deferred = Promise.pending() createUsersWithArrayInputWithRequestBuilder(body: body).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -93,9 +93,9 @@ open class UserAPI { let deferred = Promise.pending() createUsersWithListInputWithRequestBuilder(body: body).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -129,9 +129,9 @@ open class UserAPI { let deferred = Promise.pending() deleteUserWithRequestBuilder(username: username).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -169,9 +169,9 @@ open class UserAPI { let deferred = Promise.pending() getUserByNameWithRequestBuilder(username: username).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -211,9 +211,9 @@ open class UserAPI { let deferred = Promise.pending() loginUserWithRequestBuilder(username: username, password: password).execute { (response, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else if let response = response { - deferred.fulfill(response.body!) + deferred.resolver.fulfill(response.body!) } else { fatalError() } @@ -254,9 +254,9 @@ open class UserAPI { let deferred = Promise.pending() logoutUserWithRequestBuilder().execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise @@ -290,9 +290,9 @@ open class UserAPI { let deferred = Promise.pending() updateUserWithRequestBuilder(username: username, body: body).execute { (_, error) -> Void in if let error = error { - deferred.reject(error) + deferred.resolver.reject(error) } else { - deferred.fulfill(()) + deferred.resolver.fulfill(()) } } return deferred.promise diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/Extensions.swift index b07e60d99e3c..2365ab6057d8 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -182,9 +182,9 @@ extension RequestBuilder { let deferred = Promise>.pending() self.execute { (response: Response?, error: Error?) in if let response = response { - deferred.fulfill(response) + deferred.resolver.fulfill(response) } else { - deferred.reject(error!) + deferred.resolver.reject(error!) } } return deferred.promise diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift index 20c3672fbaf2..036e1df7cd50 100644 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift +++ b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift @@ -135,8 +135,7 @@ public func request( parameters: Parameters? = nil, encoding: ParameterEncoding = URLEncoding.default, headers: HTTPHeaders? = nil) - -> DataRequest -{ + -> DataRequest { return SessionManager.default.request( url, method: method, @@ -183,8 +182,7 @@ public func download( encoding: ParameterEncoding = URLEncoding.default, headers: HTTPHeaders? = nil, to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest -{ + -> DownloadRequest { return SessionManager.default.download( url, method: method, @@ -209,8 +207,7 @@ public func download( public func download( _ urlRequest: URLRequestConvertible, to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest -{ + -> DownloadRequest { return SessionManager.default.download(urlRequest, to: destination) } @@ -239,8 +236,7 @@ public func download( public func download( resumingWith resumeData: Data, to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest -{ + -> DownloadRequest { return SessionManager.default.download(resumingWith: resumeData, to: destination) } @@ -263,8 +259,7 @@ public func upload( to url: URLConvertible, method: HTTPMethod = .post, headers: HTTPHeaders? = nil) - -> UploadRequest -{ + -> UploadRequest { return SessionManager.default.upload(fileURL, to: url, method: method, headers: headers) } @@ -297,8 +292,7 @@ public func upload( to url: URLConvertible, method: HTTPMethod = .post, headers: HTTPHeaders? = nil) - -> UploadRequest -{ + -> UploadRequest { return SessionManager.default.upload(data, to: url, method: method, headers: headers) } @@ -331,8 +325,7 @@ public func upload( to url: URLConvertible, method: HTTPMethod = .post, headers: HTTPHeaders? = nil) - -> UploadRequest -{ + -> UploadRequest { return SessionManager.default.upload(stream, to: url, method: method, headers: headers) } @@ -379,8 +372,7 @@ public func upload( to url: URLConvertible, method: HTTPMethod = .post, headers: HTTPHeaders? = nil, - encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) -{ + encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) { return SessionManager.default.upload( multipartFormData: multipartFormData, usingThreshold: encodingMemoryThreshold, @@ -416,8 +408,7 @@ public func upload( multipartFormData: @escaping (MultipartFormData) -> Void, usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, with urlRequest: URLRequestConvertible, - encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) -{ + encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) { return SessionManager.default.upload( multipartFormData: multipartFormData, usingThreshold: encodingMemoryThreshold, diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift index b840138ccc15..7df468a011c8 100644 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift +++ b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift @@ -275,8 +275,7 @@ open class MultipartFormData { } bodyContentLength = fileSize.uint64Value - } - catch { + } catch { setBodyPartError(withReason: .bodyPartFileSizeQueryFailedWithError(forURL: fileURL, error: error)) return } @@ -312,8 +311,7 @@ open class MultipartFormData { withLength length: UInt64, name: String, fileName: String, - mimeType: String) - { + mimeType: String) { let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) append(stream, withLength: length, headers: headers) } diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift index 398ca827c2b0..fa0647934f67 100644 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift +++ b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift @@ -148,8 +148,7 @@ open class NetworkReachabilityManager { context.info = Unmanaged.passUnretained(self).toOpaque() let callbackEnabled = SCNetworkReachabilitySetCallback( - reachability, - { (_, flags, info) in + reachability, { (_, flags, info) in let reachability = Unmanaged.fromOpaque(info!).takeUnretainedValue() reachability.notifyListener(flags) }, @@ -221,8 +220,7 @@ extension NetworkReachabilityManager.NetworkReachabilityStatus: Equatable {} public func ==( lhs: NetworkReachabilityManager.NetworkReachabilityStatus, rhs: NetworkReachabilityManager.NetworkReachabilityStatus) - -> Bool -{ + -> Bool { switch (lhs, rhs) { case (.unknown, .unknown): return true diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift index 6195809c5db9..dc8e75e847df 100644 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift +++ b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift @@ -435,8 +435,7 @@ public struct PropertyListEncoding: ParameterEncoding { /// - returns: The new `PropertyListEncoding` instance. public init( format: PropertyListSerialization.PropertyListFormat = .xml, - options: PropertyListSerialization.WriteOptions = 0) - { + options: PropertyListSerialization.WriteOptions = 0) { self.format = format self.options = options } diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Request.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Request.swift index 2be2ce0106fa..9cd75057cae2 100644 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Request.swift +++ b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Request.swift @@ -161,8 +161,7 @@ open class Request { user: String, password: String, persistence: URLCredential.Persistence = .forSession) - -> Self - { + -> Self { let credential = URLCredential(user: user, password: password, persistence: persistence) return authenticate(usingCredential: credential) } @@ -544,8 +543,7 @@ open class DownloadRequest: Request { open class func suggestedDownloadDestination( for directory: FileManager.SearchPathDirectory = .documentDirectory, in domain: FileManager.SearchPathDomainMask = .userDomainMask) - -> DownloadFileDestination - { + -> DownloadFileDestination { return { temporaryURL, response in let directoryURLs = FileManager.default.urls(for: directory, in: domain) diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift index 747a471a55ba..88d09e33ff8e 100644 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift +++ b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift @@ -58,8 +58,7 @@ public struct DefaultDataResponse { data: Data?, error: Error?, timeline: Timeline = Timeline(), - metrics: AnyObject? = nil) - { + metrics: AnyObject? = nil) { self.request = request self.response = response self.data = data @@ -109,8 +108,7 @@ public struct DataResponse { response: HTTPURLResponse?, data: Data?, result: Result, - timeline: Timeline = Timeline()) - { + timeline: Timeline = Timeline()) { self.request = request self.response = response self.data = data @@ -296,8 +294,7 @@ public struct DefaultDownloadResponse { resumeData: Data?, error: Error?, timeline: Timeline = Timeline(), - metrics: AnyObject? = nil) - { + metrics: AnyObject? = nil) { self.request = request self.response = response self.temporaryURL = temporaryURL @@ -359,8 +356,7 @@ public struct DownloadResponse { destinationURL: URL?, resumeData: Data?, result: Result, - timeline: Timeline = Timeline()) - { + timeline: Timeline = Timeline()) { self.request = request self.response = response self.temporaryURL = temporaryURL diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift index 9cc105a82057..b8f5b65b204d 100644 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift +++ b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift @@ -144,8 +144,7 @@ extension DataRequest { queue: DispatchQueue? = nil, responseSerializer: T, completionHandler: @escaping (DataResponse) -> Void) - -> Self - { + -> Self { delegate.queue.addOperation { let result = responseSerializer.serializeResponse( self.request, @@ -182,8 +181,7 @@ extension DownloadRequest { public func response( queue: DispatchQueue? = nil, completionHandler: @escaping (DefaultDownloadResponse) -> Void) - -> Self - { + -> Self { delegate.queue.addOperation { (queue ?? DispatchQueue.main).async { var downloadResponse = DefaultDownloadResponse( @@ -218,8 +216,7 @@ extension DownloadRequest { queue: DispatchQueue? = nil, responseSerializer: T, completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { + -> Self { delegate.queue.addOperation { let result = responseSerializer.serializeResponse( self.request, @@ -289,8 +286,7 @@ extension DataRequest { public func responseData( queue: DispatchQueue? = nil, completionHandler: @escaping (DataResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DataRequest.dataResponseSerializer(), @@ -329,8 +325,7 @@ extension DownloadRequest { public func responseData( queue: DispatchQueue? = nil, completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DownloadRequest.dataResponseSerializer(), @@ -356,8 +351,7 @@ extension Request { response: HTTPURLResponse?, data: Data?, error: Error?) - -> Result - { + -> Result { guard error == nil else { return .failure(error!) } if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success("") } @@ -411,8 +405,7 @@ extension DataRequest { queue: DispatchQueue? = nil, encoding: String.Encoding? = nil, completionHandler: @escaping (DataResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DataRequest.stringResponseSerializer(encoding: encoding), @@ -459,8 +452,7 @@ extension DownloadRequest { queue: DispatchQueue? = nil, encoding: String.Encoding? = nil, completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DownloadRequest.stringResponseSerializer(encoding: encoding), @@ -486,8 +478,7 @@ extension Request { response: HTTPURLResponse?, data: Data?, error: Error?) - -> Result - { + -> Result { guard error == nil else { return .failure(error!) } if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(NSNull()) } @@ -514,8 +505,7 @@ extension DataRequest { /// - returns: A JSON object response serializer. public static func jsonResponseSerializer( options: JSONSerialization.ReadingOptions = .allowFragments) - -> DataResponseSerializer - { + -> DataResponseSerializer { return DataResponseSerializer { _, response, data, error in return Request.serializeResponseJSON(options: options, response: response, data: data, error: error) } @@ -532,8 +522,7 @@ extension DataRequest { queue: DispatchQueue? = nil, options: JSONSerialization.ReadingOptions = .allowFragments, completionHandler: @escaping (DataResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DataRequest.jsonResponseSerializer(options: options), @@ -551,8 +540,7 @@ extension DownloadRequest { /// - returns: A JSON object response serializer. public static func jsonResponseSerializer( options: JSONSerialization.ReadingOptions = .allowFragments) - -> DownloadResponseSerializer - { + -> DownloadResponseSerializer { return DownloadResponseSerializer { _, response, fileURL, error in guard error == nil else { return .failure(error!) } @@ -580,8 +568,7 @@ extension DownloadRequest { queue: DispatchQueue? = nil, options: JSONSerialization.ReadingOptions = .allowFragments, completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DownloadRequest.jsonResponseSerializer(options: options), @@ -607,8 +594,7 @@ extension Request { response: HTTPURLResponse?, data: Data?, error: Error?) - -> Result - { + -> Result { guard error == nil else { return .failure(error!) } if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(NSNull()) } @@ -635,8 +621,7 @@ extension DataRequest { /// - returns: A property list object response serializer. public static func propertyListResponseSerializer( options: PropertyListSerialization.ReadOptions = []) - -> DataResponseSerializer - { + -> DataResponseSerializer { return DataResponseSerializer { _, response, data, error in return Request.serializeResponsePropertyList(options: options, response: response, data: data, error: error) } @@ -653,8 +638,7 @@ extension DataRequest { queue: DispatchQueue? = nil, options: PropertyListSerialization.ReadOptions = [], completionHandler: @escaping (DataResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DataRequest.propertyListResponseSerializer(options: options), @@ -672,8 +656,7 @@ extension DownloadRequest { /// - returns: A property list object response serializer. public static func propertyListResponseSerializer( options: PropertyListSerialization.ReadOptions = []) - -> DownloadResponseSerializer - { + -> DownloadResponseSerializer { return DownloadResponseSerializer { _, response, fileURL, error in guard error == nil else { return .failure(error!) } @@ -701,8 +684,7 @@ extension DownloadRequest { queue: DispatchQueue? = nil, options: PropertyListSerialization.ReadOptions = [], completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DownloadRequest.propertyListResponseSerializer(options: options), diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift index dea099e257ab..ad4d5632a019 100644 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift +++ b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift @@ -249,7 +249,6 @@ public enum ServerTrustPolicy { let unspecified = SecTrustResultType.unspecified let proceed = SecTrustResultType.proceed - isValid = result == unspecified || result == proceed } diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift index 4964f1eebfd7..5cf4a385b2a5 100644 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift +++ b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift @@ -255,8 +255,7 @@ extension SessionDelegate: URLSessionDelegate { open func urlSession( _ session: URLSession, didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { + completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { guard sessionDidReceiveChallengeWithCompletion == nil else { sessionDidReceiveChallengeWithCompletion?(session, challenge, completionHandler) return @@ -315,8 +314,7 @@ extension SessionDelegate: URLSessionTaskDelegate { task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, - completionHandler: @escaping (URLRequest?) -> Void) - { + completionHandler: @escaping (URLRequest?) -> Void) { guard taskWillPerformHTTPRedirectionWithCompletion == nil else { taskWillPerformHTTPRedirectionWithCompletion?(session, task, response, request, completionHandler) return @@ -342,8 +340,7 @@ extension SessionDelegate: URLSessionTaskDelegate { _ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { + completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { guard taskDidReceiveChallengeWithCompletion == nil else { taskDidReceiveChallengeWithCompletion?(session, task, challenge, completionHandler) return @@ -372,8 +369,7 @@ extension SessionDelegate: URLSessionTaskDelegate { open func urlSession( _ session: URLSession, task: URLSessionTask, - needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) - { + needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) { guard taskNeedNewBodyStreamWithCompletion == nil else { taskNeedNewBodyStreamWithCompletion?(session, task, completionHandler) return @@ -398,8 +394,7 @@ extension SessionDelegate: URLSessionTaskDelegate { task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { + totalBytesExpectedToSend: Int64) { if let taskDidSendBodyData = taskDidSendBodyData { taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) } else if let delegate = self[task]?.delegate as? UploadTaskDelegate { @@ -512,8 +507,7 @@ extension SessionDelegate: URLSessionDataDelegate { _ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, - completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) - { + completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) { guard dataTaskDidReceiveResponseWithCompletion == nil else { dataTaskDidReceiveResponseWithCompletion?(session, dataTask, response, completionHandler) return @@ -536,8 +530,7 @@ extension SessionDelegate: URLSessionDataDelegate { open func urlSession( _ session: URLSession, dataTask: URLSessionDataTask, - didBecome downloadTask: URLSessionDownloadTask) - { + didBecome downloadTask: URLSessionDownloadTask) { if let dataTaskDidBecomeDownloadTask = dataTaskDidBecomeDownloadTask { dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask) } else { @@ -573,8 +566,7 @@ extension SessionDelegate: URLSessionDataDelegate { _ session: URLSession, dataTask: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse, - completionHandler: @escaping (CachedURLResponse?) -> Void) - { + completionHandler: @escaping (CachedURLResponse?) -> Void) { guard dataTaskWillCacheResponseWithCompletion == nil else { dataTaskWillCacheResponseWithCompletion?(session, dataTask, proposedResponse, completionHandler) return @@ -608,8 +600,7 @@ extension SessionDelegate: URLSessionDownloadDelegate { open func urlSession( _ session: URLSession, downloadTask: URLSessionDownloadTask, - didFinishDownloadingTo location: URL) - { + didFinishDownloadingTo location: URL) { if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL { downloadTaskDidFinishDownloadingToURL(session, downloadTask, location) } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { @@ -632,8 +623,7 @@ extension SessionDelegate: URLSessionDownloadDelegate { downloadTask: URLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { + totalBytesExpectedToWrite: Int64) { if let downloadTaskDidWriteData = downloadTaskDidWriteData { downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { @@ -661,8 +651,7 @@ extension SessionDelegate: URLSessionDownloadDelegate { _ session: URLSession, downloadTask: URLSessionDownloadTask, didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { + expectedTotalBytes: Int64) { if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { @@ -716,8 +705,7 @@ extension SessionDelegate: URLSessionStreamDelegate { _ session: URLSession, streamTask: URLSessionStreamTask, didBecome inputStream: InputStream, - outputStream: OutputStream) - { + outputStream: OutputStream) { streamTaskDidBecomeInputAndOutputStreams?(session, streamTask, inputStream, outputStream) } } diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift index 02c36a76b7b4..19725f287e0c 100644 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift +++ b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift @@ -166,8 +166,7 @@ open class SessionManager { public init( configuration: URLSessionConfiguration = URLSessionConfiguration.default, delegate: SessionDelegate = SessionDelegate(), - serverTrustPolicyManager: ServerTrustPolicyManager? = nil) - { + serverTrustPolicyManager: ServerTrustPolicyManager? = nil) { self.delegate = delegate self.session = URLSession(configuration: configuration, delegate: delegate, delegateQueue: nil) @@ -185,8 +184,7 @@ open class SessionManager { public init?( session: URLSession, delegate: SessionDelegate, - serverTrustPolicyManager: ServerTrustPolicyManager? = nil) - { + serverTrustPolicyManager: ServerTrustPolicyManager? = nil) { guard delegate === session.delegate else { return nil } self.delegate = delegate @@ -229,8 +227,7 @@ open class SessionManager { parameters: Parameters? = nil, encoding: ParameterEncoding = URLEncoding.default, headers: HTTPHeaders? = nil) - -> DataRequest - { + -> DataRequest { var originalRequest: URLRequest? do { @@ -320,8 +317,7 @@ open class SessionManager { encoding: ParameterEncoding = URLEncoding.default, headers: HTTPHeaders? = nil, to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest - { + -> DownloadRequest { do { let urlRequest = try URLRequest(url: url, method: method, headers: headers) let encodedURLRequest = try encoding.encode(urlRequest, with: parameters) @@ -347,8 +343,7 @@ open class SessionManager { open func download( _ urlRequest: URLRequestConvertible, to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest - { + -> DownloadRequest { do { let urlRequest = try urlRequest.asURLRequest() return download(.request(urlRequest), to: destination) @@ -384,8 +379,7 @@ open class SessionManager { open func download( resumingWith resumeData: Data, to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest - { + -> DownloadRequest { return download(.resumeData(resumeData), to: destination) } @@ -394,8 +388,7 @@ open class SessionManager { private func download( _ downloadable: DownloadRequest.Downloadable, to destination: DownloadRequest.DownloadFileDestination?) - -> DownloadRequest - { + -> DownloadRequest { do { let task = try downloadable.task(session: session, adapter: adapter, queue: queue) let download = DownloadRequest(session: session, requestTask: .download(downloadable, task)) @@ -416,8 +409,7 @@ open class SessionManager { _ downloadable: DownloadRequest.Downloadable?, to destination: DownloadRequest.DownloadFileDestination?, failedWith error: Error) - -> DownloadRequest - { + -> DownloadRequest { var downloadTask: Request.RequestTask = .download(nil, nil) if let downloadable = downloadable { @@ -458,8 +450,7 @@ open class SessionManager { to url: URLConvertible, method: HTTPMethod = .post, headers: HTTPHeaders? = nil) - -> UploadRequest - { + -> UploadRequest { do { let urlRequest = try URLRequest(url: url, method: method, headers: headers) return upload(fileURL, with: urlRequest) @@ -504,8 +495,7 @@ open class SessionManager { to url: URLConvertible, method: HTTPMethod = .post, headers: HTTPHeaders? = nil) - -> UploadRequest - { + -> UploadRequest { do { let urlRequest = try URLRequest(url: url, method: method, headers: headers) return upload(data, with: urlRequest) @@ -550,8 +540,7 @@ open class SessionManager { to url: URLConvertible, method: HTTPMethod = .post, headers: HTTPHeaders? = nil) - -> UploadRequest - { + -> UploadRequest { do { let urlRequest = try URLRequest(url: url, method: method, headers: headers) return upload(stream, with: urlRequest) @@ -612,8 +601,7 @@ open class SessionManager { method: HTTPMethod = .post, headers: HTTPHeaders? = nil, queue: DispatchQueue? = nil, - encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) - { + encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) { do { let urlRequest = try URLRequest(url: url, method: method, headers: headers) @@ -657,8 +645,7 @@ open class SessionManager { usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, with urlRequest: URLRequestConvertible, queue: DispatchQueue? = nil, - encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) - { + encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) { DispatchQueue.global(qos: .utility).async { let formData = MultipartFormData() multipartFormData(formData) diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift index 5705737e49d7..a25d80271d31 100644 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift +++ b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift @@ -94,8 +94,7 @@ open class TaskDelegate: NSObject { task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, - completionHandler: @escaping (URLRequest?) -> Void) - { + completionHandler: @escaping (URLRequest?) -> Void) { var redirectRequest: URLRequest? = request if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { @@ -110,8 +109,7 @@ open class TaskDelegate: NSObject { _ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { + completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling var credential: URLCredential? @@ -150,8 +148,7 @@ open class TaskDelegate: NSObject { func urlSession( _ session: URLSession, task: URLSessionTask, - needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) - { + needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) { var bodyStream: InputStream? if let taskNeedNewBodyStream = taskNeedNewBodyStream { @@ -237,8 +234,7 @@ class DataTaskDelegate: TaskDelegate, URLSessionDataDelegate { _ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, - completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) - { + completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) { var disposition: URLSession.ResponseDisposition = .allow expectedContentLength = response.expectedContentLength @@ -253,8 +249,7 @@ class DataTaskDelegate: TaskDelegate, URLSessionDataDelegate { func urlSession( _ session: URLSession, dataTask: URLSessionDataTask, - didBecome downloadTask: URLSessionDownloadTask) - { + didBecome downloadTask: URLSessionDownloadTask) { dataTaskDidBecomeDownloadTask?(session, dataTask, downloadTask) } @@ -287,8 +282,7 @@ class DataTaskDelegate: TaskDelegate, URLSessionDataDelegate { _ session: URLSession, dataTask: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse, - completionHandler: @escaping (CachedURLResponse?) -> Void) - { + completionHandler: @escaping (CachedURLResponse?) -> Void) { var cachedResponse: CachedURLResponse? = proposedResponse if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { @@ -343,8 +337,7 @@ class DownloadTaskDelegate: TaskDelegate, URLSessionDownloadDelegate { func urlSession( _ session: URLSession, downloadTask: URLSessionDownloadTask, - didFinishDownloadingTo location: URL) - { + didFinishDownloadingTo location: URL) { temporaryURL = location guard @@ -379,8 +372,7 @@ class DownloadTaskDelegate: TaskDelegate, URLSessionDownloadDelegate { downloadTask: URLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { + totalBytesExpectedToWrite: Int64) { if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } if let downloadTaskDidWriteData = downloadTaskDidWriteData { @@ -405,8 +397,7 @@ class DownloadTaskDelegate: TaskDelegate, URLSessionDownloadDelegate { _ session: URLSession, downloadTask: URLSessionDownloadTask, didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { + expectedTotalBytes: Int64) { if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) } else { @@ -448,8 +439,7 @@ class UploadTaskDelegate: DataTaskDelegate { task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { + totalBytesExpectedToSend: Int64) { if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } if let taskDidSendBodyData = taskDidSendBodyData { diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift index 596c1bdc41f9..2c27dd29f74b 100644 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift +++ b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift @@ -64,8 +64,7 @@ public struct Timeline { requestStartTime: CFAbsoluteTime = 0.0, initialResponseTime: CFAbsoluteTime = 0.0, requestCompletedTime: CFAbsoluteTime = 0.0, - serializationCompletedTime: CFAbsoluteTime = 0.0) - { + serializationCompletedTime: CFAbsoluteTime = 0.0) { self.requestStartTime = requestStartTime self.initialResponseTime = initialResponseTime self.requestCompletedTime = requestCompletedTime diff --git a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift index 59e0bbb2b0e9..3c37e24d847f 100644 --- a/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift +++ b/samples/client/petstore/swift4/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift @@ -94,8 +94,7 @@ extension Request { statusCode acceptableStatusCodes: S, response: HTTPURLResponse) -> ValidationResult - where S.Iterator.Element == Int - { + where S.Iterator.Element == Int { if acceptableStatusCodes.contains(response.statusCode) { return .success } else { @@ -111,8 +110,7 @@ extension Request { response: HTTPURLResponse, data: Data?) -> ValidationResult - where S.Iterator.Element == String - { + where S.Iterator.Element == String { guard let data = data, data.count > 0 else { return .success } guard diff --git a/samples/client/petstore/swift4/promisekit/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift4/promisekit/docs/HasOnlyReadOnly.md index 45781360154c..57b6e3a17e67 100644 --- a/samples/client/petstore/swift4/promisekit/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/swift4/promisekit/docs/HasOnlyReadOnly.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] [[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/swift4/promisekit/docs/Name.md b/samples/client/petstore/swift4/promisekit/docs/Name.md index 2be75d062e47..f7b180292cd6 100644 --- a/samples/client/petstore/swift4/promisekit/docs/Name.md +++ b/samples/client/petstore/swift4/promisekit/docs/Name.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **Int** | | -**snakeCase** | **Int** | | [optional] +**snakeCase** | **Int** | | [optional] [readonly] **property** | **String** | | [optional] -**_123number** | **Int** | | [optional] +**_123number** | **Int** | | [optional] [readonly] [[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/swift4/promisekit/docs/ReadOnlyFirst.md b/samples/client/petstore/swift4/promisekit/docs/ReadOnlyFirst.md index e3f16038b970..ed537b87598b 100644 --- a/samples/client/petstore/swift4/promisekit/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/swift4/promisekit/docs/ReadOnlyFirst.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] +**bar** | **String** | | [optional] [readonly] **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/swift4/rxswift/.openapi-generator/VERSION b/samples/client/petstore/swift4/rxswift/.openapi-generator/VERSION index 0e97bd19efbf..c3a2c7076fa8 100644 --- a/samples/client/petstore/swift4/rxswift/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/rxswift/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/rxswift/Cartfile b/samples/client/petstore/swift4/rxswift/Cartfile index 60ba4967b6d0..7f3452d07ee6 100644 --- a/samples/client/petstore/swift4/rxswift/Cartfile +++ b/samples/client/petstore/swift4/rxswift/Cartfile @@ -1,2 +1,2 @@ github "Alamofire/Alamofire" ~> 4.9.0 -github "ReactiveX/RxSwift" ~> 4.0 +github "ReactiveX/RxSwift" ~> 4.5.0 diff --git a/samples/client/petstore/swift4/rxswift/Package.swift b/samples/client/petstore/swift4/rxswift/Package.swift new file mode 100644 index 000000000000..6c19a2b64cc6 --- /dev/null +++ b/samples/client/petstore/swift4/rxswift/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version:4.2 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "PetstoreClient", + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "PetstoreClient", + targets: ["PetstoreClient"]) + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0"), + .package(url: "https://github.com/ReactiveX/RxSwift.git", from: "4.5.0") + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "PetstoreClient", + dependencies: ["Alamofire", "RxSwift"], + path: "PetstoreClient/Classes" + ) + ] +) diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient.podspec b/samples/client/petstore/swift4/rxswift/PetstoreClient.podspec index 3b01a31b9782..f520f827f0be 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient.podspec +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient.podspec @@ -10,6 +10,6 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'PetstoreClient' s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'RxSwift', '~> 4.0' + s.dependency 'RxSwift', '~> 4.5.0' s.dependency 'Alamofire', '~> 4.9.0' end diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift4/rxswift/PetstoreClient.xcodeproj/project.pbxproj index 578d38a3fffb..36443e510a82 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient.xcodeproj/project.pbxproj @@ -3,300 +3,300 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 51; objects = { /* Begin PBXBuildFile section */ - 02903CEC38DC202565BC08CB040AC4E9 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */; }; - 0462F801432CF94C7EF51D0532737A7E /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */; }; - 08D87E4FECF24910F0DA0F1D2E2D955A /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */; }; - 08F5828F0C2BCF07A9E4917DBBB993AE /* AdditionalPropertiesInteger.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA2F3566156A4ABC465F201B4A1F6227 /* AdditionalPropertiesInteger.swift */; }; - 1143FFF06DEE01E5B0F1368AA05BE1B4 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */; }; - 122BBAE8245606CC040EEB6B9254E376 /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */; }; - 12327BF7304AA897C5D2A1250B1659B7 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */; }; - 12BB95C66D63090732BB9E0379836E3C /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */; }; - 16E9A5E22B4823DE282E7F4C18A21EA8 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */; }; - 18F19872A0DFB4CC3D9C696BBCA64EFD /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */; }; - 196E9846B27D736630CCF90497696859 /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */; }; - 271D94A05C47B602A2433B9CD3D9DCDC /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */; }; - 293F4E0FBFC8297E414A3CDBB7F29A96 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */; }; - 297E365D1E4672C43C56E0AFD855FFBF /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */; }; - 2A35688C985E9CB1EB7732AC2AD46B82 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */; }; - 2DF4544D4D3D6CF7047A59FB89ED31BD /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */; }; - 3251A3722981CE46261615CFBA96A08D /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */; }; - 36734C4EB3362A114A7CB5F25EE39E6D /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */; }; - 39F9FBA1AC5C2612ECA1FF715EBFC287 /* AdditionalPropertiesString.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFE215C1B526E0418ED301B15357B970 /* AdditionalPropertiesString.swift */; }; - 3D8E407B1DF4FA5A5F16B64E3A285781 /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */; }; - 41D8A105135868152A56E2AC475049BB /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */; }; - 42C51BC034E8B0CAA29A068F6B0DC815 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */; }; - 491676EC91BFEF95A12556888EED87B5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */; }; - 4C28BFEC5E7C8150DEFD83E09C1A1D32 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */; }; - 52B5604F986335DB69CD2B430FB83BAB /* AdditionalPropertiesAnyType.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5AB1037D937AADF8B4A70C96D5E5D61 /* AdditionalPropertiesAnyType.swift */; }; - 58F9704B295AC436D6FB98FA669E2344 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */; }; - 59C00CBB07761CAC8DCE7054E34AD5D9 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */; }; - 59C2F5495C98836BFA9E10BF5C13BC2C /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */; }; - 59EAB3527305A37ED99FB210045B69EA /* AdditionalPropertiesNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E0512B3582586B4C0C598D5DB1C0D39 /* AdditionalPropertiesNumber.swift */; }; - 5ACDD7CC312167589335E9CA5998E770 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */; }; - 655AA371771C7BD72EE0AAC0C90DFFF0 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */; }; - 6600BB1500AE35A3C80F7C83F6444552 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */; }; - 6CD20EE568DDAD2304BF0C4B1A70C8DC /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */; }; - 7367A9D91D4B101F2D28AC56ED89F175 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */; }; - 79536B981ECC24C77EB665FDAC7CA7BD /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 69DB3E1D94EB0566C0052331742B5012 /* RxSwift.framework */; }; - 82D4D0C8AD0354A700C8ACD421ABED55 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */; }; - 83A2D1863FB136C0DFC423319F4EED65 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */; }; - 92FB161BF1E57D11B116AF0292D5835C /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718FF4525C81 /* Client.swift */; }; - 97C99615237E1B662242E04F527B38B9 /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */; }; - 988F461F59E4E1091156840007CB3773 /* AdditionalPropertiesBoolean.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CC24C01A55F644957196F9F81D10F81 /* AdditionalPropertiesBoolean.swift */; }; - A190AF5A3988639ED4B78163D0EA3CA4 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */; }; - A438970025AE69ED407BC1E67CC6359E /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */; }; - A9F1AAF6CE029DD3B4F8AC841F0B6BC6 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */; }; - AE9D2E1DB59AF6575AC4AC6756C5A937 /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */; }; - B399A1742F23330FDCA450EAB98F51F1 /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */; }; - BB02FDCF1B2B0E457E1C2BF39FBB599D /* XmlItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2253391845B73B8BA3680491575CC07 /* XmlItem.swift */; }; - BF7D58FBCF5E4D3F2932FCC0E62BED40 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */; }; - C15AC1CC631E96D0360EB8C15BF30452 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */; }; - C1CACABE18A7ADCE37D1CD9DC9128304 /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A4315C49A /* List.swift */; }; - C2EDEB747887399B13A6DFD72A219CB2 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */; }; - C329EE55B2FCC9174ED3B128D67C5E8C /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */; }; - D3A17B7FAFA8A7A210875BBCDCC30116 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; - D68F23CD4B5178493CE7AE8DFB868EAE /* AdditionalPropertiesArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FEE553331890581C2FF366F9EA0956D /* AdditionalPropertiesArray.swift */; }; - D70EC94E346077DE1482231DD4498BED /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */; }; - DB1CE39011A741D07E187663291B5DE5 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */; }; - DB724C4F1AD5DF025B53A9A2E0A49E3D /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */; }; - DDBC3CF5E447D8D838F0FE200420EEE3 /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */; }; - DEC892724574BB29BD65869374F83982 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */; }; - E2C40F0E34DB8C21A806262C72841A51 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118F057604D /* SpecialModelName.swift */; }; - E51ADEC931806B20A041303E539A8BE2 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */; }; - E57CD12D2F500D40B4135D0F5ECA9866 /* AdditionalPropertiesObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72FEDC94BA0E37214D360871B284BC8A /* AdditionalPropertiesObject.swift */; }; - F02BEF9A8503B3848B045370451E85F6 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4CF550442B /* Models.swift */; }; - F21D10C71A9DE7D0467AFD23FD391D2E /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08AA65292F7 /* Return.swift */; }; - FB4A053CDCD75E48B755CC22D463A3FC /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */; }; - FECA03F0388E84AE1B22638605D8AC9F /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */; }; + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; + 1A3562EDD07FF7D64BCD7A59 /* AdditionalPropertiesObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72FEDC94BA0E37214D360871 /* AdditionalPropertiesObject.swift */; }; + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; + 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */; }; + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; + 3EA765BDC5A11401D8A16536 /* XmlItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2253391845B73B8BA368049 /* XmlItem.swift */; }; + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; + 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */; }; + 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83D /* Alamofire.framework */; }; + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; + 4884A65ABBA468278D2450FD /* AdditionalPropertiesString.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFE215C1B526E0418ED301B1 /* AdditionalPropertiesString.swift */; }; + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; + 7244DA68425DE3B3727C1990 /* AdditionalPropertiesNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E0512B3582586B4C0C598D5 /* AdditionalPropertiesNumber.swift */; }; + 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; + 7F7BE063B514EF4A90D75B7F /* AdditionalPropertiesInteger.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA2F3566156A4ABC465F201B /* AdditionalPropertiesInteger.swift */; }; + 83BBA452D761D61542F297CC /* AdditionalPropertiesArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FEE553331890581C2FF366F /* AdditionalPropertiesArray.swift */; }; + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; + AB3B26F5E373BC8C0A0A617E /* AdditionalPropertiesAnyType.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5AB1037D937AADF8B4A70C9 /* AdditionalPropertiesAnyType.swift */; }; + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; + AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; + BC097E527F96131FEA12D864 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 69DB3E1D94EB0566C0052331 /* RxSwift.framework */; }; + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; + EF35D2C67E3BC377DDCC99CB /* AdditionalPropertiesBoolean.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CC24C01A55F644957196F9F /* AdditionalPropertiesBoolean.swift */; }; + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; - 0CC24C01A55F644957196F9F81D10F81 /* AdditionalPropertiesBoolean.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesBoolean.swift; sourceTree = ""; }; - 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; - 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; - 1E0512B3582586B4C0C598D5DB1C0D39 /* AdditionalPropertiesNumber.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesNumber.swift; sourceTree = ""; }; - 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; - 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; - 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; - 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; - 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; - 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; - 386FD590658E90509C121118F057604D /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; - 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; - 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; - 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; - 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; - 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; - 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; - 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; - 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; - 4FEE553331890581C2FF366F9EA0956D /* AdditionalPropertiesArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesArray.swift; sourceTree = ""; }; - 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; - 69DB3E1D94EB0566C0052331742B5012 /* RxSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = RxSwift.framework; sourceTree = ""; }; - 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; - 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; - 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; - 72FEDC94BA0E37214D360871B284BC8A /* AdditionalPropertiesObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesObject.swift; sourceTree = ""; }; - 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; - 7A6070F581E611FF44AFD40A4315C49A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; - 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; - 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; - 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; - 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; - 8699F7966F748ED026A6FB4CF550442B /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; - 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; - 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; - 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; - 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; - 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; - 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; - 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; - A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; - A2253391845B73B8BA3680491575CC07 /* XmlItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XmlItem.swift; sourceTree = ""; }; - A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; - A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; - A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; - A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; - A913A57E72D723632E9A718FF4525C81 /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; - B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; - B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; - B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; - B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; - B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; - C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; - C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; - C81447828475F76C5CF4F08AA65292F7 /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; - E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; - EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; - ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; - F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; - F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; - F5AB1037D937AADF8B4A70C96D5E5D61 /* AdditionalPropertiesAnyType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesAnyType.swift; sourceTree = ""; }; - FA2F3566156A4ABC465F201B4A1F6227 /* AdditionalPropertiesInteger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesInteger.swift; sourceTree = ""; }; - FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; - FFE215C1B526E0418ED301B15357B970 /* AdditionalPropertiesString.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesString.swift; sourceTree = ""; }; + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; + 0CC24C01A55F644957196F9F /* AdditionalPropertiesBoolean.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesBoolean.swift; sourceTree = ""; }; + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; + 1E0512B3582586B4C0C598D5 /* AdditionalPropertiesNumber.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesNumber.swift; sourceTree = ""; }; + 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; + 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; + 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; + 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; + 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; + 4FEE553331890581C2FF366F /* AdditionalPropertiesArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesArray.swift; sourceTree = ""; }; + 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; + 69DB3E1D94EB0566C0052331 /* RxSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = RxSwift.framework; sourceTree = ""; }; + 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; + 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; + 72FEDC94BA0E37214D360871 /* AdditionalPropertiesObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesObject.swift; sourceTree = ""; }; + 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; + 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; + 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; + 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; + 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; + 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; + 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; + A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; + A2253391845B73B8BA368049 /* XmlItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XmlItem.swift; sourceTree = ""; }; + A235FA3FDFB086CC69CDE83D /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; + A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; + B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; + B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; + C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; + E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; + F5AB1037D937AADF8B4A70C9 /* AdditionalPropertiesAnyType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesAnyType.swift; sourceTree = ""; }; + FA2F3566156A4ABC465F201B /* AdditionalPropertiesInteger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesInteger.swift; sourceTree = ""; }; + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; + FFE215C1B526E0418ED301B1 /* AdditionalPropertiesString.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesString.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - D1990C2A394CCF025EF98A2FB828C79A /* Frameworks */ = { + D1990C2A394CCF025EF98A2F /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4C28BFEC5E7C8150DEFD83E09C1A1D32 /* Alamofire.framework in Frameworks */, - 79536B981ECC24C77EB665FDAC7CA7BD /* RxSwift.framework in Frameworks */, + 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */, + BC097E527F96131FEA12D864 /* RxSwift.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 1E464C0937FE0D3A7A0FE29AF446553C /* Frameworks */ = { + 1E464C0937FE0D3A7A0FE29A /* Frameworks */ = { isa = PBXGroup; children = ( - 7861EE241895128F64DD787367B3022D /* Carthage */, + 7861EE241895128F64DD7873 /* Carthage */, ); name = Frameworks; sourceTree = ""; }; - 4FBDCF1330A9AB9122780DB3FA21DE4C /* Models */ = { + 4FBDCF1330A9AB9122780DB3 /* Models */ = { isa = PBXGroup; children = ( - F5AB1037D937AADF8B4A70C96D5E5D61 /* AdditionalPropertiesAnyType.swift */, - 4FEE553331890581C2FF366F9EA0956D /* AdditionalPropertiesArray.swift */, - 0CC24C01A55F644957196F9F81D10F81 /* AdditionalPropertiesBoolean.swift */, - 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */, - FA2F3566156A4ABC465F201B4A1F6227 /* AdditionalPropertiesInteger.swift */, - 1E0512B3582586B4C0C598D5DB1C0D39 /* AdditionalPropertiesNumber.swift */, - 72FEDC94BA0E37214D360871B284BC8A /* AdditionalPropertiesObject.swift */, - FFE215C1B526E0418ED301B15357B970 /* AdditionalPropertiesString.swift */, - 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */, - 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */, - A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */, - 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */, - B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */, - F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */, - A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */, - 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */, - 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */, - 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */, - 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */, - A913A57E72D723632E9A718FF4525C81 /* Client.swift */, - C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */, - A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */, - 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */, - 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */, - FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */, - 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */, - 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */, - 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */, - 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */, - 7A6070F581E611FF44AFD40A4315C49A /* List.swift */, - 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */, - 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */, - 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */, - 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */, - B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */, - 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */, - F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */, - C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */, - ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */, - 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */, - C81447828475F76C5CF4F08AA65292F7 /* Return.swift */, - 386FD590658E90509C121118F057604D /* SpecialModelName.swift */, - 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */, - B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */, - EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */, - 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */, - E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */, - A2253391845B73B8BA3680491575CC07 /* XmlItem.swift */, + F5AB1037D937AADF8B4A70C9 /* AdditionalPropertiesAnyType.swift */, + 4FEE553331890581C2FF366F /* AdditionalPropertiesArray.swift */, + 0CC24C01A55F644957196F9F /* AdditionalPropertiesBoolean.swift */, + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, + FA2F3566156A4ABC465F201B /* AdditionalPropertiesInteger.swift */, + 1E0512B3582586B4C0C598D5 /* AdditionalPropertiesNumber.swift */, + 72FEDC94BA0E37214D360871 /* AdditionalPropertiesObject.swift */, + FFE215C1B526E0418ED301B1 /* AdditionalPropertiesString.swift */, + 95568E7C35F119EB4A12B498 /* Animal.swift */, + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, + 212AA914B7F1793A4E32C119 /* Cat.swift */, + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, + 6F2985D01F8D60A4B1925C69 /* Category.swift */, + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, + A913A57E72D723632E9A718F /* Client.swift */, + C6C3E1129526A353B963EFD7 /* Dog.swift */, + A21A69C8402A60E01116ABBD /* DogAllOf.swift */, + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, + 3933D3B2A3AC4577094D0C23 /* File.swift */, + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, + 3156CE41C001C80379B84BDB /* FormatTest.swift */, + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, + 7A6070F581E611FF44AFD40A /* List.swift */, + 7986861626C2B1CB49AD7000 /* MapTest.swift */, + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, + 5AD994DFAA0DA93C188A4DBA /* Name.swift */, + B8E0B16084741FCB82389F58 /* NumberOnly.swift */, + 27B2E9EF856E89FEAA359A3A /* Order.swift */, + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, + C81447828475F76C5CF4F08A /* Return.swift */, + 386FD590658E90509C121118 /* SpecialModelName.swift */, + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, + B2896F8BFD1AA2965C8A3015 /* Tag.swift */, + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, + E5565A447062C7B8F695F451 /* User.swift */, + A2253391845B73B8BA368049 /* XmlItem.swift */, ); path = Models; sourceTree = ""; }; - 5FBA6AE5F64CD737F88B4565AC3CCD3B = { + 5FBA6AE5F64CD737F88B4565 = { isa = PBXGroup; children = ( - 9B364C01750D7AA4F983B9E77B01BCC6 /* PetstoreClient */, - 1E464C0937FE0D3A7A0FE29AF446553C /* Frameworks */, - 857F0DEA1890CE66D6DAD556C55821A6 /* Products */, + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, + 1E464C0937FE0D3A7A0FE29A /* Frameworks */, + 857F0DEA1890CE66D6DAD556 /* Products */, ); sourceTree = ""; }; - 67BF3478113E6B4DF1C4E04F40BF58C4 /* OpenAPIs */ = { + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { isa = PBXGroup; children = ( - 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */, - 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */, - 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */, - 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */, - 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */, - B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */, - 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */, - 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */, - 8699F7966F748ED026A6FB4CF550442B /* Models.swift */, - F956D0CCAE23BCFD1C7BDD5D47944AA5 /* APIs */, - 4FBDCF1330A9AB9122780DB3FA21DE4C /* Models */, + 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */, + 897716962D472FE162B723CB /* APIHelper.swift */, + 37DF825B8F3BADA2B2537D17 /* APIs.swift */, + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, + 28A444949BBC254798C3B3DD /* Configuration.swift */, + B8C298FC8929DCB369053F11 /* Extensions.swift */, + 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */, + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, + 8699F7966F748ED026A6FB4C /* Models.swift */, + F956D0CCAE23BCFD1C7BDD5D /* APIs */, + 4FBDCF1330A9AB9122780DB3 /* Models */, ); path = OpenAPIs; sourceTree = ""; }; - 7861EE241895128F64DD787367B3022D /* Carthage */ = { + 7861EE241895128F64DD7873 /* Carthage */ = { isa = PBXGroup; children = ( - A012205B41CB71A62B86EECDEAFB0990 /* iOS */, + A012205B41CB71A62B86EECD /* iOS */, ); name = Carthage; path = Carthage/Build; sourceTree = ""; }; - 857F0DEA1890CE66D6DAD556C55821A6 /* Products */ = { + 857F0DEA1890CE66D6DAD556 /* Products */ = { isa = PBXGroup; children = ( - 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */, + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, ); name = Products; sourceTree = ""; }; - 9B364C01750D7AA4F983B9E77B01BCC6 /* PetstoreClient */ = { + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { isa = PBXGroup; children = ( - EF4C81BDD734856ED5023B777D35098B /* Classes */, + EF4C81BDD734856ED5023B77 /* Classes */, ); path = PetstoreClient; sourceTree = ""; }; - A012205B41CB71A62B86EECDEAFB0990 /* iOS */ = { + A012205B41CB71A62B86EECD /* iOS */ = { isa = PBXGroup; children = ( - A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */, - 69DB3E1D94EB0566C0052331742B5012 /* RxSwift.framework */, + A235FA3FDFB086CC69CDE83D /* Alamofire.framework */, + 69DB3E1D94EB0566C0052331 /* RxSwift.framework */, ); path = iOS; sourceTree = ""; }; - EF4C81BDD734856ED5023B777D35098B /* Classes */ = { + EF4C81BDD734856ED5023B77 /* Classes */ = { isa = PBXGroup; children = ( - 67BF3478113E6B4DF1C4E04F40BF58C4 /* OpenAPIs */, + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, ); path = Classes; sourceTree = ""; }; - F956D0CCAE23BCFD1C7BDD5D47944AA5 /* APIs */ = { + F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { isa = PBXGroup; children = ( - 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */, - 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */, - B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */, - 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */, - A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */, - 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */, + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, + 6E00950725DC44436C5E238C /* FakeAPI.swift */, + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, + 9A019F500E546A3292CE716A /* PetAPI.swift */, + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, ); path = APIs; sourceTree = ""; @@ -304,12 +304,12 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - C1282C2230015E0D204BEAEDDFB49453 /* PetstoreClient */ = { + C1282C2230015E0D204BEAED /* PetstoreClient */ = { isa = PBXNativeTarget; - buildConfigurationList = B46EDEB1A7F0D78FE6394544C60169D1 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; buildPhases = ( - E539708354CE60FE486F81EDE56D13C8 /* Sources */, - D1990C2A394CCF025EF98A2FB828C79A /* Frameworks */, + E539708354CE60FE486F81ED /* Sources */, + D1990C2A394CCF025EF98A2F /* Frameworks */, ); buildRules = ( ); @@ -317,108 +317,108 @@ ); name = PetstoreClient; productName = PetstoreClient; - productReference = 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */; + productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - E7D276EE2369D8C455513C2E05F9AED0 /* Project object */ = { + E7D276EE2369D8C455513C2E /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1000; + LastUpgradeCheck = 1020; }; - buildConfigurationList = ECAB17FF35111B5E14DAAC0883031714 /* Build configuration list for PBXProject "PetstoreClient" */; - compatibilityVersion = "Xcode 9.3"; + buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; + compatibilityVersion = "Xcode 10.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, ); - mainGroup = 5FBA6AE5F64CD737F88B4565AC3CCD3B; + mainGroup = 5FBA6AE5F64CD737F88B4565; projectDirPath = ""; projectRoot = ""; targets = ( - C1282C2230015E0D204BEAEDDFB49453 /* PetstoreClient */, + C1282C2230015E0D204BEAED /* PetstoreClient */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ - E539708354CE60FE486F81EDE56D13C8 /* Sources */ = { + E539708354CE60FE486F81ED /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2A35688C985E9CB1EB7732AC2AD46B82 /* APIHelper.swift in Sources */, - 0462F801432CF94C7EF51D0532737A7E /* APIs.swift in Sources */, - 52B5604F986335DB69CD2B430FB83BAB /* AdditionalPropertiesAnyType.swift in Sources */, - D68F23CD4B5178493CE7AE8DFB868EAE /* AdditionalPropertiesArray.swift in Sources */, - 988F461F59E4E1091156840007CB3773 /* AdditionalPropertiesBoolean.swift in Sources */, - 12327BF7304AA897C5D2A1250B1659B7 /* AdditionalPropertiesClass.swift in Sources */, - 08F5828F0C2BCF07A9E4917DBBB993AE /* AdditionalPropertiesInteger.swift in Sources */, - 59EAB3527305A37ED99FB210045B69EA /* AdditionalPropertiesNumber.swift in Sources */, - E57CD12D2F500D40B4135D0F5ECA9866 /* AdditionalPropertiesObject.swift in Sources */, - 39F9FBA1AC5C2612ECA1FF715EBFC287 /* AdditionalPropertiesString.swift in Sources */, - 58F9704B295AC436D6FB98FA669E2344 /* AlamofireImplementations.swift in Sources */, - 02903CEC38DC202565BC08CB040AC4E9 /* Animal.swift in Sources */, - DB1CE39011A741D07E187663291B5DE5 /* AnimalFarm.swift in Sources */, - 83A2D1863FB136C0DFC423319F4EED65 /* AnotherFakeAPI.swift in Sources */, - 97C99615237E1B662242E04F527B38B9 /* ApiResponse.swift in Sources */, - 3251A3722981CE46261615CFBA96A08D /* ArrayOfArrayOfNumberOnly.swift in Sources */, - A190AF5A3988639ED4B78163D0EA3CA4 /* ArrayOfNumberOnly.swift in Sources */, - C2EDEB747887399B13A6DFD72A219CB2 /* ArrayTest.swift in Sources */, - 7367A9D91D4B101F2D28AC56ED89F175 /* Capitalization.swift in Sources */, - 18F19872A0DFB4CC3D9C696BBCA64EFD /* Cat.swift in Sources */, - 41D8A105135868152A56E2AC475049BB /* CatAllOf.swift in Sources */, - 42C51BC034E8B0CAA29A068F6B0DC815 /* Category.swift in Sources */, - 5ACDD7CC312167589335E9CA5998E770 /* ClassModel.swift in Sources */, - 92FB161BF1E57D11B116AF0292D5835C /* Client.swift in Sources */, - 6CD20EE568DDAD2304BF0C4B1A70C8DC /* CodableHelper.swift in Sources */, - DEC892724574BB29BD65869374F83982 /* Configuration.swift in Sources */, - D70EC94E346077DE1482231DD4498BED /* Dog.swift in Sources */, - 271D94A05C47B602A2433B9CD3D9DCDC /* DogAllOf.swift in Sources */, - A438970025AE69ED407BC1E67CC6359E /* EnumArrays.swift in Sources */, - 59C00CBB07761CAC8DCE7054E34AD5D9 /* EnumClass.swift in Sources */, - 08D87E4FECF24910F0DA0F1D2E2D955A /* EnumTest.swift in Sources */, - C329EE55B2FCC9174ED3B128D67C5E8C /* Extensions.swift in Sources */, - 297E365D1E4672C43C56E0AFD855FFBF /* FakeAPI.swift in Sources */, - A9F1AAF6CE029DD3B4F8AC841F0B6BC6 /* FakeClassnameTags123API.swift in Sources */, - FECA03F0388E84AE1B22638605D8AC9F /* File.swift in Sources */, - 491676EC91BFEF95A12556888EED87B5 /* FileSchemaTestClass.swift in Sources */, - 36734C4EB3362A114A7CB5F25EE39E6D /* FormatTest.swift in Sources */, - DDBC3CF5E447D8D838F0FE200420EEE3 /* HasOnlyReadOnly.swift in Sources */, - 16E9A5E22B4823DE282E7F4C18A21EA8 /* JSONEncodableEncoding.swift in Sources */, - 12BB95C66D63090732BB9E0379836E3C /* JSONEncodingHelper.swift in Sources */, - C1CACABE18A7ADCE37D1CD9DC9128304 /* List.swift in Sources */, - 655AA371771C7BD72EE0AAC0C90DFFF0 /* MapTest.swift in Sources */, - D3A17B7FAFA8A7A210875BBCDCC30116 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, - 2DF4544D4D3D6CF7047A59FB89ED31BD /* Model200Response.swift in Sources */, - F02BEF9A8503B3848B045370451E85F6 /* Models.swift in Sources */, - C15AC1CC631E96D0360EB8C15BF30452 /* Name.swift in Sources */, - AE9D2E1DB59AF6575AC4AC6756C5A937 /* NumberOnly.swift in Sources */, - 59C2F5495C98836BFA9E10BF5C13BC2C /* Order.swift in Sources */, - 82D4D0C8AD0354A700C8ACD421ABED55 /* OuterComposite.swift in Sources */, - 1143FFF06DEE01E5B0F1368AA05BE1B4 /* OuterEnum.swift in Sources */, - B399A1742F23330FDCA450EAB98F51F1 /* Pet.swift in Sources */, - 3D8E407B1DF4FA5A5F16B64E3A285781 /* PetAPI.swift in Sources */, - 293F4E0FBFC8297E414A3CDBB7F29A96 /* ReadOnlyFirst.swift in Sources */, - F21D10C71A9DE7D0467AFD23FD391D2E /* Return.swift in Sources */, - E2C40F0E34DB8C21A806262C72841A51 /* SpecialModelName.swift in Sources */, - 122BBAE8245606CC040EEB6B9254E376 /* StoreAPI.swift in Sources */, - 196E9846B27D736630CCF90497696859 /* StringBooleanMap.swift in Sources */, - E51ADEC931806B20A041303E539A8BE2 /* Tag.swift in Sources */, - 6600BB1500AE35A3C80F7C83F6444552 /* TypeHolderDefault.swift in Sources */, - FB4A053CDCD75E48B755CC22D463A3FC /* TypeHolderExample.swift in Sources */, - BF7D58FBCF5E4D3F2932FCC0E62BED40 /* User.swift in Sources */, - DB724C4F1AD5DF025B53A9A2E0A49E3D /* UserAPI.swift in Sources */, - BB02FDCF1B2B0E457E1C2BF39FBB599D /* XmlItem.swift in Sources */, + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, + AB3B26F5E373BC8C0A0A617E /* AdditionalPropertiesAnyType.swift in Sources */, + 83BBA452D761D61542F297CC /* AdditionalPropertiesArray.swift in Sources */, + EF35D2C67E3BC377DDCC99CB /* AdditionalPropertiesBoolean.swift in Sources */, + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, + 7F7BE063B514EF4A90D75B7F /* AdditionalPropertiesInteger.swift in Sources */, + 7244DA68425DE3B3727C1990 /* AdditionalPropertiesNumber.swift in Sources */, + 1A3562EDD07FF7D64BCD7A59 /* AdditionalPropertiesObject.swift in Sources */, + 4884A65ABBA468278D2450FD /* AdditionalPropertiesString.swift in Sources */, + 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */, + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, + AD594BFB99E31A5E07579237 /* Client.swift in Sources */, + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, + 72547ECFB451A509409311EE /* Configuration.swift in Sources */, + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, + 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */, + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, + 3EA765BDC5A11401D8A16536 /* XmlItem.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ - 3B2C02AFB91CB5C82766ED5CF21FF628 /* Release */ = { + 3B2C02AFB91CB5C82766ED5C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; @@ -435,7 +435,10 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -443,7 +446,7 @@ }; name = Release; }; - A9EB0A02B94C427CBACFEC7CFFC6A816 /* Debug */ = { + A9EB0A02B94C427CBACFEC7C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -498,11 +501,11 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; - DD3EEB93949E9EBA4437E9CDBF4A26F6 /* Debug */ = { + DD3EEB93949E9EBA4437E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; @@ -519,7 +522,10 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -527,7 +533,7 @@ }; name = Debug; }; - F81D4E5FECD46E9AA6DD2C299CEBEF64 /* Release */ = { + F81D4E5FECD46E9AA6DD2C29 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -572,8 +578,8 @@ GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; VALIDATE_PRODUCT = YES; }; name = Release; @@ -581,25 +587,25 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - B46EDEB1A7F0D78FE6394544C60169D1 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { isa = XCConfigurationList; buildConfigurations = ( - DD3EEB93949E9EBA4437E9CDBF4A26F6 /* Debug */, - 3B2C02AFB91CB5C82766ED5CF21FF628 /* Release */, + DD3EEB93949E9EBA4437E9CD /* Debug */, + 3B2C02AFB91CB5C82766ED5C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = ""; }; - ECAB17FF35111B5E14DAAC0883031714 /* Build configuration list for PBXProject "PetstoreClient" */ = { + ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { isa = XCConfigurationList; buildConfigurations = ( - A9EB0A02B94C427CBACFEC7CFFC6A816 /* Debug */, - F81D4E5FECD46E9AA6DD2C299CEBEF64 /* Release */, + A9EB0A02B94C427CBACFEC7C /* Debug */, + F81D4E5FECD46E9AA6DD2C29 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; /* End XCConfigurationList section */ }; - rootObject = E7D276EE2369D8C455513C2E05F9AED0 /* Project object */; + rootObject = E7D276EE2369D8C455513C2E /* Project object */; } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift4/rxswift/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme index 7802e379453b..e8ac84fa9929 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme @@ -1,6 +1,6 @@ @@ -32,7 +32,7 @@ @@ -42,6 +42,8 @@ + + @@ -77,7 +79,7 @@ runnableDebuggingMode = "0"> diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift new file mode 100644 index 000000000000..3f1237fee477 --- /dev/null +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -0,0 +1,45 @@ +// +// StringBooleanMap.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct StringBooleanMap: Codable { + + public var additionalProperties: [String: Bool] = [:] + + public subscript(key: String) -> Bool? { + get { + if let value = additionalProperties[key] { + return value + } + return nil + } + + set { + additionalProperties[key] = newValue + } + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + + var container = encoder.container(keyedBy: String.self) + + try container.encodeMap(additionalProperties) + } + + // Decodable protocol methods + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: String.self) + + var nonAdditionalPropertyKeys = Set() + additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) + } + +} diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift index 20c3672fbaf2..036e1df7cd50 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift @@ -135,8 +135,7 @@ public func request( parameters: Parameters? = nil, encoding: ParameterEncoding = URLEncoding.default, headers: HTTPHeaders? = nil) - -> DataRequest -{ + -> DataRequest { return SessionManager.default.request( url, method: method, @@ -183,8 +182,7 @@ public func download( encoding: ParameterEncoding = URLEncoding.default, headers: HTTPHeaders? = nil, to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest -{ + -> DownloadRequest { return SessionManager.default.download( url, method: method, @@ -209,8 +207,7 @@ public func download( public func download( _ urlRequest: URLRequestConvertible, to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest -{ + -> DownloadRequest { return SessionManager.default.download(urlRequest, to: destination) } @@ -239,8 +236,7 @@ public func download( public func download( resumingWith resumeData: Data, to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest -{ + -> DownloadRequest { return SessionManager.default.download(resumingWith: resumeData, to: destination) } @@ -263,8 +259,7 @@ public func upload( to url: URLConvertible, method: HTTPMethod = .post, headers: HTTPHeaders? = nil) - -> UploadRequest -{ + -> UploadRequest { return SessionManager.default.upload(fileURL, to: url, method: method, headers: headers) } @@ -297,8 +292,7 @@ public func upload( to url: URLConvertible, method: HTTPMethod = .post, headers: HTTPHeaders? = nil) - -> UploadRequest -{ + -> UploadRequest { return SessionManager.default.upload(data, to: url, method: method, headers: headers) } @@ -331,8 +325,7 @@ public func upload( to url: URLConvertible, method: HTTPMethod = .post, headers: HTTPHeaders? = nil) - -> UploadRequest -{ + -> UploadRequest { return SessionManager.default.upload(stream, to: url, method: method, headers: headers) } @@ -379,8 +372,7 @@ public func upload( to url: URLConvertible, method: HTTPMethod = .post, headers: HTTPHeaders? = nil, - encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) -{ + encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) { return SessionManager.default.upload( multipartFormData: multipartFormData, usingThreshold: encodingMemoryThreshold, @@ -416,8 +408,7 @@ public func upload( multipartFormData: @escaping (MultipartFormData) -> Void, usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, with urlRequest: URLRequestConvertible, - encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) -{ + encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) { return SessionManager.default.upload( multipartFormData: multipartFormData, usingThreshold: encodingMemoryThreshold, diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift index b840138ccc15..7df468a011c8 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift @@ -275,8 +275,7 @@ open class MultipartFormData { } bodyContentLength = fileSize.uint64Value - } - catch { + } catch { setBodyPartError(withReason: .bodyPartFileSizeQueryFailedWithError(forURL: fileURL, error: error)) return } @@ -312,8 +311,7 @@ open class MultipartFormData { withLength length: UInt64, name: String, fileName: String, - mimeType: String) - { + mimeType: String) { let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) append(stream, withLength: length, headers: headers) } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift index 398ca827c2b0..fa0647934f67 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift @@ -148,8 +148,7 @@ open class NetworkReachabilityManager { context.info = Unmanaged.passUnretained(self).toOpaque() let callbackEnabled = SCNetworkReachabilitySetCallback( - reachability, - { (_, flags, info) in + reachability, { (_, flags, info) in let reachability = Unmanaged.fromOpaque(info!).takeUnretainedValue() reachability.notifyListener(flags) }, @@ -221,8 +220,7 @@ extension NetworkReachabilityManager.NetworkReachabilityStatus: Equatable {} public func ==( lhs: NetworkReachabilityManager.NetworkReachabilityStatus, rhs: NetworkReachabilityManager.NetworkReachabilityStatus) - -> Bool -{ + -> Bool { switch (lhs, rhs) { case (.unknown, .unknown): return true diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift index 6195809c5db9..dc8e75e847df 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift @@ -435,8 +435,7 @@ public struct PropertyListEncoding: ParameterEncoding { /// - returns: The new `PropertyListEncoding` instance. public init( format: PropertyListSerialization.PropertyListFormat = .xml, - options: PropertyListSerialization.WriteOptions = 0) - { + options: PropertyListSerialization.WriteOptions = 0) { self.format = format self.options = options } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Request.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Request.swift index 2be2ce0106fa..9cd75057cae2 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Request.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Request.swift @@ -161,8 +161,7 @@ open class Request { user: String, password: String, persistence: URLCredential.Persistence = .forSession) - -> Self - { + -> Self { let credential = URLCredential(user: user, password: password, persistence: persistence) return authenticate(usingCredential: credential) } @@ -544,8 +543,7 @@ open class DownloadRequest: Request { open class func suggestedDownloadDestination( for directory: FileManager.SearchPathDirectory = .documentDirectory, in domain: FileManager.SearchPathDomainMask = .userDomainMask) - -> DownloadFileDestination - { + -> DownloadFileDestination { return { temporaryURL, response in let directoryURLs = FileManager.default.urls(for: directory, in: domain) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Response.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Response.swift index 747a471a55ba..88d09e33ff8e 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Response.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Response.swift @@ -58,8 +58,7 @@ public struct DefaultDataResponse { data: Data?, error: Error?, timeline: Timeline = Timeline(), - metrics: AnyObject? = nil) - { + metrics: AnyObject? = nil) { self.request = request self.response = response self.data = data @@ -109,8 +108,7 @@ public struct DataResponse { response: HTTPURLResponse?, data: Data?, result: Result, - timeline: Timeline = Timeline()) - { + timeline: Timeline = Timeline()) { self.request = request self.response = response self.data = data @@ -296,8 +294,7 @@ public struct DefaultDownloadResponse { resumeData: Data?, error: Error?, timeline: Timeline = Timeline(), - metrics: AnyObject? = nil) - { + metrics: AnyObject? = nil) { self.request = request self.response = response self.temporaryURL = temporaryURL @@ -359,8 +356,7 @@ public struct DownloadResponse { destinationURL: URL?, resumeData: Data?, result: Result, - timeline: Timeline = Timeline()) - { + timeline: Timeline = Timeline()) { self.request = request self.response = response self.temporaryURL = temporaryURL diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift index 9cc105a82057..b8f5b65b204d 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift @@ -144,8 +144,7 @@ extension DataRequest { queue: DispatchQueue? = nil, responseSerializer: T, completionHandler: @escaping (DataResponse) -> Void) - -> Self - { + -> Self { delegate.queue.addOperation { let result = responseSerializer.serializeResponse( self.request, @@ -182,8 +181,7 @@ extension DownloadRequest { public func response( queue: DispatchQueue? = nil, completionHandler: @escaping (DefaultDownloadResponse) -> Void) - -> Self - { + -> Self { delegate.queue.addOperation { (queue ?? DispatchQueue.main).async { var downloadResponse = DefaultDownloadResponse( @@ -218,8 +216,7 @@ extension DownloadRequest { queue: DispatchQueue? = nil, responseSerializer: T, completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { + -> Self { delegate.queue.addOperation { let result = responseSerializer.serializeResponse( self.request, @@ -289,8 +286,7 @@ extension DataRequest { public func responseData( queue: DispatchQueue? = nil, completionHandler: @escaping (DataResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DataRequest.dataResponseSerializer(), @@ -329,8 +325,7 @@ extension DownloadRequest { public func responseData( queue: DispatchQueue? = nil, completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DownloadRequest.dataResponseSerializer(), @@ -356,8 +351,7 @@ extension Request { response: HTTPURLResponse?, data: Data?, error: Error?) - -> Result - { + -> Result { guard error == nil else { return .failure(error!) } if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success("") } @@ -411,8 +405,7 @@ extension DataRequest { queue: DispatchQueue? = nil, encoding: String.Encoding? = nil, completionHandler: @escaping (DataResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DataRequest.stringResponseSerializer(encoding: encoding), @@ -459,8 +452,7 @@ extension DownloadRequest { queue: DispatchQueue? = nil, encoding: String.Encoding? = nil, completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DownloadRequest.stringResponseSerializer(encoding: encoding), @@ -486,8 +478,7 @@ extension Request { response: HTTPURLResponse?, data: Data?, error: Error?) - -> Result - { + -> Result { guard error == nil else { return .failure(error!) } if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(NSNull()) } @@ -514,8 +505,7 @@ extension DataRequest { /// - returns: A JSON object response serializer. public static func jsonResponseSerializer( options: JSONSerialization.ReadingOptions = .allowFragments) - -> DataResponseSerializer - { + -> DataResponseSerializer { return DataResponseSerializer { _, response, data, error in return Request.serializeResponseJSON(options: options, response: response, data: data, error: error) } @@ -532,8 +522,7 @@ extension DataRequest { queue: DispatchQueue? = nil, options: JSONSerialization.ReadingOptions = .allowFragments, completionHandler: @escaping (DataResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DataRequest.jsonResponseSerializer(options: options), @@ -551,8 +540,7 @@ extension DownloadRequest { /// - returns: A JSON object response serializer. public static func jsonResponseSerializer( options: JSONSerialization.ReadingOptions = .allowFragments) - -> DownloadResponseSerializer - { + -> DownloadResponseSerializer { return DownloadResponseSerializer { _, response, fileURL, error in guard error == nil else { return .failure(error!) } @@ -580,8 +568,7 @@ extension DownloadRequest { queue: DispatchQueue? = nil, options: JSONSerialization.ReadingOptions = .allowFragments, completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DownloadRequest.jsonResponseSerializer(options: options), @@ -607,8 +594,7 @@ extension Request { response: HTTPURLResponse?, data: Data?, error: Error?) - -> Result - { + -> Result { guard error == nil else { return .failure(error!) } if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(NSNull()) } @@ -635,8 +621,7 @@ extension DataRequest { /// - returns: A property list object response serializer. public static func propertyListResponseSerializer( options: PropertyListSerialization.ReadOptions = []) - -> DataResponseSerializer - { + -> DataResponseSerializer { return DataResponseSerializer { _, response, data, error in return Request.serializeResponsePropertyList(options: options, response: response, data: data, error: error) } @@ -653,8 +638,7 @@ extension DataRequest { queue: DispatchQueue? = nil, options: PropertyListSerialization.ReadOptions = [], completionHandler: @escaping (DataResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DataRequest.propertyListResponseSerializer(options: options), @@ -672,8 +656,7 @@ extension DownloadRequest { /// - returns: A property list object response serializer. public static func propertyListResponseSerializer( options: PropertyListSerialization.ReadOptions = []) - -> DownloadResponseSerializer - { + -> DownloadResponseSerializer { return DownloadResponseSerializer { _, response, fileURL, error in guard error == nil else { return .failure(error!) } @@ -701,8 +684,7 @@ extension DownloadRequest { queue: DispatchQueue? = nil, options: PropertyListSerialization.ReadOptions = [], completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: DownloadRequest.propertyListResponseSerializer(options: options), diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift index dea099e257ab..ad4d5632a019 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift @@ -249,7 +249,6 @@ public enum ServerTrustPolicy { let unspecified = SecTrustResultType.unspecified let proceed = SecTrustResultType.proceed - isValid = result == unspecified || result == proceed } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift index 4964f1eebfd7..5cf4a385b2a5 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/SessionDelegate.swift @@ -255,8 +255,7 @@ extension SessionDelegate: URLSessionDelegate { open func urlSession( _ session: URLSession, didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { + completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { guard sessionDidReceiveChallengeWithCompletion == nil else { sessionDidReceiveChallengeWithCompletion?(session, challenge, completionHandler) return @@ -315,8 +314,7 @@ extension SessionDelegate: URLSessionTaskDelegate { task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, - completionHandler: @escaping (URLRequest?) -> Void) - { + completionHandler: @escaping (URLRequest?) -> Void) { guard taskWillPerformHTTPRedirectionWithCompletion == nil else { taskWillPerformHTTPRedirectionWithCompletion?(session, task, response, request, completionHandler) return @@ -342,8 +340,7 @@ extension SessionDelegate: URLSessionTaskDelegate { _ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { + completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { guard taskDidReceiveChallengeWithCompletion == nil else { taskDidReceiveChallengeWithCompletion?(session, task, challenge, completionHandler) return @@ -372,8 +369,7 @@ extension SessionDelegate: URLSessionTaskDelegate { open func urlSession( _ session: URLSession, task: URLSessionTask, - needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) - { + needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) { guard taskNeedNewBodyStreamWithCompletion == nil else { taskNeedNewBodyStreamWithCompletion?(session, task, completionHandler) return @@ -398,8 +394,7 @@ extension SessionDelegate: URLSessionTaskDelegate { task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { + totalBytesExpectedToSend: Int64) { if let taskDidSendBodyData = taskDidSendBodyData { taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) } else if let delegate = self[task]?.delegate as? UploadTaskDelegate { @@ -512,8 +507,7 @@ extension SessionDelegate: URLSessionDataDelegate { _ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, - completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) - { + completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) { guard dataTaskDidReceiveResponseWithCompletion == nil else { dataTaskDidReceiveResponseWithCompletion?(session, dataTask, response, completionHandler) return @@ -536,8 +530,7 @@ extension SessionDelegate: URLSessionDataDelegate { open func urlSession( _ session: URLSession, dataTask: URLSessionDataTask, - didBecome downloadTask: URLSessionDownloadTask) - { + didBecome downloadTask: URLSessionDownloadTask) { if let dataTaskDidBecomeDownloadTask = dataTaskDidBecomeDownloadTask { dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask) } else { @@ -573,8 +566,7 @@ extension SessionDelegate: URLSessionDataDelegate { _ session: URLSession, dataTask: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse, - completionHandler: @escaping (CachedURLResponse?) -> Void) - { + completionHandler: @escaping (CachedURLResponse?) -> Void) { guard dataTaskWillCacheResponseWithCompletion == nil else { dataTaskWillCacheResponseWithCompletion?(session, dataTask, proposedResponse, completionHandler) return @@ -608,8 +600,7 @@ extension SessionDelegate: URLSessionDownloadDelegate { open func urlSession( _ session: URLSession, downloadTask: URLSessionDownloadTask, - didFinishDownloadingTo location: URL) - { + didFinishDownloadingTo location: URL) { if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL { downloadTaskDidFinishDownloadingToURL(session, downloadTask, location) } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { @@ -632,8 +623,7 @@ extension SessionDelegate: URLSessionDownloadDelegate { downloadTask: URLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { + totalBytesExpectedToWrite: Int64) { if let downloadTaskDidWriteData = downloadTaskDidWriteData { downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { @@ -661,8 +651,7 @@ extension SessionDelegate: URLSessionDownloadDelegate { _ session: URLSession, downloadTask: URLSessionDownloadTask, didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { + expectedTotalBytes: Int64) { if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { @@ -716,8 +705,7 @@ extension SessionDelegate: URLSessionStreamDelegate { _ session: URLSession, streamTask: URLSessionStreamTask, didBecome inputStream: InputStream, - outputStream: OutputStream) - { + outputStream: OutputStream) { streamTaskDidBecomeInputAndOutputStreams?(session, streamTask, inputStream, outputStream) } } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift index 02c36a76b7b4..19725f287e0c 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/SessionManager.swift @@ -166,8 +166,7 @@ open class SessionManager { public init( configuration: URLSessionConfiguration = URLSessionConfiguration.default, delegate: SessionDelegate = SessionDelegate(), - serverTrustPolicyManager: ServerTrustPolicyManager? = nil) - { + serverTrustPolicyManager: ServerTrustPolicyManager? = nil) { self.delegate = delegate self.session = URLSession(configuration: configuration, delegate: delegate, delegateQueue: nil) @@ -185,8 +184,7 @@ open class SessionManager { public init?( session: URLSession, delegate: SessionDelegate, - serverTrustPolicyManager: ServerTrustPolicyManager? = nil) - { + serverTrustPolicyManager: ServerTrustPolicyManager? = nil) { guard delegate === session.delegate else { return nil } self.delegate = delegate @@ -229,8 +227,7 @@ open class SessionManager { parameters: Parameters? = nil, encoding: ParameterEncoding = URLEncoding.default, headers: HTTPHeaders? = nil) - -> DataRequest - { + -> DataRequest { var originalRequest: URLRequest? do { @@ -320,8 +317,7 @@ open class SessionManager { encoding: ParameterEncoding = URLEncoding.default, headers: HTTPHeaders? = nil, to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest - { + -> DownloadRequest { do { let urlRequest = try URLRequest(url: url, method: method, headers: headers) let encodedURLRequest = try encoding.encode(urlRequest, with: parameters) @@ -347,8 +343,7 @@ open class SessionManager { open func download( _ urlRequest: URLRequestConvertible, to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest - { + -> DownloadRequest { do { let urlRequest = try urlRequest.asURLRequest() return download(.request(urlRequest), to: destination) @@ -384,8 +379,7 @@ open class SessionManager { open func download( resumingWith resumeData: Data, to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest - { + -> DownloadRequest { return download(.resumeData(resumeData), to: destination) } @@ -394,8 +388,7 @@ open class SessionManager { private func download( _ downloadable: DownloadRequest.Downloadable, to destination: DownloadRequest.DownloadFileDestination?) - -> DownloadRequest - { + -> DownloadRequest { do { let task = try downloadable.task(session: session, adapter: adapter, queue: queue) let download = DownloadRequest(session: session, requestTask: .download(downloadable, task)) @@ -416,8 +409,7 @@ open class SessionManager { _ downloadable: DownloadRequest.Downloadable?, to destination: DownloadRequest.DownloadFileDestination?, failedWith error: Error) - -> DownloadRequest - { + -> DownloadRequest { var downloadTask: Request.RequestTask = .download(nil, nil) if let downloadable = downloadable { @@ -458,8 +450,7 @@ open class SessionManager { to url: URLConvertible, method: HTTPMethod = .post, headers: HTTPHeaders? = nil) - -> UploadRequest - { + -> UploadRequest { do { let urlRequest = try URLRequest(url: url, method: method, headers: headers) return upload(fileURL, with: urlRequest) @@ -504,8 +495,7 @@ open class SessionManager { to url: URLConvertible, method: HTTPMethod = .post, headers: HTTPHeaders? = nil) - -> UploadRequest - { + -> UploadRequest { do { let urlRequest = try URLRequest(url: url, method: method, headers: headers) return upload(data, with: urlRequest) @@ -550,8 +540,7 @@ open class SessionManager { to url: URLConvertible, method: HTTPMethod = .post, headers: HTTPHeaders? = nil) - -> UploadRequest - { + -> UploadRequest { do { let urlRequest = try URLRequest(url: url, method: method, headers: headers) return upload(stream, with: urlRequest) @@ -612,8 +601,7 @@ open class SessionManager { method: HTTPMethod = .post, headers: HTTPHeaders? = nil, queue: DispatchQueue? = nil, - encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) - { + encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) { do { let urlRequest = try URLRequest(url: url, method: method, headers: headers) @@ -657,8 +645,7 @@ open class SessionManager { usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, with urlRequest: URLRequestConvertible, queue: DispatchQueue? = nil, - encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) - { + encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) { DispatchQueue.global(qos: .utility).async { let formData = MultipartFormData() multipartFormData(formData) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift index 5705737e49d7..a25d80271d31 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/TaskDelegate.swift @@ -94,8 +94,7 @@ open class TaskDelegate: NSObject { task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, - completionHandler: @escaping (URLRequest?) -> Void) - { + completionHandler: @escaping (URLRequest?) -> Void) { var redirectRequest: URLRequest? = request if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { @@ -110,8 +109,7 @@ open class TaskDelegate: NSObject { _ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { + completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling var credential: URLCredential? @@ -150,8 +148,7 @@ open class TaskDelegate: NSObject { func urlSession( _ session: URLSession, task: URLSessionTask, - needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) - { + needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) { var bodyStream: InputStream? if let taskNeedNewBodyStream = taskNeedNewBodyStream { @@ -237,8 +234,7 @@ class DataTaskDelegate: TaskDelegate, URLSessionDataDelegate { _ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, - completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) - { + completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) { var disposition: URLSession.ResponseDisposition = .allow expectedContentLength = response.expectedContentLength @@ -253,8 +249,7 @@ class DataTaskDelegate: TaskDelegate, URLSessionDataDelegate { func urlSession( _ session: URLSession, dataTask: URLSessionDataTask, - didBecome downloadTask: URLSessionDownloadTask) - { + didBecome downloadTask: URLSessionDownloadTask) { dataTaskDidBecomeDownloadTask?(session, dataTask, downloadTask) } @@ -287,8 +282,7 @@ class DataTaskDelegate: TaskDelegate, URLSessionDataDelegate { _ session: URLSession, dataTask: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse, - completionHandler: @escaping (CachedURLResponse?) -> Void) - { + completionHandler: @escaping (CachedURLResponse?) -> Void) { var cachedResponse: CachedURLResponse? = proposedResponse if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { @@ -343,8 +337,7 @@ class DownloadTaskDelegate: TaskDelegate, URLSessionDownloadDelegate { func urlSession( _ session: URLSession, downloadTask: URLSessionDownloadTask, - didFinishDownloadingTo location: URL) - { + didFinishDownloadingTo location: URL) { temporaryURL = location guard @@ -379,8 +372,7 @@ class DownloadTaskDelegate: TaskDelegate, URLSessionDownloadDelegate { downloadTask: URLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { + totalBytesExpectedToWrite: Int64) { if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } if let downloadTaskDidWriteData = downloadTaskDidWriteData { @@ -405,8 +397,7 @@ class DownloadTaskDelegate: TaskDelegate, URLSessionDownloadDelegate { _ session: URLSession, downloadTask: URLSessionDownloadTask, didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { + expectedTotalBytes: Int64) { if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) } else { @@ -448,8 +439,7 @@ class UploadTaskDelegate: DataTaskDelegate { task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { + totalBytesExpectedToSend: Int64) { if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } if let taskDidSendBodyData = taskDidSendBodyData { diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift index 596c1bdc41f9..2c27dd29f74b 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift @@ -64,8 +64,7 @@ public struct Timeline { requestStartTime: CFAbsoluteTime = 0.0, initialResponseTime: CFAbsoluteTime = 0.0, requestCompletedTime: CFAbsoluteTime = 0.0, - serializationCompletedTime: CFAbsoluteTime = 0.0) - { + serializationCompletedTime: CFAbsoluteTime = 0.0) { self.requestStartTime = requestStartTime self.initialResponseTime = initialResponseTime self.requestCompletedTime = requestCompletedTime diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift index 59e0bbb2b0e9..3c37e24d847f 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift @@ -94,8 +94,7 @@ extension Request { statusCode acceptableStatusCodes: S, response: HTTPURLResponse) -> ValidationResult - where S.Iterator.Element == Int - { + where S.Iterator.Element == Int { if acceptableStatusCodes.contains(response.statusCode) { return .success } else { @@ -111,8 +110,7 @@ extension Request { response: HTTPURLResponse, data: Data?) -> ValidationResult - where S.Iterator.Element == String - { + where S.Iterator.Element == String { guard let data = data, data.count > 0 else { return .success } guard diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/Bag.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/Bag.swift index 4ad0a2bc1887..3b7a6453e9e0 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/Bag.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/Bag.swift @@ -29,12 +29,12 @@ Time and space complexity of insertion and deletion is O(n). It is suitable for storing small number of elements. */ -struct Bag : CustomDebugStringConvertible { +struct Bag: CustomDebugStringConvertible { /// Type of identifier for inserted elements. typealias KeyType = BagKey - + typealias Entry = (key: BagKey, value: T) - + fileprivate var _nextKey: BagKey = BagKey(rawValue: 0) // data @@ -54,7 +54,7 @@ struct Bag : CustomDebugStringConvertible { /// Creates new empty `Bag`. init() { } - + /** Inserts `value` into bag. @@ -83,18 +83,18 @@ struct Bag : CustomDebugStringConvertible { _pairs.append((key: key, value: element)) return key } - + _dictionary = [key: element] - + return key } - + /// - returns: Number of elements in bag. var count: Int { let dictionaryCount: Int = _dictionary?.count ?? 0 return (_value0 != nil ? 1 : 0) + _pairs.count + dictionaryCount } - + /// Removes all elements from bag and clears capacity. mutating func removeAll() { _key0 = nil @@ -103,7 +103,7 @@ struct Bag : CustomDebugStringConvertible { _pairs.removeAll(keepingCapacity: false) _dictionary?.removeAll(keepingCapacity: false) } - + /** Removes element with a specific `key` from bag. @@ -134,7 +134,7 @@ struct Bag : CustomDebugStringConvertible { extension Bag { /// A textual representation of `self`, suitable for debugging. - var debugDescription : String { + var debugDescription: String { return "\(self.count) elements in Bag" } } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift index 5a573a0de168..1307febd8ec8 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift @@ -7,16 +7,16 @@ // /// Sequence that repeats `repeatedValue` infinite number of times. -struct InfiniteSequence : Sequence { +struct InfiniteSequence: Sequence { typealias Element = E typealias Iterator = AnyIterator - + private let _repeatedValue: E - + init(repeatedValue: E) { _repeatedValue = repeatedValue } - + func makeIterator() -> Iterator { let repeatedValue = _repeatedValue return AnyIterator { diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift index f7cb99c8b022..c85853cf7500 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift @@ -104,7 +104,7 @@ struct PriorityQueue { } } -extension PriorityQueue : CustomDebugStringConvertible { +extension PriorityQueue: CustomDebugStringConvertible { var debugDescription: String { return _elements.debugDescription } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/Queue.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/Queue.swift index d05726c7b99a..b9b3ae2e8b89 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/Queue.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DataStructures/Queue.swift @@ -19,7 +19,7 @@ struct Queue: Sequence { typealias Generator = AnyIterator private let _resizeFactor = 2 - + private var _storage: ContiguousArray private var _count = 0 private var _pushNextIndex = 0 @@ -35,50 +35,50 @@ struct Queue: Sequence { _storage = ContiguousArray(repeating: nil, count: capacity) } - + private var dequeueIndex: Int { let index = _pushNextIndex - count return index < 0 ? index + _storage.count : index } - + /// - returns: Is queue empty. var isEmpty: Bool { return count == 0 } - + /// - returns: Number of elements inside queue. var count: Int { return _count } - + /// - returns: Element in front of a list of elements to `dequeue`. func peek() -> T { precondition(count > 0) - + return _storage[dequeueIndex]! } - + mutating private func resizeTo(_ size: Int) { var newStorage = ContiguousArray(repeating: nil, count: size) - + let count = _count - + let dequeueIndex = self.dequeueIndex let spaceToEndOfQueue = _storage.count - dequeueIndex - + // first batch is from dequeue index to end of array let countElementsInFirstBatch = Swift.min(count, spaceToEndOfQueue) // second batch is wrapped from start of array to end of queue let numberOfElementsInSecondBatch = count - countElementsInFirstBatch - + newStorage[0 ..< countElementsInFirstBatch] = _storage[dequeueIndex ..< (dequeueIndex + countElementsInFirstBatch)] newStorage[countElementsInFirstBatch ..< (countElementsInFirstBatch + numberOfElementsInSecondBatch)] = _storage[0 ..< numberOfElementsInSecondBatch] - + _count = count _pushNextIndex = count _storage = newStorage } - + /// Enqueues `element`. /// /// - parameter element: Element to enqueue. @@ -86,19 +86,19 @@ struct Queue: Sequence { if count == _storage.count { resizeTo(Swift.max(_storage.count, 1) * _resizeFactor) } - + _storage[_pushNextIndex] = element _pushNextIndex += 1 _count += 1 - + if _pushNextIndex >= _storage.count { _pushNextIndex -= _storage.count } } - + private mutating func dequeueElementOnly() -> T { precondition(count > 0) - + let index = dequeueIndex defer { @@ -126,7 +126,7 @@ struct Queue: Sequence { return dequeueElementOnly() } - + /// - returns: Generator of contained elements. func makeIterator() -> AnyIterator { var i = dequeueIndex diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DeprecationWarner.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DeprecationWarner.swift index 863636b7b7a5..d2ede7fb482c 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DeprecationWarner.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/DeprecationWarner.swift @@ -12,23 +12,23 @@ import Foundation class DeprecationWarner { private static var warned = Set() private static var _lock = NSRecursiveLock() - + static func warnIfNeeded(_ kind: Kind) { _lock.lock(); defer { _lock.unlock() } guard !warned.contains(kind) else { return } - + warned.insert(kind) print("ℹ️ [DEPRECATED] \(kind.message)") } } - + extension DeprecationWarner { enum Kind { case variable case globalTestFunctionNext case globalTestFunctionError case globalTestFunctionCompleted - + var message: String { switch self { case .variable: return "`Variable` is planned for future deprecation. Please consider `BehaviorRelay` as a replacement. Read more at: https://git.io/vNqvx" @@ -40,4 +40,3 @@ import Foundation } } #endif - diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/Platform.Darwin.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/Platform.Darwin.swift index 6dc36add7be8..f75007f442ef 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/Platform.Darwin.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/Platform.Darwin.swift @@ -19,8 +19,7 @@ if let newValue = value { threadDictionary[key] = newValue - } - else { + } else { threadDictionary[key] = nil } } @@ -28,7 +27,7 @@ static func getThreadLocalStorageValueForKey(_ key: NSCopying) -> T? { let currentThread = Thread.current let threadDictionary = currentThread.threadDictionary - + return threadDictionary[key] as? T } } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/Platform.Linux.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/Platform.Linux.swift index 570f8f00fa2a..125fe8863f2c 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/Platform.Linux.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/Platform/Platform.Linux.swift @@ -18,8 +18,7 @@ if let newValue = value { threadDictionary[key] = newValue - } - else { + } else { threadDictionary[key] = nil } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/AnyObserver.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/AnyObserver.swift index 85a5efa8fd49..c901d13898fa 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/AnyObserver.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/AnyObserver.swift @@ -9,10 +9,10 @@ /// A type-erased `ObserverType`. /// /// Forwards operations to an arbitrary underlying observer with the same `Element` type, hiding the specifics of the underlying observer type. -public struct AnyObserver : ObserverType { +public struct AnyObserver: ObserverType { /// The type of elements in sequence that observer can observe. public typealias E = Element - + /// Anonymous event handler type. public typealias EventHandler = (Event) -> Void @@ -24,14 +24,14 @@ public struct AnyObserver : ObserverType { public init(eventHandler: @escaping EventHandler) { self.observer = eventHandler } - + /// Construct an instance whose `on(event)` calls `observer.on(event)` /// /// - parameter observer: Observer that receives sequence events. - public init(_ observer: O) where O.E == Element { + public init(_ observer: O) where O.E == Element { self.observer = observer.on } - + /// Send `event` to this observer. /// /// - parameter event: Event instance. diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Cancelable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Cancelable.swift index 1fa7a67726e5..341807c18cba 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Cancelable.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Cancelable.swift @@ -7,7 +7,7 @@ // /// Represents disposable resource with state tracking. -public protocol Cancelable : Disposable { +public protocol Cancelable: Disposable { /// Was resource disposed. var isDisposed: Bool { get } } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift index 80332dbc4f01..1f8fbae74c6b 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift @@ -16,14 +16,11 @@ and pending work. That means that enqueued work could possibly be executed later on a different thread. */ -final class AsyncLock - : Disposable - , Lock - , SynchronizedDisposeType { +final class AsyncLock: Disposable, Lock, SynchronizedDisposeType { typealias Action = () -> Void - + var _lock = SpinLock() - + private var _queue: Queue = Queue(capacity: 0) private var _isExecuting: Bool = false @@ -60,8 +57,7 @@ final class AsyncLock self._lock.lock(); defer { self._lock.unlock() } // { if !self._queue.isEmpty { return self._queue.dequeue() - } - else { + } else { self._isExecuting = false return nil } @@ -70,27 +66,25 @@ final class AsyncLock func invoke(_ action: I) { let firstEnqueuedAction = self.enqueue(action) - + if let firstEnqueuedAction = firstEnqueuedAction { firstEnqueuedAction.invoke() - } - else { + } else { // action is enqueued, it's somebody else's concern now return } - + while true { let nextAction = self.dequeue() if let nextAction = nextAction { nextAction.invoke() - } - else { + } else { return } } } - + func dispose() { self.synchronizedDispose() } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/Lock.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/Lock.swift index b26f5b750165..a83bef6256d4 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/Lock.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/Lock.swift @@ -14,7 +14,7 @@ protocol Lock { // https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000321.html typealias SpinLock = RecursiveLock -extension RecursiveLock : Lock { +extension RecursiveLock: Lock { @inline(__always) final func performLocked(_ action: () -> Void) { self.lock(); defer { self.unlock() } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift index ed6b28a780dd..38e897184bc9 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift @@ -6,7 +6,7 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -protocol LockOwnerType : class, Lock { +protocol LockOwnerType: class, Lock { var _lock: RecursiveLock { get } } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift index 0490a69ba87f..1c897f18c5fd 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift @@ -6,7 +6,7 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -protocol SynchronizedDisposeType : class, Disposable, Lock { +protocol SynchronizedDisposeType: class, Disposable, Lock { func _synchronized_dispose() } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift index 33aa84fc51e8..a42737c0554d 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift @@ -6,7 +6,7 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -protocol SynchronizedOnType : class, ObserverType, Lock { +protocol SynchronizedOnType: class, ObserverType, Lock { func _synchronized_on(_ event: Event) } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift index bb1aa7e47df2..29897d4bdb8e 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift @@ -6,7 +6,7 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -protocol SynchronizedUnsubscribeType : class { +protocol SynchronizedUnsubscribeType: class { associatedtype DisposeKey func synchronizedUnsubscribe(_ disposeKey: DisposeKey) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ConnectableObservableType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ConnectableObservableType.swift index 52bf93c56862..239455a0f960 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ConnectableObservableType.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ConnectableObservableType.swift @@ -9,7 +9,7 @@ /** Represents an observable sequence wrapper that can be connected and disconnected from its underlying observable sequence. */ -public protocol ConnectableObservableType : ObservableType { +public protocol ConnectableObservableType: ObservableType { /** Connects the observable wrapper to its source. All subscribed observers will receive values from the underlying observable sequence as long as the connection is established. diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Deprecated.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Deprecated.swift index cb410906eca9..c8ac5c546f44 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Deprecated.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Deprecated.swift @@ -51,7 +51,6 @@ extension ObservableType { return self.enumerated().map { try selector($0.element, $0.index) } } - /** Projects each element of an observable sequence to an observable sequence by incorporating the element's index and merges the resulting observable sequences into one observable sequence. @@ -82,7 +81,6 @@ extension ObservableType { return self.enumerated().skipWhile { try predicate($0.element, $0.index) }.map { $0.element } } - /** Returns elements from an observable sequence as long as a specified condition is true. @@ -113,7 +111,6 @@ extension Disposable { } } - extension ObservableType { /** @@ -132,7 +129,6 @@ extension ObservableType { } } - extension ObservableType { /** diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift index 6fbd6355506a..9aaa70bb1b7a 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift @@ -9,7 +9,7 @@ /// Represents an Action-based disposable. /// /// When dispose method is called, disposal action will be dereferenced. -fileprivate final class AnonymousDisposable : DisposeBase, Cancelable { +fileprivate final class AnonymousDisposable: DisposeBase, Cancelable { public typealias DisposeAction = () -> Void private let _isDisposed = AtomicInt(0) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift index 5693268d2a2a..e5ffb8d7ce4d 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift @@ -7,7 +7,7 @@ // /// Represents two disposable resources that are disposed together. -private final class BinaryDisposable : DisposeBase, Cancelable { +private final class BinaryDisposable: DisposeBase, Cancelable { private let _isDisposed = AtomicInt(0) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift index a0f5c2fb8661..82e5cfed8764 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift @@ -7,25 +7,25 @@ // /// Represents a disposable resource that can be checked for disposal status. -public final class BooleanDisposable : Cancelable { +public final class BooleanDisposable: Cancelable { internal static let BooleanDisposableTrue = BooleanDisposable(isDisposed: true) private var _isDisposed = false - + /// Initializes a new instance of the `BooleanDisposable` class public init() { } - + /// Initializes a new instance of the `BooleanDisposable` class with given value public init(isDisposed: Bool) { self._isDisposed = isDisposed } - + /// - returns: Was resource disposed. public var isDisposed: Bool { return self._isDisposed } - + /// Sets the status to disposed, which can be observer through the `isDisposed` property. public func dispose() { self._isDisposed = true diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift index ce0da6a7c62c..f5155b286839 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift @@ -7,7 +7,7 @@ // /// Represents a group of disposable resources that are disposed together. -public final class CompositeDisposable : DisposeBase, Cancelable { +public final class CompositeDisposable: DisposeBase, Cancelable { /// Key used to remove disposable from composite disposable public struct DisposeKey { fileprivate let key: BagKey @@ -17,7 +17,7 @@ public final class CompositeDisposable : DisposeBase, Cancelable { } private var _lock = SpinLock() - + // state private var _disposables: Bag? = Bag() @@ -25,17 +25,17 @@ public final class CompositeDisposable : DisposeBase, Cancelable { self._lock.lock(); defer { self._lock.unlock() } return self._disposables == nil } - + public override init() { } - + /// Initializes a new instance of composite disposable with the specified number of disposables. public init(_ disposable1: Disposable, _ disposable2: Disposable) { // This overload is here to make sure we are using optimized version up to 4 arguments. _ = self._disposables!.insert(disposable1) _ = self._disposables!.insert(disposable2) } - + /// Initializes a new instance of composite disposable with the specified number of disposables. public init(_ disposable1: Disposable, _ disposable2: Disposable, _ disposable3: Disposable) { // This overload is here to make sure we are using optimized version up to 4 arguments. @@ -43,7 +43,7 @@ public final class CompositeDisposable : DisposeBase, Cancelable { _ = self._disposables!.insert(disposable2) _ = self._disposables!.insert(disposable3) } - + /// Initializes a new instance of composite disposable with the specified number of disposables. public init(_ disposable1: Disposable, _ disposable2: Disposable, _ disposable3: Disposable, _ disposable4: Disposable, _ disposables: Disposable...) { // This overload is here to make sure we are using optimized version up to 4 arguments. @@ -51,12 +51,12 @@ public final class CompositeDisposable : DisposeBase, Cancelable { _ = self._disposables!.insert(disposable2) _ = self._disposables!.insert(disposable3) _ = self._disposables!.insert(disposable4) - + for disposable in disposables { _ = self._disposables!.insert(disposable) } } - + /// Initializes a new instance of composite disposable with the specified number of disposables. public init(disposables: [Disposable]) { for disposable in disposables { @@ -73,39 +73,39 @@ public final class CompositeDisposable : DisposeBase, Cancelable { */ public func insert(_ disposable: Disposable) -> DisposeKey? { let key = self._insert(disposable) - + if key == nil { disposable.dispose() } - + return key } - + private func _insert(_ disposable: Disposable) -> DisposeKey? { self._lock.lock(); defer { self._lock.unlock() } let bagKey = self._disposables?.insert(disposable) return bagKey.map(DisposeKey.init) } - + /// - returns: Gets the number of disposables contained in the `CompositeDisposable`. public var count: Int { self._lock.lock(); defer { self._lock.unlock() } return self._disposables?.count ?? 0 } - + /// Removes and disposes the disposable identified by `disposeKey` from the CompositeDisposable. /// /// - parameter disposeKey: Key used to identify disposable to be removed. public func remove(for disposeKey: DisposeKey) { self._remove(for: disposeKey)?.dispose() } - + private func _remove(for disposeKey: DisposeKey) -> Disposable? { self._lock.lock(); defer { self._lock.unlock() } return self._disposables?.removeKey(disposeKey.key) } - + /// Disposes all disposables in the group and removes them from the group. public func dispose() { if let disposables = self._dispose() { @@ -129,7 +129,7 @@ extension Disposables { public static func create(_ disposable1: Disposable, _ disposable2: Disposable, _ disposable3: Disposable) -> Cancelable { return CompositeDisposable(disposable1, disposable2, disposable3) } - + /// Creates a disposable with the given disposables. public static func create(_ disposable1: Disposable, _ disposable2: Disposable, _ disposable3: Disposable, _ disposables: Disposable ...) -> Cancelable { var disposables = disposables @@ -138,7 +138,7 @@ extension Disposables { disposables.append(disposable3) return CompositeDisposable(disposables: disposables) } - + /// Creates a disposable with the given disposables. public static func create(_ disposables: [Disposable]) -> Cancelable { switch disposables.count { diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/Disposables.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/Disposables.swift index 8cd6e28c3c90..fbee0bc5b8ed 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/Disposables.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/Disposables.swift @@ -10,4 +10,3 @@ public struct Disposables { private init() {} } - diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift index 22e5cb02f980..a28ee9ffdc36 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift @@ -28,13 +28,13 @@ or create a new one in its place. In case explicit disposal is necessary, there is also `CompositeDisposable`. */ public final class DisposeBag: DisposeBase { - + private var _lock = SpinLock() - + // state fileprivate var _disposables = [Disposable]() fileprivate var _isDisposed = false - + /// Constructs new empty dispose bag. public override init() { super.init() @@ -46,7 +46,7 @@ public final class DisposeBag: DisposeBase { public func insert(_ disposable: Disposable) { self._insert(disposable)?.dispose() } - + private func _insert(_ disposable: Disposable) -> Disposable? { self._lock.lock(); defer { self._lock.unlock() } if self._isDisposed { @@ -71,13 +71,13 @@ public final class DisposeBag: DisposeBase { self._lock.lock(); defer { self._lock.unlock() } let disposables = self._disposables - + self._disposables.removeAll(keepingCapacity: false) self._isDisposed = true - + return disposables } - + deinit { self.dispose() } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift index 0d4b2fb7f9b8..08cd2dd263e9 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift @@ -13,7 +13,7 @@ public class DisposeBase { _ = Resources.incrementTotal() #endif } - + deinit { #if TRACE_RESOURCES _ = Resources.decrementTotal() diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift index 149f86643425..24fb5acc61f0 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift @@ -9,14 +9,14 @@ /// Represents a disposable that does nothing on disposal. /// /// Nop = No Operation -fileprivate struct NopDisposable : Disposable { - +private struct NopDisposable: Disposable { + fileprivate static let noOp: Disposable = NopDisposable() - + fileprivate init() { - + } - + /// Does nothing. public func dispose() { } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift index 922f20a6db01..d7035b8b2170 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift @@ -7,7 +7,7 @@ // /// Represents a disposable resource that only disposes its underlying disposable resource when all dependent disposable objects have been disposed. -public final class RefCountDisposable : DisposeBase, Cancelable { +public final class RefCountDisposable: DisposeBase, Cancelable { private var _lock = SpinLock() private var _disposable = nil as Disposable? private var _primaryDisposed = false @@ -94,8 +94,7 @@ public final class RefCountDisposable : DisposeBase, Cancelable { } } -internal final class RefCountInnerDisposable: DisposeBase, Disposable -{ +internal final class RefCountInnerDisposable: DisposeBase, Disposable { private let _parent: RefCountDisposable private let _isDisposed = AtomicInt(0) @@ -104,8 +103,7 @@ internal final class RefCountInnerDisposable: DisposeBase, Disposable super.init() } - internal func dispose() - { + internal func dispose() { if fetchOr(self._isDisposed, 1) == 0 { self._parent.release() } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift index c834f5be1b08..76304345b30e 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift @@ -12,7 +12,7 @@ private let disposeScheduledDisposable: (ScheduledDisposable) -> Disposable = { } /// Represents a disposable resource whose disposal invocation will be scheduled on the specified scheduler. -public final class ScheduledDisposable : Cancelable { +public final class ScheduledDisposable: Cancelable { public let scheduler: ImmediateSchedulerType private let _isDisposed = AtomicInt(0) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift index 22dce3620b1b..3ea6ee54a26d 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift @@ -7,23 +7,23 @@ // /// Represents a disposable resource whose underlying disposable resource can be replaced by another disposable resource, causing automatic disposal of the previous underlying disposable resource. -public final class SerialDisposable : DisposeBase, Cancelable { +public final class SerialDisposable: DisposeBase, Cancelable { private var _lock = SpinLock() - + // state private var _current = nil as Disposable? private var _isDisposed = false - + /// - returns: Was resource disposed. public var isDisposed: Bool { return self._isDisposed } - + /// Initializes a new instance of the `SerialDisposable`. override public init() { super.init() } - + /** Gets or sets the underlying disposable. @@ -41,20 +41,19 @@ public final class SerialDisposable : DisposeBase, Cancelable { let disposable: Disposable? = self._lock.calculateLocked { if self._isDisposed { return newDisposable - } - else { + } else { let toDispose = self._current self._current = newDisposable return toDispose } } - + if let disposable = disposable { disposable.dispose() } } } - + /// Disposes the underlying disposable as well as all future replacements. public func dispose() { self._dispose()?.dispose() @@ -64,8 +63,7 @@ public final class SerialDisposable : DisposeBase, Cancelable { self._lock.lock(); defer { self._lock.unlock() } if self._isDisposed { return nil - } - else { + } else { self._isDisposed = true let current = self._current self._current = nil diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift index 88d59dbe31aa..9750ec92bf68 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift @@ -11,7 +11,7 @@ Represents a disposable resource which only allows a single assignment of its un If an underlying disposable resource has already been set, future attempts to set the underlying disposable resource will throw an exception. */ -public final class SingleAssignmentDisposable : DisposeBase, Cancelable { +public final class SingleAssignmentDisposable: DisposeBase, Cancelable { fileprivate enum DisposeState: Int32 { case disposed = 1 diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift index 430e4c6b550d..fd62ccf047c1 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift @@ -6,7 +6,7 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -struct SubscriptionDisposable : Disposable { +struct SubscriptionDisposable: Disposable { private let _key: T.DisposeKey private weak var _owner: T? diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Errors.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Errors.swift index f17b52d882a8..648918e16fec 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Errors.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Errors.swift @@ -10,9 +10,7 @@ let RxErrorDomain = "RxErrorDomain" let RxCompositeFailures = "RxCompositeFailures" /// Generic Rx error codes. -public enum RxError - : Swift.Error - , CustomDebugStringConvertible { +public enum RxError: Swift.Error, CustomDebugStringConvertible { /// Unknown error occurred. case unknown /// Performing an action on disposed object. diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Event.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Event.swift index 9193e3504d4d..1386ba8a4941 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Event.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Event.swift @@ -21,7 +21,7 @@ public enum Event { case completed } -extension Event : CustomDebugStringConvertible { +extension Event: CustomDebugStringConvertible { /// Description of event. public var debugDescription: String { switch self { @@ -82,8 +82,7 @@ extension Event { case .completed: return .completed } - } - catch let e { + } catch let e { return .error(e) } } @@ -98,7 +97,7 @@ public protocol EventConvertible { var event: Event { get } } -extension Event : EventConvertible { +extension Event: EventConvertible { /// Event representation of this instance public var event: Event { return self diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift index fc9b22cd7f80..0b228b8a3f8d 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift @@ -6,7 +6,6 @@ // Copyright © 2016 Krunoslav Zaher. All rights reserved. // - // MARK: forEach @inline(__always) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/GroupedObservable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/GroupedObservable.swift index c5b0a9d6d10a..a9be538b542a 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/GroupedObservable.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/GroupedObservable.swift @@ -7,7 +7,7 @@ // /// Represents an observable sequence of elements that have a common key. -public struct GroupedObservable : ObservableType { +public struct GroupedObservable: ObservableType { public typealias E = Element /// Gets the common key. @@ -26,7 +26,7 @@ public struct GroupedObservable : ObservableType { } /// Subscribes `observer` to receive events for this sequence. - public func subscribe(_ observer: O) -> Disposable where O.E == E { + public func subscribe(_ observer: O) -> Disposable where O.E == E { return self.source.subscribe(observer) } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift index 954fbf04b2a0..de9f9ee92509 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift @@ -28,9 +28,9 @@ extension ImmediateSchedulerType { */ public func scheduleRecursive(_ state: State, action: @escaping (_ state: State, _ recurse: (State) -> Void) -> Void) -> Disposable { let recursiveScheduler = RecursiveImmediateScheduler(action: action, scheduler: self) - + recursiveScheduler.schedule(state) - + return Disposables.create(with: recursiveScheduler.dispose) } } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observable.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observable.swift index 08caab43765f..ef96782089d5 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observable.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observable.swift @@ -9,24 +9,24 @@ /// A type-erased `ObservableType`. /// /// It represents a push style sequence. -public class Observable : ObservableType { +public class Observable: ObservableType { /// Type of elements in sequence. public typealias E = Element - + init() { #if TRACE_RESOURCES _ = Resources.incrementTotal() #endif } - + public func subscribe(_ observer: O) -> Disposable where O.E == E { rxAbstractMethod() } - + public func asObservable() -> Observable { return self } - + deinit { #if TRACE_RESOURCES _ = Resources.decrementTotal() @@ -41,4 +41,3 @@ public class Observable : ObservableType { return _map(source: self, transform: transform) } } - diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift index 362fc58a5ad5..0d07788cbdb9 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift @@ -24,8 +24,7 @@ extension ObservableType { } return self.asObservable().subscribe(observer) } - - + /** Subscribes an element handler, an error handler, a completion handler and disposed handler to an observable sequence. @@ -39,35 +38,33 @@ extension ObservableType { public func subscribe(onNext: ((E) -> Void)? = nil, onError: ((Swift.Error) -> Void)? = nil, onCompleted: (() -> Void)? = nil, onDisposed: (() -> Void)? = nil) -> Disposable { let disposable: Disposable - + if let disposed = onDisposed { disposable = Disposables.create(with: disposed) - } - else { + } else { disposable = Disposables.create() } - + #if DEBUG let synchronizationTracker = SynchronizationTracker() #endif - + let callStack = Hooks.recordCallStackOnError ? Hooks.customCaptureSubscriptionCallstack() : [] - + let observer = AnonymousObserver { event in - + #if DEBUG synchronizationTracker.register(synchronizationErrorMessage: .default) defer { synchronizationTracker.unregister() } #endif - + switch event { case .next(let value): onNext?(value) case .error(let error): if let onError = onError { onError(error) - } - else { + } else { Hooks.defaultErrorHandler(callStack, error) } disposable.dispose() @@ -115,7 +112,7 @@ extension Hooks { _defaultErrorHandler = newValue } } - + /// Subscription callstack block to fetch custom callstack information. public static var customCaptureSubscriptionCallstack: CustomCaptureSubscriptionCallstack { get { @@ -128,4 +125,3 @@ extension Hooks { } } } - diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObservableType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObservableType.swift index e41a36a1ae63..5f2a0219ab0f 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObservableType.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObservableType.swift @@ -7,7 +7,7 @@ // /// Represents a push style sequence. -public protocol ObservableType : ObservableConvertibleType { +public protocol ObservableType: ObservableConvertibleType { /** Subscribes `observer` to receive events for this sequence. @@ -35,7 +35,7 @@ public protocol ObservableType : ObservableConvertibleType { } extension ObservableType { - + /// Default implementation of converting `ObservableType` to `Observable`. public func asObservable() -> Observable { // temporary workaround diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/AddRef.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/AddRef.swift index a69147c84911..f7adb4998b03 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/AddRef.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/AddRef.swift @@ -6,13 +6,13 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -final class AddRefSink : Sink, ObserverType { +final class AddRefSink: Sink, ObserverType { typealias Element = O.E - + override init(observer: O, cancel: Cancelable) { super.init(observer: observer, cancel: cancel) } - + func on(_ event: Event) { switch event { case .next: @@ -24,16 +24,16 @@ final class AddRefSink : Sink, ObserverType { } } -final class AddRef : Producer { - +final class AddRef: Producer { + private let _source: Observable private let _refCount: RefCountDisposable - + init(source: Observable, refCount: RefCountDisposable) { self._source = source self._refCount = refCount } - + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let releaseDisposable = self._refCount.retain() let sink = AddRefSink(observer: observer, cancel: cancel) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Amb.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Amb.swift index b4b9b7ee9020..2d3a842ce941 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Amb.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Amb.swift @@ -39,7 +39,7 @@ extension ObservableType { } } -fileprivate enum AmbState { +private enum AmbState { case neither case left case right @@ -50,28 +50,28 @@ final private class AmbObserver: ObserverType { typealias Parent = AmbSink typealias This = AmbObserver typealias Sink = (This, Event) -> Void - + fileprivate let _parent: Parent fileprivate var _sink: Sink fileprivate var _cancel: Disposable - + init(parent: Parent, cancel: Disposable, sink: @escaping Sink) { #if TRACE_RESOURCES _ = Resources.incrementTotal() #endif - + self._parent = parent self._sink = sink self._cancel = cancel } - + func on(_ event: Event) { self._sink(self, event) if event.isStopEvent { self._cancel.dispose() } } - + deinit { #if TRACE_RESOURCES _ = Resources.decrementTotal() @@ -85,21 +85,21 @@ final private class AmbSink: Sink { typealias AmbObserverType = AmbObserver private let _parent: Parent - + private let _lock = RecursiveLock() // state private var _choice = AmbState.neither - + init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent super.init(observer: observer, cancel: cancel) } - + func run() -> Disposable { let subscription1 = SingleAssignmentDisposable() let subscription2 = SingleAssignmentDisposable() let disposeAll = Disposables.create(subscription1, subscription2) - + let forwardEvent = { (o: AmbObserverType, event: Event) -> Void in self.forwardOn(event) if event.isStopEvent { @@ -115,7 +115,7 @@ final private class AmbSink: Sink { o._cancel = disposeAll otherSubscription.dispose() } - + if self._choice == me { self.forwardOn(event) if event.isStopEvent { @@ -124,18 +124,18 @@ final private class AmbSink: Sink { } } } - + let sink1 = AmbObserver(parent: self, cancel: subscription1) { o, e in decide(o, e, .left, subscription2) } - + let sink2 = AmbObserver(parent: self, cancel: subscription1) { o, e in decide(o, e, .right, subscription1) } - + subscription1.setDisposable(self._parent._left.subscribe(sink1)) subscription2.setDisposable(self._parent._right.subscribe(sink2)) - + return disposeAll } } @@ -143,13 +143,13 @@ final private class AmbSink: Sink { final private class Amb: Producer { fileprivate let _left: Observable fileprivate let _right: Observable - + init(left: Observable, right: Observable) { self._left = left self._right = right } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = AmbSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift index d9010dd43311..842cf0fcae8f 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift @@ -6,7 +6,7 @@ // Copyright © 2017 Krunoslav Zaher. All rights reserved. // -fileprivate final class AsMaybeSink : Sink, ObserverType { +fileprivate final class AsMaybeSink: Sink, ObserverType { typealias ElementType = O.E typealias E = ElementType @@ -41,7 +41,7 @@ final class AsMaybe: Producer { self._source = source } - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = AsMaybeSink(observer: observer, cancel: cancel) let subscription = self._source.subscribe(sink) return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/AsSingle.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/AsSingle.swift index 8682f1fb0ae9..81685acbbebe 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/AsSingle.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/AsSingle.swift @@ -6,7 +6,7 @@ // Copyright © 2017 Krunoslav Zaher. All rights reserved. // -fileprivate final class AsSingleSink : Sink, ObserverType { +fileprivate final class AsSingleSink: Sink, ObserverType { typealias ElementType = O.E typealias E = ElementType @@ -28,8 +28,7 @@ fileprivate final class AsSingleSink : Sink, ObserverType { if let element = self._element { self.forwardOn(element) self.forwardOn(.completed) - } - else { + } else { self.forwardOn(.error(RxError.noElements)) } self.dispose() @@ -44,7 +43,7 @@ final class AsSingle: Producer { self._source = source } - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = AsSingleSink(observer: observer, cancel: cancel) let subscription = self._source.subscribe(sink) return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Buffer.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Buffer.swift index db4cf2107583..94fff0b99a19 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Buffer.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Buffer.swift @@ -27,64 +27,60 @@ extension ObservableType { } final private class BufferTimeCount: Producer<[Element]> { - + fileprivate let _timeSpan: RxTimeInterval fileprivate let _count: Int fileprivate let _scheduler: SchedulerType fileprivate let _source: Observable - + init(source: Observable, timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) { self._source = source self._timeSpan = timeSpan self._count = count self._scheduler = scheduler } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == [Element] { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == [Element] { let sink = BufferTimeCountSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() return (sink: sink, subscription: subscription) } } -final private class BufferTimeCountSink - : Sink - , LockOwnerType - , ObserverType - , SynchronizedOnType where O.E == [Element] { +final private class BufferTimeCountSink: Sink, LockOwnerType, ObserverType, SynchronizedOnType where O.E == [Element] { typealias Parent = BufferTimeCount typealias E = Element - + private let _parent: Parent - + let _lock = RecursiveLock() - + // state private let _timerD = SerialDisposable() private var _buffer = [Element]() private var _windowID = 0 - + init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent super.init(observer: observer, cancel: cancel) } - + func run() -> Disposable { self.createTimer(self._windowID) return Disposables.create(_timerD, _parent._source.subscribe(self)) } - + func startNewWindowAndSendCurrentOne() { self._windowID = self._windowID &+ 1 let windowID = self._windowID - + let buffer = self._buffer self._buffer = [] self.forwardOn(.next(buffer)) - + self.createTimer(windowID) } - + func on(_ event: Event) { self.synchronizedOn(event) } @@ -93,11 +89,11 @@ final private class BufferTimeCountSink switch event { case .next(let element): self._buffer.append(element) - + if self._buffer.count == self._parent._count { self.startNewWindowAndSendCurrentOne() } - + case .error(let error): self._buffer = [] self.forwardOn(.error(error)) @@ -108,18 +104,18 @@ final private class BufferTimeCountSink self.dispose() } } - + func createTimer(_ windowID: Int) { if self._timerD.isDisposed { return } - + if self._windowID != windowID { return } let nextTimer = SingleAssignmentDisposable() - + self._timerD.disposable = nextTimer let disposable = self._parent._scheduler.scheduleRelative(windowID, dueTime: self._parent._timeSpan) { previousWindowID in @@ -127,10 +123,10 @@ final private class BufferTimeCountSink if previousWindowID != self._windowID { return } - + self.startNewWindowAndSendCurrentOne() } - + return Disposables.create() } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Catch.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Catch.swift index 130607675728..43de02f05e34 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Catch.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Catch.swift @@ -33,7 +33,7 @@ extension ObservableType { -> Observable { return Catch(source: self.asObservable(), handler: { _ in Observable.just(element) }) } - + } extension ObservableType { @@ -86,16 +86,16 @@ extension ObservableType { final private class CatchSinkProxy: ObserverType { typealias E = O.E typealias Parent = CatchSink - + private let _parent: Parent - + init(parent: Parent) { self._parent = parent } - + func on(_ event: Event) { self._parent.forwardOn(event) - + switch event { case .next: break @@ -108,15 +108,15 @@ final private class CatchSinkProxy: ObserverType { final private class CatchSink: Sink, ObserverType { typealias E = O.E typealias Parent = Catch - + private let _parent: Parent private let _subscription = SerialDisposable() - + init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent super.init(observer: observer, cancel: cancel) } - + func run() -> Disposable { let d1 = SingleAssignmentDisposable() self._subscription.disposable = d1 @@ -124,7 +124,7 @@ final private class CatchSink: Sink, ObserverType { return self._subscription } - + func on(_ event: Event) { switch event { case .next: @@ -137,10 +137,9 @@ final private class CatchSink: Sink, ObserverType { let catchSequence = try self._parent._handler(error) let observer = CatchSinkProxy(parent: self) - + self._subscription.disposable = catchSequence.subscribe(observer) - } - catch let e { + } catch let e { self.forwardOn(.error(e)) self.dispose() } @@ -150,15 +149,15 @@ final private class CatchSink: Sink, ObserverType { final private class Catch: Producer { typealias Handler = (Swift.Error) throws -> Observable - + fileprivate let _source: Observable fileprivate let _handler: Handler - + init(source: Observable, handler: @escaping Handler) { self._source = source self._handler = handler } - + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = CatchSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() @@ -168,18 +167,16 @@ final private class Catch: Producer { // catch enumerable -final private class CatchSequenceSink - : TailRecursiveSink - , ObserverType where S.Iterator.Element: ObservableConvertibleType, S.Iterator.Element.E == O.E { +final private class CatchSequenceSink: TailRecursiveSink, ObserverType where S.Iterator.Element: ObservableConvertibleType, S.Iterator.Element.E == O.E { typealias Element = O.E typealias Parent = CatchSequence - + private var _lastError: Swift.Error? - + override init(observer: O, cancel: Cancelable) { super.init(observer: observer, cancel: cancel) } - + func on(_ event: Event) { switch event { case .next: @@ -196,23 +193,21 @@ final private class CatchSequenceSink override func subscribeToNext(_ source: Observable) -> Disposable { return source.subscribe(self) } - + override func done() { if let lastError = self._lastError { self.forwardOn(.error(lastError)) - } - else { + } else { self.forwardOn(.completed) } - + self.dispose() } - + override func extract(_ observable: Observable) -> SequenceGenerator? { if let onError = observable as? CatchSequence { return (onError.sources.makeIterator(), nil) - } - else { + } else { return nil } } @@ -220,14 +215,14 @@ final private class CatchSequenceSink final private class CatchSequence: Producer where S.Iterator.Element: ObservableConvertibleType { typealias Element = S.Iterator.Element.E - + let sources: S - + init(sources: S) { self.sources = sources } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = CatchSequenceSink(observer: observer, cancel: cancel) let subscription = sink.run((self.sources.makeIterator(), nil)) return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift index b62fa2929af2..d1de13585af4 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift @@ -33,14 +33,13 @@ extension ObservableType { } } -final private class CombineLatestCollectionTypeSink - : Sink where C.Iterator.Element: ObservableConvertibleType { +final private class CombineLatestCollectionTypeSink: Sink where C.Iterator.Element: ObservableConvertibleType { typealias R = O.E typealias Parent = CombineLatestCollectionType typealias SourceElement = C.Iterator.Element.E - + let _parent: Parent - + let _lock = RecursiveLock() // state @@ -49,21 +48,21 @@ final private class CombineLatestCollectionTypeSink, atIndex: Int) { self._lock.lock(); defer { self._lock.unlock() } // { switch event { @@ -71,9 +70,9 @@ final private class CombineLatestCollectionTypeSink Disposable { var j = 0 for i in self._parent._sources { @@ -124,21 +121,21 @@ final private class CombineLatestCollectionTypeSink: Producer where C.Iterator.Element: ObservableConvertibleType { typealias ResultSelector = ([C.Iterator.Element.E]) throws -> R - + let _sources: C let _resultSelector: ResultSelector let _count: Int @@ -148,8 +145,8 @@ final private class CombineLatestCollectionType: Producer w self._resultSelector = resultSelector self._count = Int(Int64(self._sources.count)) } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { let sink = CombineLatestCollectionTypeSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift index 7474bdc449f5..1bf382b2a17a 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift @@ -7,8 +7,6 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // - - // 2 extension ObservableType { @@ -48,7 +46,7 @@ extension ObservableType where E == Any { } } -final class CombineLatestSink2_ : CombineLatestSink { +final class CombineLatestSink2_: CombineLatestSink { typealias R = O.E typealias Parent = CombineLatest2 @@ -83,7 +81,7 @@ final class CombineLatestSink2_ : CombineLatestSink } } -final class CombineLatest2 : Producer { +final class CombineLatest2: Producer { typealias ResultSelector = (E1, E2) throws -> R let _source1: Observable @@ -105,8 +103,6 @@ final class CombineLatest2 : Producer { } } - - // 3 extension ObservableType { @@ -146,7 +142,7 @@ extension ObservableType where E == Any { } } -final class CombineLatestSink3_ : CombineLatestSink { +final class CombineLatestSink3_: CombineLatestSink { typealias R = O.E typealias Parent = CombineLatest3 @@ -186,7 +182,7 @@ final class CombineLatestSink3_ : CombineLatestSink } } -final class CombineLatest3 : Producer { +final class CombineLatest3: Producer { typealias ResultSelector = (E1, E2, E3) throws -> R let _source1: Observable @@ -210,8 +206,6 @@ final class CombineLatest3 : Producer { } } - - // 4 extension ObservableType { @@ -251,7 +245,7 @@ extension ObservableType where E == Any { } } -final class CombineLatestSink4_ : CombineLatestSink { +final class CombineLatestSink4_: CombineLatestSink { typealias R = O.E typealias Parent = CombineLatest4 @@ -296,7 +290,7 @@ final class CombineLatestSink4_ : CombineLatest } } -final class CombineLatest4 : Producer { +final class CombineLatest4: Producer { typealias ResultSelector = (E1, E2, E3, E4) throws -> R let _source1: Observable @@ -322,8 +316,6 @@ final class CombineLatest4 : Producer { } } - - // 5 extension ObservableType { @@ -363,7 +355,7 @@ extension ObservableType where E == Any { } } -final class CombineLatestSink5_ : CombineLatestSink { +final class CombineLatestSink5_: CombineLatestSink { typealias R = O.E typealias Parent = CombineLatest5 @@ -413,7 +405,7 @@ final class CombineLatestSink5_ : CombineLa } } -final class CombineLatest5 : Producer { +final class CombineLatest5: Producer { typealias ResultSelector = (E1, E2, E3, E4, E5) throws -> R let _source1: Observable @@ -441,8 +433,6 @@ final class CombineLatest5 : Producer { } } - - // 6 extension ObservableType { @@ -482,7 +472,7 @@ extension ObservableType where E == Any { } } -final class CombineLatestSink6_ : CombineLatestSink { +final class CombineLatestSink6_: CombineLatestSink { typealias R = O.E typealias Parent = CombineLatest6 @@ -537,7 +527,7 @@ final class CombineLatestSink6_ : Combi } } -final class CombineLatest6 : Producer { +final class CombineLatest6: Producer { typealias ResultSelector = (E1, E2, E3, E4, E5, E6) throws -> R let _source1: Observable @@ -567,8 +557,6 @@ final class CombineLatest6 : Producer { } } - - // 7 extension ObservableType { @@ -608,7 +596,7 @@ extension ObservableType where E == Any { } } -final class CombineLatestSink7_ : CombineLatestSink { +final class CombineLatestSink7_: CombineLatestSink { typealias R = O.E typealias Parent = CombineLatest7 @@ -668,7 +656,7 @@ final class CombineLatestSink7_ : C } } -final class CombineLatest7 : Producer { +final class CombineLatest7: Producer { typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7) throws -> R let _source1: Observable @@ -700,8 +688,6 @@ final class CombineLatest7 : Producer { } } - - // 8 extension ObservableType { @@ -741,7 +727,7 @@ extension ObservableType where E == Any { } } -final class CombineLatestSink8_ : CombineLatestSink { +final class CombineLatestSink8_: CombineLatestSink { typealias R = O.E typealias Parent = CombineLatest8 @@ -806,7 +792,7 @@ final class CombineLatestSink8_ } } -final class CombineLatest8 : Producer { +final class CombineLatest8: Producer { typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7, E8) throws -> R let _source1: Observable @@ -839,5 +825,3 @@ final class CombineLatest8 : Producer { return (sink: sink, subscription: subscription) } } - - diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift index dbecf98ab363..7306862aba99 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift @@ -6,17 +6,15 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -protocol CombineLatestProtocol : class { +protocol CombineLatestProtocol: class { func next(_ index: Int) func fail(_ error: Swift.Error) func done(_ index: Int) } -class CombineLatestSink - : Sink - , CombineLatestProtocol { +class CombineLatestSink: Sink, CombineLatestProtocol { typealias Element = O.E - + let _lock = RecursiveLock() private let _arity: Int @@ -24,19 +22,19 @@ class CombineLatestSink private var _numberOfDone = 0 private var _hasValue: [Bool] private var _isDone: [Bool] - + init(arity: Int, observer: O, cancel: Cancelable) { self._arity = arity self._hasValue = [Bool](repeating: false, count: arity) self._isDone = [Bool](repeating: false, count: arity) - + super.init(observer: observer, cancel: cancel) } - + func getResult() throws -> Element { rxAbstractMethod() } - + func next(_ index: Int) { if !self._hasValue[index] { self._hasValue[index] = true @@ -47,13 +45,11 @@ class CombineLatestSink do { let result = try self.getResult() self.forwardOn(.next(result)) - } - catch let e { + } catch let e { self.forwardOn(.error(e)) self.dispose() } - } - else { + } else { var allOthersDone = true for i in 0 ..< self._arity { @@ -62,19 +58,19 @@ class CombineLatestSink break } } - + if allOthersDone { self.forwardOn(.completed) self.dispose() } } } - + func fail(_ error: Swift.Error) { self.forwardOn(.error(error)) self.dispose() } - + func done(_ index: Int) { if self._isDone[index] { return @@ -90,20 +86,17 @@ class CombineLatestSink } } -final class CombineLatestObserver - : ObserverType - , LockOwnerType - , SynchronizedOnType { +final class CombineLatestObserver: ObserverType, LockOwnerType, SynchronizedOnType { typealias Element = ElementType typealias ValueSetter = (Element) -> Void - + private let _parent: CombineLatestProtocol - + let _lock: RecursiveLock private let _index: Int private let _this: Disposable private let _setLatestValue: ValueSetter - + init(lock: RecursiveLock, parent: CombineLatestProtocol, index: Int, setLatestValue: @escaping ValueSetter, this: Disposable) { self._lock = lock self._parent = parent @@ -111,7 +104,7 @@ final class CombineLatestObserver self._this = this self._setLatestValue = setLatestValue } - + func on(_ event: Event) { self.synchronizedOn(event) } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Concat.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Concat.swift index 27daf8d4dc8d..2765ec2b18c6 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Concat.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Concat.swift @@ -76,16 +76,14 @@ extension ObservableType { } } -final private class ConcatSink - : TailRecursiveSink - , ObserverType where S.Iterator.Element: ObservableConvertibleType, S.Iterator.Element.E == O.E { +final private class ConcatSink: TailRecursiveSink, ObserverType where S.Iterator.Element: ObservableConvertibleType, S.Iterator.Element.E == O.E { typealias Element = O.E - + override init(observer: O, cancel: Cancelable) { super.init(observer: observer, cancel: cancel) } - - func on(_ event: Event){ + + func on(_ event: Event) { switch event { case .next: self.forwardOn(event) @@ -100,12 +98,11 @@ final private class ConcatSink override func subscribeToNext(_ source: Observable) -> Disposable { return source.subscribe(self) } - + override func extract(_ observable: Observable) -> SequenceGenerator? { if let source = observable as? Concat { return (source._sources.makeIterator(), source._count) - } - else { + } else { return nil } } @@ -113,7 +110,7 @@ final private class ConcatSink final private class Concat: Producer where S.Iterator.Element: ObservableConvertibleType { typealias Element = S.Iterator.Element.E - + fileprivate let _sources: S fileprivate let _count: IntMax? @@ -121,11 +118,10 @@ final private class Concat: Producer where S. self._sources = sources self._count = count } - + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = ConcatSink(observer: observer, cancel: cancel) let subscription = sink.run((self._sources.makeIterator(), self._count)) return (sink: sink, subscription: subscription) } } - diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Create.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Create.swift index b57a63ab1081..9204ba859c6a 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Create.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Create.swift @@ -70,7 +70,7 @@ final private class AnonymousObservable: Producer { self._subscribeHandler = subscribeHandler } - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = AnonymousObservableSink(observer: observer, cancel: cancel) let subscription = sink.run(self) return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Debounce.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Debounce.swift index 0b23cc94b7ab..9f11ffe15c51 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Debounce.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Debounce.swift @@ -23,11 +23,7 @@ extension ObservableType { } } -final private class DebounceSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { +final private class DebounceSink: Sink, ObserverType, LockOwnerType, SynchronizedOnType { typealias Element = O.E typealias ParentType = Debounce @@ -64,7 +60,6 @@ final private class DebounceSink let currentId = self._id self._value = element - let scheduler = self._parent._scheduler let dueTime = self._parent._dueTime @@ -114,5 +109,5 @@ final private class Debounce: Producer { let subscription = sink.run() return (sink: sink, subscription: subscription) } - + } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Debug.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Debug.swift index 1a07eb6e454e..7d47fbc62e04 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Debug.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Debug.swift @@ -26,19 +26,19 @@ extension ObservableType { } } -fileprivate let dateFormat = "yyyy-MM-dd HH:mm:ss.SSS" +private let dateFormat = "yyyy-MM-dd HH:mm:ss.SSS" -fileprivate func logEvent(_ identifier: String, dateFormat: DateFormatter, content: String) { +private func logEvent(_ identifier: String, dateFormat: DateFormatter, content: String) { print("\(dateFormat.string(from: Date())): \(identifier) -> \(content)") } final private class DebugSink: Sink, ObserverType where O.E == Source.E { typealias Element = O.E typealias Parent = Debug - + private let _parent: Parent private let _timestampFormatter = DateFormatter() - + init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent self._timestampFormatter.dateFormat = dateFormat @@ -47,7 +47,7 @@ final private class DebugSink: Sink, super.init(observer: observer, cancel: cancel) } - + func on(_ event: Event) { let maxEventTextLength = 40 let eventText = "\(event)" @@ -63,7 +63,7 @@ final private class DebugSink: Sink, self.dispose() } } - + override func dispose() { if !self.disposed { logEvent(self._parent._identifier, dateFormat: self._timestampFormatter, content: "isDisposed") @@ -81,20 +81,18 @@ final private class Debug: Producer { self._trimOutput = trimOutput if let identifier = identifier { self._identifier = identifier - } - else { + } else { let trimmedFile: String if let lastIndex = file.lastIndexOf("/") { trimmedFile = String(file[file.index(after: lastIndex) ..< file.endIndex]) - } - else { + } else { trimmedFile = file } self._identifier = "\(trimmedFile):\(line) (\(function))" } self._source = source } - + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Source.E { let sink = DebugSink(parent: self, observer: observer, cancel: cancel) let subscription = self._source.subscribe(sink) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift index cf0bfed9dc61..8745dbd0e796 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift @@ -25,12 +25,12 @@ final private class DefaultIfEmptySink: Sink, ObserverType { typealias E = O.E private let _default: E private var _isEmpty = true - + init(default: E, observer: O, cancel: Cancelable) { self._default = `default` super.init(observer: observer, cancel: cancel) } - + func on(_ event: Event) { switch event { case .next: @@ -52,12 +52,12 @@ final private class DefaultIfEmptySink: Sink, ObserverType { final private class DefaultIfEmpty: Producer { private let _source: Observable private let _default: SourceType - + init(source: Observable, `default`: SourceType) { self._source = source self._default = `default` } - + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceType { let sink = DefaultIfEmptySink(default: self._default, observer: observer, cancel: cancel) let subscription = self._source.subscribe(sink) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Deferred.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Deferred.swift index b75fbf9162b9..c7733790514d 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Deferred.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Deferred.swift @@ -30,22 +30,21 @@ final private class DeferredSink: Sink, O self._observableFactory = observableFactory super.init(observer: observer, cancel: cancel) } - + func run() -> Disposable { do { let result = try self._observableFactory() return result.subscribe(self) - } - catch let e { + } catch let e { self.forwardOn(.error(e)) self.dispose() return Disposables.create() } } - + func on(_ event: Event) { self.forwardOn(event) - + switch event { case .next: break @@ -59,13 +58,13 @@ final private class DeferredSink: Sink, O final private class Deferred: Producer { typealias Factory = () throws -> S - - private let _observableFactory : Factory - + + private let _observableFactory: Factory + init(observableFactory: @escaping Factory) { self._observableFactory = observableFactory } - + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { let sink = DeferredSink(observableFactory: self._observableFactory, observer: observer, cancel: cancel) let subscription = sink.run() diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Delay.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Delay.swift index 61969d5cfe56..5ccf7a979bcf 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Delay.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Delay.swift @@ -25,18 +25,16 @@ extension ObservableType { } } -final private class DelaySink - : Sink - , ObserverType { +final private class DelaySink: Sink, ObserverType { typealias E = O.E typealias Source = Observable typealias DisposeKey = Bag.KeyType - + private let _lock = RecursiveLock() private let _dueTime: RxTimeInterval private let _scheduler: SchedulerType - + private let _sourceSubscription = SingleAssignmentDisposable() private let _cancelable = SerialDisposable() @@ -49,7 +47,7 @@ final private class DelaySink // state private var _queue = Queue<(eventTime: RxTime, event: Event)>(capacity: 0) private var _disposed = false - + init(observer: O, dueTime: RxTimeInterval, scheduler: SchedulerType, cancel: Cancelable) { self._dueTime = dueTime self._scheduler = scheduler @@ -85,11 +83,9 @@ final private class DelaySink if errorEvent == nil { if eventToForwardImmediately != nil { - } - else if nextEventToScheduleOriginalTime != nil { + } else if nextEventToScheduleOriginalTime != nil { self._running = false - } - else { + } else { self._running = false self._active = false } @@ -100,8 +96,7 @@ final private class DelaySink self.forwardOn(errorEvent) self.dispose() return - } - else { + } else { if let eventToForwardImmediately = eventToForwardImmediately { ranAtLeastOnce = true self.forwardOn(eventToForwardImmediately) @@ -109,21 +104,19 @@ final private class DelaySink self.dispose() return } - } - else if let nextEventToScheduleOriginalTime = nextEventToScheduleOriginalTime { + } else if let nextEventToScheduleOriginalTime = nextEventToScheduleOriginalTime { let elapsedTime = self._scheduler.now.timeIntervalSince(nextEventToScheduleOriginalTime) let interval = self._dueTime - elapsedTime let normalizedInterval = interval < 0.0 ? 0.0 : interval scheduler.schedule((), dueTime: normalizedInterval) return - } - else { + } else { return } } } } - + func on(_ event: Event) { if event.isStopEvent { self._sourceSubscription.dispose() @@ -153,7 +146,7 @@ final private class DelaySink } } } - + func run(source: Observable) -> Disposable { self._sourceSubscription.setDisposable(source.subscribe(self)) return Disposables.create(_sourceSubscription, _cancelable) @@ -164,7 +157,7 @@ final private class Delay: Producer { private let _source: Observable private let _dueTime: RxTimeInterval private let _scheduler: SchedulerType - + init(source: Observable, dueTime: RxTimeInterval, scheduler: SchedulerType) { self._source = source self._dueTime = dueTime diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift index 16218a701f31..87c4d1b7fcfc 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift @@ -23,31 +23,30 @@ extension ObservableType { } } -final private class DelaySubscriptionSink - : Sink, ObserverType { +final private class DelaySubscriptionSink: Sink, ObserverType { typealias E = O.E - + func on(_ event: Event) { self.forwardOn(event) if event.isStopEvent { self.dispose() } } - + } final private class DelaySubscription: Producer { private let _source: Observable private let _dueTime: RxTimeInterval private let _scheduler: SchedulerType - + init(source: Observable, dueTime: RxTimeInterval, scheduler: SchedulerType) { self._source = source self._dueTime = dueTime self._scheduler = scheduler } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = DelaySubscriptionSink(observer: observer, cancel: cancel) let subscription = self._scheduler.scheduleRelative((), dueTime: self._dueTime) { _ in return self._source.subscribe(sink) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift index e315d17103e6..8256b890a433 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift @@ -38,12 +38,12 @@ fileprivate final class DematerializeSink: Producer { private let _source: Observable - + init(source: Observable) { self._source = source } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element.ElementType { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element.ElementType { let sink = DematerializeSink(observer: observer, cancel: cancel) let subscription = self._source.subscribe(sink) return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift index db0b0ab92180..58f8957f7785 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift @@ -65,15 +65,15 @@ extension ObservableType { final private class DistinctUntilChangedSink: Sink, ObserverType { typealias E = O.E - + private let _parent: DistinctUntilChanged private var _currentKey: Key? - + init(parent: DistinctUntilChanged, observer: O, cancel: Cancelable) { self._parent = parent super.init(observer: observer, cancel: cancel) } - + func on(_ event: Event) { switch event { case .next(let value): @@ -83,16 +83,15 @@ final private class DistinctUntilChangedSink: Sink, Obs if let currentKey = self._currentKey { areEqual = try self._parent._comparer(currentKey, key) } - + if areEqual { return } - + self._currentKey = key - + self.forwardOn(event) - } - catch let error { + } catch let error { self.forwardOn(.error(error)) self.dispose() } @@ -106,17 +105,17 @@ final private class DistinctUntilChangedSink: Sink, Obs final private class DistinctUntilChanged: Producer { typealias KeySelector = (Element) throws -> Key typealias EqualityComparer = (Key, Key) throws -> Bool - + fileprivate let _source: Observable fileprivate let _selector: KeySelector fileprivate let _comparer: EqualityComparer - + init(source: Observable, selector: @escaping KeySelector, comparer: @escaping EqualityComparer) { self._source = source self._selector = selector self._comparer = comparer } - + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = DistinctUntilChangedSink(parent: self, observer: observer, cancel: cancel) let subscription = self._source.subscribe(sink) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Do.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Do.swift index d05713194182..7270b263fa93 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Do.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Do.swift @@ -38,14 +38,14 @@ extension ObservableType { final private class DoSink: Sink, ObserverType { typealias Element = O.E typealias EventHandler = (Event) throws -> Void - + private let _eventHandler: EventHandler - + init(eventHandler: @escaping EventHandler, observer: O, cancel: Cancelable) { self._eventHandler = eventHandler super.init(observer: observer, cancel: cancel) } - + func on(_ event: Event) { do { try self._eventHandler(event) @@ -53,8 +53,7 @@ final private class DoSink: Sink, ObserverType { if event.isStopEvent { self.dispose() } - } - catch let error { + } catch let error { self.forwardOn(.error(error)) self.dispose() } @@ -63,13 +62,13 @@ final private class DoSink: Sink, ObserverType { final private class Do: Producer { typealias EventHandler = (Event) throws -> Void - + fileprivate let _source: Observable fileprivate let _eventHandler: EventHandler fileprivate let _onSubscribe: (() -> Void)? fileprivate let _onSubscribed: (() -> Void)? fileprivate let _onDispose: (() -> Void)? - + init(source: Observable, eventHandler: @escaping EventHandler, onSubscribe: (() -> Void)?, onSubscribed: (() -> Void)?, onDispose: (() -> Void)?) { self._source = source self._eventHandler = eventHandler @@ -77,7 +76,7 @@ final private class Do: Producer { self._onSubscribed = onSubscribed self._onDispose = onDispose } - + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { self._onSubscribe?() let sink = DoSink(eventHandler: self._eventHandler, observer: observer, cancel: cancel) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ElementAt.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ElementAt.swift index 2279400229da..f9325782f9b2 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ElementAt.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ElementAt.swift @@ -25,17 +25,17 @@ extension ObservableType { final private class ElementAtSink: Sink, ObserverType { typealias SourceType = O.E typealias Parent = ElementAt - + let _parent: Parent var _i: Int - + init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent self._i = parent._index - + super.init(observer: observer, cancel: cancel) } - + func on(_ event: Event) { switch event { case .next: @@ -45,7 +45,7 @@ final private class ElementAtSink: Sink, ObserverType { self.forwardOn(.completed) self.dispose() } - + do { _ = try decrementChecked(&self._i) } catch let e { @@ -53,7 +53,7 @@ final private class ElementAtSink: Sink, ObserverType { self.dispose() return } - + case .error(let e): self.forwardOn(.error(e)) self.dispose() @@ -63,7 +63,7 @@ final private class ElementAtSink: Sink, ObserverType { } else { self.forwardOn(.completed) } - + self.dispose() } } @@ -73,7 +73,7 @@ final private class ElementAt: Producer { let _source: Observable let _throwOnEmpty: Bool let _index: Int - + init(source: Observable, index: Int, throwOnEmpty: Bool) { if index < 0 { rxFatalError("index can't be negative") @@ -83,7 +83,7 @@ final private class ElementAt: Producer { self._index = index self._throwOnEmpty = throwOnEmpty } - + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceType { let sink = ElementAtSink(parent: self, observer: observer, cancel: cancel) let subscription = self._source.subscribe(sink) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Enumerated.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Enumerated.swift index fdf326ec623c..ed3ad9a09ad4 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Enumerated.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Enumerated.swift @@ -24,7 +24,7 @@ extension ObservableType { final private class EnumeratedSink: Sink, ObserverType where O.E == (index: Int, element: Element) { typealias E = Element var index = 0 - + func on(_ event: Event) { switch event { case .next(let value): @@ -32,8 +32,7 @@ final private class EnumeratedSink: Sink, ObserverT let nextIndex = try incrementChecked(&self.index) let next = (index: nextIndex, element: value) self.forwardOn(.next(next)) - } - catch let e { + } catch let e { self.forwardOn(.error(e)) self.dispose() } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Error.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Error.swift index 026a7cee0098..d3e9eea1cfff 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Error.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Error.swift @@ -21,11 +21,11 @@ extension ObservableType { final private class ErrorProducer: Producer { private let _error: Swift.Error - + init(error: Swift.Error) { self._error = error } - + override func subscribe(_ observer: O) -> Disposable where O.E == Element { observer.on(.error(self._error)) return Disposables.create() diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Filter.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Filter.swift index d77e89022d85..3cd884ec7f42 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Filter.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Filter.swift @@ -43,14 +43,14 @@ extension ObservableType { final private class FilterSink: Sink, ObserverType { typealias Predicate = (Element) throws -> Bool typealias Element = O.E - + private let _predicate: Predicate - + init(predicate: @escaping Predicate, observer: O, cancel: Cancelable) { self._predicate = predicate super.init(observer: observer, cancel: cancel) } - + func on(_ event: Event) { switch event { case .next(let value): @@ -59,8 +59,7 @@ final private class FilterSink: Sink, ObserverType { if satisfies { self.forwardOn(.next(value)) } - } - catch let e { + } catch let e { self.forwardOn(.error(e)) self.dispose() } @@ -73,15 +72,15 @@ final private class FilterSink: Sink, ObserverType { final private class Filter: Producer { typealias Predicate = (Element) throws -> Bool - + private let _source: Observable private let _predicate: Predicate - + init(source: Observable, predicate: @escaping Predicate) { self._source = source self._predicate = predicate } - + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = FilterSink(predicate: self._predicate, observer: observer, cancel: cancel) let subscription = self._source.subscribe(sink) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/First.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/First.swift index 29ba8dedc4f5..0e0f90259dc5 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/First.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/First.swift @@ -6,7 +6,7 @@ // Copyright © 2017 Krunoslav Zaher. All rights reserved. // -fileprivate final class FirstSink : Sink, ObserverType where O.E == Element? { +fileprivate final class FirstSink: Sink, ObserverType where O.E == Element? { typealias E = Element typealias Parent = First @@ -34,7 +34,7 @@ final class First: Producer { self._source = source } - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element? { + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element? { let sink = FirstSink(observer: observer, cancel: cancel) let subscription = self._source.subscribe(sink) return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Generate.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Generate.swift index 98635e9748a8..9d0c07369775 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Generate.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Generate.swift @@ -26,36 +26,34 @@ extension ObservableType { final private class GenerateSink: Sink { typealias Parent = Generate - + private let _parent: Parent - + private var _state: S - + init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent self._state = parent._initialState super.init(observer: observer, cancel: cancel) } - + func run() -> Disposable { return self._parent._scheduler.scheduleRecursive(true) { isFirst, recurse -> Void in do { if !isFirst { self._state = try self._parent._iterate(self._state) } - + if try self._parent._condition(self._state) { let result = try self._parent._resultSelector(self._state) self.forwardOn(.next(result)) - + recurse(false) - } - else { + } else { self.forwardOn(.completed) self.dispose() } - } - catch let error { + } catch let error { self.forwardOn(.error(error)) self.dispose() } @@ -69,7 +67,7 @@ final private class Generate: Producer { fileprivate let _iterate: (S) throws -> S fileprivate let _resultSelector: (S) throws -> E fileprivate let _scheduler: ImmediateSchedulerType - + init(initialState: S, condition: @escaping (S) throws -> Bool, iterate: @escaping (S) throws -> S, resultSelector: @escaping (S) throws -> E, scheduler: ImmediateSchedulerType) { self._initialState = initialState self._condition = condition @@ -78,8 +76,8 @@ final private class Generate: Producer { self._scheduler = scheduler super.init() } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { let sink = GenerateSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/GroupBy.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/GroupBy.swift index adce8763a974..b95332b19cf1 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/GroupBy.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/GroupBy.swift @@ -16,7 +16,7 @@ extension ObservableType { - returns: A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. */ public func groupBy(keySelector: @escaping (E) throws -> K) - -> Observable> { + -> Observable> { return GroupBy(source: self.asObservable(), selector: keySelector) } } @@ -24,7 +24,7 @@ extension ObservableType { final private class GroupedObservableImpl: Observable { private var _subject: PublishSubject private var _refCount: RefCountDisposable - + init(subject: PublishSubject, refCount: RefCountDisposable) { self._subject = subject self._refCount = refCount @@ -37,10 +37,7 @@ final private class GroupedObservableImpl: Observable { } } - -final private class GroupBySink - : Sink - , ObserverType where O.E == GroupedObservable { +final private class GroupBySink: Sink, ObserverType where O.E == GroupedObservable { typealias E = Element typealias ResultType = O.E typealias Parent = GroupBy @@ -49,33 +46,33 @@ final private class GroupBySink private let _subscription = SingleAssignmentDisposable() private var _refCountDisposable: RefCountDisposable! private var _groupedSubjectTable: [Key: PublishSubject] - + init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent self._groupedSubjectTable = [Key: PublishSubject]() super.init(observer: observer, cancel: cancel) } - + func run() -> Disposable { self._refCountDisposable = RefCountDisposable(disposable: self._subscription) - + self._subscription.setDisposable(self._parent._source.subscribe(self)) - + return self._refCountDisposable } - + private func onGroupEvent(key: Key, value: Element) { if let writer = self._groupedSubjectTable[key] { writer.on(.next(value)) } else { let writer = PublishSubject() self._groupedSubjectTable[key] = writer - + let group = GroupedObservable( key: key, source: GroupedObservableImpl(subject: writer, refCount: _refCountDisposable) ) - + self.forwardOn(.next(group)) writer.on(.next(value)) } @@ -87,8 +84,7 @@ final private class GroupBySink do { let groupKey = try self._parent._selector(value) self.onGroupEvent(key: groupKey, value: value) - } - catch let e { + } catch let e { self.error(e) return } @@ -108,7 +104,7 @@ final private class GroupBySink self._subscription.dispose() self.dispose() } - + final func forwardOnGroups(event: Event) { for writer in self._groupedSubjectTable.values { writer.on(event) @@ -116,18 +112,18 @@ final private class GroupBySink } } -final private class GroupBy: Producer> { +final private class GroupBy: Producer> { typealias KeySelector = (Element) throws -> Key fileprivate let _source: Observable fileprivate let _selector: KeySelector - + init(source: Observable, selector: @escaping KeySelector) { self._source = source self._selector = selector } - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == GroupedObservable { + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == GroupedObservable { let sink = GroupBySink(parent: self, observer: observer, cancel: cancel) return (sink: sink, subscription: sink.run()) } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Just.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Just.swift index f4fa0d2d5d3e..7a7f734c4221 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Just.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Just.swift @@ -65,7 +65,7 @@ final private class JustScheduled: Producer { self._element = element } - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { let sink = JustScheduledSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() return (sink: sink, subscription: subscription) @@ -74,11 +74,11 @@ final private class JustScheduled: Producer { final private class Just: Producer { private let _element: Element - + init(element: Element) { self._element = element } - + override func subscribe(_ observer: O) -> Disposable where O.E == Element { observer.on(.next(self._element)) observer.on(.completed) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Map.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Map.swift index b5ae37092417..7e6f2d7a31ff 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Map.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Map.swift @@ -42,8 +42,7 @@ final private class MapSink: Sink, ObserverType do { let mappedElement = try self._transform(element) self.forwardOn(.next(mappedElement)) - } - catch let e { + } catch let e { self.forwardOn(.error(e)) self.dispose() } @@ -58,7 +57,7 @@ final private class MapSink: Sink, ObserverType } #if TRACE_RESOURCES - fileprivate let _numberOfMapOperators = AtomicInt(0) + private let _numberOfMapOperators = AtomicInt(0) extension Resources { public static var numberOfMapOperators: Int32 { return load(_numberOfMapOperators) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Materialize.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Materialize.swift index 1a5e2f52bff9..acbdf5c5f35d 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Materialize.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Materialize.swift @@ -18,7 +18,7 @@ extension ObservableType { } fileprivate final class MaterializeSink: Sink, ObserverType where O.E == Event { - + func on(_ event: Event) { self.forwardOn(.next(event)) if event.isStopEvent { @@ -30,7 +30,7 @@ fileprivate final class MaterializeSink: Sink, Obse final private class Materialize: Producer> { private let _source: Observable - + init(source: Observable) { self._source = source } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Merge.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Merge.swift index 0bc0a383471a..2c0a4717b9e8 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Merge.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Merge.swift @@ -40,7 +40,7 @@ extension ObservableType { } } -extension ObservableType where E : ObservableConvertibleType { +extension ObservableType where E: ObservableConvertibleType { /** Merges elements from all observable sequences in the given enumerable sequence into a single observable sequence. @@ -67,7 +67,7 @@ extension ObservableType where E : ObservableConvertibleType { } } -extension ObservableType where E : ObservableConvertibleType { +extension ObservableType where E: ObservableConvertibleType { /** Concatenates all inner observable sequences, as long as the previous observable sequence terminated successfully. @@ -129,33 +129,30 @@ extension ObservableType { - returns: An observable sequence that contains the elements of each observed inner sequence, in sequential order. */ - + public func concatMap(_ selector: @escaping (E) throws -> O) -> Observable { return ConcatMap(source: self.asObservable(), selector: selector) } } -fileprivate final class MergeLimitedSinkIter - : ObserverType - , LockOwnerType - , SynchronizedOnType where SourceSequence.E == Observer.E { +fileprivate final class MergeLimitedSinkIter: ObserverType, LockOwnerType, SynchronizedOnType where SourceSequence.E == Observer.E { typealias E = Observer.E typealias DisposeKey = CompositeDisposable.DisposeKey typealias Parent = MergeLimitedSink - + private let _parent: Parent private let _disposeKey: DisposeKey var _lock: RecursiveLock { return self._parent._lock } - + init(parent: Parent, disposeKey: DisposeKey) { self._parent = parent self._disposeKey = disposeKey } - + func on(_ event: Event) { self.synchronizedOn(event) } @@ -171,10 +168,9 @@ fileprivate final class MergeLimitedSinkIter: MergeLimitedSink where Observer.E == SourceSequence.E { typealias Selector = (SourceElement) throws -> SourceSequence - + private let _selector: Selector - + init(selector: @escaping Selector, observer: Observer, cancel: Cancelable) { self._selector = selector super.init(maxConcurrent: 1, observer: observer, cancel: cancel) } - + override func performMap(_ element: SourceElement) throws -> SourceSequence { return try self._selector(element) } } fileprivate final class MergeLimitedBasicSink: MergeLimitedSink where Observer.E == SourceSequence.E { - + override func performMap(_ element: SourceSequence) throws -> SourceSequence { return element } } -private class MergeLimitedSink - : Sink - , ObserverType where Observer.E == SourceSequence.E { +private class MergeLimitedSink: Sink, ObserverType where Observer.E == SourceSequence.E { typealias QueueType = Queue let _maxConcurrent: Int @@ -219,36 +213,36 @@ private class MergeLimitedSink) -> Disposable { _ = self._group.insert(self._sourceSubscription) - + let disposable = source.subscribe(self) self._sourceSubscription.setDisposable(disposable) return self._group } - + func subscribe(_ innerSource: SourceSequence, group: CompositeDisposable) { let subscription = SingleAssignmentDisposable() - + let key = group.insert(subscription) - + if let key = key { let observer = MergeLimitedSinkIter(parent: self, disposeKey: key) - + let disposable = innerSource.asObservable().subscribe(observer) subscription.setDisposable(disposable) } } - + func performMap(_ element: SourceElement) throws -> SourceSequence { rxAbstractMethod() } @@ -260,8 +254,7 @@ private class MergeLimitedSink: Producer { private let _source: Observable private let _maxConcurrent: Int - + init(source: Observable, maxConcurrent: Int) { self._source = source self._maxConcurrent = maxConcurrent } - + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceSequence.E { let sink = MergeLimitedBasicSink(maxConcurrent: self._maxConcurrent, observer: observer, cancel: cancel) let subscription = sink.run(self._source) @@ -330,7 +322,7 @@ final private class MergeLimited: Pro // MARK: Merge -fileprivate final class MergeBasicSink : MergeSink where O.E == S.E { +fileprivate final class MergeBasicSink: MergeSink where O.E == S.E { override func performMap(_ element: S) throws -> S { return element } @@ -338,7 +330,7 @@ fileprivate final class MergeBasicSink : MergeSink where Observer.E == SourceSequence.E { +fileprivate final class FlatMapSink: MergeSink where Observer.E == SourceSequence.E { typealias Selector = (SourceElement) throws -> SourceSequence private let _selector: Selector @@ -355,7 +347,7 @@ fileprivate final class FlatMapSink : MergeSink where Observer.E == SourceSequence.E { +fileprivate final class FlatMapFirstSink: MergeSink where Observer.E == SourceSequence.E { typealias Selector = (SourceElement) throws -> SourceSequence private let _selector: Selector @@ -374,11 +366,11 @@ fileprivate final class FlatMapFirstSink : ObserverType where Observer.E == SourceSequence.E { +fileprivate final class MergeSinkIter: ObserverType where Observer.E == SourceSequence.E { typealias Parent = MergeSink typealias DisposeKey = CompositeDisposable.DisposeKey typealias E = Observer.E - + private let _parent: Parent private let _disposeKey: DisposeKey @@ -386,7 +378,7 @@ fileprivate final class MergeSinkIter) { self._parent._lock.lock(); defer { self._parent._lock.unlock() } // lock { switch event { @@ -404,10 +396,7 @@ fileprivate final class MergeSinkIter - : Sink - , ObserverType where Observer.E == SourceSequence.E { +private class MergeSink: Sink, ObserverType where Observer.E == SourceSequence.E { typealias ResultType = Observer.E typealias Element = SourceElement @@ -443,15 +432,14 @@ private class MergeSink) { switch event { case .next(let element): @@ -500,13 +488,13 @@ private class MergeSink) -> Disposable { _ = self._group.insert(self._sourceSubscription) let subscription = source.subscribe(self) self._sourceSubscription.setDisposable(subscription) - + return self._group } } @@ -517,14 +505,14 @@ final private class FlatMap SourceSequence private let _source: Observable - + private let _selector: Selector init(source: Observable, selector: @escaping Selector) { self._source = source self._selector = selector } - + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceSequence.E { let sink = FlatMapSink(selector: self._selector, observer: observer, cancel: cancel) let subscription = sink.run(self._source) @@ -553,15 +541,15 @@ final private class FlatMapFirst: Producer { typealias Selector = (SourceElement) throws -> SourceSequence - + private let _source: Observable private let _selector: Selector - + init(source: Observable, selector: @escaping Selector) { self._source = source self._selector = selector } - + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceSequence.E { let sink = ConcatMapSink(selector: self._selector, observer: observer, cancel: cancel) let subscription = sink.run(self._source) @@ -569,13 +557,13 @@ final class ConcatMap: } } -final class Merge : Producer { +final class Merge: Producer { private let _source: Observable init(source: Observable) { self._source = source } - + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceSequence.E { let sink = MergeBasicSink(observer: observer, cancel: cancel) let subscription = sink.run(self._source) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Multicast.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Multicast.swift index 7e47389f725b..4d51f693ed6a 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Multicast.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Multicast.swift @@ -9,9 +9,7 @@ /** Represents an observable wrapper that can be connected and disconnected from its underlying observable sequence. */ -public class ConnectableObservable - : Observable - , ConnectableObservableType { +public class ConnectableObservable: Observable, ConnectableObservableType { /** Connects the observable wrapper to its source. All subscribed observers will receive values from the underlying observable sequence as long as the connection is established. @@ -153,7 +151,7 @@ final private class Connection: ObserverType, Disposable { private var _lock: RecursiveLock // state private var _parent: ConnectableObservableAdapter? - private var _subscription : Disposable? + private var _subscription: Disposable? private var _subjectObserver: S.SubjectObserverType private let _disposed = AtomicInt(0) @@ -194,8 +192,7 @@ final private class Connection: ObserverType, Disposable { } } -final private class ConnectableObservableAdapter - : ConnectableObservable { +final private class ConnectableObservableAdapter: ConnectableObservable { typealias ConnectionType = Connection fileprivate let _source: Observable @@ -239,14 +236,12 @@ final private class ConnectableObservableAdapter return subject } - override func subscribe(_ observer: O) -> Disposable where O.E == S.E { + override func subscribe(_ observer: O) -> Disposable where O.E == S.E { return self.lazySubject.subscribe(observer) } } -final private class RefCountSink - : Sink - , ObserverType where CO.E == O.E { +final private class RefCountSink: Sink, ObserverType where CO.E == O.E { typealias Element = O.E typealias Parent = RefCount @@ -272,8 +267,7 @@ final private class RefCountSink if self._parent._count == 0 { self._parent._count = 1 self._parent._connectableSubscription = self._parent._source.connect() - } - else { + } else { self._parent._count += 1 } // } @@ -292,11 +286,9 @@ final private class RefCountSink connectableSubscription.dispose() self._parent._connectableSubscription = nil - } - else if self._parent._count > 1 { + } else if self._parent._count > 1 { self._parent._count -= 1 - } - else { + } else { rxFatalError("Something went wrong with RefCount disposing mechanism") } // } @@ -368,8 +360,7 @@ final private class MulticastSink: Sink, Obs let connection = connectable.connect() return Disposables.create(subscription, connection) - } - catch let e { + } catch let e { self.forwardOn(.error(e)) self.dispose() return Disposables.create() diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift index cf7e0b6b811f..8d01cd65a05d 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift @@ -23,8 +23,7 @@ extension ObservableType { -> Observable { if let scheduler = scheduler as? SerialDispatchQueueScheduler { return ObserveOnSerialDispatchQueue(source: self.asObservable(), scheduler: scheduler) - } - else { + } else { return ObserveOn(source: self.asObservable(), scheduler: scheduler) } } @@ -56,7 +55,7 @@ final private class ObserveOn: Producer { #endif } -enum ObserveOnState : Int32 { +enum ObserveOnState: Int32 { // pump is not running case stopped = 0 // pump is running @@ -106,8 +105,7 @@ final private class ObserveOnSink: ObserverBase { let (nextEvent, observer) = self._lock.calculateLocked { () -> (Event?, O) in if !self._queue.isEmpty { return (self._queue.dequeue(), self._observer) - } - else { + } else { self._state = .stopped return (nil, self._observer) } @@ -118,8 +116,7 @@ final private class ObserveOnSink: ObserverBase { if nextEvent.isStopEvent { self.dispose() } - } - else { + } else { return } @@ -134,8 +131,7 @@ final private class ObserveOnSink: ObserverBase { self._lock.lock(); defer { self._lock.unlock() } // { if !self._queue.isEmpty { return true - } - else { + } else { self._state = .stopped return false } @@ -151,7 +147,7 @@ final private class ObserveOnSink: ObserverBase { } #if TRACE_RESOURCES - fileprivate let _numberOfSerialDispatchQueueObservables = AtomicInt(0) + private let _numberOfSerialDispatchQueueObservables = AtomicInt(0) extension Resources { /** Counts number of `SerialDispatchQueueObservables`. diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Optional.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Optional.swift index 43fede5aec72..92ef7c3c65a5 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Optional.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Optional.swift @@ -71,7 +71,7 @@ final private class ObservableOptionalScheduled: Producer { self._scheduler = scheduler } - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { let sink = ObservableOptionalScheduledSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() return (sink: sink, subscription: subscription) @@ -80,11 +80,11 @@ final private class ObservableOptionalScheduled: Producer { final private class ObservableOptional: Producer { private let _optional: E? - + init(optional: E?) { self._optional = optional } - + override func subscribe(_ observer: O) -> Disposable where O.E == E { if let element = self._optional { observer.on(.next(element)) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Producer.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Producer.swift index f687d1145fd3..81a376b26cdb 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Producer.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Producer.swift @@ -6,12 +6,12 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -class Producer : Observable { +class Producer: Observable { override init() { super.init() } - override func subscribe(_ observer: O) -> Disposable where O.E == Element { + override func subscribe(_ observer: O) -> Disposable where O.E == Element { if !CurrentThreadScheduler.isScheduleRequired { // The returned disposable needs to release all references once it was disposed. let disposer = SinkDisposer() @@ -19,8 +19,7 @@ class Producer : Observable { disposer.setSinkAndSubscription(sink: sinkAndSubscription.sink, subscription: sinkAndSubscription.subscription) return disposer - } - else { + } else { return CurrentThreadScheduler.instance.schedule(()) { _ in let disposer = SinkDisposer() let sinkAndSubscription = self.run(observer, cancel: disposer) @@ -31,7 +30,7 @@ class Producer : Observable { } } - func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { rxAbstractMethod() } } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Range.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Range.swift index 67a441204b0f..b252047963b8 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Range.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Range.swift @@ -6,7 +6,7 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -extension ObservableType where E : RxAbstractInteger { +extension ObservableType where E: RxAbstractInteger { /** Generates an observable sequence of integral numbers within a specified range, using the specified scheduler to generate and send out observer messages. @@ -40,8 +40,8 @@ final private class RangeProducer: Producer { self._count = count self._scheduler = scheduler } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { let sink = RangeSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() return (sink: sink, subscription: subscription) @@ -50,21 +50,20 @@ final private class RangeProducer: Producer { final private class RangeSink: Sink where O.E: RxAbstractInteger { typealias Parent = RangeProducer - + private let _parent: Parent - + init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent super.init(observer: observer, cancel: cancel) } - + func run() -> Disposable { return self._parent._scheduler.scheduleRecursive(0 as O.E) { i, recurse in if i < self._parent._count { self.forwardOn(.next(self._parent._start + i)) recurse(i + 1) - } - else { + } else { self.forwardOn(.completed) self.dispose() } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Reduce.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Reduce.swift index 5b3efd82e526..1df04ed42180 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Reduce.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Reduce.swift @@ -6,7 +6,6 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // - extension ObservableType { /** Applies an `accumulator` function over an observable sequence, returning the result of the aggregation as a single element in the result sequence. The specified `seed` value is used as the initial accumulator value. @@ -45,24 +44,23 @@ extension ObservableType { final private class ReduceSink: Sink, ObserverType { typealias ResultType = O.E typealias Parent = Reduce - + private let _parent: Parent private var _accumulation: AccumulateType - + init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent self._accumulation = parent._seed - + super.init(observer: observer, cancel: cancel) } - + func on(_ event: Event) { switch event { case .next(let value): do { self._accumulation = try self._parent._accumulator(self._accumulation, value) - } - catch let e { + } catch let e { self.forwardOn(.error(e)) self.dispose() } @@ -75,8 +73,7 @@ final private class ReduceSink: Sin self.forwardOn(.next(result)) self.forwardOn(.completed) self.dispose() - } - catch let e { + } catch let e { self.forwardOn(.error(e)) self.dispose() } @@ -87,12 +84,12 @@ final private class ReduceSink: Sin final private class Reduce: Producer { typealias AccumulatorType = (AccumulateType, SourceType) throws -> AccumulateType typealias ResultSelectorType = (AccumulateType) throws -> ResultType - + fileprivate let _source: Observable fileprivate let _seed: AccumulateType fileprivate let _accumulator: AccumulatorType fileprivate let _mapResult: ResultSelectorType - + init(source: Observable, seed: AccumulateType, accumulator: @escaping AccumulatorType, mapResult: @escaping ResultSelectorType) { self._source = source self._seed = seed @@ -106,4 +103,3 @@ final private class Reduce: Producer: Producer { fileprivate let _element: Element fileprivate let _scheduler: ImmediateSchedulerType - + init(element: Element, scheduler: ImmediateSchedulerType) { self._element = element self._scheduler = scheduler } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = RepeatElementSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() @@ -40,14 +40,14 @@ final private class RepeatElement: Producer { final private class RepeatElementSink: Sink { typealias Parent = RepeatElement - + private let _parent: Parent - + init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent super.init(observer: observer, cancel: cancel) } - + func run() -> Disposable { return self._parent._scheduler.scheduleRecursive(self._parent._element) { e, recurse in self.forwardOn(.next(e)) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift index ce82df9bcc82..976fe83f6f01 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift @@ -37,12 +37,11 @@ extension ObservableType { } } -final private class RetryTriggerSink - : ObserverType where S.Iterator.Element: ObservableType, S.Iterator.Element.E == O.E { +final private class RetryTriggerSink: ObserverType where S.Iterator.Element: ObservableType, S.Iterator.Element.E == O.E { typealias E = TriggerObservable.E - + typealias Parent = RetryWhenSequenceSinkIter - + fileprivate let _parent: Parent init(parent: Parent) { @@ -64,9 +63,7 @@ final private class RetryTriggerSink - : ObserverType - , Disposable where S.Iterator.Element: ObservableType, S.Iterator.Element.E == O.E { +final private class RetryWhenSequenceSinkIter: ObserverType, Disposable where S.Iterator.Element: ObservableType, S.Iterator.Element.E == O.E { typealias E = O.E typealias Parent = RetryWhenSequenceSink @@ -93,8 +90,7 @@ final private class RetryWhenSequenceSinkIter - : TailRecursiveSink where S.Iterator.Element: ObservableType, S.Iterator.Element.E == O.E { +final private class RetryWhenSequenceSink: TailRecursiveSink where S.Iterator.Element: ObservableType, S.Iterator.Element.E == O.E { typealias Element = O.E typealias Parent = RetryWhenSequence - + let _lock = RecursiveLock() - + fileprivate let _parent: Parent - + fileprivate var _lastError: Swift.Error? fileprivate let _errorSubject = PublishSubject() fileprivate let _handler: Observable @@ -129,19 +124,18 @@ final private class RetryWhenSequenceSink) -> SequenceGenerator? { // It is important to always return `nil` here because there are sideffects in the `run` method // that are dependant on particular `retryWhen` operator so single operator stack can't be reused in this @@ -165,16 +159,16 @@ final private class RetryWhenSequenceSink: Producer where S.Iterator.Element: ObservableType { typealias Element = S.Iterator.Element.E - + fileprivate let _sources: S fileprivate let _notificationHandler: (Observable) -> TriggerObservable - + init(sources: S, notificationHandler: @escaping (Observable) -> TriggerObservable) { self._sources = sources self._notificationHandler = notificationHandler } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = RetryWhenSequenceSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run((self._sources.makeIterator(), nil)) return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Sample.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Sample.swift index a930f0d456e1..873f13295066 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Sample.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Sample.swift @@ -26,24 +26,21 @@ extension ObservableType { } } -final private class SamplerSink - : ObserverType - , LockOwnerType - , SynchronizedOnType { +final private class SamplerSink: ObserverType, LockOwnerType, SynchronizedOnType { typealias E = SampleType - + typealias Parent = SampleSequenceSink - + fileprivate let _parent: Parent var _lock: RecursiveLock { return self._parent._lock } - + init(parent: Parent) { self._parent = parent } - + func on(_ event: Event) { self.synchronizedOn(event) } @@ -67,36 +64,32 @@ final private class SamplerSink } } -final private class SampleSequenceSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { +final private class SampleSequenceSink: Sink, ObserverType, LockOwnerType, SynchronizedOnType { typealias Element = O.E typealias Parent = Sample - + fileprivate let _parent: Parent let _lock = RecursiveLock() - + // state fileprivate var _element = nil as Element? fileprivate var _atEnd = false - + fileprivate let _sourceSubscription = SingleAssignmentDisposable() - + init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent super.init(observer: observer, cancel: cancel) } - + func run() -> Disposable { self._sourceSubscription.setDisposable(self._parent._source.subscribe(self)) let samplerSubscription = self._parent._sampler.subscribe(SamplerSink(parent: self)) - + return Disposables.create(_sourceSubscription, samplerSubscription) } - + func on(_ event: Event) { self.synchronizedOn(event) } @@ -113,7 +106,7 @@ final private class SampleSequenceSink self._sourceSubscription.dispose() } } - + } final private class Sample: Producer { @@ -124,7 +117,7 @@ final private class Sample: Producer { self._source = source self._sampler = sampler } - + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = SampleSequenceSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Scan.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Scan.swift index c6df6084e9be..ec637e24ae81 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Scan.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Scan.swift @@ -48,24 +48,23 @@ final private class ScanSink: Sink, ObserverTyp typealias Accumulate = O.E typealias Parent = Scan typealias E = ElementType - + fileprivate let _parent: Parent fileprivate var _accumulate: Accumulate - + init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent self._accumulate = parent._seed super.init(observer: observer, cancel: cancel) } - + func on(_ event: Event) { switch event { case .next(let element): do { try self._parent._accumulator(&self._accumulate, element) self.forwardOn(.next(self._accumulate)) - } - catch let error { + } catch let error { self.forwardOn(.error(error)) self.dispose() } @@ -77,23 +76,23 @@ final private class ScanSink: Sink, ObserverTyp self.dispose() } } - + } final private class Scan: Producer { typealias Accumulator = (inout Accumulate, Element) throws -> Void - + fileprivate let _source: Observable fileprivate let _seed: Accumulate fileprivate let _accumulator: Accumulator - + init(source: Observable, seed: Accumulate, accumulator: @escaping Accumulator) { self._source = source self._seed = seed self._accumulator = accumulator } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Accumulate { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Accumulate { let sink = ScanSink(parent: self, observer: observer, cancel: cancel) let subscription = self._source.subscribe(sink) return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Sequence.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Sequence.swift index a7f6450a3275..a78665939a62 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Sequence.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Sequence.swift @@ -63,8 +63,7 @@ final private class ObservableSequenceSink: Sink: Producer(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { let sink = ObservableSequenceSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift index 44e37d9fb73d..03fb01906eab 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift @@ -156,9 +156,7 @@ extension ObservableType { } } -fileprivate final class ShareReplay1WhileConnectedConnection - : ObserverType - , SynchronizedUnsubscribeType { +fileprivate final class ShareReplay1WhileConnectedConnection: ObserverType, SynchronizedUnsubscribeType { typealias E = Element typealias Observers = AnyObserver.s typealias DisposeKey = Observers.KeyType @@ -259,8 +257,7 @@ fileprivate final class ShareReplay1WhileConnectedConnection } // optimized version of share replay for most common case -final private class ShareReplay1WhileConnected - : Observable { +final private class ShareReplay1WhileConnected: Observable { fileprivate typealias Connection = ShareReplay1WhileConnectedConnection @@ -283,7 +280,7 @@ final private class ShareReplay1WhileConnected let disposable = connection._synchronized_subscribe(observer) self._lock.unlock() - + if count == 0 { connection.connect() } @@ -292,13 +289,12 @@ final private class ShareReplay1WhileConnected } @inline(__always) - private func _synchronized_subscribe(_ observer: O) -> Connection where O.E == E { + private func _synchronized_subscribe(_ observer: O) -> Connection where O.E == E { let connection: Connection if let existingConnection = self._connection { connection = existingConnection - } - else { + } else { connection = ShareReplay1WhileConnectedConnection( parent: self, lock: self._lock) @@ -309,9 +305,7 @@ final private class ShareReplay1WhileConnected } } -fileprivate final class ShareWhileConnectedConnection - : ObserverType - , SynchronizedUnsubscribeType { +fileprivate final class ShareWhileConnectedConnection: ObserverType, SynchronizedUnsubscribeType { typealias E = Element typealias Observers = AnyObserver.s typealias DisposeKey = Observers.KeyType @@ -407,8 +401,7 @@ fileprivate final class ShareWhileConnectedConnection } // optimized version of share replay for most common case -final private class ShareWhileConnected - : Observable { +final private class ShareWhileConnected: Observable { fileprivate typealias Connection = ShareWhileConnectedConnection @@ -440,19 +433,18 @@ final private class ShareWhileConnected } @inline(__always) - private func _synchronized_subscribe(_ observer: O) -> Connection where O.E == E { + private func _synchronized_subscribe(_ observer: O) -> Connection where O.E == E { let connection: Connection if let existingConnection = self._connection { connection = existingConnection - } - else { + } else { connection = ShareWhileConnectedConnection( parent: self, lock: self._lock) self._connection = connection } - + return connection } } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift index cf40b65e3d3c..3150dda10e76 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift @@ -36,19 +36,19 @@ extension ObservableType { } } -fileprivate final class SingleAsyncSink : Sink, ObserverType { +fileprivate final class SingleAsyncSink: Sink, ObserverType { typealias ElementType = O.E typealias Parent = SingleAsync typealias E = ElementType - + private let _parent: Parent private var _seenValue: Bool = false - + init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent super.init(observer: observer, cancel: cancel) } - + func on(_ event: Event) { switch event { case .next(let value): @@ -57,8 +57,7 @@ fileprivate final class SingleAsyncSink : Sink, ObserverType if !forward { return } - } - catch let error { + } catch let error { self.forwardOn(.error(error as Swift.Error)) self.dispose() return @@ -88,16 +87,16 @@ fileprivate final class SingleAsyncSink : Sink, ObserverType final class SingleAsync: Producer { typealias Predicate = (Element) throws -> Bool - + fileprivate let _source: Observable fileprivate let _predicate: Predicate? - + init(source: Observable, predicate: Predicate? = nil) { self._source = source self._predicate = predicate } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = SingleAsyncSink(parent: self, observer: observer, cancel: cancel) let subscription = self._source.subscribe(sink) return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Sink.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Sink.swift index 9b1018b61000..9476200b550f 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Sink.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Sink.swift @@ -6,7 +6,7 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -class Sink : Disposable { +class Sink: Disposable { fileprivate let _observer: O fileprivate let _cancel: Cancelable fileprivate let _disposed = AtomicInt(0) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Skip.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Skip.swift index bc49283fdb41..589359353b33 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Skip.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Skip.swift @@ -44,25 +44,24 @@ extension ObservableType { final private class SkipCountSink: Sink, ObserverType { typealias Element = O.E typealias Parent = SkipCount - + let parent: Parent - + var remaining: Int - + init(parent: Parent, observer: O, cancel: Cancelable) { self.parent = parent self.remaining = parent.count super.init(observer: observer, cancel: cancel) } - + func on(_ event: Event) { switch event { case .next(let value): - + if self.remaining <= 0 { self.forwardOn(.next(value)) - } - else { + } else { self.remaining -= 1 } case .error: @@ -73,19 +72,19 @@ final private class SkipCountSink: Sink, ObserverType { self.dispose() } } - + } final private class SkipCount: Producer { let source: Observable let count: Int - + init(source: Observable, count: Int) { self.source = source self.count = count } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = SkipCountSink(parent: self, observer: observer, cancel: cancel) let subscription = self.source.subscribe(sink) @@ -100,15 +99,15 @@ final private class SkipTimeSink: Sink, Observe typealias Element = ElementType let parent: Parent - + // state var open = false - + init(parent: Parent, observer: O, cancel: Cancelable) { self.parent = parent super.init(observer: observer, cancel: cancel) } - + func on(_ event: Event) { switch event { case .next(let value): @@ -123,19 +122,19 @@ final private class SkipTimeSink: Sink, Observe self.dispose() } } - + func tick() { self.open = true } - + func run() -> Disposable { - let disposeTimer = self.parent.scheduler.scheduleRelative((), dueTime: self.parent.duration) { _ in + let disposeTimer = self.parent.scheduler.scheduleRelative((), dueTime: self.parent.duration) { _ in self.tick() return Disposables.create() } - + let disposeSubscription = self.parent.source.subscribe(self) - + return Disposables.create(disposeTimer, disposeSubscription) } } @@ -144,14 +143,14 @@ final private class SkipTime: Producer { let source: Observable let duration: RxTimeInterval let scheduler: SchedulerType - + init(source: Observable, duration: RxTimeInterval, scheduler: SchedulerType) { self.source = source self.scheduler = scheduler self.duration = duration } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = SkipTimeSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift index 7681b14143d1..448be5e707b5 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift @@ -22,19 +22,16 @@ extension ObservableType { } } -final private class SkipUntilSinkOther - : ObserverType - , LockOwnerType - , SynchronizedOnType { +final private class SkipUntilSinkOther: ObserverType, LockOwnerType, SynchronizedOnType { typealias Parent = SkipUntilSink typealias E = Other - + fileprivate let _parent: Parent var _lock: RecursiveLock { return self._parent._lock } - + let _subscription = SingleAssignmentDisposable() init(parent: Parent) { @@ -60,7 +57,7 @@ final private class SkipUntilSinkOther self._subscription.dispose() } } - + #if TRACE_RESOURCES deinit { _ = Resources.decrementTotal() @@ -69,26 +66,21 @@ final private class SkipUntilSinkOther } - -final private class SkipUntilSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { +final private class SkipUntilSink: Sink, ObserverType, LockOwnerType, SynchronizedOnType { typealias E = O.E typealias Parent = SkipUntil - + let _lock = RecursiveLock() fileprivate let _parent: Parent fileprivate var _forwardElements = false - + fileprivate let _sourceSubscription = SingleAssignmentDisposable() init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent super.init(observer: observer, cancel: cancel) } - + func on(_ event: Event) { self.synchronizedOn(event) } @@ -109,29 +101,29 @@ final private class SkipUntilSink self.dispose() } } - + func run() -> Disposable { let sourceSubscription = self._parent._source.subscribe(self) let otherObserver = SkipUntilSinkOther(parent: self) let otherSubscription = self._parent._other.subscribe(otherObserver) self._sourceSubscription.setDisposable(sourceSubscription) otherObserver._subscription.setDisposable(otherSubscription) - + return Disposables.create(_sourceSubscription, otherObserver._subscription) } } final private class SkipUntil: Producer { - + fileprivate let _source: Observable fileprivate let _other: Observable - + init(source: Observable, other: Observable) { self._source = source self._other = other } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = SkipUntilSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift index a0fbdf5585e9..ba835e83caf4 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift @@ -67,7 +67,7 @@ final private class SkipWhile: Producer { self._predicate = predicate } - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = SkipWhileSink(parent: self, observer: observer, cancel: cancel) let subscription = self._source.subscribe(sink) return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift index 2d0d34853248..9e0b9c499dd1 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift @@ -32,28 +32,28 @@ extension ObservableType { final private class SubscribeOnSink: Sink, ObserverType where Ob.E == O.E { typealias Element = O.E typealias Parent = SubscribeOn - + let parent: Parent - + init(parent: Parent, observer: O, cancel: Cancelable) { self.parent = parent super.init(observer: observer, cancel: cancel) } - + func on(_ event: Event) { self.forwardOn(event) - + if event.isStopEvent { self.dispose() } } - + func run() -> Disposable { let disposeEverything = SerialDisposable() let cancelSchedule = SingleAssignmentDisposable() - + disposeEverything.disposable = cancelSchedule - + let disposeSchedule = self.parent.scheduler.schedule(()) { _ -> Disposable in let subscription = self.parent.source.subscribe(self) disposeEverything.disposable = ScheduledDisposable(scheduler: self.parent.scheduler, disposable: subscription) @@ -61,7 +61,7 @@ final private class SubscribeOnSink: Sink: Sink: Producer { let source: Ob let scheduler: ImmediateSchedulerType - + init(source: Ob, scheduler: ImmediateSchedulerType) { self.source = source self.scheduler = scheduler } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Ob.E { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Ob.E { let sink = SubscribeOnSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Switch.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Switch.swift index 5139f0eccd66..094b3c994268 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Switch.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Switch.swift @@ -25,7 +25,7 @@ extension ObservableType { } } -extension ObservableType where E : ObservableConvertibleType { +extension ObservableType where E: ObservableConvertibleType { /** Transforms an observable sequence of observable sequences into an observable sequence @@ -43,25 +43,23 @@ extension ObservableType where E : ObservableConvertibleType { } } -private class SwitchSink - : Sink - , ObserverType where S.E == O.E { +private class SwitchSink: Sink, ObserverType where S.E == O.E { typealias E = SourceType fileprivate let _subscriptions: SingleAssignmentDisposable = SingleAssignmentDisposable() fileprivate let _innerSubscription: SerialDisposable = SerialDisposable() let _lock = RecursiveLock() - + // state fileprivate var _stopped = false fileprivate var _latest = 0 fileprivate var _hasLatest = false - + override init(observer: O, cancel: Cancelable) { super.init(observer: observer, cancel: cancel) } - + func run(_ source: Observable) -> Disposable { let subscription = source.subscribe(self) self._subscriptions.setDisposable(subscription) @@ -80,8 +78,7 @@ private class SwitchSink - : ObserverType - , LockOwnerType - , SynchronizedOnType where S.E == O.E { +final private class SwitchSinkIter: ObserverType, LockOwnerType, SynchronizedOnType where S.E == O.E { typealias E = S.E typealias Parent = SwitchSink - + fileprivate let _parent: Parent fileprivate let _id: Int fileprivate let _self: Disposable @@ -139,7 +133,7 @@ final private class SwitchSinkIter) { self.synchronizedOn(event) } @@ -150,11 +144,11 @@ final private class SwitchSinkIter: Producer { fileprivate let _source: Observable - + init(source: Observable) { self._source = source } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { let sink = SwitchIdentitySink(observer: observer, cancel: cancel) let subscription = sink.run(self._source) return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift index 2ce6f246a270..30577fc4e611 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift @@ -21,43 +21,42 @@ extension ObservableType { } final private class SwitchIfEmpty: Producer { - + private let _source: Observable private let _ifEmpty: Observable - + init(source: Observable, ifEmpty: Observable) { self._source = source self._ifEmpty = ifEmpty } - + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = SwitchIfEmptySink(ifEmpty: self._ifEmpty, observer: observer, cancel: cancel) let subscription = sink.run(self._source.asObservable()) - + return (sink: sink, subscription: subscription) } } -final private class SwitchIfEmptySink: Sink - , ObserverType { +final private class SwitchIfEmptySink: Sink, ObserverType { typealias E = O.E - + private let _ifEmpty: Observable private var _isEmpty = true private let _ifEmptySubscription = SingleAssignmentDisposable() - + init(ifEmpty: Observable, observer: O, cancel: Cancelable) { self._ifEmpty = ifEmpty super.init(observer: observer, cancel: cancel) } - + func run(_ source: Observable) -> Disposable { let subscription = source.subscribe(self) return Disposables.create(subscription, _ifEmptySubscription) } - + func on(_ event: Event) { switch event { case .next: @@ -78,17 +77,16 @@ final private class SwitchIfEmptySink: Sink } } -final private class SwitchIfEmptySinkIter - : ObserverType { +final private class SwitchIfEmptySinkIter: ObserverType { typealias E = O.E typealias Parent = SwitchIfEmptySink - + private let _parent: Parent init(parent: Parent) { self._parent = parent } - + func on(_ event: Event) { switch event { case .next: diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Take.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Take.swift index cbfb57fcac1b..700e2886874f 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Take.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Take.swift @@ -20,8 +20,7 @@ extension ObservableType { -> Observable { if count == 0 { return Observable.empty() - } - else { + } else { return TakeCount(source: self.asObservable(), count: count) } } @@ -49,26 +48,26 @@ extension ObservableType { final private class TakeCountSink: Sink, ObserverType { typealias E = O.E typealias Parent = TakeCount - + private let _parent: Parent - + private var _remaining: Int - + init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent self._remaining = parent._count super.init(observer: observer, cancel: cancel) } - + func on(_ event: Event) { switch event { case .next(let value): - + if self._remaining > 0 { self._remaining -= 1 - + self.forwardOn(.next(value)) - + if self._remaining == 0 { self.forwardOn(.completed) self.dispose() @@ -82,13 +81,13 @@ final private class TakeCountSink: Sink, ObserverType { self.dispose() } } - + } final private class TakeCount: Producer { fileprivate let _source: Observable fileprivate let _count: Int - + init(source: Observable, count: Int) { if count < 0 { rxFatalError("count can't be negative") @@ -96,8 +95,8 @@ final private class TakeCount: Producer { self._source = source self._count = count } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = TakeCountSink(parent: self, observer: observer, cancel: cancel) let subscription = self._source.subscribe(sink) return (sink: sink, subscription: subscription) @@ -106,23 +105,19 @@ final private class TakeCount: Producer { // time version -final private class TakeTimeSink - : Sink - , LockOwnerType - , ObserverType - , SynchronizedOnType where O.E == ElementType { +final private class TakeTimeSink: Sink, LockOwnerType, ObserverType, SynchronizedOnType where O.E == ElementType { typealias Parent = TakeTime typealias E = ElementType fileprivate let _parent: Parent - + let _lock = RecursiveLock() - + init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent super.init(observer: observer, cancel: cancel) } - + func on(_ event: Event) { self.synchronizedOn(event) } @@ -139,40 +134,40 @@ final private class TakeTimeSink self.dispose() } } - + func tick() { self._lock.lock(); defer { self._lock.unlock() } self.forwardOn(.completed) self.dispose() } - + func run() -> Disposable { let disposeTimer = self._parent._scheduler.scheduleRelative((), dueTime: self._parent._duration) { _ in self.tick() return Disposables.create() } - + let disposeSubscription = self._parent._source.subscribe(self) - + return Disposables.create(disposeTimer, disposeSubscription) } } final private class TakeTime: Producer { typealias TimeInterval = RxTimeInterval - + fileprivate let _source: Observable fileprivate let _duration: TimeInterval fileprivate let _scheduler: SchedulerType - + init(source: Observable, duration: TimeInterval, scheduler: SchedulerType) { self._source = source self._scheduler = scheduler self._duration = duration } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = TakeTimeSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/TakeLast.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/TakeLast.swift index 22672964282d..8bb5ffc53ab0 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/TakeLast.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/TakeLast.swift @@ -27,17 +27,17 @@ extension ObservableType { final private class TakeLastSink: Sink, ObserverType { typealias E = O.E typealias Parent = TakeLast - + private let _parent: Parent - + private var _elements: Queue - + init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent self._elements = Queue(capacity: parent._count + 1) super.init(observer: observer, cancel: cancel) } - + func on(_ event: Event) { switch event { case .next(let value): @@ -61,7 +61,7 @@ final private class TakeLastSink: Sink, ObserverType { final private class TakeLast: Producer { fileprivate let _source: Observable fileprivate let _count: Int - + init(source: Observable, count: Int) { if count < 0 { rxFatalError("count can't be negative") @@ -69,8 +69,8 @@ final private class TakeLast: Producer { self._source = source self._count = count } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = TakeLastSink(parent: self, observer: observer, cancel: cancel) let subscription = self._source.subscribe(sink) return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift index b0d6927c9683..fd4f0f699178 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift @@ -49,28 +49,25 @@ public enum TakeUntilBehavior { } // MARK: - TakeUntil Observable -final private class TakeUntilSinkOther - : ObserverType - , LockOwnerType - , SynchronizedOnType { +final private class TakeUntilSinkOther: ObserverType, LockOwnerType, SynchronizedOnType { typealias Parent = TakeUntilSink typealias E = Other - + fileprivate let _parent: Parent var _lock: RecursiveLock { return self._parent._lock } - + fileprivate let _subscription = SingleAssignmentDisposable() - + init(parent: Parent) { self._parent = parent #if TRACE_RESOURCES _ = Resources.incrementTotal() #endif } - + func on(_ event: Event) { self.synchronizedOn(event) } @@ -87,7 +84,7 @@ final private class TakeUntilSinkOther self._subscription.dispose() } } - + #if TRACE_RESOURCES deinit { _ = Resources.decrementTotal() @@ -95,24 +92,19 @@ final private class TakeUntilSinkOther #endif } -final private class TakeUntilSink - : Sink - , LockOwnerType - , ObserverType - , SynchronizedOnType { +final private class TakeUntilSink: Sink, LockOwnerType, ObserverType, SynchronizedOnType { typealias E = O.E typealias Parent = TakeUntil - + fileprivate let _parent: Parent - + let _lock = RecursiveLock() - - + init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent super.init(observer: observer, cancel: cancel) } - + func on(_ event: Event) { self.synchronizedOn(event) } @@ -129,28 +121,28 @@ final private class TakeUntilSink self.dispose() } } - + func run() -> Disposable { let otherObserver = TakeUntilSinkOther(parent: self) let otherSubscription = self._parent._other.subscribe(otherObserver) otherObserver._subscription.setDisposable(otherSubscription) let sourceSubscription = self._parent._source.subscribe(self) - + return Disposables.create(sourceSubscription, otherObserver._subscription) } } final private class TakeUntil: Producer { - + fileprivate let _source: Observable fileprivate let _other: Observable - + init(source: Observable, other: Observable) { self._source = source self._other = other } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = TakeUntilSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() return (sink: sink, subscription: subscription) @@ -158,8 +150,7 @@ final private class TakeUntil: Producer { } // MARK: - TakeUntil Predicate -final private class TakeUntilPredicateSink - : Sink, ObserverType { +final private class TakeUntilPredicateSink: Sink, ObserverType { typealias Element = O.E typealias Parent = TakeUntilPredicate @@ -219,7 +210,7 @@ final private class TakeUntilPredicate: Producer { self._predicate = predicate } - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = TakeUntilPredicateSink(parent: self, observer: observer, cancel: cancel) let subscription = self._source.subscribe(sink) return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift index 1e866f88c0f3..af6e4c4124ad 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift @@ -22,9 +22,7 @@ extension ObservableType { } } -final private class TakeWhileSink - : Sink - , ObserverType { +final private class TakeWhileSink: Sink, ObserverType { typealias Element = O.E typealias Parent = TakeWhile @@ -36,14 +34,14 @@ final private class TakeWhileSink self._parent = parent super.init(observer: observer, cancel: cancel) } - + func on(_ event: Event) { switch event { case .next(let value): if !self._running { return } - + do { self._running = try self._parent._predicate(value) } catch let e { @@ -51,7 +49,7 @@ final private class TakeWhileSink self.dispose() return } - + if self._running { self.forwardOn(.next(value)) } else { @@ -63,7 +61,7 @@ final private class TakeWhileSink self.dispose() } } - + } final private class TakeWhile: Producer { @@ -77,7 +75,7 @@ final private class TakeWhile: Producer { self._predicate = predicate } - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = TakeWhileSink(parent: self, observer: observer, cancel: cancel) let subscription = self._source.subscribe(sink) return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Throttle.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Throttle.swift index c31ae7469912..8989ce8034a8 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Throttle.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Throttle.swift @@ -28,34 +28,30 @@ extension ObservableType { } } -final private class ThrottleSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { +final private class ThrottleSink: Sink, ObserverType, LockOwnerType, SynchronizedOnType { typealias Element = O.E typealias ParentType = Throttle - + private let _parent: ParentType - + let _lock = RecursiveLock() - + // state private var _lastUnsentElement: Element? private var _lastSentTime: Date? private var _completed: Bool = false let cancellable = SerialDisposable() - + init(parent: ParentType, observer: O, cancel: Cancelable) { self._parent = parent - + super.init(observer: observer, cancel: cancel) } - + func run() -> Disposable { let subscription = self._parent._source.subscribe(self) - + return Disposables.create(subscription, cancellable) } @@ -72,8 +68,7 @@ final private class ThrottleSink if let lastSendingTime = self._lastSentTime { timeIntervalSinceLast = now.timeIntervalSince(lastSendingTime) - } - else { + } else { timeIntervalSinceLast = self._parent._dueTime } @@ -89,7 +84,7 @@ final private class ThrottleSink } let isThereAlreadyInFlightRequest = self._lastUnsentElement != nil - + self._lastUnsentElement = element if isThereAlreadyInFlightRequest { @@ -110,8 +105,7 @@ final private class ThrottleSink case .completed: if self._lastUnsentElement != nil { self._completed = true - } - else { + } else { self.forwardOn(.completed) self.dispose() } @@ -124,7 +118,7 @@ final private class ThrottleSink // in case element processing takes a while, this should give some more room self._lastSentTime = self._parent._scheduler.now } - + func propagate(_: Int) -> Disposable { self._lock.lock(); defer { self._lock.unlock() } // { if let lastUnsentElement = self._lastUnsentElement { @@ -152,11 +146,11 @@ final private class Throttle: Producer { self._latest = latest self._scheduler = scheduler } - + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = ThrottleSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() return (sink: sink, subscription: subscription) } - + } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Timeout.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Timeout.swift index f37bf7620630..3218d0bdd13e 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Timeout.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Timeout.swift @@ -41,30 +41,30 @@ extension ObservableType { final private class TimeoutSink: Sink, LockOwnerType, ObserverType { typealias E = O.E typealias Parent = Timeout - + private let _parent: Parent - + let _lock = RecursiveLock() private let _timerD = SerialDisposable() private let _subscription = SerialDisposable() - + private var _id = 0 private var _switched = false - + init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent super.init(observer: observer, cancel: cancel) } - + func run() -> Disposable { let original = SingleAssignmentDisposable() self._subscription.disposable = original - + self._createTimeoutTimer() - + original.setDisposable(self._parent._source.subscribe(self)) - + return Disposables.create(_subscription, _timerD) } @@ -72,56 +72,56 @@ final private class TimeoutSink: Sink, LockOwnerType, Observ switch event { case .next: var onNextWins = false - + self._lock.performLocked { onNextWins = !self._switched if onNextWins { self._id = self._id &+ 1 } } - + if onNextWins { self.forwardOn(event) self._createTimeoutTimer() } case .error, .completed: var onEventWins = false - + self._lock.performLocked { onEventWins = !self._switched if onEventWins { self._id = self._id &+ 1 } } - + if onEventWins { self.forwardOn(event) self.dispose() } } } - + private func _createTimeoutTimer() { if self._timerD.isDisposed { return } - + let nextTimer = SingleAssignmentDisposable() self._timerD.disposable = nextTimer - + let disposeSchedule = self._parent._scheduler.scheduleRelative(self._id, dueTime: self._parent._dueTime) { state in - + var timerWins = false - + self._lock.performLocked { self._switched = (state == self._id) timerWins = self._switched } - + if timerWins { self._subscription.disposable = self._parent._other.subscribe(self.forwarder()) } - + return Disposables.create() } @@ -129,21 +129,20 @@ final private class TimeoutSink: Sink, LockOwnerType, Observ } } - final private class Timeout: Producer { fileprivate let _source: Observable fileprivate let _dueTime: RxTimeInterval fileprivate let _other: Observable fileprivate let _scheduler: SchedulerType - + init(source: Observable, dueTime: RxTimeInterval, other: Observable, scheduler: SchedulerType) { self._source = source self._dueTime = dueTime self._other = other self._scheduler = scheduler } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let sink = TimeoutSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Timer.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Timer.swift index 1715e1ec5e9e..768c4739af9d 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Timer.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Timer.swift @@ -6,7 +6,7 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -extension ObservableType where E : RxAbstractInteger { +extension ObservableType where E: RxAbstractInteger { /** Returns an observable sequence that produces a value after each period, using the specified scheduler to run timers and to send out observer messages. @@ -49,7 +49,7 @@ extension ObservableType where E: RxAbstractInteger { import Foundation -final private class TimerSink : Sink where O.E : RxAbstractInteger { +final private class TimerSink: Sink where O.E: RxAbstractInteger { typealias Parent = Timer private let _parent: Parent @@ -106,8 +106,7 @@ final private class Timer: Producer { let sink = TimerSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() return (sink: sink, subscription: subscription) - } - else { + } else { let sink = TimerOneOffSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ToArray.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ToArray.swift index 5cf1aa431fde..b07e3ad93682 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ToArray.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/ToArray.swift @@ -6,7 +6,6 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // - extension ObservableType { /** @@ -26,16 +25,16 @@ extension ObservableType { final private class ToArraySink: Sink, ObserverType where O.E == [SourceType] { typealias Parent = ToArray - + let _parent: Parent var _list = [SourceType]() - + init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent - + super.init(observer: observer, cancel: cancel) } - + func on(_ event: Event) { switch event { case .next(let value): @@ -57,7 +56,7 @@ final private class ToArray: Producer<[SourceType]> { init(source: Observable) { self._source = source } - + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == [SourceType] { let sink = ToArraySink(parent: self, observer: observer, cancel: cancel) let subscription = self._source.subscribe(sink) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Using.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Using.swift index 3651dc9a005d..ba9ab23d1a28 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Using.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Using.swift @@ -26,20 +26,20 @@ final private class UsingSink: Sink private let _parent: Parent - + init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent super.init(observer: observer, cancel: cancel) } - + func run() -> Disposable { var disposable = Disposables.create() - + do { let resource = try self._parent._resourceFactory() disposable = resource let source = try self._parent._observableFactory(resource) - + return Disposables.create( source.subscribe(self), disposable @@ -51,7 +51,7 @@ final private class UsingSink: Sink) { switch event { case let .next(value): @@ -67,22 +67,21 @@ final private class UsingSink: Sink: Producer { - + typealias E = SourceType - + typealias ResourceFactory = () throws -> ResourceType typealias ObservableFactory = (ResourceType) throws -> Observable - + fileprivate let _resourceFactory: ResourceFactory fileprivate let _observableFactory: ObservableFactory - - + init(resourceFactory: @escaping ResourceFactory, observableFactory: @escaping ObservableFactory) { self._resourceFactory = resourceFactory self._observableFactory = observableFactory } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { let sink = UsingSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Window.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Window.swift index 5de452cabf32..50901baa3d17 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Window.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Window.swift @@ -24,48 +24,44 @@ extension ObservableType { } } -final private class WindowTimeCountSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType where O.E == Observable { +final private class WindowTimeCountSink: Sink, ObserverType, LockOwnerType, SynchronizedOnType where O.E == Observable { typealias Parent = WindowTimeCount typealias E = Element - + private let _parent: Parent - + let _lock = RecursiveLock() - + private var _subject = PublishSubject() private var _count = 0 private var _windowId = 0 - + private let _timerD = SerialDisposable() private let _refCountDisposable: RefCountDisposable private let _groupDisposable = CompositeDisposable() - + init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent - + _ = self._groupDisposable.insert(self._timerD) - + self._refCountDisposable = RefCountDisposable(disposable: self._groupDisposable) super.init(observer: observer, cancel: cancel) } - + func run() -> Disposable { - + self.forwardOn(.next(AddRef(source: self._subject, refCount: self._refCountDisposable).asObservable())) self.createTimer(self._windowId) - + _ = self._groupDisposable.insert(self._parent._source.subscribe(self)) return self._refCountDisposable } - + func startNewWindowAndCompleteCurrentOne() { self._subject.on(.completed) self._subject = PublishSubject() - + self.forwardOn(.next(AddRef(source: self._subject, refCount: self._refCountDisposable).asObservable())) } @@ -76,18 +72,18 @@ final private class WindowTimeCountSink func _synchronized_on(_ event: Event) { var newWindow = false var newId = 0 - + switch event { case .next(let element): self._subject.on(.next(element)) - + do { _ = try incrementChecked(&self._count) } catch let e { self._subject.on(.error(e as Swift.Error)) self.dispose() } - + if self._count == self._parent._count { newWindow = true self._count = 0 @@ -95,7 +91,7 @@ final private class WindowTimeCountSink newId = self._windowId self.startNewWindowAndCompleteCurrentOne() } - + case .error(let error): self._subject.on(.error(error)) self.forwardOn(.error(error)) @@ -110,12 +106,12 @@ final private class WindowTimeCountSink self.createTimer(newId) } } - + func createTimer(_ windowId: Int) { if self._timerD.isDisposed { return } - + if self._windowId != windowId { return } @@ -125,22 +121,22 @@ final private class WindowTimeCountSink self._timerD.disposable = nextTimer let scheduledRelative = self._parent._scheduler.scheduleRelative(windowId, dueTime: self._parent._timeSpan) { previousWindowId in - + var newId = 0 - + self._lock.performLocked { if previousWindowId != self._windowId { return } - + self._count = 0 self._windowId = self._windowId &+ 1 newId = self._windowId self.startNewWindowAndCompleteCurrentOne() } - + self.createTimer(newId) - + return Disposables.create() } @@ -153,15 +149,15 @@ final private class WindowTimeCount: Producer> { fileprivate let _count: Int fileprivate let _scheduler: SchedulerType fileprivate let _source: Observable - + init(source: Observable, timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) { self._source = source self._timeSpan = timeSpan self._count = count self._scheduler = scheduler } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Observable { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Observable { let sink = WindowTimeCountSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift index 1a1b5949845f..9d73b15d8db5 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift @@ -34,30 +34,26 @@ extension ObservableType { } } -final private class WithLatestFromSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { +final private class WithLatestFromSink: Sink, ObserverType, LockOwnerType, SynchronizedOnType { typealias ResultType = O.E typealias Parent = WithLatestFrom typealias E = FirstType - + fileprivate let _parent: Parent - + var _lock = RecursiveLock() fileprivate var _latest: SecondType? init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent - + super.init(observer: observer, cancel: cancel) } - + func run() -> Disposable { let sndSubscription = SingleAssignmentDisposable() let sndO = WithLatestFromSecond(parent: self, disposable: sndSubscription) - + sndSubscription.setDisposable(self._parent._second.subscribe(sndO)) let fstSubscription = self._parent._first.subscribe(self) @@ -74,7 +70,7 @@ final private class WithLatestFromSink guard let latest = self._latest else { return } do { let res = try self._parent._resultSelector(value, latest) - + self.forwardOn(.next(res)) } catch let e { self.forwardOn(.error(e)) @@ -90,15 +86,12 @@ final private class WithLatestFromSink } } -final private class WithLatestFromSecond - : ObserverType - , LockOwnerType - , SynchronizedOnType { - +final private class WithLatestFromSecond: ObserverType, LockOwnerType, SynchronizedOnType { + typealias ResultType = O.E typealias Parent = WithLatestFromSink typealias E = SecondType - + private let _parent: Parent private let _disposable: Disposable @@ -110,7 +103,7 @@ final private class WithLatestFromSecond self._parent = parent self._disposable = disposable } - + func on(_ event: Event) { self.synchronizedOn(event) } @@ -130,7 +123,7 @@ final private class WithLatestFromSecond final private class WithLatestFrom: Producer { typealias ResultSelector = (FirstType, SecondType) throws -> ResultType - + fileprivate let _first: Observable fileprivate let _second: Observable fileprivate let _resultSelector: ResultSelector @@ -140,8 +133,8 @@ final private class WithLatestFrom: Producer< self._second = second self._resultSelector = resultSelector } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == ResultType { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == ResultType { let sink = WithLatestFromSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift index c2b5819a6c20..99f76807d9d6 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift @@ -31,50 +31,49 @@ extension ObservableType { where C.Iterator.Element: ObservableType, C.Iterator.Element.E == E { return ZipCollectionType(sources: collection, resultSelector: { $0 }) } - + } -final private class ZipCollectionTypeSink - : Sink where C.Iterator.Element: ObservableConvertibleType { +final private class ZipCollectionTypeSink: Sink where C.Iterator.Element: ObservableConvertibleType { typealias R = O.E typealias Parent = ZipCollectionType typealias SourceElement = C.Iterator.Element.E - + private let _parent: Parent - + private let _lock = RecursiveLock() - + // state private var _numberOfValues = 0 private var _values: [Queue] private var _isDone: [Bool] private var _numberOfDone = 0 private var _subscriptions: [SingleAssignmentDisposable] - + init(parent: Parent, observer: O, cancel: Cancelable) { self._parent = parent self._values = [Queue](repeating: Queue(capacity: 4), count: parent.count) self._isDone = [Bool](repeating: false, count: parent.count) self._subscriptions = [SingleAssignmentDisposable]() self._subscriptions.reserveCapacity(parent.count) - + for _ in 0 ..< parent.count { self._subscriptions.append(SingleAssignmentDisposable()) } - + super.init(observer: observer, cancel: cancel) } - + func on(_ event: Event, atIndex: Int) { self._lock.lock(); defer { self._lock.unlock() } // { switch event { case .next(let element): self._values[atIndex].enqueue(element) - + if self._values[atIndex].count == 1 { self._numberOfValues += 1 } - + if self._numberOfValues < self._parent.count { if self._numberOfDone == self._parent.count - 1 { self.forwardOn(.completed) @@ -82,29 +81,28 @@ final private class ZipCollectionTypeSink } return } - + do { var arguments = [SourceElement]() arguments.reserveCapacity(self._parent.count) - + // recalculate number of values self._numberOfValues = 0 - + for i in 0 ..< self._values.count { arguments.append(self._values[i].dequeue()!) if !self._values[i].isEmpty { self._numberOfValues += 1 } } - + let result = try self._parent.resultSelector(arguments) self.forwardOn(.next(result)) - } - catch let error { + } catch let error { self.forwardOn(.error(error)) self.dispose() } - + case .error(let error): self.forwardOn(.error(error)) self.dispose() @@ -112,21 +110,20 @@ final private class ZipCollectionTypeSink if self._isDone[atIndex] { return } - + self._isDone[atIndex] = true self._numberOfDone += 1 - + if self._numberOfDone == self._parent.count { self.forwardOn(.completed) self.dispose() - } - else { + } else { self._subscriptions[atIndex].dispose() } } // } } - + func run() -> Disposable { var j = 0 for i in self._parent.sources { @@ -143,25 +140,25 @@ final private class ZipCollectionTypeSink if self._parent.sources.isEmpty { self.forwardOn(.completed) } - + return Disposables.create(_subscriptions) } } final private class ZipCollectionType: Producer where C.Iterator.Element: ObservableConvertibleType { typealias ResultSelector = ([C.Iterator.Element.E]) throws -> R - + let sources: C let resultSelector: ResultSelector let count: Int - + init(sources: C, resultSelector: @escaping ResultSelector) { self.sources = sources self.resultSelector = resultSelector self.count = Int(Int64(self.sources.count)) } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { let sink = ZipCollectionTypeSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() return (sink: sink, subscription: subscription) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift index 01992f432d87..7c858348dbee 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift @@ -7,8 +7,6 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // - - // 2 extension ObservableType { @@ -48,7 +46,7 @@ extension ObservableType where E == Any { } } -final class ZipSink2_ : ZipSink { +final class ZipSink2_: ZipSink { typealias R = O.E typealias Parent = Zip2 @@ -101,7 +99,7 @@ final class ZipSink2_ : ZipSink { } } -final class Zip2 : Producer { +final class Zip2: Producer { typealias ResultSelector = (E1, E2) throws -> R let source1: Observable @@ -123,8 +121,6 @@ final class Zip2 : Producer { } } - - // 3 extension ObservableType { @@ -164,7 +160,7 @@ extension ObservableType where E == Any { } } -final class ZipSink3_ : ZipSink { +final class ZipSink3_: ZipSink { typealias R = O.E typealias Parent = Zip3 @@ -223,7 +219,7 @@ final class ZipSink3_ : ZipSink { } } -final class Zip3 : Producer { +final class Zip3: Producer { typealias ResultSelector = (E1, E2, E3) throws -> R let source1: Observable @@ -247,8 +243,6 @@ final class Zip3 : Producer { } } - - // 4 extension ObservableType { @@ -288,7 +282,7 @@ extension ObservableType where E == Any { } } -final class ZipSink4_ : ZipSink { +final class ZipSink4_: ZipSink { typealias R = O.E typealias Parent = Zip4 @@ -353,7 +347,7 @@ final class ZipSink4_ : ZipSink { } } -final class Zip4 : Producer { +final class Zip4: Producer { typealias ResultSelector = (E1, E2, E3, E4) throws -> R let source1: Observable @@ -379,8 +373,6 @@ final class Zip4 : Producer { } } - - // 5 extension ObservableType { @@ -420,7 +412,7 @@ extension ObservableType where E == Any { } } -final class ZipSink5_ : ZipSink { +final class ZipSink5_: ZipSink { typealias R = O.E typealias Parent = Zip5 @@ -491,7 +483,7 @@ final class ZipSink5_ : ZipSink { } } -final class Zip5 : Producer { +final class Zip5: Producer { typealias ResultSelector = (E1, E2, E3, E4, E5) throws -> R let source1: Observable @@ -519,8 +511,6 @@ final class Zip5 : Producer { } } - - // 6 extension ObservableType { @@ -560,7 +550,7 @@ extension ObservableType where E == Any { } } -final class ZipSink6_ : ZipSink { +final class ZipSink6_: ZipSink { typealias R = O.E typealias Parent = Zip6 @@ -637,7 +627,7 @@ final class ZipSink6_ : ZipSink { } } -final class Zip6 : Producer { +final class Zip6: Producer { typealias ResultSelector = (E1, E2, E3, E4, E5, E6) throws -> R let source1: Observable @@ -667,8 +657,6 @@ final class Zip6 : Producer { } } - - // 7 extension ObservableType { @@ -708,7 +696,7 @@ extension ObservableType where E == Any { } } -final class ZipSink7_ : ZipSink { +final class ZipSink7_: ZipSink { typealias R = O.E typealias Parent = Zip7 @@ -791,7 +779,7 @@ final class ZipSink7_ : ZipSink } } -final class Zip7 : Producer { +final class Zip7: Producer { typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7) throws -> R let source1: Observable @@ -823,8 +811,6 @@ final class Zip7 : Producer { } } - - // 8 extension ObservableType { @@ -864,7 +850,7 @@ extension ObservableType where E == Any { } } -final class ZipSink8_ : ZipSink { +final class ZipSink8_: ZipSink { typealias R = O.E typealias Parent = Zip8 @@ -953,7 +939,7 @@ final class ZipSink8_ : ZipSink } } -final class Zip8 : Producer { +final class Zip8: Producer { typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7, E8) throws -> R let source1: Observable @@ -986,5 +972,3 @@ final class Zip8 : Producer { return (sink: sink, subscription: subscription) } } - - diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Zip.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Zip.swift index 50edf8481dae..f44641d1c894 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Zip.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observables/Zip.swift @@ -6,61 +6,58 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -protocol ZipSinkProtocol : class -{ +protocol ZipSinkProtocol: class { func next(_ index: Int) func fail(_ error: Swift.Error) func done(_ index: Int) } -class ZipSink : Sink, ZipSinkProtocol { +class ZipSink: Sink, ZipSinkProtocol { typealias Element = O.E - + let _arity: Int let _lock = RecursiveLock() // state private var _isDone: [Bool] - + init(arity: Int, observer: O, cancel: Cancelable) { self._isDone = [Bool](repeating: false, count: arity) self._arity = arity - + super.init(observer: observer, cancel: cancel) } func getResult() throws -> Element { rxAbstractMethod() } - + func hasElements(_ index: Int) -> Bool { rxAbstractMethod() } - + func next(_ index: Int) { var hasValueAll = true - + for i in 0 ..< self._arity { if !self.hasElements(i) { hasValueAll = false break } } - + if hasValueAll { do { let result = try self.getResult() self.forwardOn(.next(result)) - } - catch let e { + } catch let e { self.forwardOn(.error(e)) self.dispose() } - } - else { + } else { var allOthersDone = true - + let arity = self._isDone.count for i in 0 ..< arity { if i != index && !self._isDone[i] { @@ -68,29 +65,29 @@ class ZipSink : Sink, ZipSinkProtocol { break } } - + if allOthersDone { self.forwardOn(.completed) self.dispose() } } } - + func fail(_ error: Swift.Error) { self.forwardOn(.error(error)) self.dispose() } - + func done(_ index: Int) { self._isDone[index] = true - + var allDone = true - + for done in self._isDone where !done { allDone = false break } - + if allDone { self.forwardOn(.completed) self.dispose() @@ -98,22 +95,19 @@ class ZipSink : Sink, ZipSinkProtocol { } } -final class ZipObserver - : ObserverType - , LockOwnerType - , SynchronizedOnType { +final class ZipObserver: ObserverType, LockOwnerType, SynchronizedOnType { typealias E = ElementType typealias ValueSetter = (ElementType) -> Void private var _parent: ZipSinkProtocol? - + let _lock: RecursiveLock - + // state private let _index: Int private let _this: Disposable private let _setNextValue: ValueSetter - + init(lock: RecursiveLock, parent: ZipSinkProtocol, index: Int, setNextValue: @escaping ValueSetter, this: Disposable) { self._lock = lock self._parent = parent @@ -121,7 +115,7 @@ final class ZipObserver self._this = this self._setNextValue = setNextValue } - + func on(_ event: Event) { self.synchronizedOn(event) } @@ -137,7 +131,7 @@ final class ZipObserver self._this.dispose() } } - + if let parent = self._parent { switch event { case .next(let value): diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObserverType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObserverType.swift index 908941ff17cd..a143e002d975 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObserverType.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/ObserverType.swift @@ -19,19 +19,19 @@ public protocol ObserverType { /// Convenience API extensions to provide alternate next, error, completed events extension ObserverType { - + /// Convenience method equivalent to `on(.next(element: E))` /// /// - parameter element: Next element to send to observer(s) public func onNext(_ element: E) { self.on(.next(element)) } - + /// Convenience method equivalent to `on(.completed)` public func onCompleted() { self.on(.completed) } - + /// Convenience method equivalent to `on(.error(Swift.Error))` /// - parameter error: Swift.Error to send to observer(s) public func onError(_ error: Swift.Error) { diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift index 765cf1168d3c..f2c67f26fce0 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift @@ -6,13 +6,13 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -final class AnonymousObserver : ObserverBase { +final class AnonymousObserver: ObserverBase { typealias Element = ElementType - + typealias EventHandler = (Event) -> Void - - private let _eventHandler : EventHandler - + + private let _eventHandler: EventHandler + init(_ eventHandler: @escaping EventHandler) { #if TRACE_RESOURCES _ = Resources.incrementTotal() @@ -23,7 +23,7 @@ final class AnonymousObserver : ObserverBase { override func onCore(_ event: Event) { return self._eventHandler(event) } - + #if TRACE_RESOURCES deinit { _ = Resources.decrementTotal() diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift index 65d05ec0f982..daa3b6fc04c8 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift @@ -6,7 +6,7 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -class ObserverBase : Disposable, ObserverType { +class ObserverBase: Disposable, ObserverType { typealias E = ElementType private let _isStopped = AtomicInt(0) diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift index e75a38012e7c..5f47f8e25cd6 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift @@ -16,9 +16,7 @@ enum TailRecursiveSinkCommand { #endif /// This class is usually used with `Generator` version of the operators. -class TailRecursiveSink - : Sink - , InvocableWithValueType where S.Iterator.Element: ObservableConvertibleType, S.Iterator.Element.E == O.E { +class TailRecursiveSink: Sink, InvocableWithValueType where S.Iterator.Element: ObservableConvertibleType, S.Iterator.Element.E == O.E { typealias Value = TailRecursiveSinkCommand typealias E = O.E typealias SequenceGenerator = (generator: S.Iterator, remaining: IntMax?) @@ -74,13 +72,13 @@ class TailRecursiveSink guard let (g, left) = self._generators.last else { break } - + if self._isDisposed { return } self._generators.removeLast() - + var e = g guard let nextCandidate = e.next()?.asObservable() else { @@ -100,8 +98,7 @@ class TailRecursiveSink if knownOriginalLeft - 1 >= 1 { self._generators.append((e, knownOriginalLeft - 1)) } - } - else { + } else { self._generators.append((e, nil)) } @@ -114,8 +111,7 @@ class TailRecursiveSink maxTailRecursiveSinkStackSize = self._generators.count } #endif - } - else { + } else { next = nextCandidate } } while next == nil @@ -141,11 +137,10 @@ class TailRecursiveSink override func dispose() { super.dispose() - + self._subscription.dispose() self._gate.dispose() - + self.schedule(.dispose) } } - diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Rx.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Rx.swift index a547a8f98cd2..1e542d4776cb 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Rx.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Rx.swift @@ -7,7 +7,7 @@ // #if TRACE_RESOURCES - fileprivate let resourceCount = AtomicInt(0) + private let resourceCount = AtomicInt(0) /// Resource utilization information public struct Resources { @@ -37,7 +37,7 @@ func rxAbstractMethod(file: StaticString = #file, line: UInt = #line) -> Swift.N rxFatalError("Abstract method", file: file, line: line) } -func rxFatalError(_ lastMessage: @autoclosure () -> String, file: StaticString = #file, line: UInt = #line) -> Swift.Never { +func rxFatalError(_ lastMessage: @autoclosure () -> String, file: StaticString = #file, line: UInt = #line) -> Swift.Never { fatalError(lastMessage(), file: file, line: line) } @@ -84,7 +84,7 @@ func decrementChecked(_ i: inout Int) throws -> Int { print(message) #endif } - + func register(synchronizationErrorMessage: SynchronizationErrorMessages) { self._lock.lock(); defer { self._lock.unlock() } let pointer = Unmanaged.passUnretained(Thread.current).toOpaque() @@ -103,7 +103,7 @@ func decrementChecked(_ i: inout Int) throws -> Int { " or by enqueuing sequence events in some other way.\n" ) } - + self._threads[pointer] = count if self._threads.count > 1 { @@ -134,7 +134,7 @@ func decrementChecked(_ i: inout Int) throws -> Int { /// RxSwift global hooks public enum Hooks { - + // Should capture call stack public static var recordCallStackOnError: Bool = false diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/RxMutableBox.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/RxMutableBox.swift index 7f3c333baa65..55302ea2e5d6 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/RxMutableBox.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/RxMutableBox.swift @@ -7,10 +7,10 @@ // /// Creates mutable reference wrapper for any type. -final class RxMutableBox : CustomDebugStringConvertible { +final class RxMutableBox: CustomDebugStringConvertible { /// Wrapped value - var value : T - + var value: T + /// Creates reference wrapper for `value`. /// /// - parameter value: Value to wrap. diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/SchedulerType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/SchedulerType.swift index e09c499de265..d765c9a45de9 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/SchedulerType.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/SchedulerType.swift @@ -19,7 +19,7 @@ public typealias RxTime = Date public protocol SchedulerType: ImmediateSchedulerType { /// - returns: Current time. - var now : RxTime { + var now: RxTime { get } @@ -32,7 +32,7 @@ public protocol SchedulerType: ImmediateSchedulerType { - returns: The disposable object used to cancel the scheduled action (best effort). */ func scheduleRelative(_ state: StateType, dueTime: RxTimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable - + /** Schedules a periodic piece of work. @@ -57,15 +57,15 @@ extension SchedulerType { */ public func schedulePeriodic(_ state: StateType, startAfter: RxTimeInterval, period: RxTimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { let schedule = SchedulePeriodicRecursive(scheduler: self, startAfter: startAfter, period: period, action: action, state: state) - + return schedule.start() } func scheduleRecursive(_ state: State, dueTime: RxTimeInterval, action: @escaping (State, AnyRecursiveScheduler) -> Void) -> Disposable { let scheduler = AnyRecursiveScheduler(scheduler: self, action: action) - + scheduler.schedule(state, dueTime: dueTime) - + return Disposables.create(with: scheduler.dispose) } } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift index ed2efbb16b5e..670afc34c21b 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift @@ -16,13 +16,13 @@ import Dispatch public class ConcurrentDispatchQueueScheduler: SchedulerType { public typealias TimeInterval = Foundation.TimeInterval public typealias Time = Date - - public var now : Date { + + public var now: Date { return Date() } let configuration: DispatchQueueConfiguration - + /// Constructs new `ConcurrentDispatchQueueScheduler` that wraps `queue`. /// /// - parameter queue: Target dispatch queue. @@ -30,7 +30,7 @@ public class ConcurrentDispatchQueueScheduler: SchedulerType { public init(queue: DispatchQueue, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { self.configuration = DispatchQueueConfiguration(queue: queue, leeway: leeway) } - + /// Convenience init for scheduler that wraps one of the global concurrent dispatch queues. /// /// - parameter qos: Target global dispatch queue, by quality of service class. @@ -56,7 +56,7 @@ public class ConcurrentDispatchQueueScheduler: SchedulerType { public final func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { return self.configuration.schedule(state, action: action) } - + /** Schedules an action to be executed. @@ -68,7 +68,7 @@ public class ConcurrentDispatchQueueScheduler: SchedulerType { public final func scheduleRelative(_ state: StateType, dueTime: Foundation.TimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { return self.configuration.scheduleRelative(state, dueTime: dueTime, action: action) } - + /** Schedules a periodic piece of work. diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift index 0d65b6cabd20..53963b2377e1 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift @@ -16,7 +16,7 @@ Abstracts work that needs to be performed on `MainThread`. In case `schedule` me This scheduler is optimized for `subscribeOn` operator. If you want to observe observable sequence elements on main thread using `observeOn` operator, `MainScheduler` is more suitable for that purpose. */ -public final class ConcurrentMainScheduler : SchedulerType { +public final class ConcurrentMainScheduler: SchedulerType { public typealias TimeInterval = Foundation.TimeInterval public typealias Time = Date diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift index c7f6b1730ccc..2d8509745859 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift @@ -16,8 +16,8 @@ import Dispatch import func Foundation.pthread_setspecific import func Foundation.pthread_getspecific import func Foundation.pthread_key_create - - fileprivate enum CurrentThreadSchedulerQueueKey { + + private enum CurrentThreadSchedulerQueueKey { fileprivate static let instance = "RxSwift.CurrentThreadScheduler.Queue" } #else @@ -42,7 +42,7 @@ import Dispatch /// This is the default scheduler for operators that generate elements. /// /// This scheduler is also sometimes called `trampoline scheduler`. -public class CurrentThreadScheduler : ImmediateSchedulerType { +public class CurrentThreadScheduler: ImmediateSchedulerType { typealias ScheduleQueue = RxMutableBox> /// The singleton instance of the current thread scheduler. @@ -57,7 +57,7 @@ public class CurrentThreadScheduler : ImmediateSchedulerType { key.deallocate(capacity: 1) #endif } - + guard pthread_key_create(key, nil) == 0 else { rxFatalError("isScheduleRequired key creation failed") } @@ -69,7 +69,7 @@ public class CurrentThreadScheduler : ImmediateSchedulerType { return UnsafeRawPointer(UnsafeMutablePointer.allocate(capacity: 1)) }() - static var queue : ScheduleQueue? { + static var queue: ScheduleQueue? { get { return Thread.getThreadLocalStorageValueForKey(CurrentThreadSchedulerQueueKey.instance) } @@ -130,8 +130,7 @@ public class CurrentThreadScheduler : ImmediateSchedulerType { let queue: RxMutableBox> if let existingQueue = existingQueue { queue = existingQueue - } - else { + } else { queue = RxMutableBox(Queue(capacity: 1)) CurrentThreadScheduler.queue = queue } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift index 11af238a3b1f..8f76a1407be2 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift @@ -9,7 +9,7 @@ import struct Foundation.Date /// Provides a virtual time scheduler that uses `Date` for absolute time and `NSTimeInterval` for relative time. -public class HistoricalScheduler : VirtualTimeScheduler { +public class HistoricalScheduler: VirtualTimeScheduler { /** Creates a new historical scheduler with initial clock value. diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift index 930ca37762ba..260f5a2bd822 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift @@ -11,7 +11,7 @@ import struct Foundation.Date /// Converts historical virtual time into real time. /// /// Since historical virtual time is also measured in `Date`, this converter is identity function. -public struct HistoricalSchedulerTimeConverter : VirtualTimeConverterType { +public struct HistoricalSchedulerTimeConverter: VirtualTimeConverterType { /// Virtual time unit used that represents ticks of virtual clock. public typealias VirtualTimeUnit = RxTime diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift index 792a0be29e39..6b0a4811071d 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift @@ -30,7 +30,6 @@ extension DispatchQueueConfiguration { return } - cancel.setDisposable(action(state)) } @@ -78,7 +77,7 @@ extension DispatchQueueConfiguration { let timer = DispatchSource.makeTimerSource(queue: self.queue) timer.schedule(deadline: initial, repeating: dispatchInterval(period), leeway: self.leeway) - + // TODO: // This looks horrible, and yes, it is. // It looks like Apple has made a conceputal change here, and I'm unsure why. @@ -98,7 +97,7 @@ extension DispatchQueueConfiguration { timerState = action(timerState) }) timer.resume() - + return cancelTimer } } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift index f31469e00650..3d4de10460d1 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift @@ -6,7 +6,7 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -struct InvocableScheduledItem : InvocableType { +struct InvocableScheduledItem: InvocableType { let _invocable: I let _state: I.Value diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift index 6e7a0c1a86ca..4eda4e77ef16 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift @@ -6,11 +6,9 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -struct ScheduledItem - : ScheduledItemType - , InvocableType { +struct ScheduledItem: ScheduledItemType, InvocableType { typealias Action = (T) -> Disposable - + private let _action: Action private let _state: T @@ -19,16 +17,16 @@ struct ScheduledItem var isDisposed: Bool { return self._disposable.isDisposed } - + init(action: @escaping Action, state: T) { self._action = action self._state = state } - + func invoke() { self._disposable.setDisposable(self._action(self._state)) } - + func dispose() { self._disposable.dispose() } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift index d2b16cab7007..ec05efda6297 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift @@ -6,8 +6,6 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -protocol ScheduledItemType - : Cancelable - , InvocableType { +protocol ScheduledItemType: Cancelable, InvocableType { func invoke() } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift index 8fb09071d5c3..e188250c824e 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift @@ -21,7 +21,7 @@ Main scheduler is a specialization of `SerialDispatchQueueScheduler`. This scheduler is optimized for `observeOn` operator. To ensure observable sequence is subscribed on main thread using `subscribeOn` operator please use `ConcurrentMainScheduler` because it is more optimized for that purpose. */ -public final class MainScheduler : SerialDispatchQueueScheduler { +public final class MainScheduler: SerialDispatchQueueScheduler { private let _mainQueue: DispatchQueue diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift index 81ba59f34e47..a7dc1b8e3ebc 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift @@ -17,7 +17,7 @@ import Dispatch public class OperationQueueScheduler: ImmediateSchedulerType { public let operationQueue: OperationQueue public let queuePriority: Operation.QueuePriority - + /// Constructs new instance of `OperationQueueScheduler` that performs work on `operationQueue`. /// /// - parameter operationQueue: Operation queue targeted to perform work on. @@ -26,7 +26,7 @@ public class OperationQueueScheduler: ImmediateSchedulerType { self.operationQueue = operationQueue self.queuePriority = queuePriority } - + /** Schedules an action to be executed recursively. @@ -42,14 +42,13 @@ public class OperationQueueScheduler: ImmediateSchedulerType { return } - cancel.setDisposable(action(state)) } operation.queuePriority = self.queuePriority self.operationQueue.addOperation(operation) - + return cancel } diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift index 9e9b4ffd11b2..05dffe361b93 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift @@ -14,17 +14,17 @@ private enum ScheduleState { /// Type erased recursive scheduler. final class AnyRecursiveScheduler { - + typealias Action = (State, AnyRecursiveScheduler) -> Void private let _lock = RecursiveLock() - + // state private let _group = CompositeDisposable() private var _scheduler: SchedulerType private var _action: Action? - + init(scheduler: SchedulerType, action: @escaping Action) { self._action = action self._scheduler = scheduler @@ -44,7 +44,7 @@ final class AnyRecursiveScheduler { if self._group.isDisposed { return Disposables.create() } - + let action = self._lock.calculateLocked { () -> Action? in switch scheduleState { case let .added(removeKey): @@ -59,14 +59,14 @@ final class AnyRecursiveScheduler { return self._action } - + if let action = action { action(state, self) } - + return Disposables.create() } - + self._lock.performLocked { switch scheduleState { case .added: @@ -74,8 +74,7 @@ final class AnyRecursiveScheduler { case .initial: if let removeKey = self._group.insert(d) { scheduleState = .added(removeKey) - } - else { + } else { scheduleState = .done } case .done: @@ -95,7 +94,7 @@ final class AnyRecursiveScheduler { if self._group.isDisposed { return Disposables.create() } - + let action = self._lock.calculateLocked { () -> Action? in switch scheduleState { case let .added(removeKey): @@ -107,17 +106,17 @@ final class AnyRecursiveScheduler { } scheduleState = .done - + return self._action } - + if let action = action { action(state, self) } - + return Disposables.create() } - + self._lock.performLocked { switch scheduleState { case .added: @@ -125,8 +124,7 @@ final class AnyRecursiveScheduler { case .initial: if let removeKey = self._group.insert(d) { scheduleState = .added(removeKey) - } - else { + } else { scheduleState = .done } case .done: @@ -134,7 +132,7 @@ final class AnyRecursiveScheduler { } } } - + func dispose() { self._lock.performLocked { self._action = nil @@ -146,20 +144,20 @@ final class AnyRecursiveScheduler { /// Type erased recursive scheduler. final class RecursiveImmediateScheduler { typealias Action = (_ state: State, _ recurse: (State) -> Void) -> Void - + private var _lock = SpinLock() private let _group = CompositeDisposable() - + private var _action: Action? private let _scheduler: ImmediateSchedulerType - + init(action: @escaping Action, scheduler: ImmediateSchedulerType) { self._action = action self._scheduler = scheduler } - + // immediate scheduling - + /// Schedules an action to be executed recursively. /// /// - parameter state: State passed to the action to be executed. @@ -171,7 +169,7 @@ final class RecursiveImmediateScheduler { if self._group.isDisposed { return Disposables.create() } - + let action = self._lock.calculateLocked { () -> Action? in switch scheduleState { case let .added(removeKey): @@ -186,14 +184,14 @@ final class RecursiveImmediateScheduler { return self._action } - + if let action = action { action(state, self.schedule) } - + return Disposables.create() } - + self._lock.performLocked { switch scheduleState { case .added: @@ -201,8 +199,7 @@ final class RecursiveImmediateScheduler { case .initial: if let removeKey = self._group.insert(d) { scheduleState = .added(removeKey) - } - else { + } else { scheduleState = .done } case .done: @@ -210,7 +207,7 @@ final class RecursiveImmediateScheduler { } } } - + func dispose() { self._lock.performLocked { self._action = nil diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift index 8adb57b309f2..62f5a0243ccf 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift @@ -27,17 +27,17 @@ In case some customization need to be made on it before usage, internal serial queue can be customized using `serialQueueConfiguration` callback. */ -public class SerialDispatchQueueScheduler : SchedulerType { +public class SerialDispatchQueueScheduler: SchedulerType { public typealias TimeInterval = Foundation.TimeInterval public typealias Time = Date - + /// - returns: Current time. - public var now : Date { + public var now: Date { return Date() } let configuration: DispatchQueueConfiguration - + /** Constructs new `SerialDispatchQueueScheduler` that wraps `serialQueue`. @@ -62,7 +62,7 @@ public class SerialDispatchQueueScheduler : SchedulerType { serialQueueConfiguration?(queue) self.init(serialQueue: queue, leeway: leeway) } - + /** Constructs new `SerialDispatchQueueScheduler` named `internalSerialQueueName` that wraps `queue`. @@ -89,7 +89,7 @@ public class SerialDispatchQueueScheduler : SchedulerType { public convenience init(qos: DispatchQoS, internalSerialQueueName: String = "rx.global_dispatch_queue.serial", leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { self.init(queue: DispatchQueue.global(qos: qos.qosClass), internalSerialQueueName: internalSerialQueueName, leeway: leeway) } - + /** Schedules an action to be executed immediately. @@ -116,7 +116,7 @@ public class SerialDispatchQueueScheduler : SchedulerType { public final func scheduleRelative(_ state: StateType, dueTime: Foundation.TimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { return self.configuration.scheduleRelative(state, dueTime: dueTime, action: action) } - + /** Schedules a periodic piece of work. diff --git a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift index 037df95a0474..78a147d2ddff 100644 --- a/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift +++ b/samples/client/petstore/swift4/rxswift/SwaggerClientTests/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift @@ -7,17 +7,16 @@ // /// Base class for virtual time schedulers using a priority queue for scheduled items. -open class VirtualTimeScheduler - : SchedulerType { +open class VirtualTimeScheduler: SchedulerType { public typealias VirtualTime = Converter.VirtualTimeUnit public typealias VirtualTimeInterval = Converter.VirtualTimeIntervalUnit - private var _running : Bool + private var _running: Bool private var _clock: VirtualTime - fileprivate var _schedulerQueue : PriorityQueue> + fileprivate var _schedulerQueue: PriorityQueue> private var _converter: Converter private var _nextId = 0 @@ -116,9 +115,9 @@ open class VirtualTimeScheduler self._nextId += 1 self._schedulerQueue.enqueue(item) - + _ = compositeDisposable.insert(item) - + return compositeDisposable } @@ -232,10 +231,9 @@ extension VirtualTimeScheduler: CustomDebugStringConvertible { } } -final class VirtualSchedulerItem