From 46a4ffe64cadb0050f565d490ac7bcd07fe1e3b2 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 26 Nov 2018 22:01:53 +0800 Subject: [PATCH] Skip model generation if it's a top-level map or array (#1296) * update samples * remove string boolean map spec * add logic to skip array alias being generated as model * fix alias to array * remove unused ruby files * remove unused ruby (oas3) files * unalias response schema * fix NPE when no model defined * fix ruby openapi3 script * update samples * add global openapi, schemas for unaliasing * minor code cleanup/refactoring using globalSchemas * Revert "minor code cleanup/refactoring using globalSchemas" This reverts commit 20a2bbc6fc4267a0e0768dcf5f15d4194ce9647b. --- bin/openapi3/ruby-client-petstore.sh | 5 + .../openapitools/codegen/CodegenConfig.java | 6 + .../openapitools/codegen/DefaultCodegen.java | 55 ++++- .../codegen/DefaultGenerator.java | 25 ++- .../codegen/utils/ModelUtils.java | 13 +- .../petstore/csharp/OpenAPIClient/README.md | 2 - .../client/petstore/go/go-petstore/README.md | 2 - .../go/go-petstore/docs/AnimalFarm.md | 9 - .../go/go-petstore/docs/StringBooleanMap.md | 9 - .../go/go-petstore/model_animal_farm.go | 13 -- .../go-petstore/model_string_boolean_map.go | 13 -- .../lib/OpenAPIPetstore/Model.hs | 56 ----- .../lib/OpenAPIPetstore/ModelLens.hs | 8 - .../haskell-http-client/tests/Instances.hs | 10 - .../haskell-http-client/tests/Test.hs | 2 - .../openapitools/client/model/AnimalFarm.java | 66 ------ .../client/model/StringBooleanMap.java | 65 ------ .../openapitools/client/model/AnimalFarm.java | 66 ------ .../client/model/StringBooleanMap.java | 65 ------ .../openapitools/client/model/AnimalFarm.java | 66 ------ .../client/model/StringBooleanMap.java | 65 ------ .../openapitools/client/model/AnimalFarm.java | 66 ------ .../client/model/StringBooleanMap.java | 65 ------ .../openapitools/client/model/AnimalFarm.java | 65 ------ .../client/model/StringBooleanMap.java | 64 ------ .../openapitools/client/model/AnimalFarm.java | 66 ------ .../client/model/StringBooleanMap.java | 65 ------ .../openapitools/client/model/AnimalFarm.java | 66 ------ .../client/model/StringBooleanMap.java | 65 ------ .../openapitools/client/model/AnimalFarm.java | 94 -------- .../client/model/StringBooleanMap.java | 91 -------- .../openapitools/client/model/AnimalFarm.java | 66 ------ .../client/model/StringBooleanMap.java | 65 ------ .../openapitools/client/model/AnimalFarm.java | 66 ------ .../client/model/StringBooleanMap.java | 65 ------ .../openapitools/client/model/AnimalFarm.java | 66 ------ .../client/model/StringBooleanMap.java | 65 ------ .../openapitools/client/model/AnimalFarm.java | 71 ------ .../client/model/StringBooleanMap.java | 70 ------ .../openapitools/client/model/AnimalFarm.java | 66 ------ .../client/model/StringBooleanMap.java | 65 ------ .../openapitools/client/model/AnimalFarm.java | 66 ------ .../client/model/StringBooleanMap.java | 65 ------ .../openapitools/client/model/AnimalFarm.java | 68 ------ .../client/model/StringBooleanMap.java | 67 ------ .../openapitools/client/model/AnimalFarm.java | 68 ------ .../client/model/StringBooleanMap.java | 67 ------ .../openapitools/client/model/AnimalFarm.java | 68 ------ .../client/model/StringBooleanMap.java | 67 ------ .../openapitools/client/model/AnimalFarm.java | 66 ------ .../client/model/StringBooleanMap.java | 65 ------ .../openapitools/client/model/AnimalFarm.java | 66 ------ .../client/model/StringBooleanMap.java | 65 ------ .../openapitools/client/model/AnimalFarm.java | 66 ------ .../client/model/StringBooleanMap.java | 65 ------ .../openapitools/client/model/AnimalFarm.java | 66 ------ .../client/model/StringBooleanMap.java | 65 ------ .../openapitools/client/model/AnimalFarm.java | 66 ------ .../client/model/StringBooleanMap.java | 65 ------ .../petstore/php/OpenAPIClient-php/README.md | 2 - .../test/Model/AnimalFarmTest.php | 78 ------- .../test/Model/StringBooleanMapTest.php | 78 ------- samples/client/petstore/ruby/README.md | 2 - .../client/petstore/ruby/docs/AnimalFarm.md | 7 - .../petstore/ruby/docs/StringBooleanMap.md | 7 - samples/client/petstore/ruby/lib/petstore.rb | 2 - .../ruby/lib/petstore/models/animal_farm.rb | 174 --------------- .../lib/petstore/models/string_boolean_map.rb | 174 --------------- .../ruby/spec/models/animal_farm_spec.rb | 35 --- .../spec/models/string_boolean_map_spec.rb | 35 --- .../petstore/php/OpenAPIClient-php/README.md | 2 - .../test/Model/AnimalFarmTest.php | 78 ------- .../test/Model/StringBooleanMapTest.php | 78 ------- .../openapi3/client/petstore/ruby/README.md | 2 - .../client/petstore/ruby/docs/AnimalFarm.md | 7 - .../petstore/ruby/docs/StringBooleanMap.md | 7 - .../client/petstore/ruby/lib/petstore.rb | 2 - .../ruby/lib/petstore/models/animal_farm.rb | 174 --------------- .../ruby/lib/petstore/models/body4.rb | 204 ------------------ .../ruby/lib/petstore/models/outer_boolean.rb | 174 --------------- .../ruby/lib/petstore/models/outer_number.rb | 174 --------------- .../ruby/lib/petstore/models/outer_string.rb | 174 --------------- .../lib/petstore/models/string_boolean_map.rb | 174 --------------- .../ruby/spec/models/animal_farm_spec.rb | 35 --- .../spec/models/string_boolean_map_spec.rb | 35 --- .../org/openapitools/model/AnimalFarm.java | 41 ---- .../openapitools/model/StringBooleanMap.java | 40 ---- samples/server/petstore/php-slim/README.md | 2 - .../src/client/mod.rs | 6 +- .../src/lib.rs | 6 +- .../src/models.rs | 62 ------ .../output/rust-server-test/src/models.rs | 12 -- .../org/openapitools/model/AnimalFarm.java | 52 ----- .../openapitools/model/StringBooleanMap.java | 51 ----- .../org/openapitools/model/AnimalFarm.java | 52 ----- .../openapitools/model/StringBooleanMap.java | 51 ----- .../org/openapitools/model/AnimalFarm.java | 52 ----- .../openapitools/model/StringBooleanMap.java | 51 ----- .../org/openapitools/model/AnimalFarm.java | 52 ----- .../openapitools/model/StringBooleanMap.java | 51 ----- .../org/openapitools/model/AnimalFarm.java | 52 ----- .../openapitools/model/StringBooleanMap.java | 51 ----- .../org/openapitools/model/AnimalFarm.java | 52 ----- .../openapitools/model/StringBooleanMap.java | 51 ----- .../virtualan/model/AnimalFarm.java | 52 ----- .../virtualan/model/StringBooleanMap.java | 51 ----- .../org/openapitools/model/AnimalFarm.java | 52 ----- .../openapitools/model/StringBooleanMap.java | 51 ----- 108 files changed, 92 insertions(+), 5999 deletions(-) delete mode 100644 samples/client/petstore/go/go-petstore/docs/AnimalFarm.md delete mode 100644 samples/client/petstore/go/go-petstore/docs/StringBooleanMap.md delete mode 100644 samples/client/petstore/go/go-petstore/model_animal_farm.go delete mode 100644 samples/client/petstore/go/go-petstore/model_string_boolean_map.go delete mode 100644 samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AnimalFarm.java delete mode 100644 samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AnimalFarm.java delete mode 100644 samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AnimalFarm.java delete mode 100644 samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AnimalFarm.java delete mode 100644 samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AnimalFarm.java delete mode 100644 samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AnimalFarm.java delete mode 100644 samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AnimalFarm.java delete mode 100644 samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AnimalFarm.java delete mode 100644 samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AnimalFarm.java delete mode 100644 samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AnimalFarm.java delete mode 100644 samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AnimalFarm.java delete mode 100644 samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AnimalFarm.java delete mode 100644 samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AnimalFarm.java delete mode 100644 samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AnimalFarm.java delete mode 100644 samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AnimalFarm.java delete mode 100644 samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AnimalFarm.java delete mode 100644 samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AnimalFarm.java delete mode 100644 samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AnimalFarm.java delete mode 100644 samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AnimalFarm.java delete mode 100644 samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AnimalFarm.java delete mode 100644 samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AnimalFarm.java delete mode 100644 samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AnimalFarm.java delete mode 100644 samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/StringBooleanMapTest.php delete mode 100644 samples/client/petstore/ruby/docs/AnimalFarm.md delete mode 100644 samples/client/petstore/ruby/docs/StringBooleanMap.md delete mode 100644 samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb delete mode 100644 samples/client/petstore/ruby/lib/petstore/models/string_boolean_map.rb delete mode 100644 samples/client/petstore/ruby/spec/models/animal_farm_spec.rb delete mode 100644 samples/client/petstore/ruby/spec/models/string_boolean_map_spec.rb delete mode 100644 samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php delete mode 100644 samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/StringBooleanMapTest.php delete mode 100644 samples/openapi3/client/petstore/ruby/docs/AnimalFarm.md delete mode 100644 samples/openapi3/client/petstore/ruby/docs/StringBooleanMap.md delete mode 100644 samples/openapi3/client/petstore/ruby/lib/petstore/models/animal_farm.rb delete mode 100644 samples/openapi3/client/petstore/ruby/lib/petstore/models/body4.rb delete mode 100644 samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_boolean.rb delete mode 100644 samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_number.rb delete mode 100644 samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_string.rb delete mode 100644 samples/openapi3/client/petstore/ruby/lib/petstore/models/string_boolean_map.rb delete mode 100644 samples/openapi3/client/petstore/ruby/spec/models/animal_farm_spec.rb delete mode 100644 samples/openapi3/client/petstore/ruby/spec/models/string_boolean_map_spec.rb delete mode 100644 samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AnimalFarm.java delete mode 100644 samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/StringBooleanMap.java delete mode 100644 samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AnimalFarm.java delete mode 100644 samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/StringBooleanMap.java delete mode 100644 samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AnimalFarm.java delete mode 100644 samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/StringBooleanMap.java delete mode 100644 samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AnimalFarm.java delete mode 100644 samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/StringBooleanMap.java delete mode 100644 samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AnimalFarm.java delete mode 100644 samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/StringBooleanMap.java delete mode 100644 samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AnimalFarm.java delete mode 100644 samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/StringBooleanMap.java delete mode 100644 samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AnimalFarm.java delete mode 100644 samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/StringBooleanMap.java delete mode 100644 samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AnimalFarm.java delete mode 100644 samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/StringBooleanMap.java delete mode 100644 samples/server/petstore/springboot/src/main/java/org/openapitools/model/AnimalFarm.java delete mode 100644 samples/server/petstore/springboot/src/main/java/org/openapitools/model/StringBooleanMap.java diff --git a/bin/openapi3/ruby-client-petstore.sh b/bin/openapi3/ruby-client-petstore.sh index a1daedaccbe5..b01c768b30e3 100755 --- a/bin/openapi3/ruby-client-petstore.sh +++ b/bin/openapi3/ruby-client-petstore.sh @@ -25,6 +25,11 @@ then mvn clean package fi +# purge lib/doc folder +echo "purge ruby petstore lib, docs folder" +rm -Rf samples/openapi3/client/petstore/ruby/lib +rm -Rf samples/openapi3/client/petstore/ruby/docs + # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" ags="generate -t modules/openapi-generator/src/main/resources/ruby-client -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g ruby -c bin/ruby-petstore.json -o samples/openapi3/client/petstore/ruby -DskipFormModel=true $@" diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java index 275d12205bc6..261614814cd2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java @@ -27,6 +27,7 @@ import io.swagger.v3.oas.models.servers.ServerVariable; import java.io.File; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; @@ -261,4 +262,9 @@ public interface CodegenConfig { public void setEnablePostProcessFile(boolean isEnablePostProcessFile); + // set OpenAPI and schemas + public void setGlobalOpenAPI(OpenAPI openAPI); + + public void setGlobalSchemas(OpenAPI openAPI); + } 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 e8a4cc5f9bb4..2ce583570687 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 @@ -137,6 +137,9 @@ public class DefaultCodegen implements CodegenConfig { // flag to indicate whether to use environment variable to post process file protected boolean enablePostProcessFile = false; + // make openapi and schemas available to all methods + protected OpenAPI globalOpenAPI; + protected Map globalSchemas; public List cliOptions() { return cliOptions; @@ -383,6 +386,32 @@ public String toEnumVarName(String value, String datatype) { } } + + /** + * Set global OpenAPI based on OpenAPI object + * + * @param openAPI OpenAPI object + */ + public void setGlobalOpenAPI(OpenAPI openAPI) { + this.globalOpenAPI = openAPI; + } + + + /** + * Set global schema based on OpenAPI object + * + * @param openAPI OpenAPI object + */ + public void setGlobalSchemas(OpenAPI openAPI) { + if (openAPI != null && openAPI.getComponents() != null) { + this.globalSchemas = openAPI.getComponents().getSchemas(); + } + + if (this.globalSchemas == null) { // initalize with empty map if it's null + this.globalSchemas = new HashMap(); + } + } + // override with any special post-processing @SuppressWarnings("static-method") public Map postProcessOperations(Map objs) { @@ -1762,6 +1791,7 @@ public String getterAndSetterCapitalize(String name) { return org.openapitools.codegen.utils.StringUtils.camelize(toVarName(name)); } + /** * Convert OAS Property object to Codegen Property object * @@ -1775,6 +1805,10 @@ public CodegenProperty fromProperty(String name, Schema p) { return null; } LOGGER.debug("debugging fromProperty for " + name + " : " + p); + + // unalias schema + p = ModelUtils.unaliasSchema(globalSchemas, p); + CodegenProperty property = CodegenModelFactory.newInstance(CodegenModelType.PROPERTY); property.name = toVarName(name); property.baseName = name; @@ -2003,7 +2037,8 @@ public CodegenProperty fromProperty(String name, Schema p) { if (itemName == null) { itemName = property.name; } - CodegenProperty cp = fromProperty(itemName, ((ArraySchema) p).getItems()); + Schema innerSchema = ModelUtils.unaliasSchema(globalSchemas, ((ArraySchema) p).getItems()); + CodegenProperty cp = fromProperty(itemName, innerSchema); updatePropertyForArray(property, cp); } else if (ModelUtils.isMapSchema(p)) { property.isContainer = true; @@ -2014,7 +2049,8 @@ public CodegenProperty fromProperty(String name, Schema p) { property.maxItems = p.getMaxProperties(); // handle inner property - CodegenProperty cp = fromProperty("inner", ModelUtils.getAdditionalProperties(p)); + Schema innerSchema = ModelUtils.unaliasSchema(globalSchemas, ModelUtils.getAdditionalProperties(p)); + CodegenProperty cp = fromProperty("inner", innerSchema); updatePropertyForMap(property, cp); } else if (ModelUtils.isFreeFormObject(p)) { property.isFreeFormObject = true; @@ -2308,10 +2344,8 @@ public CodegenOperation fromOperation(String path, op.responses.get(op.responses.size() - 1).hasMore = false; if (methodResponse != null) { - Schema responseSchema = ModelUtils.getSchemaFromResponse(methodResponse); - if (openAPI != null && openAPI.getComponents() != null) { // has models/aliases defined - responseSchema = ModelUtils.unaliasSchema(openAPI.getComponents().getSchemas(), responseSchema); - } + Schema responseSchema = ModelUtils.unaliasSchema(globalSchemas, ModelUtils.getSchemaFromResponse(methodResponse)); + if (responseSchema != null) { CodegenProperty cm = fromProperty("response", responseSchema); @@ -2559,7 +2593,12 @@ public CodegenResponse fromResponse(OpenAPI openAPI, String responseCode, ApiRes } else { r.code = responseCode; } - final Schema responseSchema = ModelUtils.getSchemaFromResponse(response); + Schema responseSchema; + if (openAPI != null && openAPI.getComponents() != null) { + responseSchema = ModelUtils.unaliasSchema(openAPI.getComponents().getSchemas(), ModelUtils.getSchemaFromResponse(response)); + } else { // no model/alias defined + responseSchema = ModelUtils.getSchemaFromResponse(response); + } r.schema = responseSchema; r.message = escapeText(response.getDescription()); // TODO need to revise and test examples in responses @@ -2573,6 +2612,7 @@ public CodegenResponse fromResponse(OpenAPI openAPI, String responseCode, ApiRes r.hasHeaders = !r.headers.isEmpty(); if (r.schema != null) { + Map allSchemas = null; CodegenProperty cp = fromProperty("response", responseSchema); if (ModelUtils.isArraySchema(responseSchema)) { @@ -3209,6 +3249,7 @@ private void addHeaders(OpenAPI openAPI, ApiResponse response, List schemaMap = new HashMap<>(); schemaMap.put(name, schema); Map models = processModels(config, schemaMap, schemas); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java index 6f495304fcc2..86edabc97075 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java @@ -771,22 +771,15 @@ public static Schema unaliasSchema(Map allSchemas, Schema schema return schema; } else if (isFreeFormObject(ref)) { return schema; - } else if (isArraySchema(ref) || isComposedSchema(ref)) { // array def should be created as models + } else if (isArraySchema(ref)) { + return unaliasSchema(allSchemas, allSchemas.get(ModelUtils.getSimpleRef(schema.get$ref()))); + } else if (isComposedSchema(ref)) { return schema; } else if (isMapSchema(ref)) { if (ref.getProperties() != null && !ref.getProperties().isEmpty()) // has properties return schema; // treat it as model else { // treat it as a typical map - /* TODO unalias the map item if it's an alias - if (ref.getAdditionalProperties() != null) { - - Schema innerSchema = (Schema) ref.getAdditionalProperties(); - if (StringUtils.isNotEmpty(innerSchema.get$ref())) { // map item is a ref to something else - //Schema unaliasInnerSchema = unaliasSchema(allSchemas, allSchemas.get(ModelUtils.getSimpleRef(innerSchema.get$ref()))); - //ref.setAdditionalProperties(unaliasInnerSchema); - } - }*/ return unaliasSchema(allSchemas, allSchemas.get(ModelUtils.getSimpleRef(schema.get$ref()))); } } else if (isObjectSchema(ref)) { // model diff --git a/samples/client/petstore/csharp/OpenAPIClient/README.md b/samples/client/petstore/csharp/OpenAPIClient/README.md index aabf26b7899b..52d7d417cb77 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/README.md +++ b/samples/client/petstore/csharp/OpenAPIClient/README.md @@ -138,7 +138,6 @@ Class | Method | HTTP request | Description - [Model.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - [Model.Animal](docs/Animal.md) - - [Model.AnimalFarm](docs/AnimalFarm.md) - [Model.ApiResponse](docs/ApiResponse.md) - [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) @@ -169,7 +168,6 @@ Class | Method | HTTP request | Description - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) - [Model.Return](docs/Return.md) - [Model.SpecialModelName](docs/SpecialModelName.md) - - [Model.StringBooleanMap](docs/StringBooleanMap.md) - [Model.Tag](docs/Tag.md) - [Model.User](docs/User.md) diff --git a/samples/client/petstore/go/go-petstore/README.md b/samples/client/petstore/go/go-petstore/README.md index 91a0e994b249..c6ffd9374bf8 100644 --- a/samples/client/petstore/go/go-petstore/README.md +++ b/samples/client/petstore/go/go-petstore/README.md @@ -71,7 +71,6 @@ Class | Method | HTTP request | Description - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - [Animal](docs/Animal.md) - - [AnimalFarm](docs/AnimalFarm.md) - [ApiResponse](docs/ApiResponse.md) - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) @@ -102,7 +101,6 @@ Class | Method | HTTP request | Description - [ReadOnlyFirst](docs/ReadOnlyFirst.md) - [Return](docs/Return.md) - [SpecialModelName](docs/SpecialModelName.md) - - [StringBooleanMap](docs/StringBooleanMap.md) - [Tag](docs/Tag.md) - [User](docs/User.md) diff --git a/samples/client/petstore/go/go-petstore/docs/AnimalFarm.md b/samples/client/petstore/go/go-petstore/docs/AnimalFarm.md deleted file mode 100644 index df6bab21dae8..000000000000 --- a/samples/client/petstore/go/go-petstore/docs/AnimalFarm.md +++ /dev/null @@ -1,9 +0,0 @@ -# AnimalFarm - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/go/go-petstore/docs/StringBooleanMap.md b/samples/client/petstore/go/go-petstore/docs/StringBooleanMap.md deleted file mode 100644 index 7abf11ec68b1..000000000000 --- a/samples/client/petstore/go/go-petstore/docs/StringBooleanMap.md +++ /dev/null @@ -1,9 +0,0 @@ -# StringBooleanMap - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/go/go-petstore/model_animal_farm.go b/samples/client/petstore/go/go-petstore/model_animal_farm.go deleted file mode 100644 index e3ff77813ee2..000000000000 --- a/samples/client/petstore/go/go-petstore/model_animal_farm.go +++ /dev/null @@ -1,13 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstore - -type AnimalFarm struct { -} diff --git a/samples/client/petstore/go/go-petstore/model_string_boolean_map.go b/samples/client/petstore/go/go-petstore/model_string_boolean_map.go deleted file mode 100644 index 7cc08c7e8958..000000000000 --- a/samples/client/petstore/go/go-petstore/model_string_boolean_map.go +++ /dev/null @@ -1,13 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstore - -type StringBooleanMap struct { -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs index ef55290920ba..010abaab4530 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs @@ -278,34 +278,6 @@ mkAnimal animalClassName = , animalColor = Nothing } --- ** AnimalFarm --- | AnimalFarm -data AnimalFarm = AnimalFarm - { - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON AnimalFarm -instance A.FromJSON AnimalFarm where - parseJSON = A.withObject "AnimalFarm" $ \o -> - pure AnimalFarm - - --- | ToJSON AnimalFarm -instance A.ToJSON AnimalFarm where - toJSON AnimalFarm = - _omitNulls - [ - ] - - --- | Construct a value of type 'AnimalFarm' (by applying it's required fields, if any) -mkAnimalFarm - :: AnimalFarm -mkAnimalFarm = - AnimalFarm - { - } - -- ** ApiResponse -- | ApiResponse data ApiResponse = ApiResponse @@ -1326,34 +1298,6 @@ mkSpecialModelName = { specialModelNameSpecialPropertyName = Nothing } --- ** StringBooleanMap --- | StringBooleanMap -data StringBooleanMap = StringBooleanMap - { - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON StringBooleanMap -instance A.FromJSON StringBooleanMap where - parseJSON = A.withObject "StringBooleanMap" $ \o -> - pure StringBooleanMap - - --- | ToJSON StringBooleanMap -instance A.ToJSON StringBooleanMap where - toJSON StringBooleanMap = - _omitNulls - [ - ] - - --- | Construct a value of type 'StringBooleanMap' (by applying it's required fields, if any) -mkStringBooleanMap - :: StringBooleanMap -mkStringBooleanMap = - StringBooleanMap - { - } - -- ** Tag -- | Tag data Tag = Tag diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs index b1aa4c791c50..0b8a2a848137 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs @@ -64,10 +64,6 @@ animalColorL f Animal{..} = (\animalColor -> Animal { animalColor, ..} ) <$> f a --- * AnimalFarm - - - -- * ApiResponse -- | 'apiResponseCode' Lens @@ -603,10 +599,6 @@ specialModelNameSpecialPropertyNameL f SpecialModelName{..} = (\specialModelName --- * StringBooleanMap - - - -- * Tag -- | 'tagId' Lens diff --git a/samples/client/petstore/haskell-http-client/tests/Instances.hs b/samples/client/petstore/haskell-http-client/tests/Instances.hs index 59f575e12cd0..74830f44ba20 100644 --- a/samples/client/petstore/haskell-http-client/tests/Instances.hs +++ b/samples/client/petstore/haskell-http-client/tests/Instances.hs @@ -101,11 +101,6 @@ instance Arbitrary Animal where <$> arbitrary -- animalClassName :: Text <*> arbitrary -- animalColor :: Maybe Text -instance Arbitrary AnimalFarm where - arbitrary = - - pure AnimalFarm - instance Arbitrary ApiResponse where arbitrary = ApiResponse @@ -301,11 +296,6 @@ instance Arbitrary SpecialModelName where SpecialModelName <$> arbitrary -- specialModelNameSpecialPropertyName :: Maybe Integer -instance Arbitrary StringBooleanMap where - arbitrary = - - pure StringBooleanMap - instance Arbitrary Tag where arbitrary = Tag diff --git a/samples/client/petstore/haskell-http-client/tests/Test.hs b/samples/client/petstore/haskell-http-client/tests/Test.hs index ea6fff251e36..9d6355d7b711 100644 --- a/samples/client/petstore/haskell-http-client/tests/Test.hs +++ b/samples/client/petstore/haskell-http-client/tests/Test.hs @@ -22,7 +22,6 @@ main = pure () propMimeEq MimeJSON (Proxy :: Proxy AdditionalPropertiesClass) propMimeEq MimeJSON (Proxy :: Proxy Animal) - propMimeEq MimeJSON (Proxy :: Proxy AnimalFarm) propMimeEq MimeJSON (Proxy :: Proxy ApiResponse) propMimeEq MimeJSON (Proxy :: Proxy ArrayOfArrayOfNumberOnly) propMimeEq MimeJSON (Proxy :: Proxy ArrayOfNumberOnly) @@ -53,7 +52,6 @@ main = propMimeEq MimeJSON (Proxy :: Proxy Pet) propMimeEq MimeJSON (Proxy :: Proxy ReadOnlyFirst) propMimeEq MimeJSON (Proxy :: Proxy SpecialModelName) - propMimeEq MimeJSON (Proxy :: Proxy StringBooleanMap) propMimeEq MimeJSON (Proxy :: Proxy Tag) propMimeEq MimeJSON (Proxy :: Proxy User) diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AnimalFarm.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AnimalFarm.java deleted file mode 100644 index 2f43f1b1a965..000000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AnimalFarm.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Animal; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AnimalFarm.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AnimalFarm.java deleted file mode 100644 index 2f43f1b1a965..000000000000 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AnimalFarm.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Animal; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AnimalFarm.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AnimalFarm.java deleted file mode 100644 index 2f43f1b1a965..000000000000 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AnimalFarm.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Animal; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AnimalFarm.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AnimalFarm.java deleted file mode 100644 index 2f43f1b1a965..000000000000 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AnimalFarm.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Animal; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AnimalFarm.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AnimalFarm.java deleted file mode 100644 index 5ffad5e19910..000000000000 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AnimalFarm.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import org.apache.commons.lang3.ObjectUtils; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Animal; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return ObjectUtils.hashCodeMulti(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 5b20288f8f62..000000000000 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import org.apache.commons.lang3.ObjectUtils; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return ObjectUtils.hashCodeMulti(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AnimalFarm.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AnimalFarm.java deleted file mode 100644 index 2f43f1b1a965..000000000000 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AnimalFarm.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Animal; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AnimalFarm.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AnimalFarm.java deleted file mode 100644 index 2f43f1b1a965..000000000000 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AnimalFarm.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Animal; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AnimalFarm.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AnimalFarm.java deleted file mode 100644 index d0911570bb78..000000000000 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AnimalFarm.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Animal; -import android.os.Parcelable; -import android.os.Parcel; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList implements Parcelable { - public AnimalFarm() { - super(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public void writeToParcel(Parcel out, int flags) { - out.writeList(this); - } - - AnimalFarm(Parcel in) { - in.readTypedList(this, Animal.CREATOR); - } - - public int describeContents() { - return 0; - } - - public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { - public AnimalFarm createFromParcel(Parcel in) { - AnimalFarm result = new AnimalFarm(); - result.addAll(in.readArrayList(Animal.class.getClassLoader())); - return result; - } - public AnimalFarm[] newArray(int size) { - return new AnimalFarm[size]; - } - }; -} - diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index fa40c1e911a7..000000000000 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import android.os.Parcelable; -import android.os.Parcel; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap implements Parcelable { - public StringBooleanMap() { - super(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public void writeToParcel(Parcel out, int flags) { - super.writeToParcel(out, flags); - } - - StringBooleanMap(Parcel in) { - super(in); - } - - public int describeContents() { - return 0; - } - - public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { - public StringBooleanMap createFromParcel(Parcel in) { - return new StringBooleanMap(in); - } - public StringBooleanMap[] newArray(int size) { - return new StringBooleanMap[size]; - } - }; -} - diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AnimalFarm.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AnimalFarm.java deleted file mode 100644 index 2f43f1b1a965..000000000000 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AnimalFarm.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Animal; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AnimalFarm.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AnimalFarm.java deleted file mode 100644 index 2f43f1b1a965..000000000000 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AnimalFarm.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Animal; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AnimalFarm.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AnimalFarm.java deleted file mode 100644 index 2f43f1b1a965..000000000000 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AnimalFarm.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Animal; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AnimalFarm.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AnimalFarm.java deleted file mode 100644 index 57997e8d7b31..000000000000 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AnimalFarm.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Animal; -import com.fasterxml.jackson.dataformat.xml.annotation.*; -import javax.xml.bind.annotation.*; - -/** - * AnimalFarm - */ - -@XmlRootElement(name = "AnimalFarm") -@XmlAccessorType(XmlAccessType.FIELD) -@JacksonXmlRootElement(localName = "AnimalFarm") -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 83beddee9201..000000000000 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.dataformat.xml.annotation.*; -import javax.xml.bind.annotation.*; - -/** - * StringBooleanMap - */ - -@XmlRootElement(name = "StringBooleanMap") -@XmlAccessorType(XmlAccessType.FIELD) -@JacksonXmlRootElement(localName = "StringBooleanMap") -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AnimalFarm.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AnimalFarm.java deleted file mode 100644 index 2f43f1b1a965..000000000000 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AnimalFarm.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Animal; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AnimalFarm.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AnimalFarm.java deleted file mode 100644 index 2f43f1b1a965..000000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AnimalFarm.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Animal; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AnimalFarm.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AnimalFarm.java deleted file mode 100644 index 867cf78d4ac0..000000000000 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AnimalFarm.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Animal; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index c651556f7d0a..000000000000 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AnimalFarm.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AnimalFarm.java deleted file mode 100644 index 867cf78d4ac0..000000000000 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AnimalFarm.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Animal; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index c651556f7d0a..000000000000 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AnimalFarm.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AnimalFarm.java deleted file mode 100644 index 867cf78d4ac0..000000000000 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AnimalFarm.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Animal; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index c651556f7d0a..000000000000 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AnimalFarm.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AnimalFarm.java deleted file mode 100644 index 2f43f1b1a965..000000000000 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AnimalFarm.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Animal; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AnimalFarm.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AnimalFarm.java deleted file mode 100644 index 2f43f1b1a965..000000000000 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AnimalFarm.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Animal; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AnimalFarm.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AnimalFarm.java deleted file mode 100644 index 2f43f1b1a965..000000000000 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AnimalFarm.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Animal; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AnimalFarm.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AnimalFarm.java deleted file mode 100644 index 2f43f1b1a965..000000000000 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AnimalFarm.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Animal; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AnimalFarm.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AnimalFarm.java deleted file mode 100644 index 2f43f1b1a965..000000000000 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AnimalFarm.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Animal; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/php/OpenAPIClient-php/README.md b/samples/client/petstore/php/OpenAPIClient-php/README.md index 671d2522e7de..f42e37b4a462 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/README.md +++ b/samples/client/petstore/php/OpenAPIClient-php/README.md @@ -120,7 +120,6 @@ Class | Method | HTTP request | Description - [AdditionalPropertiesClass](docs/Model/AdditionalPropertiesClass.md) - [Animal](docs/Model/Animal.md) - - [AnimalFarm](docs/Model/AnimalFarm.md) - [ApiResponse](docs/Model/ApiResponse.md) - [ArrayOfArrayOfNumberOnly](docs/Model/ArrayOfArrayOfNumberOnly.md) - [ArrayOfNumberOnly](docs/Model/ArrayOfNumberOnly.md) @@ -151,7 +150,6 @@ Class | Method | HTTP request | Description - [Pet](docs/Model/Pet.md) - [ReadOnlyFirst](docs/Model/ReadOnlyFirst.md) - [SpecialModelName](docs/Model/SpecialModelName.md) - - [StringBooleanMap](docs/Model/StringBooleanMap.md) - [Tag](docs/Model/Tag.md) - [User](docs/Model/User.md) diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php deleted file mode 100644 index 62a7e002c42a..000000000000 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php +++ /dev/null @@ -1,78 +0,0 @@ -/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = Petstore.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/samples/client/petstore/ruby/lib/petstore/models/string_boolean_map.rb b/samples/client/petstore/ruby/lib/petstore/models/string_boolean_map.rb deleted file mode 100644 index 692d306720de..000000000000 --- a/samples/client/petstore/ruby/lib/petstore/models/string_boolean_map.rb +++ /dev/null @@ -1,174 +0,0 @@ -=begin -#OpenAPI Petstore - -#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - -OpenAPI spec version: 1.0.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.4-SNAPSHOT - -=end - -require 'date' - -module Petstore - class StringBooleanMap - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - } - end - - # Attribute type mapping. - def self.openapi_types - { - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = Petstore.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/samples/client/petstore/ruby/spec/models/animal_farm_spec.rb b/samples/client/petstore/ruby/spec/models/animal_farm_spec.rb deleted file mode 100644 index fafc7166178a..000000000000 --- a/samples/client/petstore/ruby/spec/models/animal_farm_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -=begin -#OpenAPI Petstore - -#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - -OpenAPI spec version: 1.0.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.4-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for Petstore::AnimalFarm -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe 'AnimalFarm' do - before do - # run before each test - @instance = Petstore::AnimalFarm.new - end - - after do - # run after each test - end - - describe 'test an instance of AnimalFarm' do - it 'should create an instance of AnimalFarm' do - expect(@instance).to be_instance_of(Petstore::AnimalFarm) - end - end -end diff --git a/samples/client/petstore/ruby/spec/models/string_boolean_map_spec.rb b/samples/client/petstore/ruby/spec/models/string_boolean_map_spec.rb deleted file mode 100644 index 921a427d6133..000000000000 --- a/samples/client/petstore/ruby/spec/models/string_boolean_map_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -=begin -#OpenAPI Petstore - -#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - -OpenAPI spec version: 1.0.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.4-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for Petstore::StringBooleanMap -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe 'StringBooleanMap' do - before do - # run before each test - @instance = Petstore::StringBooleanMap.new - end - - after do - # run after each test - end - - describe 'test an instance of StringBooleanMap' do - it 'should create an instance of StringBooleanMap' do - expect(@instance).to be_instance_of(Petstore::StringBooleanMap) - end - end -end diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/README.md b/samples/openapi3/client/petstore/php/OpenAPIClient-php/README.md index aff21d6c2a8b..34ffbd1ab452 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/README.md +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/README.md @@ -121,7 +121,6 @@ Class | Method | HTTP request | Description - [AdditionalPropertiesClass](docs/Model/AdditionalPropertiesClass.md) - [Animal](docs/Model/Animal.md) - - [AnimalFarm](docs/Model/AnimalFarm.md) - [ApiResponse](docs/Model/ApiResponse.md) - [ArrayOfArrayOfNumberOnly](docs/Model/ArrayOfArrayOfNumberOnly.md) - [ArrayOfNumberOnly](docs/Model/ArrayOfNumberOnly.md) @@ -160,7 +159,6 @@ Class | Method | HTTP request | Description - [Pet](docs/Model/Pet.md) - [ReadOnlyFirst](docs/Model/ReadOnlyFirst.md) - [SpecialModelName](docs/Model/SpecialModelName.md) - - [StringBooleanMap](docs/Model/StringBooleanMap.md) - [Tag](docs/Model/Tag.md) - [User](docs/Model/User.md) diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php deleted file mode 100644 index 62a7e002c42a..000000000000 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php +++ /dev/null @@ -1,78 +0,0 @@ -/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = Petstore.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/body4.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/body4.rb deleted file mode 100644 index 7b0954a6061d..000000000000 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/body4.rb +++ /dev/null @@ -1,204 +0,0 @@ -=begin -#OpenAPI Petstore - -#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - -OpenAPI spec version: 1.0.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.2-SNAPSHOT - -=end - -require 'date' - -module Petstore - class Body4 - # field1 - attr_accessor :param - - # field2 - attr_accessor :param2 - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'param' => :'param', - :'param2' => :'param2' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'param' => :'String', - :'param2' => :'String' - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - - if attributes.has_key?(:'param') - self.param = attributes[:'param'] - end - - if attributes.has_key?(:'param2') - self.param2 = attributes[:'param2'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if @param.nil? - invalid_properties.push('invalid value for "param", param cannot be nil.') - end - - if @param2.nil? - invalid_properties.push('invalid value for "param2", param2 cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @param.nil? - return false if @param2.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - param == o.param && - param2 == o.param2 - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [param, param2].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = Petstore.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_boolean.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_boolean.rb deleted file mode 100644 index 323e66b278b8..000000000000 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_boolean.rb +++ /dev/null @@ -1,174 +0,0 @@ -=begin -#Swagger Petstore - -#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - -OpenAPI spec version: 1.0.0 -Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.0-SNAPSHOT - -=end - -require 'date' - -module Petstore - class OuterBoolean - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - } - end - - # Attribute type mapping. - def self.swagger_types - { - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = Petstore.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_number.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_number.rb deleted file mode 100644 index 03e7a603cb05..000000000000 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_number.rb +++ /dev/null @@ -1,174 +0,0 @@ -=begin -#Swagger Petstore - -#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - -OpenAPI spec version: 1.0.0 -Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.0-SNAPSHOT - -=end - -require 'date' - -module Petstore - class OuterNumber - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - } - end - - # Attribute type mapping. - def self.swagger_types - { - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = Petstore.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_string.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_string.rb deleted file mode 100644 index 5e6dfc4b6bb5..000000000000 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/outer_string.rb +++ /dev/null @@ -1,174 +0,0 @@ -=begin -#Swagger Petstore - -#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - -OpenAPI spec version: 1.0.0 -Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.0-SNAPSHOT - -=end - -require 'date' - -module Petstore - class OuterString - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - } - end - - # Attribute type mapping. - def self.swagger_types - { - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.swagger_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = Petstore.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/models/string_boolean_map.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/models/string_boolean_map.rb deleted file mode 100644 index 692d306720de..000000000000 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/models/string_boolean_map.rb +++ /dev/null @@ -1,174 +0,0 @@ -=begin -#OpenAPI Petstore - -#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - -OpenAPI spec version: 1.0.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.3.4-SNAPSHOT - -=end - -require 'date' - -module Petstore - class StringBooleanMap - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - } - end - - # Attribute type mapping. - def self.openapi_types - { - } - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - return unless attributes.is_a?(Hash) - - # convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Fixnum] Hash code - def hash - [].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end # or else data not found in attributes(hash), not an issue as the data can be optional - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :BOOLEAN - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - temp_model = Petstore.const_get(type).new - temp_model.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - next if value.nil? - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end -end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/animal_farm_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/animal_farm_spec.rb deleted file mode 100644 index 895781828d2f..000000000000 --- a/samples/openapi3/client/petstore/ruby/spec/models/animal_farm_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -=begin -#Swagger Petstore - -#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - -OpenAPI spec version: 1.0.0 -Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for Petstore::AnimalFarm -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'AnimalFarm' do - before do - # run before each test - @instance = Petstore::AnimalFarm.new - end - - after do - # run after each test - end - - describe 'test an instance of AnimalFarm' do - it 'should create an instance of AnimalFarm' do - expect(@instance).to be_instance_of(Petstore::AnimalFarm) - end - end -end diff --git a/samples/openapi3/client/petstore/ruby/spec/models/string_boolean_map_spec.rb b/samples/openapi3/client/petstore/ruby/spec/models/string_boolean_map_spec.rb deleted file mode 100644 index 3f54837a62a4..000000000000 --- a/samples/openapi3/client/petstore/ruby/spec/models/string_boolean_map_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -=begin -#OpenAPI Petstore - -#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - -OpenAPI spec version: 1.0.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for Petstore::StringBooleanMap -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe 'StringBooleanMap' do - before do - # run before each test - @instance = Petstore::StringBooleanMap.new - end - - after do - # run after each test - end - - describe 'test an instance of StringBooleanMap' do - it 'should create an instance of StringBooleanMap' do - expect(@instance).to be_instance_of(Petstore::StringBooleanMap) - end - end -end diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AnimalFarm.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AnimalFarm.java deleted file mode 100644 index ea7ba3a7d131..000000000000 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AnimalFarm.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.openapitools.model; - -import java.util.ArrayList; -import java.util.List; -import org.openapitools.model.Animal; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class AnimalFarm extends ArrayList { - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private static String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/StringBooleanMap.java deleted file mode 100644 index be2e2950ecb9..000000000000 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/StringBooleanMap.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.openapitools.model; - -import java.util.HashMap; -import java.util.Map; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class StringBooleanMap extends HashMap { - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private static String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/php-slim/README.md b/samples/server/petstore/php-slim/README.md index 17577106de36..aa92b9f953d7 100644 --- a/samples/server/petstore/php-slim/README.md +++ b/samples/server/petstore/php-slim/README.md @@ -92,7 +92,6 @@ Class | Method | HTTP request | Description * OpenAPIServer\Model\AdditionalPropertiesClass * OpenAPIServer\Model\Animal -* OpenAPIServer\Model\AnimalFarm * OpenAPIServer\Model\ApiResponse * OpenAPIServer\Model\ArrayOfArrayOfNumberOnly * OpenAPIServer\Model\ArrayOfNumberOnly @@ -123,7 +122,6 @@ Class | Method | HTTP request | Description * OpenAPIServer\Model\Pet * OpenAPIServer\Model\ReadOnlyFirst * OpenAPIServer\Model\SpecialModelName -* OpenAPIServer\Model\StringBooleanMap * OpenAPIServer\Model\Tag * OpenAPIServer\Model\User diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/client/mod.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/client/mod.rs index c0c343293398..3f873a33749d 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/client/mod.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/client/mod.rs @@ -395,7 +395,7 @@ if let Some(body) = body { .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e))) .and_then(|body| - serde_json::from_str::(body) + serde_json::from_str::(body) .map_err(|e| e.into()) )) @@ -545,7 +545,7 @@ if let Some(body) = body { .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e))) .and_then(|body| - serde_json::from_str::(body) + serde_json::from_str::(body) .map_err(|e| e.into()) )) @@ -620,7 +620,7 @@ if let Some(body) = body { .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e))) .and_then(|body| - serde_json::from_str::(body) + serde_json::from_str::(body) .map_err(|e| e.into()) )) diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs index a3034479d5d1..b1fb3e7f5a81 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs @@ -48,7 +48,7 @@ pub enum TestSpecialTagsResponse { #[derive(Debug, PartialEq)] pub enum FakeOuterBooleanSerializeResponse { /// Output boolean - OutputBoolean ( models::OuterBoolean ) , + OutputBoolean ( bool ) , } #[derive(Debug, PartialEq)] @@ -60,13 +60,13 @@ pub enum FakeOuterCompositeSerializeResponse { #[derive(Debug, PartialEq)] pub enum FakeOuterNumberSerializeResponse { /// Output number - OutputNumber ( models::OuterNumber ) , + OutputNumber ( f64 ) , } #[derive(Debug, PartialEq)] pub enum FakeOuterStringSerializeResponse { /// Output string - OutputString ( models::OuterString ) , + OutputString ( String ) , } #[derive(Debug, PartialEq)] diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs index 8e3d864a0a4a..0daa05e4dbf3 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs @@ -51,68 +51,6 @@ impl Animal { } } -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] -pub struct AnimalFarm(Vec); - -impl ::std::convert::From> for AnimalFarm { - fn from(x: Vec) -> Self { - AnimalFarm(x) - } -} - -impl ::std::convert::From for Vec { - fn from(x: AnimalFarm) -> Self { - x.0 - } -} - -impl ::std::iter::FromIterator for AnimalFarm { - fn from_iter>(u: U) -> Self { - AnimalFarm(Vec::::from_iter(u)) - } -} - -impl ::std::iter::IntoIterator for AnimalFarm { - type Item = Animal; - type IntoIter = ::std::vec::IntoIter; - - fn into_iter(self) -> Self::IntoIter { - self.0.into_iter() - } -} - -impl<'a> ::std::iter::IntoIterator for &'a AnimalFarm { - type Item = &'a Animal; - type IntoIter = ::std::slice::Iter<'a, Animal>; - - fn into_iter(self) -> Self::IntoIter { - (&self.0).into_iter() - } -} - -impl<'a> ::std::iter::IntoIterator for &'a mut AnimalFarm { - type Item = &'a mut Animal; - type IntoIter = ::std::slice::IterMut<'a, Animal>; - - fn into_iter(self) -> Self::IntoIter { - (&mut self.0).into_iter() - } -} - -impl ::std::ops::Deref for AnimalFarm { - type Target = Vec; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl ::std::ops::DerefMut for AnimalFarm { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } -} - - #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ApiResponse { #[serde(rename = "code")] diff --git a/samples/server/petstore/rust-server/output/rust-server-test/src/models.rs b/samples/server/petstore/rust-server/output/rust-server-test/src/models.rs index 03a3b9559452..a4d5b838c108 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/src/models.rs +++ b/samples/server/petstore/rust-server/output/rust-server-test/src/models.rs @@ -32,18 +32,6 @@ impl ANullableContainer { } } -/// An additionalPropertiesObject -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] -pub struct AdditionalPropertiesObject { -} - -impl AdditionalPropertiesObject { - pub fn new() -> AdditionalPropertiesObject { - AdditionalPropertiesObject { - } - } -} - #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct InlineObject { #[serde(rename = "id")] diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AnimalFarm.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AnimalFarm.java deleted file mode 100644 index 393968173ac0..000000000000 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AnimalFarm.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.model.Animal; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/StringBooleanMap.java deleted file mode 100644 index 42b689e5e223..000000000000 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/StringBooleanMap.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.HashMap; -import java.util.Map; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AnimalFarm.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AnimalFarm.java deleted file mode 100644 index 393968173ac0..000000000000 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AnimalFarm.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.model.Animal; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/StringBooleanMap.java deleted file mode 100644 index 42b689e5e223..000000000000 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/StringBooleanMap.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.HashMap; -import java.util.Map; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AnimalFarm.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AnimalFarm.java deleted file mode 100644 index 393968173ac0..000000000000 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AnimalFarm.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.model.Animal; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/StringBooleanMap.java deleted file mode 100644 index 42b689e5e223..000000000000 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/StringBooleanMap.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.HashMap; -import java.util.Map; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AnimalFarm.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AnimalFarm.java deleted file mode 100644 index 393968173ac0..000000000000 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AnimalFarm.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.model.Animal; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/StringBooleanMap.java deleted file mode 100644 index 42b689e5e223..000000000000 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/StringBooleanMap.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.HashMap; -import java.util.Map; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AnimalFarm.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AnimalFarm.java deleted file mode 100644 index 393968173ac0..000000000000 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AnimalFarm.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.model.Animal; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/StringBooleanMap.java deleted file mode 100644 index 42b689e5e223..000000000000 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/StringBooleanMap.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.HashMap; -import java.util.Map; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AnimalFarm.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AnimalFarm.java deleted file mode 100644 index 393968173ac0..000000000000 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AnimalFarm.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.model.Animal; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/StringBooleanMap.java deleted file mode 100644 index 42b689e5e223..000000000000 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/StringBooleanMap.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.HashMap; -import java.util.Map; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AnimalFarm.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AnimalFarm.java deleted file mode 100644 index 225ae3beb877..000000000000 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AnimalFarm.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.openapitools.virtualan.model; - -import java.util.Objects; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.virtualan.model.Animal; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/StringBooleanMap.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/StringBooleanMap.java deleted file mode 100644 index 095b736ebbc1..000000000000 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/StringBooleanMap.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.openapitools.virtualan.model; - -import java.util.Objects; -import java.util.HashMap; -import java.util.Map; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AnimalFarm.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AnimalFarm.java deleted file mode 100644 index 393968173ac0..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AnimalFarm.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.model.Animal; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/StringBooleanMap.java deleted file mode 100644 index 42b689e5e223..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/StringBooleanMap.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.HashMap; -import java.util.Map; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} -