From 41e97e6d2bd817c39e0ce6593acea8b9b290ddd6 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Tue, 12 May 2020 18:57:25 -0700 Subject: [PATCH 001/105] Mustache template should use invokerPackage tag to generate import --- .../Java/libraries/jersey2/AbstractOpenApiSchema.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/AbstractOpenApiSchema.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/AbstractOpenApiSchema.mustache index cdba3be84552..c924650e6c0a 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/AbstractOpenApiSchema.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/AbstractOpenApiSchema.mustache @@ -2,7 +2,7 @@ package {{invokerPackage}}.model; -import org.openapitools.client.ApiException; +import {{invokerPackage}}.ApiException; import java.lang.reflect.Type; import java.util.Map; import javax.ws.rs.core.GenericType; From fca81de731bb07e0eaa65ee565374870c54aad1c Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 13 May 2020 14:07:56 -0700 Subject: [PATCH 002/105] Add a unit test for allOf and additionalProperties --- .../tests/test_deserialization.py | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py b/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py index 2d8e3de5e72a..18b42e965e08 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py +++ b/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py @@ -176,3 +176,27 @@ def test_deserialize_fruit_null_value(self): inst = petstore_api.FruitReq(None) self.assertIsNone(inst) + + def test_deserialize_all_of_with_additional_properties(self): + """ + deserialize data. + """ + + # Dog is allOf with two child schemas. + # The OAS document for Dog does not specify the 'additionalProperties' keyword. + # The additionalProperties keyword is used to control the handling of extra stuff, + # that is, properties whose names are not listed in the properties keyword. + # By default any additional properties are allowed. + data = { + 'className': 'Dog', + 'color': 'brown', + 'breed': 'golden retriever', + # Below are additional, undeclared properties + 'group': 'Terrier Group', + 'size': 'medium', + } + response = MockResponse(data=json.dumps(data)) + deserialized = self.deserialize(response, (petstore_api.Dog,), True) + self.assertEqual(type(deserialized), petstore_api.Dog) + self.assertEqual(deserialized.class_name, 'Dog') + self.assertEqual(deserialized.breed, 'golden retriever') From 13d865a04f551aa3eb2c76789e2970c2c1eceb0f Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 13 May 2020 22:10:26 +0000 Subject: [PATCH 003/105] Fix getAdditionalProperties --- .../codegen/utils/ModelUtils.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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 7092f2961715..27b637456f61 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 @@ -1080,11 +1080,28 @@ public static Schema unaliasSchema(OpenAPI openAPI, return schema; } + /** + * Returns the additionalProperties Schema for the specified input schema. + * + * The additionalProperties keyword is used to control the handling of additional, undeclared + * properties, that is, properties whose names are not listed in the properties keyword. + * The additionalProperties keyword may be either a boolean or an object. + * If additionalProperties is a boolean and set to false, no additional properties are allowed. + * By default when the additionalProperties keyword is not specified in the input schema, + * any additional properties are allowed. This is equivalent to setting additionalProperties + * to the boolean value True or setting additionalProperties: {} + * + * @param schema the input schema that may or may not have the additionalProperties keyword. + * @return the Schema of the additionalProperties. The null value is returned if no additional + * properties are allowed. + */ public static Schema getAdditionalProperties(Schema schema) { if (schema.getAdditionalProperties() instanceof Schema) { return (Schema) schema.getAdditionalProperties(); } - if (schema.getAdditionalProperties() instanceof Boolean && (Boolean) schema.getAdditionalProperties()) { + if (schema.getAdditionalProperties() == null || + (schema.getAdditionalProperties() instanceof Boolean && + (Boolean) schema.getAdditionalProperties())) { return new ObjectSchema(); } return null; From eed27dc4105fde10491bd455af790916b0204739 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 13 May 2020 22:10:55 -0700 Subject: [PATCH 004/105] Add code comments --- .../src/main/java/org/openapitools/codegen/CodegenModel.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java index 68b26dbf496d..cff23f95bad5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java @@ -102,7 +102,10 @@ public class CodegenModel implements IJsonSchemaValidationProperties { public Map vendorExtensions = new HashMap(); - //The type of the value from additional properties. Used in map like objects. + /** + * The type of the value for the additionalProperties keyword in the OAS document. + * Used in map like objects, including composed schemas. + */ public String additionalPropertiesType; private Integer maxProperties; From 158ee579ddef524de0bc9067b9ad9feeab42ed78 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 13 May 2020 22:11:17 -0700 Subject: [PATCH 005/105] Add code comments --- .../openapitools/codegen/DefaultCodegen.java | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) 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 b3d02767d03d..44f3380b8ca3 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 @@ -2793,6 +2793,32 @@ protected CodegenDiscriminator createDiscriminator(String schemaName, Schema sch return discriminator; } + /** + * Handle the model for the 'additionalProperties' keyword in the OAS schema. + * + * For example, in the OAS schema below, the schema has a declared 'id' property + * and additional, undeclared properties of type 'integer' are allowed. + * + * type: object + * properties: + * id: + * type: integer + * additionalProperties: + * type: integer + * + * In most programming languages, the additionalProperties are stored in a map + * data structure, such as HashMap in Java, map[string]interface{} in golang, + * and a dict in Python. + * There are multiple ways to implement the additionalProperties keyword, depending + * on the programming language and mustache template. + * One way is to use class inheritance. For example in Java, the schema may extend + * from HashMap to store the additional properties. + * In that case 'CodegenModel.parent' may be used. + * Another way is to use CodegenModel.additionalPropertiesType. + * + * @param codegenModel The codegen representation of the schema. + * @param schema the input OAS schema. + */ protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { addParentContainer(codegenModel, codegenModel.name, schema); } @@ -4473,6 +4499,13 @@ public void addOperationToGroup(String tag, String resourcePath, Operation opera co.baseName = tag; } + /** + * Sets the value of the 'model.parent' property in CodegenModel. + * + * @param model the codegen representation of the OAS schema. + * @param name the name of the model. + * @param schema the input OAS schema. + */ protected void addParentContainer(CodegenModel model, String name, Schema schema) { final CodegenProperty property = fromProperty(name, schema); addImport(model, property.complexType); From 24fc6c526143b4e6d33705d538de56bab5827042 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 13 May 2020 22:12:05 -0700 Subject: [PATCH 006/105] set nullable for additionalproperties --- .../java/org/openapitools/codegen/utils/ModelUtils.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 27b637456f61..5dc7d792e2de 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 @@ -1102,7 +1102,12 @@ public static Schema getAdditionalProperties(Schema schema) { if (schema.getAdditionalProperties() == null || (schema.getAdditionalProperties() instanceof Boolean && (Boolean) schema.getAdditionalProperties())) { - return new ObjectSchema(); + // Return ObjectSchema to specify any object (map) value is allowed. + // Set nullable to specify the value of additional properties may be + // the null value. + // Free-form additionalProperties don't need to have an inner + // additional properties, the type is already free-form. + return new ObjectSchema().additionalProperties(Boolean.FALSE).nullable(Boolean.TRUE); } return null; } From c47d0972f5cd83da658f630cf1c6801e2e0a6515 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 13 May 2020 22:12:42 -0700 Subject: [PATCH 007/105] add variants of additionalProperties --- ...-fake-endpoints-models-for-testing-with-http-signature.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index f617a76f204b..818a2bca581d 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -1881,6 +1881,8 @@ components: type: boolean required: - cultivar + # The keyword below has the same effect as if it had not been specified. + additionalProperties: true bananaReq: type: object properties: @@ -1890,6 +1892,7 @@ components: type: boolean required: - lengthCm + additionalProperties: false # go-experimental is unable to make Triangle and Quadrilateral models # correctly https://github.com/OpenAPITools/openapi-generator/issues/6149 Drawing: From 4c889510f03e8d2493dbbf0a07203221ca8bdfb0 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 13 May 2020 22:13:27 -0700 Subject: [PATCH 008/105] Add more unit tests --- .../tests/test_deserialization.py | 39 ++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py b/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py index 18b42e965e08..d037ad2af86a 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py +++ b/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py @@ -177,7 +177,7 @@ def test_deserialize_fruit_null_value(self): inst = petstore_api.FruitReq(None) self.assertIsNone(inst) - def test_deserialize_all_of_with_additional_properties(self): + def test_deserialize_with_additional_properties(self): """ deserialize data. """ @@ -200,3 +200,40 @@ def test_deserialize_all_of_with_additional_properties(self): self.assertEqual(type(deserialized), petstore_api.Dog) self.assertEqual(deserialized.class_name, 'Dog') self.assertEqual(deserialized.breed, 'golden retriever') + + # The 'appleReq' schema allows additional properties by explicitly setting + # additionalProperties: true + data = { + 'cultivar': 'Golden Delicious', + 'mealy': False, + # Below are additional, undeclared properties + 'group': 'abc', + 'size': 3, + 'p1': True, + 'p2': [ 'a', 'b', 123], + } + response = MockResponse(data=json.dumps(data)) + deserialized = self.deserialize(response, (petstore_api.AppleReq,), True) + self.assertEqual(type(deserialized), petstore_api.AppleReq) + self.assertEqual(deserialized.cultivar, 'Golden Delicious') + self.assertEqual(deserialized.p1, True) + + # The 'bananaReq' schema disallows additional properties by explicitly setting + # additionalProperties: false + err_msg = ("Invalid value for `{}`, must match regular expression `{}` with flags") + with self.assertRaisesRegexp( + petstore_api.ApiValueError, + err_msg.format("origin", "[^`]*") + ): + data = { + 'lengthCm': 21, + 'sweet': False, + # Below are additional, undeclared properties. They are not allowed, + # an exception should be raised. + 'group': 'abc', + } + response = MockResponse(data=json.dumps(data)) + deserialized = self.deserialize(response, (petstore_api.AppleReq,), True) + self.assertEqual(type(deserialized), petstore_api.AppleReq) + self.assertEqual(deserialized.lengthCm, 21) + self.assertEqual(deserialized.p1, True) \ No newline at end of file From 9b687da90b9d7c0a5aeded43674a9fecdf58c3aa Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Thu, 14 May 2020 05:27:06 +0000 Subject: [PATCH 009/105] Handle additionalProperties for composed schemas --- .../src/main/java/org/openapitools/codegen/DefaultCodegen.java | 3 +++ 1 file changed, 3 insertions(+) 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 44f3380b8ca3..7e39f20507be 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 @@ -2352,6 +2352,9 @@ public CodegenModel fromModel(String name, Schema schema) { addVars(m, unaliasPropertySchema(properties), required, unaliasPropertySchema(allProperties), allRequired); + // Composed schemas may use the 'additionalProperties' keyword. + addAdditionPropertiesToCodeGenModel(m, schema); + // end of code block for composed schema } else { m.dataType = getSchemaType(schema); From c603f099a8db8e056a8f948e1e8bde957045e93b Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Thu, 14 May 2020 15:08:22 +0000 Subject: [PATCH 010/105] improve code comments --- .../openapitools/codegen/CodegenModel.java | 23 +++++++++++++++++++ .../openapitools/codegen/DefaultCodegen.java | 20 ---------------- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java index cff23f95bad5..b3a0e54c476c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java @@ -105,6 +105,29 @@ public class CodegenModel implements IJsonSchemaValidationProperties { /** * The type of the value for the additionalProperties keyword in the OAS document. * Used in map like objects, including composed schemas. + * + * In most programming languages, the additional (undeclared) properties are stored + * in a map data structure, such as HashMap in Java, map[string]interface{} + * in golang, or a dict in Python. + * There are multiple ways to implement the additionalProperties keyword, depending + * on the programming language and mustache template. + * One way is to use class inheritance. For example in the generated Java code, the + * generated model class may extend from HashMap to store the + * additional properties. In that case 'CodegenModel.parent' is set to represent + * the class hierarchy. + * Another way is to use CodegenModel.additionalPropertiesType. A code generator + * such as Python does not use class inheritance to model additional properties. + * + * For example, in the OAS schema below, the schema has a declared 'id' property + * and additional, undeclared properties of type 'integer' are allowed. + * + * type: object + * properties: + * id: + * type: integer + * additionalProperties: + * type: integer + * */ public String additionalPropertiesType; 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 7e39f20507be..ee7d7c517f93 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 @@ -2799,26 +2799,6 @@ protected CodegenDiscriminator createDiscriminator(String schemaName, Schema sch /** * Handle the model for the 'additionalProperties' keyword in the OAS schema. * - * For example, in the OAS schema below, the schema has a declared 'id' property - * and additional, undeclared properties of type 'integer' are allowed. - * - * type: object - * properties: - * id: - * type: integer - * additionalProperties: - * type: integer - * - * In most programming languages, the additionalProperties are stored in a map - * data structure, such as HashMap in Java, map[string]interface{} in golang, - * and a dict in Python. - * There are multiple ways to implement the additionalProperties keyword, depending - * on the programming language and mustache template. - * One way is to use class inheritance. For example in Java, the schema may extend - * from HashMap to store the additional properties. - * In that case 'CodegenModel.parent' may be used. - * Another way is to use CodegenModel.additionalPropertiesType. - * * @param codegenModel The codegen representation of the schema. * @param schema the input OAS schema. */ From a594a1a0c313ba9d73d60192b8cad4de4e34ff08 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Thu, 14 May 2020 15:29:05 +0000 Subject: [PATCH 011/105] Add code comments --- .../org/openapitools/codegen/DefaultCodegen.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 ee7d7c517f93..05e0972ce193 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 @@ -4483,7 +4483,17 @@ public void addOperationToGroup(String tag, String resourcePath, Operation opera } /** - * Sets the value of the 'model.parent' property in CodegenModel. + * Sets the value of the 'model.parent' property in CodegenModel, based on the value + * of the 'additionalProperties' keyword. Some language generator use class inheritance + * to implement additional properties. For example, in Java the generated model class + * has 'extends HashMap' to represent the additional properties. + * + * TODO: it's not a good idea to use single class inheritance to implement + * additionalProperties. That may work for non-composed schemas, but that does not + * work for composed 'allOf' schemas. For example, in Java, if additionalProperties + * is set to true (which it should be by default, per OAS spec), then the generated + * code has extends HashMap. That clearly won't work for composed 'allOf' + * schemas. * * @param model the codegen representation of the OAS schema. * @param name the name of the model. From 068b137b33c969c2f8a070745cfbce6851e893f3 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Thu, 14 May 2020 15:42:35 +0000 Subject: [PATCH 012/105] Add code comments --- .../openapitools/codegen/DefaultCodegen.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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 05e0972ce193..ba71bcb046ab 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 @@ -176,7 +176,21 @@ apiTemplateFiles are for API outputs only (controllers/handlers). protected List cliOptions = new ArrayList(); protected boolean skipOverwrite; protected boolean removeOperationIdPrefix; + + /** + * True if the code generator supports multiple class inheritance. + * This is used to model the parent hierarchy based on the 'allOf' composed schemas. + */ protected boolean supportsMultipleInheritance; + /** + * True if the code generator supports class inheritance. + * This is used to model the parent hierarchy based on the 'allOf' composed schemas. + * Note: the single-class inheritance technique has inherent limitations because + * a 'allOf' composed schema may have multiple $ref child schemas, each one + * potentially representing a "parent" in the class inheritance hierarchy. + * Some language generators also use class inheritance to implement the `additionalProperties` + * keyword. For example, the Java code generator may generate 'extends HashMap'. + */" protected boolean supportsInheritance; protected boolean supportsMixins; protected Map supportedLibraries = new LinkedHashMap(); @@ -2353,7 +2367,8 @@ public CodegenModel fromModel(String name, Schema schema) { addVars(m, unaliasPropertySchema(properties), required, unaliasPropertySchema(allProperties), allRequired); // Composed schemas may use the 'additionalProperties' keyword. - addAdditionPropertiesToCodeGenModel(m, schema); + // TODO: this wouldn't work with generators that use single + //addAdditionPropertiesToCodeGenModel(m, schema); // end of code block for composed schema } else { From 524bd31683f2ca21ce5066323bcabecfcc524eaa Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Thu, 14 May 2020 15:48:15 +0000 Subject: [PATCH 013/105] Add code comments --- .../src/main/java/org/openapitools/codegen/DefaultCodegen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ba71bcb046ab..27134f6d50ea 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 @@ -190,7 +190,7 @@ apiTemplateFiles are for API outputs only (controllers/handlers). * potentially representing a "parent" in the class inheritance hierarchy. * Some language generators also use class inheritance to implement the `additionalProperties` * keyword. For example, the Java code generator may generate 'extends HashMap'. - */" + */ protected boolean supportsInheritance; protected boolean supportsMixins; protected Map supportedLibraries = new LinkedHashMap(); From e2e2e0869ced3b0d1d3d5edb4219ab8e86bd251c Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Thu, 14 May 2020 15:51:30 +0000 Subject: [PATCH 014/105] Add code comments --- .../src/main/java/org/openapitools/codegen/DefaultCodegen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 27134f6d50ea..ce57dcbf4729 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 @@ -183,7 +183,7 @@ apiTemplateFiles are for API outputs only (controllers/handlers). */ protected boolean supportsMultipleInheritance; /** - * True if the code generator supports class inheritance. + * True if the code generator supports single class inheritance. * This is used to model the parent hierarchy based on the 'allOf' composed schemas. * Note: the single-class inheritance technique has inherent limitations because * a 'allOf' composed schema may have multiple $ref child schemas, each one From b62ae93b1cb610e20261ee486f2ca761e71260f2 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Thu, 14 May 2020 16:05:10 +0000 Subject: [PATCH 015/105] Add code comments --- .../org/openapitools/codegen/DefaultCodegen.java | 16 ++++++++++++---- .../PythonClientExperimentalCodegen.java | 2 ++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index ce57dcbf4729..a482189d8930 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 @@ -2366,10 +2366,18 @@ public CodegenModel fromModel(String name, Schema schema) { addVars(m, unaliasPropertySchema(properties), required, unaliasPropertySchema(allProperties), allRequired); - // Composed schemas may use the 'additionalProperties' keyword. - // TODO: this wouldn't work with generators that use single - //addAdditionPropertiesToCodeGenModel(m, schema); - + // Per OAS specification, composed schemas may use the 'additionalProperties' keyword. + if (!supportsInheritance) { + // Process the schema specified with the 'additionalProperties' keyword. + // This will set the 'CodegenModel.additionalPropertiesType' field. + // + // Code generators that use single class inheritance sometimes use + // the 'Codegen.parent' field to implement the 'additionalProperties' keyword. + // However, that is in conflict with 'allOf' composed schemas, + // because these code generators also want to set 'Codegen.parent' to the first + // child schema of the 'allOf' schema. + addAdditionPropertiesToCodeGenModel(m, schema); + } // end of code block for composed schema } else { m.dataType = getSchemaType(schema); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java index 92c76bb89bbb..1c3a57569ec4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java @@ -53,6 +53,8 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { public PythonClientExperimentalCodegen() { super(); + supportsInheritance = false; + modifyFeatureSet(features -> features .includeDocumentationFeatures(DocumentationFeature.Readme) .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) From c2cadb08b0335d96940fddb70fa297e9f25cd02c Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Thu, 14 May 2020 16:13:21 +0000 Subject: [PATCH 016/105] Add assertions in unit tests --- .../test/java/org/openapitools/codegen/DefaultCodegenTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index 45b7c5298164..638e208469e6 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -1187,6 +1187,8 @@ public void verifyXDiscriminatorValue() { // check that the model's children contain the x-discriminator-values modelName = "BaseObj"; cm = getModel(allModels, modelName); + Assert.assertNotNull(cm); + Assert.assertNotNull(cm.children); List excpectedDiscriminatorValues = new ArrayList<>(Arrays.asList("daily", "sub-obj")); ArrayList xDiscriminatorValues = new ArrayList<>(); for (CodegenModel child: cm.children) { From 62733880dc37140b43bd2f424a927288d715ade3 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Thu, 14 May 2020 09:46:49 -0700 Subject: [PATCH 017/105] Add new property to support the 'additionalProperties' keyword with composed schemas --- .../openapitools/codegen/DefaultCodegen.java | 22 +++++++++++++------ .../PythonClientExperimentalCodegen.java | 8 +++---- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index a482189d8930..4572b952a778 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 @@ -192,6 +192,12 @@ apiTemplateFiles are for API outputs only (controllers/handlers). * keyword. For example, the Java code generator may generate 'extends HashMap'. */ protected boolean supportsInheritance; + /** + * True if the language generator supports the 'additionalProperties' keyword + * as sibling of a composed (allOf/anyOf/oneOf) schema. + * Note: all language generators should support this to comply with the OAS specification. + */ + protected boolean supportsAdditionalPropertiesWithComposedSchema; protected boolean supportsMixins; protected Map supportedLibraries = new LinkedHashMap(); protected String library; @@ -2367,15 +2373,17 @@ public CodegenModel fromModel(String name, Schema schema) { addVars(m, unaliasPropertySchema(properties), required, unaliasPropertySchema(allProperties), allRequired); // Per OAS specification, composed schemas may use the 'additionalProperties' keyword. - if (!supportsInheritance) { + if (supportsAdditionalPropertiesWithComposedSchema) { // Process the schema specified with the 'additionalProperties' keyword. - // This will set the 'CodegenModel.additionalPropertiesType' field. + // This will set the 'CodegenModel.additionalPropertiesType' field + // and potentially 'Codegen.parent'. // - // Code generators that use single class inheritance sometimes use - // the 'Codegen.parent' field to implement the 'additionalProperties' keyword. - // However, that is in conflict with 'allOf' composed schemas, - // because these code generators also want to set 'Codegen.parent' to the first - // child schema of the 'allOf' schema. + // Note: it's not a good idea to use single class inheritance to implement + // the 'additionalProperties' keyword. Code generators that use single class + // inheritance sometimes use the 'Codegen.parent' field to implement the + // 'additionalProperties' keyword. However, that would be in conflict with + // 'allOf' composed schemas, because these code generators also want to set + // 'Codegen.parent' to the first child schema of the 'allOf' schema. addAdditionPropertiesToCodeGenModel(m, schema); } // end of code block for composed schema diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java index 1c3a57569ec4..bcd495c7d263 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java @@ -53,7 +53,7 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { public PythonClientExperimentalCodegen() { super(); - supportsInheritance = false; + supportsAdditionalPropertiesWithComposedSchema = true; modifyFeatureSet(features -> features .includeDocumentationFeatures(DocumentationFeature.Readme) @@ -973,9 +973,9 @@ public String toInstantiationType(Schema property) { protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { Schema addProps = ModelUtils.getAdditionalProperties(schema); if (addProps != null && addProps.get$ref() == null) { - // if AdditionalProperties exists and is an inline definition, get its datatype and store it in m.parent - String typeString = getTypeDeclaration(addProps); - codegenModel.additionalPropertiesType = typeString; + // if AdditionalProperties exists and is an inline definition, get its datatype and + // store it in codegenModel.additionalPropertiesType. + codegenModel.additionalPropertiesType = getTypeDeclaration(addProps);; } else { addParentContainer(codegenModel, codegenModel.name, schema); } From f32f9eb4c8052b5360e4e03139867ef304ad04c2 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Thu, 14 May 2020 09:51:52 -0700 Subject: [PATCH 018/105] run sample scripts --- .../docs/AdditionalPropertiesAnyType.md | 2 +- .../docs/AdditionalPropertiesArray.md | 2 +- .../docs/AdditionalPropertiesClass.md | 10 +++---- .../docs/AdditionalPropertiesObject.md | 2 +- .../petstore/python-experimental/docs/Cat.md | 1 + .../python-experimental/docs/Child.md | 1 + .../python-experimental/docs/ChildCat.md | 1 + .../python-experimental/docs/ChildDog.md | 1 + .../python-experimental/docs/ChildLizard.md | 1 + .../petstore/python-experimental/docs/Dog.md | 1 + .../python-experimental/docs/Parent.md | 1 + .../python-experimental/docs/ParentPet.md | 1 + .../models/additional_properties_any_type.py | 2 +- .../models/additional_properties_array.py | 2 +- .../models/additional_properties_class.py | 20 +++++++------- .../models/additional_properties_object.py | 2 +- .../petstore_api/models/cat.py | 2 +- .../petstore_api/models/child.py | 2 +- .../petstore_api/models/child_cat.py | 2 +- .../petstore_api/models/child_dog.py | 2 +- .../petstore_api/models/child_lizard.py | 2 +- .../petstore_api/models/dog.py | 2 +- .../petstore_api/models/parent.py | 2 +- .../petstore_api/models/parent_pet.py | 2 +- .../python-experimental/docs/AppleReq.md | 1 + .../docs/BiologyHominid.md | 1 + .../python-experimental/docs/BiologyMammal.md | 1 + .../docs/BiologyPrimate.md | 1 + .../docs/BiologyReptile.md | 1 + .../petstore/python-experimental/docs/Cat.md | 1 + .../docs/ComplexQuadrilateral.md | 1 + .../petstore/python-experimental/docs/Dog.md | 1 + .../docs/EquilateralTriangle.md | 1 + .../python-experimental/docs/Fruit.md | 1 + .../python-experimental/docs/FruitReq.md | 1 + .../python-experimental/docs/GmFruit.md | 1 + .../docs/IsoscelesTriangle.md | 1 + .../python-experimental/docs/Mammal.md | 1 + .../python-experimental/docs/NullableClass.md | 14 +++++----- .../python-experimental/docs/Quadrilateral.md | 1 + .../docs/ScaleneTriangle.md | 1 + .../python-experimental/docs/Shape.md | 1 + .../docs/SimpleQuadrilateral.md | 1 + .../python-experimental/docs/Triangle.md | 1 + .../petstore/python-experimental/docs/User.md | 4 +-- .../petstore_api/models/apple_req.py | 2 +- .../petstore_api/models/biology_hominid.py | 2 +- .../petstore_api/models/biology_mammal.py | 2 +- .../petstore_api/models/biology_primate.py | 2 +- .../petstore_api/models/biology_reptile.py | 2 +- .../petstore_api/models/cat.py | 2 +- .../models/complex_quadrilateral.py | 2 +- .../petstore_api/models/dog.py | 2 +- .../models/equilateral_triangle.py | 2 +- .../petstore_api/models/fruit.py | 2 +- .../petstore_api/models/fruit_req.py | 2 +- .../petstore_api/models/gm_fruit.py | 2 +- .../petstore_api/models/isosceles_triangle.py | 2 +- .../petstore_api/models/mammal.py | 2 +- .../petstore_api/models/nullable_class.py | 26 +++++++++---------- .../petstore_api/models/quadrilateral.py | 2 +- .../petstore_api/models/scalene_triangle.py | 2 +- .../petstore_api/models/shape.py | 2 +- .../models/simple_quadrilateral.py | 2 +- .../petstore_api/models/triangle.py | 2 +- .../petstore_api/models/user.py | 8 +++--- 66 files changed, 101 insertions(+), 74 deletions(-) diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesAnyType.md index d27928ab7527..62eee911ea26 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesAnyType.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str** | any string name can be used but the value must be the correct type | [optional] +**any string name** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesArray.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesArray.md index 6eac3ace2eca..46be89a5b23e 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesArray.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] -**any string name** | **[bool, date, datetime, dict, float, int, list, str]** | any string name can be used but the value must be the correct type | [optional] +**any string name** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md index 4b232aa174af..cf00d9d4c816 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md @@ -8,12 +8,12 @@ Name | Type | Description | Notes **map_integer** | **{str: (int,)}** | | [optional] **map_boolean** | **{str: (bool,)}** | | [optional] **map_array_integer** | **{str: ([int],)}** | | [optional] -**map_array_anytype** | **{str: ([bool, date, datetime, dict, float, int, list, str],)}** | | [optional] +**map_array_anytype** | **{str: ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],)}** | | [optional] **map_map_string** | **{str: ({str: (str,)},)}** | | [optional] -**map_map_anytype** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)}** | | [optional] -**anytype_1** | **bool, date, datetime, dict, float, int, list, str** | | [optional] -**anytype_2** | **bool, date, datetime, dict, float, int, list, str** | | [optional] -**anytype_3** | **bool, date, datetime, dict, float, int, list, str** | | [optional] +**map_map_anytype** | **{str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)}** | | [optional] +**anytype_1** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**anytype_2** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**anytype_3** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesObject.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesObject.md index 36026fe72f82..15763836ddb1 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesObject.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] -**any string name** | **{str: (bool, date, datetime, dict, float, int, list, str,)}** | any string name can be used but the value must be the correct type | [optional] +**any string name** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/Cat.md b/samples/client/petstore/python-experimental/docs/Cat.md index 1d7b5b26d715..846a97c82a84 100644 --- a/samples/client/petstore/python-experimental/docs/Cat.md +++ b/samples/client/petstore/python-experimental/docs/Cat.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **class_name** | **str** | | **declawed** | **bool** | | [optional] **color** | **str** | | [optional] if omitted the server will use the default value of 'red' +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/Child.md b/samples/client/petstore/python-experimental/docs/Child.md index bc3c7f3922d3..4e43e94825b7 100644 --- a/samples/client/petstore/python-experimental/docs/Child.md +++ b/samples/client/petstore/python-experimental/docs/Child.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **radio_waves** | **bool** | | [optional] **tele_vision** | **bool** | | [optional] **inter_net** | **bool** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/ChildCat.md b/samples/client/petstore/python-experimental/docs/ChildCat.md index 8f5ea4b2ced0..bee23082474c 100644 --- a/samples/client/petstore/python-experimental/docs/ChildCat.md +++ b/samples/client/petstore/python-experimental/docs/ChildCat.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pet_type** | **str** | | **name** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/ChildDog.md b/samples/client/petstore/python-experimental/docs/ChildDog.md index 2680d987a452..631b0362886c 100644 --- a/samples/client/petstore/python-experimental/docs/ChildDog.md +++ b/samples/client/petstore/python-experimental/docs/ChildDog.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pet_type** | **str** | | **bark** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/ChildLizard.md b/samples/client/petstore/python-experimental/docs/ChildLizard.md index 97b8891a27e2..2e315eb2f21b 100644 --- a/samples/client/petstore/python-experimental/docs/ChildLizard.md +++ b/samples/client/petstore/python-experimental/docs/ChildLizard.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pet_type** | **str** | | **loves_rocks** | **bool** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/Dog.md b/samples/client/petstore/python-experimental/docs/Dog.md index ec98b99dcec5..4c0497d67698 100644 --- a/samples/client/petstore/python-experimental/docs/Dog.md +++ b/samples/client/petstore/python-experimental/docs/Dog.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **class_name** | **str** | | **breed** | **str** | | [optional] **color** | **str** | | [optional] if omitted the server will use the default value of 'red' +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/Parent.md b/samples/client/petstore/python-experimental/docs/Parent.md index 2437d3c81ac9..74beb2c531ce 100644 --- a/samples/client/petstore/python-experimental/docs/Parent.md +++ b/samples/client/petstore/python-experimental/docs/Parent.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **radio_waves** | **bool** | | [optional] **tele_vision** | **bool** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/ParentPet.md b/samples/client/petstore/python-experimental/docs/ParentPet.md index 12bfa5c7fe5c..78693cf8f0e6 100644 --- a/samples/client/petstore/python-experimental/docs/ParentPet.md +++ b/samples/client/petstore/python-experimental/docs/ParentPet.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pet_type** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py index 4fec91d87358..8e2932ce5925 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py @@ -64,7 +64,7 @@ class AdditionalPropertiesAnyType(ModelNormal): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str,) # noqa: E501 + additional_properties_type = ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py index 345d5c970c9c..3664cdd79071 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py @@ -64,7 +64,7 @@ class AdditionalPropertiesArray(ModelNormal): validations = { } - additional_properties_type = ([bool, date, datetime, dict, float, int, list, str],) # noqa: E501 + additional_properties_type = ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py index 4ef564793dc0..0c8f013cd486 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py @@ -82,12 +82,12 @@ def openapi_types(): 'map_integer': ({str: (int,)},), # noqa: E501 'map_boolean': ({str: (bool,)},), # noqa: E501 'map_array_integer': ({str: ([int],)},), # noqa: E501 - 'map_array_anytype': ({str: ([bool, date, datetime, dict, float, int, list, str],)},), # noqa: E501 + 'map_array_anytype': ({str: ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],)},), # noqa: E501 'map_map_string': ({str: ({str: (str,)},)},), # noqa: E501 - 'map_map_anytype': ({str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)},), # noqa: E501 - 'anytype_1': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 - 'anytype_2': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 - 'anytype_3': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 + 'map_map_anytype': ({str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)},), # noqa: E501 + 'anytype_1': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'anytype_2': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'anytype_3': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 } @cached_property @@ -157,12 +157,12 @@ def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _conf map_integer ({str: (int,)}): [optional] # noqa: E501 map_boolean ({str: (bool,)}): [optional] # noqa: E501 map_array_integer ({str: ([int],)}): [optional] # noqa: E501 - map_array_anytype ({str: ([bool, date, datetime, dict, float, int, list, str],)}): [optional] # noqa: E501 + map_array_anytype ({str: ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],)}): [optional] # noqa: E501 map_map_string ({str: ({str: (str,)},)}): [optional] # noqa: E501 - map_map_anytype ({str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)}): [optional] # noqa: E501 - anytype_1 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 - anytype_2 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 - anytype_3 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 + map_map_anytype ({str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)}): [optional] # noqa: E501 + anytype_1 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + anytype_2 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + anytype_3 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 """ self._data_store = {} diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py index 749e3ada66e5..38483bcfd925 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py @@ -64,7 +64,7 @@ class AdditionalPropertiesObject(ModelNormal): validations = { } - additional_properties_type = ({str: (bool, date, datetime, dict, float, int, list, str,)},) # noqa: E501 + additional_properties_type = ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/client/petstore/python-experimental/petstore_api/models/cat.py b/samples/client/petstore/python-experimental/petstore_api/models/cat.py index bb0b08667d24..a947a3f1ce17 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/cat.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/cat.py @@ -74,7 +74,7 @@ class Cat(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child.py b/samples/client/petstore/python-experimental/petstore_api/models/child.py index 3587e28fdcb7..e250585bd018 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child.py @@ -74,7 +74,7 @@ class Child(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py b/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py index f382aa023ce4..f2f66828aa2f 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py @@ -74,7 +74,7 @@ class ChildCat(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py b/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py index c95da553350a..f3f1fc4104a4 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py @@ -74,7 +74,7 @@ class ChildDog(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py index 04b98e500c43..1c0c437e28b0 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py @@ -74,7 +74,7 @@ class ChildLizard(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/client/petstore/python-experimental/petstore_api/models/dog.py b/samples/client/petstore/python-experimental/petstore_api/models/dog.py index de8d27972b1a..fc05f2889898 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/dog.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/dog.py @@ -74,7 +74,7 @@ class Dog(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/client/petstore/python-experimental/petstore_api/models/parent.py b/samples/client/petstore/python-experimental/petstore_api/models/parent.py index 16bb62ed0fbd..50c99bdf0727 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/parent.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/parent.py @@ -74,7 +74,7 @@ class Parent(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py b/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py index 5012af9ae1b0..c463a789b710 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py @@ -84,7 +84,7 @@ class ParentPet(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/docs/AppleReq.md b/samples/openapi3/client/petstore/python-experimental/docs/AppleReq.md index 3d6717ebd60c..5295d1f06db8 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/AppleReq.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/AppleReq.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **cultivar** | **str** | | **mealy** | **bool** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/BiologyHominid.md b/samples/openapi3/client/petstore/python-experimental/docs/BiologyHominid.md index 408e8c7533a8..cbdbd12338f8 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/BiologyHominid.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/BiologyHominid.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **class_name** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/BiologyMammal.md b/samples/openapi3/client/petstore/python-experimental/docs/BiologyMammal.md index 5f625ab888b8..0af90241dc2c 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/BiologyMammal.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/BiologyMammal.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **class_name** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/BiologyPrimate.md b/samples/openapi3/client/petstore/python-experimental/docs/BiologyPrimate.md index 46b91e54a8bb..c9f5c791ddc4 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/BiologyPrimate.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/BiologyPrimate.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **class_name** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/BiologyReptile.md b/samples/openapi3/client/petstore/python-experimental/docs/BiologyReptile.md index 594b477258a8..5d0a5f87b3e1 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/BiologyReptile.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/BiologyReptile.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **class_name** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Cat.md b/samples/openapi3/client/petstore/python-experimental/docs/Cat.md index 1d7b5b26d715..846a97c82a84 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/Cat.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/Cat.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **class_name** | **str** | | **declawed** | **bool** | | [optional] **color** | **str** | | [optional] if omitted the server will use the default value of 'red' +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ComplexQuadrilateral.md b/samples/openapi3/client/petstore/python-experimental/docs/ComplexQuadrilateral.md index 6a7288abcb8e..4230b57b1262 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/ComplexQuadrilateral.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/ComplexQuadrilateral.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **shape_type** | **str** | | **quadrilateral_type** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Dog.md b/samples/openapi3/client/petstore/python-experimental/docs/Dog.md index ec98b99dcec5..4c0497d67698 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/Dog.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/Dog.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **class_name** | **str** | | **breed** | **str** | | [optional] **color** | **str** | | [optional] if omitted the server will use the default value of 'red' +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/EquilateralTriangle.md b/samples/openapi3/client/petstore/python-experimental/docs/EquilateralTriangle.md index 46c822e9db42..2263b96b258f 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/EquilateralTriangle.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/EquilateralTriangle.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **shape_type** | **str** | | **triangle_type** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Fruit.md b/samples/openapi3/client/petstore/python-experimental/docs/Fruit.md index 787699f2eb3a..cb3f8462e0e5 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/Fruit.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/Fruit.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **cultivar** | **str** | | [optional] **origin** | **str** | | [optional] **length_cm** | **float** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/FruitReq.md b/samples/openapi3/client/petstore/python-experimental/docs/FruitReq.md index 22eeb37f1cc3..7117b79ca68a 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/FruitReq.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/FruitReq.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **length_cm** | **float** | | defaults to nulltype.Null **mealy** | **bool** | | [optional] **sweet** | **bool** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/GmFruit.md b/samples/openapi3/client/petstore/python-experimental/docs/GmFruit.md index ea21af6ad1f8..61a2c33e6a47 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/GmFruit.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/GmFruit.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **cultivar** | **str** | | [optional] **origin** | **str** | | [optional] **length_cm** | **float** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangle.md b/samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangle.md index 335edad8c0fe..e825da665ed5 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangle.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangle.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **shape_type** | **str** | | **triangle_type** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Mammal.md b/samples/openapi3/client/petstore/python-experimental/docs/Mammal.md index b86f0b17ab99..8aadf030d29b 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/Mammal.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/Mammal.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **has_baleen** | **bool** | | [optional] **has_teeth** | **bool** | | [optional] **type** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/NullableClass.md b/samples/openapi3/client/petstore/python-experimental/docs/NullableClass.md index 7b1fe8506a62..00037cf35fa2 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/NullableClass.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/NullableClass.md @@ -9,13 +9,13 @@ Name | Type | Description | Notes **string_prop** | **str, none_type** | | [optional] **date_prop** | **date, none_type** | | [optional] **datetime_prop** | **datetime, none_type** | | [optional] -**array_nullable_prop** | **[bool, date, datetime, dict, float, int, list, str], none_type** | | [optional] -**array_and_items_nullable_prop** | **[bool, date, datetime, dict, float, int, list, str, none_type], none_type** | | [optional] -**array_items_nullable** | **[bool, date, datetime, dict, float, int, list, str, none_type]** | | [optional] -**object_nullable_prop** | **{str: (bool, date, datetime, dict, float, int, list, str,)}, none_type** | | [optional] -**object_and_items_nullable_prop** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] -**object_items_nullable** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**array_nullable_prop** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}], none_type** | | [optional] +**array_and_items_nullable_prop** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type], none_type** | | [optional] +**array_items_nullable** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type]** | | [optional] +**object_nullable_prop** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}, none_type** | | [optional] +**object_and_items_nullable_prop** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type)}, none_type** | | [optional] +**object_items_nullable** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type)}** | | [optional] +**any string name** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Quadrilateral.md b/samples/openapi3/client/petstore/python-experimental/docs/Quadrilateral.md index bc43f1e9351c..5d0a4a075fec 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/Quadrilateral.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/Quadrilateral.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **quadrilateral_type** | **str** | | **shape_type** | **str** | | defaults to nulltype.Null +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ScaleneTriangle.md b/samples/openapi3/client/petstore/python-experimental/docs/ScaleneTriangle.md index a99a1f761c2f..6e4dc3c9af87 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/ScaleneTriangle.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/ScaleneTriangle.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **shape_type** | **str** | | **triangle_type** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Shape.md b/samples/openapi3/client/petstore/python-experimental/docs/Shape.md index 6fbc1b6d2c70..793225bc517f 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/Shape.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/Shape.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **shape_type** | **str** | | **quadrilateral_type** | **str** | | defaults to nulltype.Null **triangle_type** | **str** | | defaults to nulltype.Null +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateral.md b/samples/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateral.md index fe93f4173476..14789a06f915 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateral.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateral.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **shape_type** | **str** | | **quadrilateral_type** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Triangle.md b/samples/openapi3/client/petstore/python-experimental/docs/Triangle.md index b6cf81066821..f066c080aad2 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/Triangle.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/Triangle.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **triangle_type** | **str** | | **shape_type** | **str** | | defaults to nulltype.Null +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/User.md b/samples/openapi3/client/petstore/python-experimental/docs/User.md index 2d9e43b532c2..1b1ec5fb6cc9 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/User.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/User.md @@ -11,8 +11,8 @@ Name | Type | Description | Notes **password** | **str** | | [optional] **phone** | **str** | | [optional] **user_status** | **int** | User Status | [optional] -**object_with_no_declared_props** | **bool, date, datetime, dict, float, int, list, str** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] -**object_with_no_declared_props_nullable** | **bool, date, datetime, dict, float, int, list, str, none_type** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] +**object_with_no_declared_props** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] +**object_with_no_declared_props_nullable** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] **any_type_prop** | **bool, date, datetime, dict, float, int, list, str, none_type** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional] **any_type_prop_nullable** | **bool, date, datetime, dict, float, int, list, str, none_type** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [optional] diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple_req.py index e0209f490b43..35def0646b13 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple_req.py @@ -64,7 +64,7 @@ class AppleReq(ModelNormal): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_hominid.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_hominid.py index cd0165286aab..82542e8e709c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_hominid.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_hominid.py @@ -69,7 +69,7 @@ class BiologyHominid(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_mammal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_mammal.py index 38fad7b220f5..f2adcf604183 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_mammal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_mammal.py @@ -79,7 +79,7 @@ class BiologyMammal(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_primate.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_primate.py index 1490bbc71e65..b6c40431aec0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_primate.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_primate.py @@ -74,7 +74,7 @@ class BiologyPrimate(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_reptile.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_reptile.py index 81f40ad3377c..7fa03fda3f8d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_reptile.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_reptile.py @@ -69,7 +69,7 @@ class BiologyReptile(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat.py index 1916169c5126..6a95e862ac32 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat.py @@ -79,7 +79,7 @@ class Cat(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/complex_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/complex_quadrilateral.py index 0be63bdcd2d6..401be7b0dd95 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/complex_quadrilateral.py @@ -74,7 +74,7 @@ class ComplexQuadrilateral(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog.py index de8d27972b1a..fc05f2889898 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog.py @@ -74,7 +74,7 @@ class Dog(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/equilateral_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/equilateral_triangle.py index 90c79fd2bbcc..85d5be3b80ae 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/equilateral_triangle.py @@ -74,7 +74,7 @@ class EquilateralTriangle(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit.py index cc33a3d9ec3e..beeb69a573d6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit.py @@ -85,7 +85,7 @@ class Fruit(ModelComposed): }, } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit_req.py index 130f8781a7f3..f1c436b53898 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit_req.py @@ -74,7 +74,7 @@ class FruitReq(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/gm_fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/gm_fruit.py index d40836a3076f..e36ad6804bb6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/gm_fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/gm_fruit.py @@ -85,7 +85,7 @@ class GmFruit(ModelComposed): }, } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/isosceles_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/isosceles_triangle.py index 6ef7500c2c62..3b67428f4138 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/isosceles_triangle.py @@ -74,7 +74,7 @@ class IsoscelesTriangle(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mammal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mammal.py index 1d4a80e0c7cd..0b35ac17cf50 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mammal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mammal.py @@ -79,7 +79,7 @@ class Mammal(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_class.py index 89d8720a969c..cad529c4dc00 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_class.py @@ -64,7 +64,7 @@ class NullableClass(ModelNormal): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,) # noqa: E501 @cached_property def openapi_types(): @@ -83,12 +83,12 @@ def openapi_types(): 'string_prop': (str, none_type,), # noqa: E501 'date_prop': (date, none_type,), # noqa: E501 'datetime_prop': (datetime, none_type,), # noqa: E501 - 'array_nullable_prop': ([bool, date, datetime, dict, float, int, list, str], none_type,), # noqa: E501 - 'array_and_items_nullable_prop': ([bool, date, datetime, dict, float, int, list, str, none_type], none_type,), # noqa: E501 - 'array_items_nullable': ([bool, date, datetime, dict, float, int, list, str, none_type],), # noqa: E501 - 'object_nullable_prop': ({str: (bool, date, datetime, dict, float, int, list, str,)}, none_type,), # noqa: E501 - 'object_and_items_nullable_prop': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'object_items_nullable': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'array_nullable_prop': ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}], none_type,), # noqa: E501 + 'array_and_items_nullable_prop': ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type], none_type,), # noqa: E501 + 'array_items_nullable': ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type],), # noqa: E501 + 'object_nullable_prop': ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}, none_type,), # noqa: E501 + 'object_and_items_nullable_prop': ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type)}, none_type,), # noqa: E501 + 'object_items_nullable': ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type)},), # noqa: E501 } @cached_property @@ -160,12 +160,12 @@ def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _conf string_prop (str, none_type): [optional] # noqa: E501 date_prop (date, none_type): [optional] # noqa: E501 datetime_prop (datetime, none_type): [optional] # noqa: E501 - array_nullable_prop ([bool, date, datetime, dict, float, int, list, str], none_type): [optional] # noqa: E501 - array_and_items_nullable_prop ([bool, date, datetime, dict, float, int, list, str, none_type], none_type): [optional] # noqa: E501 - array_items_nullable ([bool, date, datetime, dict, float, int, list, str, none_type]): [optional] # noqa: E501 - object_nullable_prop ({str: (bool, date, datetime, dict, float, int, list, str,)}, none_type): [optional] # noqa: E501 - object_and_items_nullable_prop ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 - object_items_nullable ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + array_nullable_prop ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}], none_type): [optional] # noqa: E501 + array_and_items_nullable_prop ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type], none_type): [optional] # noqa: E501 + array_items_nullable ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type]): [optional] # noqa: E501 + object_nullable_prop ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}, none_type): [optional] # noqa: E501 + object_and_items_nullable_prop ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type)}, none_type): [optional] # noqa: E501 + object_items_nullable ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type)}): [optional] # noqa: E501 """ self._data_store = {} diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral.py index b50f8fb77864..dfe8ab46c5f7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral.py @@ -74,7 +74,7 @@ class Quadrilateral(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/scalene_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/scalene_triangle.py index 8a9b46fd4c6f..bdcb7b18b0b6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/scalene_triangle.py @@ -74,7 +74,7 @@ class ScaleneTriangle(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape.py index d334ceac0d97..138419c1a27e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape.py @@ -74,7 +74,7 @@ class Shape(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/simple_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/simple_quadrilateral.py index cd92ebf412e8..a55f0ac8bed7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/simple_quadrilateral.py @@ -74,7 +74,7 @@ class SimpleQuadrilateral(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle.py index c37a9f93fb2b..e270cfcf8549 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle.py @@ -79,7 +79,7 @@ class Triangle(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/user.py index b8d64ff38c3a..bce02d2b8d43 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/user.py @@ -85,8 +85,8 @@ def openapi_types(): 'password': (str,), # noqa: E501 'phone': (str,), # noqa: E501 'user_status': (int,), # noqa: E501 - 'object_with_no_declared_props': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 - 'object_with_no_declared_props_nullable': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'object_with_no_declared_props': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'object_with_no_declared_props_nullable': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 'any_type_prop': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'any_type_prop_nullable': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 } @@ -162,8 +162,8 @@ def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _conf password (str): [optional] # noqa: E501 phone (str): [optional] # noqa: E501 user_status (int): User Status. [optional] # noqa: E501 - object_with_no_declared_props (bool, date, datetime, dict, float, int, list, str): test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value.. [optional] # noqa: E501 - object_with_no_declared_props_nullable (bool, date, datetime, dict, float, int, list, str, none_type): test code generation for nullable objects. Value must be a map of strings to values or the 'null' value.. [optional] # noqa: E501 + object_with_no_declared_props ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value.. [optional] # noqa: E501 + object_with_no_declared_props_nullable ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): test code generation for nullable objects. Value must be a map of strings to values or the 'null' value.. [optional] # noqa: E501 any_type_prop (bool, date, datetime, dict, float, int, list, str, none_type): test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389. [optional] # noqa: E501 any_type_prop_nullable (bool, date, datetime, dict, float, int, list, str, none_type): test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values.. [optional] # noqa: E501 """ From 87f900ff42f575c36aa6f851edba1c7badb03202 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Thu, 14 May 2020 10:32:01 -0700 Subject: [PATCH 019/105] fix unit tests to handle additionalProperties --- ...odels-for-testing-with-http-signature.yaml | 3 + .../tests/test_deserialization.py | 18 ++--- .../tests/test_discard_unknown_properties.py | 65 ++++++++++++++----- 3 files changed, 60 insertions(+), 26 deletions(-) diff --git a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index 818a2bca581d..2c6ee0e6ea8d 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -1813,6 +1813,9 @@ components: oneOf: - $ref: '#/components/schemas/apple' - $ref: '#/components/schemas/banana' + # Below additionalProperties is set to false to validate the use + # case when a composed schema has additionalProperties set to false. + #additionalProperties: false apple: type: object properties: diff --git a/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py b/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py index d037ad2af86a..c1fd4e3c9452 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py +++ b/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py @@ -183,7 +183,8 @@ def test_deserialize_with_additional_properties(self): """ # Dog is allOf with two child schemas. - # The OAS document for Dog does not specify the 'additionalProperties' keyword. + # The OAS document for Dog does not specify the 'additionalProperties' keyword, + # which means that by default, the Dog schema must allow undeclared properties. # The additionalProperties keyword is used to control the handling of extra stuff, # that is, properties whose names are not listed in the properties keyword. # By default any additional properties are allowed. @@ -191,7 +192,7 @@ def test_deserialize_with_additional_properties(self): 'className': 'Dog', 'color': 'brown', 'breed': 'golden retriever', - # Below are additional, undeclared properties + # Below are additional, undeclared properties. 'group': 'Terrier Group', 'size': 'medium', } @@ -202,7 +203,8 @@ def test_deserialize_with_additional_properties(self): self.assertEqual(deserialized.breed, 'golden retriever') # The 'appleReq' schema allows additional properties by explicitly setting - # additionalProperties: true + # additionalProperties: true. + # This is equivalent to 'additionalProperties' not being present. data = { 'cultivar': 'Golden Delicious', 'mealy': False, @@ -222,18 +224,18 @@ def test_deserialize_with_additional_properties(self): # additionalProperties: false err_msg = ("Invalid value for `{}`, must match regular expression `{}` with flags") with self.assertRaisesRegexp( - petstore_api.ApiValueError, + petstore_api.exceptions.ApiAttributeError, err_msg.format("origin", "[^`]*") ): data = { - 'lengthCm': 21, + 'lengthCm': 21.2, 'sweet': False, # Below are additional, undeclared properties. They are not allowed, - # an exception should be raised. + # an exception must be raised. 'group': 'abc', } response = MockResponse(data=json.dumps(data)) - deserialized = self.deserialize(response, (petstore_api.AppleReq,), True) - self.assertEqual(type(deserialized), petstore_api.AppleReq) + deserialized = self.deserialize(response, (petstore_api.BananaReq,), True) + self.assertEqual(type(deserialized), petstore_api.BananaReq) self.assertEqual(deserialized.lengthCm, 21) self.assertEqual(deserialized.p1, True) \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python-experimental/tests/test_discard_unknown_properties.py b/samples/openapi3/client/petstore/python-experimental/tests/test_discard_unknown_properties.py index 769ee23937d9..9f26ab2f213b 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests/test_discard_unknown_properties.py +++ b/samples/openapi3/client/petstore/python-experimental/tests/test_discard_unknown_properties.py @@ -36,46 +36,75 @@ class DiscardUnknownPropertiesTests(unittest.TestCase): - def test_deserialize_dog_do_not_discard_unknown_properties(self): - """ deserialize str, Dog) with unknown properties, strict validation is enabled """ + def test_deserialize_banana_req_do_not_discard_unknown_properties(self): + """ + deserialize str, bananaReq) with unknown properties. + Strict validation is enabled. + Simple (non-composed) schema scenario. + """ config = Configuration(discard_unknown_keys=False) api_client = petstore_api.ApiClient(config) data = { - "class_name": "Dog", - "color": "black", - "breed": "husky", - "unknown_property": "a-value" + 'lengthCm': 21.3, + 'sweet': False, + # Below are additional (undeclared) properties not specified in the bananaReq schema. + 'unknown_property': 'a-value' + } + response = MockResponse(data=json.dumps(data)) + + # Deserializing with strict validation raises an exception because the 'unknown_property' + # is undeclared. + with self.assertRaises(petstore_api.exceptions.ApiAttributeError) as cm: + deserialized = api_client.deserialize(response, ((petstore_api.BananaReq),), True) + self.assertTrue(re.match("BananaReq has no attribute 'unknown_property' at.*", str(cm.exception)), + 'Exception message: {0}'.format(str(cm.exception))) + + + def test_deserialize_isosceles_triangle_do_not_discard_unknown_properties(self): + """ + deserialize str, IsoscelesTriangle) with unknown properties + Strict validation is enabled. + Composed schema scenario. + """ + config = Configuration(discard_unknown_keys=False) + api_client = petstore_api.ApiClient(config) + data = { + 'shape_type': 'Triangle', + 'triangle_type': 'EquilateralTriangle', + # Below are additional (undeclared) properties not specified in the bananaReq schema. + 'unknown_property': 'a-value' } response = MockResponse(data=json.dumps(data)) # Deserializing with strict validation raises an exception because the 'unknown_property' # is undeclared. with self.assertRaises(petstore_api.ApiValueError) as cm: - deserialized = api_client.deserialize(response, ((petstore_api.Dog),), True) + deserialized = api_client.deserialize(response, ((petstore_api.IsoscelesTriangle),), True) self.assertTrue(re.match('.*Not all inputs were used.*unknown_property.*', str(cm.exception)), 'Exception message: {0}'.format(str(cm.exception))) - def test_deserialize_dog_discard_unknown_properties(self): - """ deserialize str, Dog) with unknown properties, discard unknown properties """ + + def test_deserialize_banana_req_discard_unknown_properties(self): + """ deserialize str, bananaReq) with unknown properties, discard unknown properties """ config = Configuration(discard_unknown_keys=True) api_client = petstore_api.ApiClient(config) data = { - "class_name": "Dog", - "color": "black", - "breed": "husky", - "unknown_property": "a-value", - "more-unknown": [ - "a" + 'lengthCm': 21.3, + 'sweet': False, + # Below are additional (undeclared) properties not specified in the bananaReq schema. + 'unknown_property': 'a-value', + 'more-unknown': [ + 'a' ] } # The 'unknown_property' is undeclared, which would normally raise an exception, but # when discard_unknown_keys is set to True, the unknown properties are discarded. response = MockResponse(data=json.dumps(data)) - deserialized = api_client.deserialize(response, ((petstore_api.Dog),), True) - self.assertTrue(isinstance(deserialized, petstore_api.Dog)) + deserialized = api_client.deserialize(response, ((petstore_api.BananaReq),), True) + self.assertTrue(isinstance(deserialized, petstore_api.BananaReq)) # Check the 'unknown_property' and 'more-unknown' properties are not present in the # output. - self.assertIn("breed", deserialized.to_dict().keys()) + self.assertIn("length_cm", deserialized.to_dict().keys()) self.assertNotIn("unknown_property", deserialized.to_dict().keys()) self.assertNotIn("more-unknown", deserialized.to_dict().keys()) From ed47df0e36add511872d8387b38e767260e8167a Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Thu, 14 May 2020 14:02:19 -0700 Subject: [PATCH 020/105] Handle additional properties and composed schema --- .../PythonClientExperimentalCodegen.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java index bcd495c7d263..9d3dde5056cd 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java @@ -972,13 +972,17 @@ public String toInstantiationType(Schema property) { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { Schema addProps = ModelUtils.getAdditionalProperties(schema); - if (addProps != null && addProps.get$ref() == null) { - // if AdditionalProperties exists and is an inline definition, get its datatype and - // store it in codegenModel.additionalPropertiesType. - codegenModel.additionalPropertiesType = getTypeDeclaration(addProps);; - } else { - addParentContainer(codegenModel, codegenModel.name, schema); + if (addProps != null) { + if (addProps.get$ref() == null) { + // if AdditionalProperties exists and is an inline definition, get its datatype and + // store it in codegenModel.additionalPropertiesType. + codegenModel.additionalPropertiesType = getTypeDeclaration(addProps);; + } else { + addParentContainer(codegenModel, codegenModel.name, schema); + } } + // If addProps is null, that means the value of the 'additionalProperties' keyword is set + // to false, i.e. no additional properties are allowed. } @Override From 80a6f9bdc7b4b11dfd19ee742d5c77fe763dc5b9 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Thu, 14 May 2020 14:04:37 -0700 Subject: [PATCH 021/105] Handle additional properties and composed schema --- ...ake-endpoints-models-for-testing-with-http-signature.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index 2c6ee0e6ea8d..83d151f6afb0 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -1815,7 +1815,7 @@ components: - $ref: '#/components/schemas/banana' # Below additionalProperties is set to false to validate the use # case when a composed schema has additionalProperties set to false. - #additionalProperties: false + additionalProperties: false apple: type: object properties: @@ -1870,11 +1870,13 @@ components: anyOf: - $ref: '#/components/schemas/apple' - $ref: '#/components/schemas/banana' + additionalProperties: false fruitReq: oneOf: - type: 'null' - $ref: '#/components/schemas/appleReq' - $ref: '#/components/schemas/bananaReq' + additionalProperties: false appleReq: type: object properties: @@ -1942,6 +1944,7 @@ components: allOf: - $ref: '#/components/schemas/ShapeInterface' - $ref: '#/components/schemas/TriangleInterface' + additionalProperties: false ScaleneTriangle: allOf: - $ref: '#/components/schemas/ShapeInterface' From 82507564a052d60c719e5199ff35ded6f147c56b Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Thu, 14 May 2020 15:13:18 -0700 Subject: [PATCH 022/105] Add support for additionalProperties and composed schema --- ...odels-for-testing-with-http-signature.yaml | 4 ++-- .../python-experimental/docs/AppleReq.md | 1 - .../python-experimental/docs/Fruit.md | 1 - .../python-experimental/docs/FruitReq.md | 1 - .../python-experimental/docs/GmFruit.md | 1 - .../docs/IsoscelesTriangle.md | 1 - .../python-experimental/docs/Zebra.md | 1 + .../petstore_api/models/apple_req.py | 2 +- .../petstore_api/models/fruit.py | 2 +- .../petstore_api/models/fruit_req.py | 2 +- .../petstore_api/models/gm_fruit.py | 2 +- .../petstore_api/models/isosceles_triangle.py | 2 +- .../petstore_api/models/zebra.py | 2 +- .../tests/test_deserialization.py | 19 +++++++++-------- .../tests/test_discard_unknown_properties.py | 21 +++++++++++++------ 15 files changed, 34 insertions(+), 28 deletions(-) diff --git a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index 83d151f6afb0..8e82b862388b 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -1863,6 +1863,7 @@ components: type: string required: - className + additionalProperties: true gmFruit: properties: color: @@ -1886,8 +1887,7 @@ components: type: boolean required: - cultivar - # The keyword below has the same effect as if it had not been specified. - additionalProperties: true + additionalProperties: false bananaReq: type: object properties: diff --git a/samples/openapi3/client/petstore/python-experimental/docs/AppleReq.md b/samples/openapi3/client/petstore/python-experimental/docs/AppleReq.md index 5295d1f06db8..3d6717ebd60c 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/AppleReq.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/AppleReq.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **cultivar** | **str** | | **mealy** | **bool** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Fruit.md b/samples/openapi3/client/petstore/python-experimental/docs/Fruit.md index cb3f8462e0e5..787699f2eb3a 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/Fruit.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/Fruit.md @@ -7,7 +7,6 @@ Name | Type | Description | Notes **cultivar** | **str** | | [optional] **origin** | **str** | | [optional] **length_cm** | **float** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/FruitReq.md b/samples/openapi3/client/petstore/python-experimental/docs/FruitReq.md index 7117b79ca68a..22eeb37f1cc3 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/FruitReq.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/FruitReq.md @@ -7,7 +7,6 @@ Name | Type | Description | Notes **length_cm** | **float** | | defaults to nulltype.Null **mealy** | **bool** | | [optional] **sweet** | **bool** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/GmFruit.md b/samples/openapi3/client/petstore/python-experimental/docs/GmFruit.md index 61a2c33e6a47..ea21af6ad1f8 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/GmFruit.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/GmFruit.md @@ -7,7 +7,6 @@ Name | Type | Description | Notes **cultivar** | **str** | | [optional] **origin** | **str** | | [optional] **length_cm** | **float** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangle.md b/samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangle.md index e825da665ed5..335edad8c0fe 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangle.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/IsoscelesTriangle.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **shape_type** | **str** | | **triangle_type** | **str** | | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Zebra.md b/samples/openapi3/client/petstore/python-experimental/docs/Zebra.md index 779a8db51e9f..05a4dbfd6baf 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/Zebra.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/Zebra.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **class_name** | **str** | | **type** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple_req.py index 35def0646b13..e0209f490b43 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple_req.py @@ -64,7 +64,7 @@ class AppleReq(ModelNormal): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit.py index beeb69a573d6..cc33a3d9ec3e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit.py @@ -85,7 +85,7 @@ class Fruit(ModelComposed): }, } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit_req.py index f1c436b53898..130f8781a7f3 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit_req.py @@ -74,7 +74,7 @@ class FruitReq(ModelComposed): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/gm_fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/gm_fruit.py index e36ad6804bb6..d40836a3076f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/gm_fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/gm_fruit.py @@ -85,7 +85,7 @@ class GmFruit(ModelComposed): }, } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/isosceles_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/isosceles_triangle.py index 3b67428f4138..6ef7500c2c62 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/isosceles_triangle.py @@ -74,7 +74,7 @@ class IsoscelesTriangle(ModelComposed): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/zebra.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/zebra.py index 53c8a1dc2dee..bb2e1a7615c7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/zebra.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/zebra.py @@ -69,7 +69,7 @@ class Zebra(ModelNormal): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py b/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py index c1fd4e3c9452..f539f5af9468 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py +++ b/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py @@ -202,12 +202,12 @@ def test_deserialize_with_additional_properties(self): self.assertEqual(deserialized.class_name, 'Dog') self.assertEqual(deserialized.breed, 'golden retriever') - # The 'appleReq' schema allows additional properties by explicitly setting + # The 'zebra' schema allows additional properties by explicitly setting # additionalProperties: true. # This is equivalent to 'additionalProperties' not being present. data = { - 'cultivar': 'Golden Delicious', - 'mealy': False, + 'class_name': 'zebra', + 'type': 'plains', # Below are additional, undeclared properties 'group': 'abc', 'size': 3, @@ -215,24 +215,25 @@ def test_deserialize_with_additional_properties(self): 'p2': [ 'a', 'b', 123], } response = MockResponse(data=json.dumps(data)) - deserialized = self.deserialize(response, (petstore_api.AppleReq,), True) - self.assertEqual(type(deserialized), petstore_api.AppleReq) - self.assertEqual(deserialized.cultivar, 'Golden Delicious') + deserialized = self.deserialize(response, (petstore_api.Mammal,), True) + self.assertEqual(type(deserialized), petstore_api.Zebra) + self.assertEqual(deserialized.class_name, 'zebra') + self.assertEqual(deserialized.type, 'plains') self.assertEqual(deserialized.p1, True) # The 'bananaReq' schema disallows additional properties by explicitly setting # additionalProperties: false - err_msg = ("Invalid value for `{}`, must match regular expression `{}` with flags") + err_msg = ("{} has no attribute '{}' at ") with self.assertRaisesRegexp( petstore_api.exceptions.ApiAttributeError, - err_msg.format("origin", "[^`]*") + err_msg.format("BananaReq", "unknown-group") ): data = { 'lengthCm': 21.2, 'sweet': False, # Below are additional, undeclared properties. They are not allowed, # an exception must be raised. - 'group': 'abc', + 'unknown-group': 'abc', } response = MockResponse(data=json.dumps(data)) deserialized = self.deserialize(response, (petstore_api.BananaReq,), True) diff --git a/samples/openapi3/client/petstore/python-experimental/tests/test_discard_unknown_properties.py b/samples/openapi3/client/petstore/python-experimental/tests/test_discard_unknown_properties.py index 9f26ab2f213b..35c628bf24ef 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests/test_discard_unknown_properties.py +++ b/samples/openapi3/client/petstore/python-experimental/tests/test_discard_unknown_properties.py @@ -38,7 +38,7 @@ class DiscardUnknownPropertiesTests(unittest.TestCase): def test_deserialize_banana_req_do_not_discard_unknown_properties(self): """ - deserialize str, bananaReq) with unknown properties. + deserialize bananaReq with unknown properties. Strict validation is enabled. Simple (non-composed) schema scenario. """ @@ -62,7 +62,7 @@ def test_deserialize_banana_req_do_not_discard_unknown_properties(self): def test_deserialize_isosceles_triangle_do_not_discard_unknown_properties(self): """ - deserialize str, IsoscelesTriangle) with unknown properties + deserialize IsoscelesTriangle with unknown properties. Strict validation is enabled. Composed schema scenario. """ @@ -85,7 +85,10 @@ def test_deserialize_isosceles_triangle_do_not_discard_unknown_properties(self): def test_deserialize_banana_req_discard_unknown_properties(self): - """ deserialize str, bananaReq) with unknown properties, discard unknown properties """ + """ + Deserialize bananaReq with unknown properties. + Discard unknown properties. + """ config = Configuration(discard_unknown_keys=True) api_client = petstore_api.ApiClient(config) data = { @@ -109,7 +112,10 @@ def test_deserialize_banana_req_discard_unknown_properties(self): self.assertNotIn("more-unknown", deserialized.to_dict().keys()) def test_deserialize_cat_do_not_discard_unknown_properties(self): - """ deserialize str, Cat) with unknown properties, strict validation is enabled """ + """ + Deserialize Cat with unknown properties. + Strict validation is enabled. + """ config = Configuration(discard_unknown_keys=False) api_client = petstore_api.ApiClient(config) data = { @@ -129,15 +135,18 @@ def test_deserialize_cat_do_not_discard_unknown_properties(self): self.assertEqual(deserialized['color'], 'black') def test_deserialize_cat_discard_unknown_properties(self): - """ deserialize str, Cat) with unknown properties. + """ + Deserialize Cat with unknown properties. Request to discard unknown properties, but Cat is composed schema - with one inner schema that has 'additionalProperties' set to true. """ + with one inner schema that has 'additionalProperties' set to true. + """ config = Configuration(discard_unknown_keys=True) api_client = petstore_api.ApiClient(config) data = { "class_name": "Cat", "color": "black", "declawed": True, + # Below are additional (undeclared) properties. "my_additional_property": 123, } # The 'my_additional_property' is undeclared, but 'Cat' has a 'Address' type through From 64723518dcd26fa487430e1a6a655c702019854e Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Thu, 14 May 2020 22:25:56 +0000 Subject: [PATCH 023/105] Format java code --- .../main/java/org/openapitools/codegen/CodegenModel.java | 7 +++---- .../main/java/org/openapitools/codegen/DefaultCodegen.java | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java index b3a0e54c476c..c661e8965a48 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java @@ -107,14 +107,13 @@ public class CodegenModel implements IJsonSchemaValidationProperties { * Used in map like objects, including composed schemas. * * In most programming languages, the additional (undeclared) properties are stored - * in a map data structure, such as HashMap in Java, map[string]interface{} + * in a map data structure, such as HashMap in Java, map[string]interface{} * in golang, or a dict in Python. * There are multiple ways to implement the additionalProperties keyword, depending * on the programming language and mustache template. * One way is to use class inheritance. For example in the generated Java code, the - * generated model class may extend from HashMap to store the - * additional properties. In that case 'CodegenModel.parent' is set to represent - * the class hierarchy. + * generated model class may extend from HashMap to store the additional properties. + * In that case 'CodegenModel.parent' is set to represent the class hierarchy. * Another way is to use CodegenModel.additionalPropertiesType. A code generator * such as Python does not use class inheritance to model additional properties. * 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 4572b952a778..6bdd13fe2af6 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 @@ -4517,14 +4517,13 @@ public void addOperationToGroup(String tag, String resourcePath, Operation opera * Sets the value of the 'model.parent' property in CodegenModel, based on the value * of the 'additionalProperties' keyword. Some language generator use class inheritance * to implement additional properties. For example, in Java the generated model class - * has 'extends HashMap' to represent the additional properties. + * has 'extends HashMap' to represent the additional properties. * * TODO: it's not a good idea to use single class inheritance to implement * additionalProperties. That may work for non-composed schemas, but that does not * work for composed 'allOf' schemas. For example, in Java, if additionalProperties * is set to true (which it should be by default, per OAS spec), then the generated - * code has extends HashMap. That clearly won't work for composed 'allOf' - * schemas. + * code has extends HashMap. That wouldn't work for composed 'allOf' schemas. * * @param model the codegen representation of the OAS schema. * @param name the name of the model. From e158fef4a814f1f404c9c1bac76dda08490f3eae Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Thu, 14 May 2020 23:02:55 +0000 Subject: [PATCH 024/105] Add more unit tests for Python --- .../tests/test_deserialization.py | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py b/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py index f539f5af9468..cf46fc9735bf 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py +++ b/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py @@ -179,7 +179,9 @@ def test_deserialize_fruit_null_value(self): def test_deserialize_with_additional_properties(self): """ - deserialize data. + Deserialize data with schemas that have the additionalProperties keyword. + Test conditions when additional properties are allowed, not allowed, have + specific types... """ # Dog is allOf with two child schemas. @@ -239,4 +241,28 @@ def test_deserialize_with_additional_properties(self): deserialized = self.deserialize(response, (petstore_api.BananaReq,), True) self.assertEqual(type(deserialized), petstore_api.BananaReq) self.assertEqual(deserialized.lengthCm, 21) - self.assertEqual(deserialized.p1, True) \ No newline at end of file + self.assertEqual(deserialized.p1, True) + + def test_deserialize_with_additional_properties_and_reference(self): + """ + Deserialize data with schemas that has the additionalProperties keyword + and the schema is specified as a reference ($ref). + """ + data = { + 'main_shape': { + 'shape_type': 'Triangle', + 'triangle_type': 'EquilateralTriangle', + }, + 'shapes': [ + { + 'shape_type': 'Triangle', + 'triangle_type': 'IsoscelesTriangle', + }, + { + 'shape_type': 'Quadrilateral', + 'quadrilateral_type': 'ComplexQuadrilateral', + }, + ], + } + response = MockResponse(data=json.dumps(data)) + deserialized = self.deserialize(response, (petstore_api.Drawing,), True) \ No newline at end of file From 250dd7cd6a82848189eb5a964977dac5bc8853d1 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Thu, 14 May 2020 17:32:29 -0700 Subject: [PATCH 025/105] Handle reference in additionalProperty keyword --- .../languages/PythonClientExperimentalCodegen.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java index 9d3dde5056cd..b9c5ae4ad590 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java @@ -973,12 +973,14 @@ public String toInstantiationType(Schema property) { protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { Schema addProps = ModelUtils.getAdditionalProperties(schema); if (addProps != null) { - if (addProps.get$ref() == null) { - // if AdditionalProperties exists and is an inline definition, get its datatype and + if (addProps.get$ref() != null) { + // Resolve the schema reference. + addProps = ModelUtils.getSchema(this.openAPI, ModelUtils.getSimpleRef(addProps.get$ref())); + } + if (addProps != null) { + // if AdditionalProperties exists, get its datatype and // store it in codegenModel.additionalPropertiesType. - codegenModel.additionalPropertiesType = getTypeDeclaration(addProps);; - } else { - addParentContainer(codegenModel, codegenModel.name, schema); + codegenModel.additionalPropertiesType = getTypeDeclaration(addProps); } } // If addProps is null, that means the value of the 'additionalProperties' keyword is set From 6b4fa1fd9a59d4c70deda65ba57ed7204f9b1d32 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Thu, 14 May 2020 17:32:38 -0700 Subject: [PATCH 026/105] Handle reference in additionalProperty keyword --- .../codegen/python/PythonClientExperimentalTest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientExperimentalTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientExperimentalTest.java index c040b61b33ec..c7988952b7f5 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientExperimentalTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientExperimentalTest.java @@ -289,9 +289,8 @@ public void mapModelTest() { Assert.assertEquals(cm.classname, "sample.Sample"); Assert.assertEquals(cm.description, "a map model"); Assert.assertEquals(cm.vars.size(), 0); - Assert.assertEquals(cm.parent, "dict"); - Assert.assertEquals(cm.imports.size(), 1); - Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("children.Children")).size(), 1); + Assert.assertEquals(cm.parent, null); + Assert.assertEquals(cm.imports.size(), 0); } } From 3b2261bc0deb3cc611c471f9714961efc173a19a Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Thu, 14 May 2020 17:33:06 -0700 Subject: [PATCH 027/105] Add use case for additionalProperties and reference --- ...ake-endpoints-models-for-testing-with-http-signature.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index 8e82b862388b..723d37586f00 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -1911,6 +1911,11 @@ components: type: array items: $ref: '#/components/schemas/Shape' + additionalProperties: + # Here the additional properties are specified using a referenced schema. + # This is just to validate the generated code works when using $ref + # under 'additionalProperties'. + $ref: '#/components/schemas/fruit' Shape: oneOf: - $ref: '#/components/schemas/Triangle' From b8b6d221aabab0c3db5b85c5f6400a645a60f834 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Fri, 15 May 2020 07:52:57 -0700 Subject: [PATCH 028/105] run sample scripts --- .../client/petstore/python-experimental/docs/Drawing.md | 1 + .../petstore/python-experimental/petstore_api/models/drawing.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Drawing.md b/samples/openapi3/client/petstore/python-experimental/docs/Drawing.md index 7c805f9e0fad..244a31c548e6 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/Drawing.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/Drawing.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **main_shape** | [**shape.Shape**](Shape.md) | | [optional] **shapes** | [**[shape.Shape]**](Shape.md) | | [optional] +**any string name** | **one_ofapplebanana.OneOfapplebanana** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py index e47ede9cc927..cbcd01161a9a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py @@ -69,7 +69,7 @@ class Drawing(ModelNormal): validations = { } - additional_properties_type = None + additional_properties_type = (one_ofapplebanana.OneOfapplebanana,) # noqa: E501 @cached_property def openapi_types(): From 66ec230f74d25a22e49734e06bb39fbc7c18cfc6 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Fri, 15 May 2020 07:53:49 -0700 Subject: [PATCH 029/105] resolve schema reference --- .../codegen/languages/PythonClientExperimentalCodegen.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java index b9c5ae4ad590..6fb39b001cfc 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java @@ -973,9 +973,9 @@ public String toInstantiationType(Schema property) { protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { Schema addProps = ModelUtils.getAdditionalProperties(schema); if (addProps != null) { - if (addProps.get$ref() != null) { - // Resolve the schema reference. - addProps = ModelUtils.getSchema(this.openAPI, ModelUtils.getSimpleRef(addProps.get$ref())); + if (StringUtils.isNotEmpty(addProps.get$ref())) { + // Resolve reference + addProps = ModelUtils.getReferencedSchema(this.openAPI, addProps); } if (addProps != null) { // if AdditionalProperties exists, get its datatype and From 594332a6fc70c8320ac57cab35deab7d7bf44fa8 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Fri, 15 May 2020 18:12:44 +0000 Subject: [PATCH 030/105] Add OpenAPI argument --- .../codegen/languages/AbstractAdaCodegen.java | 2 +- .../codegen/languages/AbstractApexCodegen.java | 8 ++++---- .../codegen/languages/AbstractCSharpCodegen.java | 2 +- .../codegen/languages/AbstractEiffelCodegen.java | 4 ++-- .../codegen/languages/AbstractFSharpCodegen.java | 2 +- .../codegen/languages/AbstractGoCodegen.java | 4 ++-- .../codegen/languages/AbstractJavaCodegen.java | 6 +++--- .../codegen/languages/AbstractKotlinCodegen.java | 2 +- .../codegen/languages/AbstractPhpCodegen.java | 2 +- .../codegen/languages/AbstractRubyCodegen.java | 2 +- .../codegen/languages/AbstractScalaCodegen.java | 6 +++--- .../languages/AbstractTypeScriptClientCodegen.java | 2 +- .../codegen/languages/AndroidClientCodegen.java | 2 +- .../codegen/languages/ApexClientCodegen.java | 2 +- .../codegen/languages/BashClientCodegen.java | 2 +- .../codegen/languages/CSharpClientCodegen.java | 2 +- .../languages/CSharpNetCoreClientCodegen.java | 2 +- .../codegen/languages/ConfluenceWikiCodegen.java | 2 +- .../codegen/languages/CppPistacheServerCodegen.java | 4 ++-- .../codegen/languages/CppQt5AbstractCodegen.java | 4 ++-- .../codegen/languages/CppRestSdkClientCodegen.java | 6 +++--- .../codegen/languages/CppRestbedServerCodegen.java | 4 ++-- .../codegen/languages/DartClientCodegen.java | 2 +- .../codegen/languages/DartDioClientCodegen.java | 2 +- .../codegen/languages/ElixirClientCodegen.java | 2 +- .../codegen/languages/ElmClientCodegen.java | 2 +- .../codegen/languages/HaskellHttpClientCodegen.java | 4 ++-- .../codegen/languages/HaskellServantCodegen.java | 4 ++-- .../codegen/languages/JMeterClientCodegen.java | 2 +- .../languages/JavascriptApolloClientCodegen.java | 6 +++--- .../codegen/languages/JavascriptClientCodegen.java | 6 +++--- .../JavascriptClosureAngularClientCodegen.java | 2 +- .../languages/JavascriptFlowtypedClientCodegen.java | 2 +- .../codegen/languages/LuaClientCodegen.java | 2 +- .../codegen/languages/NimClientCodegen.java | 2 +- .../codegen/languages/OCamlClientCodegen.java | 2 +- .../codegen/languages/ObjcClientCodegen.java | 2 +- .../codegen/languages/PerlClientCodegen.java | 2 +- .../codegen/languages/PhpSilexServerCodegen.java | 2 +- .../codegen/languages/PhpSymfonyServerCodegen.java | 2 +- .../codegen/languages/ProtobufSchemaCodegen.java | 2 +- .../PythonAbstractConnexionServerCodegen.java | 2 +- .../codegen/languages/PythonClientCodegen.java | 2 +- .../languages/PythonClientExperimentalCodegen.java | 12 ++++++------ .../codegen/languages/RClientCodegen.java | 2 +- .../codegen/languages/RubyClientCodegen.java | 2 +- .../codegen/languages/RustClientCodegen.java | 2 +- .../codegen/languages/RustServerCodegen.java | 6 +++--- .../codegen/languages/ScalaAkkaClientCodegen.java | 2 +- .../codegen/languages/ScalaFinchServerCodegen.java | 2 +- .../codegen/languages/ScalaGatlingCodegen.java | 2 +- .../languages/ScalaPlayFrameworkServerCodegen.java | 2 +- .../codegen/languages/ScalazClientCodegen.java | 2 +- .../codegen/languages/StaticHtml2Generator.java | 2 +- .../codegen/languages/StaticHtmlGenerator.java | 2 +- .../codegen/languages/Swift3Codegen.java | 6 +++--- .../codegen/languages/Swift4Codegen.java | 6 +++--- .../codegen/languages/Swift5ClientCodegen.java | 6 +++--- .../codegen/languages/SwiftClientCodegen.java | 4 ++-- .../languages/TypeScriptAngularClientCodegen.java | 2 +- .../languages/TypeScriptAxiosClientCodegen.java | 2 +- .../languages/TypeScriptFetchClientCodegen.java | 2 +- .../languages/TypeScriptInversifyClientCodegen.java | 2 +- .../languages/TypeScriptJqueryClientCodegen.java | 2 +- .../languages/TypeScriptNodeClientCodegen.java | 2 +- .../languages/TypeScriptReduxQueryClientCodegen.java | 2 +- .../languages/TypeScriptRxjsClientCodegen.java | 2 +- 67 files changed, 101 insertions(+), 101 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java index b3177163df8a..1322dc94c42c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java @@ -347,7 +347,7 @@ public String getTypeDeclaration(Schema p) { return getTypeDeclaration(inner) + "_Vectors.Vector"; } if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); String name = getTypeDeclaration(inner) + "_Map"; if (name.startsWith("Swagger.")) { return name; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java index bb2a21d4afa9..24a25c5d5a61 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java @@ -195,7 +195,7 @@ public String getTypeDeclaration(Schema p) { } return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); if (inner == null) { LOGGER.warn(p.getName() + "(map property) does not have a proper inner type defined"); @@ -228,11 +228,11 @@ public String toDefaultValue(Schema p) { } else if (ModelUtils.isMapSchema(p)) { final MapSchema ap = (MapSchema) p; final String pattern = "new HashMap<%s>()"; - if (ModelUtils.getAdditionalProperties(ap) == null) { + if (ModelUtils.getAdditionalProperties(this.openAPI, ap) == null) { return null; } - return String.format(Locale.ROOT, pattern, String.format(Locale.ROOT, "String, %s", getTypeDeclaration(ModelUtils.getAdditionalProperties(ap)))); + return String.format(Locale.ROOT, pattern, String.format(Locale.ROOT, "String, %s", getTypeDeclaration(ModelUtils.getAdditionalProperties(this.openAPI, ap)))); } else if (ModelUtils.isLongSchema(p)) { if (p.getDefault() != null) { return p.getDefault().toString() + "l"; @@ -365,7 +365,7 @@ public String toExampleValue(Schema p) { } else if (ModelUtils.isLongSchema(p)) { example = example.isEmpty() ? "123456789L" : example + "L"; } else if (ModelUtils.isMapSchema(p)) { - example = "new " + getTypeDeclaration(p) + "{'key'=>" + toExampleValue(ModelUtils.getAdditionalProperties(p)) + "}"; + example = "new " + getTypeDeclaration(p) + "{'key'=>" + toExampleValue(ModelUtils.getAdditionalProperties(this.openAPI, p)) + "}"; } else if (ModelUtils.isPasswordSchema(p)) { example = example.isEmpty() ? "password123" : escapeText(example); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java index 66af4e39a872..3323eb2ff034 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java @@ -989,7 +989,7 @@ public String getTypeDeclaration(Schema p) { return getArrayTypeDeclaration((ArraySchema) p); } else if (ModelUtils.isMapSchema(p)) { // Should we also support maps of maps? - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + ""; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java index 6d8f5e97632b..a0a17f1c9ce9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java @@ -281,7 +281,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return "LIST [" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } @@ -549,7 +549,7 @@ public Map createMapping(String key, String value) { @Override public String toInstantiationType(Schema p) { if (ModelUtils.isMapSchema(p)) { - Schema additionalProperties2 = ModelUtils.getAdditionalProperties(p); + Schema additionalProperties2 = ModelUtils.getAdditionalProperties(this.openAPI, p); String type = additionalProperties2.getType(); if (null == type) { LOGGER.error("No Type defined for Additional Schema " + additionalProperties2 + "\n" // diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java index 6ec69705188f..446fb8416733 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java @@ -881,7 +881,7 @@ public String getTypeDeclaration(Schema p) { return getArrayTypeDeclaration((ArraySchema) p); } else if (ModelUtils.isMapSchema(p)) { // Should we also support maps of maps? - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + ""; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java index d9d916d9079f..249cf3a437bb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java @@ -344,7 +344,7 @@ public String getTypeDeclaration(Schema p) { } return "[]" + typDecl; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + "[string]" + getTypeDeclaration(ModelUtils.unaliasSchema(this.openAPI, inner)); } //return super.getTypeDeclaration(p); @@ -390,7 +390,7 @@ public String getSchemaType(Schema p) { if (ref != null && !ref.isEmpty()) { type = openAPIType; - } else if ("object".equals(openAPIType) && ModelUtils.isAnyTypeSchema(p)) { + } else if ("object".equals(openAPIType) && ModelUtils.isAnyTypeSchema(this.openAPI, p)) { // Arbitrary type. Note this is not the same thing as free-form object. type = "interface{}"; } else if (typeMapping.containsKey(openAPIType)) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index 2ba884ebb86c..82513ed6a05b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -804,11 +804,11 @@ public String toDefaultValue(Schema schema) { } else { pattern = "new HashMap<%s>()"; } - if (ModelUtils.getAdditionalProperties(schema) == null) { + if (ModelUtils.getAdditionalProperties(this.openAPI, schema) == null) { return null; } - String typeDeclaration = String.format(Locale.ROOT, "String, %s", getTypeDeclaration(ModelUtils.getAdditionalProperties(schema))); + String typeDeclaration = String.format(Locale.ROOT, "String, %s", getTypeDeclaration(ModelUtils.getAdditionalProperties(this.openAPI, schema))); Object java8obj = additionalProperties.get("java8"); if (java8obj != null) { Boolean java8 = Boolean.valueOf(java8obj.toString()); @@ -1642,7 +1642,7 @@ protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Sc super.addAdditionPropertiesToCodeGenModel(codegenModel, schema); // See https://github.com/OpenAPITools/openapi-generator/pull/1729#issuecomment-449937728 - codegenModel.additionalPropertiesType = getSchemaType(ModelUtils.getAdditionalProperties(schema)); + codegenModel.additionalPropertiesType = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java index bc582f756160..07238fb7cf7b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java @@ -310,7 +310,7 @@ public String getTypeDeclaration(Schema p) { if (ModelUtils.isArraySchema(p)) { return getArrayTypeDeclaration((ArraySchema) p); } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); // Maps will be keyed only by primitive Kotlin string return getSchemaType(p) + ""; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java index 7395186f4843..8311fb29f4c2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java @@ -301,7 +301,7 @@ public String getTypeDeclaration(Schema p) { } return getTypeDeclaration(inner) + "[]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); if (inner == null) { LOGGER.warn(p.getName() + "(map property) does not have a proper inner type defined. Default to string"); inner = new StringSchema().description("TODO default missing map inner type to string"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java index c293ff84eecc..6e14557065c8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java @@ -110,7 +110,7 @@ public String getTypeDeclaration(Schema schema) { Schema inner = ((ArraySchema) schema).getItems(); return getSchemaType(schema) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(schema)) { - Schema inner = ModelUtils.getAdditionalProperties(schema); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, schema); return getSchemaType(schema) + ""; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java index af24ba9c21a7..a96dea59a929 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java @@ -325,7 +325,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } @@ -354,7 +354,7 @@ public String getSchemaType(Schema p) { @Override public String toInstantiationType(Schema p) { if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(p)); + String inner = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); return instantiationTypes.get("map") + "[String, " + inner + "]"; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; @@ -383,7 +383,7 @@ public String toDefaultValue(Schema p) { } else if (ModelUtils.isIntegerSchema(p)) { return null; } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(p)); + String inner = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); return "new HashMap[String, " + inner + "]() "; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java index 8bc11a662232..62e0251bcbf1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java @@ -401,7 +401,7 @@ protected String getParameterDataType(Parameter parameter, Schema p) { inner = mp1.getItems(); return this.getSchemaType(p) + "<" + this.getParameterDataType(parameter, inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - inner = ModelUtils.getAdditionalProperties(p); + inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return "{ [key: string]: " + this.getParameterDataType(parameter, inner) + "; }"; } else if (ModelUtils.isStringSchema(p)) { // Handle string enums diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java index 1e7349a53bd8..793d593a2c02 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java @@ -216,7 +216,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + ""; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java index 1deb382a6a55..9e4f889a287c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java @@ -238,7 +238,7 @@ public String toDefaultValue(Schema p) { Long def = (Long) p.getDefault(); out = def == null ? out : def.toString() + "L"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); String s = inner == null ? "Object" : getTypeDeclaration(inner); out = String.format(Locale.ROOT, "new Map()", s); } else if (ModelUtils.isStringSchema(p)) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java index bf59d7db699f..79b02bd32748 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java @@ -428,7 +428,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index a12d712c3ffa..748b54fa00af 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -982,7 +982,7 @@ public Mustache.Compiler processCompiler(Mustache.Compiler compiler) { @Override public String toInstantiationType(Schema schema) { if (ModelUtils.isMapSchema(schema)) { - Schema additionalProperties = ModelUtils.getAdditionalProperties(schema); + Schema additionalProperties = ModelUtils.getAdditionalProperties(this.openAPI, schema); String inner = getSchemaType(additionalProperties); if (ModelUtils.isMapSchema(additionalProperties)) { inner = toInstantiationType(additionalProperties); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java index 3c8d8a3e33d0..e9235266d44d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java @@ -917,7 +917,7 @@ protected String getTargetFrameworkVersion() { @Override public String toInstantiationType(Schema schema) { if (ModelUtils.isMapSchema(schema)) { - Schema additionalProperties = ModelUtils.getAdditionalProperties(schema); + Schema additionalProperties = ModelUtils.getAdditionalProperties(this.openAPI, schema); String inner = getSchemaType(additionalProperties); if (ModelUtils.isMapSchema(additionalProperties)) { inner = toInstantiationType(additionalProperties); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java index 1de98be94e73..a323067cb8fe 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java @@ -107,7 +107,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java index 88637961ccc1..45aaa1c5b13e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java @@ -363,7 +363,7 @@ public String getTypeDeclaration(Schema p) { return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + ""; } else if (ModelUtils.isByteArraySchema(p)) { return "std::string"; @@ -399,7 +399,7 @@ public String toDefaultValue(Schema p) { } else if (ModelUtils.isByteArraySchema(p)) { return "\"\""; } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(p)); + String inner = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); return "std::map()"; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java index c308a53996e5..8acde46deee6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java @@ -186,7 +186,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + ""; } else if (ModelUtils.isBinarySchema(p)) { return getSchemaType(p); @@ -222,7 +222,7 @@ public String toDefaultValue(Schema p) { } return "0"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return "QMap()"; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java index 0dd42392622b..f183491f7e27 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java @@ -349,7 +349,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + ""; } else if (ModelUtils.isFileSchema(p) || ModelUtils.isBinarySchema(p)) { return "std::shared_ptr<" + openAPIType + ">"; @@ -382,7 +382,7 @@ public String toDefaultValue(Schema p) { } return "0"; } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(p)); + String inner = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); return "std::map()"; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; @@ -395,7 +395,7 @@ public String toDefaultValue(Schema p) { return "new " + toModelName(ModelUtils.getSimpleRef(p.get$ref())) + "()"; } else if (ModelUtils.isStringSchema(p)) { return "utility::conversions::to_string_t(\"\")"; - } else if (ModelUtils.isFreeFormObject(p)) { + } else if (ModelUtils.isFreeFormObject(this.openAPI, p)) { return "new Object()"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java index 3234cfb4c9fb..47520177e939 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java @@ -355,7 +355,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + ""; } else if (ModelUtils.isByteArraySchema(p)) { return "std::string"; @@ -430,7 +430,7 @@ public String toDefaultValue(Schema p) { return "\"\""; } } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(p)); + String inner = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); return "std::map()"; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java index ae1a2e8fbb06..3db621ed8403 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java @@ -425,7 +425,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + ""; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java index 9c06fb029b7a..31394c5fc078 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java @@ -142,7 +142,7 @@ public String toDefaultValue(Schema p) { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { //super.addAdditionPropertiesToCodeGenModel(codegenModel, schema); - codegenModel.additionalPropertiesType = getSchemaType(ModelUtils.getAdditionalProperties(schema)); + codegenModel.additionalPropertiesType = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java index 6f487e0d4757..c1e21a14e189 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java @@ -495,7 +495,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return "%{optional(String.t) => " + getTypeDeclaration(inner) + "}"; } else if (ModelUtils.isPasswordSchema(p)) { return "String.t"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java index b31277f51e87..cac59737d3bc 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java @@ -428,7 +428,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getTypeDeclaration(inner); } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getTypeDeclaration(inner); } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java index 15a37e681e88..5e590e6f08bc 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java @@ -647,7 +647,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return "(Map.Map String " + getTypeDeclaration(inner) + ")"; } return super.getTypeDeclaration(p); @@ -669,7 +669,7 @@ public String getSchemaType(Schema p) { @Override public String toInstantiationType(Schema p) { if (ModelUtils.isMapSchema(p)) { - Schema additionalProperties2 = ModelUtils.getAdditionalProperties(p); + Schema additionalProperties2 = ModelUtils.getAdditionalProperties(this.openAPI, p); String type = additionalProperties2.getType(); if (null == type) { LOGGER.error("No Type defined for Additional Schema " + additionalProperties2 + "\n" // diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java index 024447f3dd33..6eb0f48fcf00 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java @@ -374,7 +374,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return "(Map.Map String " + getTypeDeclaration(inner) + ")"; } return fixModelChars(super.getTypeDeclaration(p)); @@ -409,7 +409,7 @@ public String getSchemaType(Schema p) { @Override public String toInstantiationType(Schema p) { if (ModelUtils.isMapSchema(p)) { - Schema additionalProperties2 = ModelUtils.getAdditionalProperties(p); + Schema additionalProperties2 = ModelUtils.getAdditionalProperties(this.openAPI, p); String type = additionalProperties2.getType(); if (null == type) { LOGGER.error("No Type defined for Additional Property " + additionalProperties2 + "\n" // diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java index 5617b2973da4..1096e2d81acb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java @@ -206,7 +206,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java index 6103ae1edc93..378307c3eddb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java @@ -565,7 +565,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return "{String: " + getTypeDeclaration(inner) + "}"; } return super.getTypeDeclaration(p); @@ -835,8 +835,8 @@ public CodegenModel fromModel(String name, Schema model) { codegenModel.vendorExtensions.put("x-item-type", itemType); } } else if (ModelUtils.isMapSchema(model)) { - if (codegenModel != null && ModelUtils.getAdditionalProperties(model) != null) { - String itemType = getSchemaType(ModelUtils.getAdditionalProperties(model)); + if (codegenModel != null && ModelUtils.getAdditionalProperties(this.openAPI, model) != null) { + String itemType = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, model)); codegenModel.vendorExtensions.put("x-isMap", true); // TODO: 5.0 Remove codegenModel.vendorExtensions.put("x-is-map", true); codegenModel.vendorExtensions.put("x-itemType", itemType); // TODO: 5.0 Remove diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java index 2beed8ba2f4a..26d2a334fa57 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java @@ -611,7 +611,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return "{String: " + getTypeDeclaration(inner) + "}"; } return super.getTypeDeclaration(p); @@ -881,8 +881,8 @@ public CodegenModel fromModel(String name, Schema model) { codegenModel.vendorExtensions.put("x-item-type", itemType); } } else if (ModelUtils.isMapSchema(model)) { - if (codegenModel != null && ModelUtils.getAdditionalProperties(model) != null) { - String itemType = getSchemaType(ModelUtils.getAdditionalProperties(model)); + if (codegenModel != null && ModelUtils.getAdditionalProperties(this.openAPI, model) != null) { + String itemType = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, model)); codegenModel.vendorExtensions.put("x-isMap", true); // TODO: 5.0 Remove codegenModel.vendorExtensions.put("x-is-map", true); codegenModel.vendorExtensions.put("x-itemType", itemType); // TODO: 5.0 Remove diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java index 7cc1215f4646..60abe7528a78 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java @@ -225,7 +225,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + ""; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return "Object"; } else if (ModelUtils.isFileSchema(p)) { return "Object"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java index 322b7b98e999..418e79201ab6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java @@ -107,7 +107,7 @@ public JavascriptFlowtypedClientCodegen() { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(schema)); + codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(this.openAPI, schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java index 18330873bcf4..900ed1120a2a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java @@ -367,7 +367,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getTypeDeclaration(inner); } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getTypeDeclaration(inner); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java index 101dbab1fb9d..dee46f19c377 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java @@ -278,7 +278,7 @@ public String getTypeDeclaration(Schema p) { } return "seq[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); if (inner == null) { inner = new StringSchema(); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java index d3e022bf6d6d..6dd901199f8d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java @@ -584,7 +584,7 @@ public String getTypeDeclaration(Schema p) { } return getTypeDeclaration(inner) + " list"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); if (inner == null) { LOGGER.warn(p.getName() + "(map property) does not have a proper inner type defined. Default to string"); inner = new StringSchema().description("TODO default missing map inner type to string"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java index 2fa81b97dd4e..0501c0cf3b04 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java @@ -389,7 +389,7 @@ public String getTypeDeclaration(Schema p) { return getSchemaType(p) + "<" + innerTypeDeclaration + ">*"; } } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); String innerTypeDeclaration = getTypeDeclaration(inner); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java index 8eef21d0e89d..a4641d79049e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java @@ -256,7 +256,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + "[string," + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java index fef8185b61d3..4396979d2b14 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java @@ -176,7 +176,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + "[string," + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java index ef09fa0caa13..8c9bd4b7c5a9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java @@ -558,7 +558,7 @@ public String getTypeDeclaration(Schema p) { } if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getTypeDeclaration(inner); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java index c2bccf21152f..c2bd0793147d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java @@ -459,7 +459,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + "[str, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java index 267d14bc83b3..fbd5c513c999 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java @@ -350,7 +350,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + "[str, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java index a7e186c3735a..84d465fc7ef8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java @@ -460,7 +460,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + "(str, " + getTypeDeclaration(inner) + ")"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java index 6fb39b001cfc..02c58e98bc97 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java @@ -909,18 +909,18 @@ private String getTypeString(Schema p, String prefix, String suffix) { if (")".equals(suffix)) { fullSuffix = "," + suffix; } - if (ModelUtils.isAnyTypeSchema(p)) { + if (ModelUtils.isAnyTypeSchema(this.openAPI, p)) { return prefix + "bool, date, datetime, dict, float, int, list, str, none_type" + suffix; } // Resolve $ref because ModelUtils.isXYZ methods do not automatically resolve references. if (ModelUtils.isNullable(ModelUtils.getReferencedSchema(this.openAPI, p))) { fullSuffix = ", none_type" + suffix; } - if (ModelUtils.isFreeFormObject(p) && ModelUtils.getAdditionalProperties(p) == null) { + if (ModelUtils.isFreeFormObject(this.openAPI, p) && ModelUtils.getAdditionalProperties(this.openAPI, p) == null) { return prefix + "bool, date, datetime, dict, float, int, list, str" + fullSuffix; } - if ((ModelUtils.isMapSchema(p) || "object".equals(p.getType())) && ModelUtils.getAdditionalProperties(p) != null) { - Schema inner = ModelUtils.getAdditionalProperties(p); + if ((ModelUtils.isMapSchema(p) || "object".equals(p.getType())) && ModelUtils.getAdditionalProperties(this.openAPI, p) != null) { + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return prefix + "{str: " + getTypeString(inner, "(", ")") + "}" + fullSuffix; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; @@ -971,7 +971,7 @@ public String toInstantiationType(Schema property) { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - Schema addProps = ModelUtils.getAdditionalProperties(schema); + Schema addProps = ModelUtils.getAdditionalProperties(this.openAPI, schema); if (addProps != null) { if (StringUtils.isNotEmpty(addProps.get$ref())) { // Resolve reference @@ -983,7 +983,7 @@ protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Sc codegenModel.additionalPropertiesType = getTypeDeclaration(addProps); } } - // If addProps is null, that means the value of the 'additionalProperties' keyword is set + // If addProps is null, the value of the 'additionalProperties' keyword is set // to false, i.e. no additional properties are allowed. } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java index 85be42aca6f7..2a5683847564 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java @@ -360,7 +360,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner)+ "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + "(" + getTypeDeclaration(inner) + ")"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java index ce35525629ae..8a73b4694457 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java @@ -659,7 +659,7 @@ public void setGemAuthorEmail(String gemAuthorEmail) { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - final Schema additionalProperties = ModelUtils.getAdditionalProperties(schema); + final Schema additionalProperties = ModelUtils.getAdditionalProperties(this.openAPI, schema); if (additionalProperties != null) { codegenModel.additionalPropertiesType = getSchemaType(additionalProperties); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java index 706083b50dc4..5416b2cfc0e4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java @@ -421,7 +421,7 @@ public String getTypeDeclaration(Schema p) { } return "Vec<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); if (inner == null) { LOGGER.warn(p.getName() + "(map property) does not have a proper inner type defined. Default to string"); inner = new StringSchema().description("TODO default missing map inner type to string"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java index a0ef19a483ad..fb18ed017586 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java @@ -1177,7 +1177,7 @@ public String getTypeDeclaration(Schema p) { String innerType = getTypeDeclaration(inner); return typeMapping.get("array") + "<" + innerType + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); String innerType = getTypeDeclaration(inner); StringBuilder typeDeclaration = new StringBuilder(typeMapping.get("map")).append("<").append(typeMapping.get("string")).append(", "); typeDeclaration.append(innerType).append(">"); @@ -1211,7 +1211,7 @@ public String toInstantiationType(Schema p) { Schema inner = ap.getItems(); return instantiationTypes.get("array") + "<" + getSchemaType(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return instantiationTypes.get("map") + "<" + typeMapping.get("string") + ", " + getSchemaType(inner) + ">"; } else { return null; @@ -1274,7 +1274,7 @@ public CodegenModel fromModel(String name, Schema model) { additionalProperties.put("usesXmlNamespaces", true); } - Schema additionalProperties = ModelUtils.getAdditionalProperties(model); + Schema additionalProperties = ModelUtils.getAdditionalProperties(this.openAPI, model); if (additionalProperties != null) { mdl.additionalPropertiesType = getSchemaType(additionalProperties); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java index 299a8e79e57d..e2dc12109934 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java @@ -288,7 +288,7 @@ public String toDefaultValue(Schema p) { } else if (ModelUtils.isIntegerSchema(p)) { return null; } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(p)); + String inner = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); return "Map[String, " + inner + "].empty "; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java index d49f37e56225..bf697e60ddb2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java @@ -265,7 +265,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java index 4cd79f8644e3..42392373d8f5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java @@ -387,7 +387,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java index 4c1da136a2e4..9d8becf59612 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java @@ -374,7 +374,7 @@ public String toDefaultValue(Schema p) { } if (ModelUtils.isMapSchema(p)) { - Schema ap = ModelUtils.getAdditionalProperties(p); + Schema ap = ModelUtils.getAdditionalProperties(this.openAPI, p); String inner = getSchemaType(ap); return "Map.empty[String, " + inner + "]"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java index 0b19394c08e7..b046930aacf2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java @@ -182,7 +182,7 @@ public String toDefaultValue(Schema p) { } else if (ModelUtils.isIntegerSchema(p)) { return null; } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(p)); + String inner = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); return "Map.empty[String, " + inner + "] "; } else if (ModelUtils.isArraySchema(p)) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java index 347b371c7769..b19fb328d873 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java @@ -135,7 +135,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java index c50f4492b402..3637bf4da744 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java @@ -117,7 +117,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift3Codegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift3Codegen.java index e2f798df5dc2..e0ca5c85dc8a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift3Codegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift3Codegen.java @@ -259,7 +259,7 @@ public String getHelp() { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - final Schema additionalProperties = ModelUtils.getAdditionalProperties(schema); + final Schema additionalProperties = ModelUtils.getAdditionalProperties(this.openAPI, schema); if (additionalProperties != null) { codegenModel.additionalPropertiesType = getSchemaType(additionalProperties); @@ -367,7 +367,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return "[String:" + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); @@ -456,7 +456,7 @@ public String toDefaultValue(Schema p) { @Override public String toInstantiationType(Schema p) { if (ModelUtils.isMapSchema(p)) { - return getSchemaType(ModelUtils.getAdditionalProperties(p)); + return getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; String inner = getSchemaType(ap.getItems()); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java index b15c045efd7a..dbab5b8e818f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java @@ -335,7 +335,7 @@ public String getHelp() { protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - final Schema additionalProperties = ModelUtils.getAdditionalProperties(schema); + final Schema additionalProperties = ModelUtils.getAdditionalProperties(this.openAPI, schema); if (additionalProperties != null) { codegenModel.additionalPropertiesType = getSchemaType(additionalProperties); @@ -510,7 +510,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return "[String:" + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); @@ -623,7 +623,7 @@ public String toDefaultValue(Schema p) { @Override public String toInstantiationType(Schema p) { if (ModelUtils.isMapSchema(p)) { - return getSchemaType(ModelUtils.getAdditionalProperties(p)); + return getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; String inner = getSchemaType(ap.getItems()); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java index 445069455d49..92773a9ab99d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java @@ -330,7 +330,7 @@ public String getHelp() { protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - final Schema additionalProperties = ModelUtils.getAdditionalProperties(schema); + final Schema additionalProperties = ModelUtils.getAdditionalProperties(this.openAPI, schema); if (additionalProperties != null) { codegenModel.additionalPropertiesType = getSchemaType(additionalProperties); @@ -522,7 +522,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return "[String:" + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); @@ -635,7 +635,7 @@ public String toDefaultValue(Schema p) { @Override public String toInstantiationType(Schema p) { if (ModelUtils.isMapSchema(p)) { - return getSchemaType(ModelUtils.getAdditionalProperties(p)); + return getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; String inner = getSchemaType(ap.getItems()); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java index 039d271fa053..5b263c829f74 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java @@ -301,7 +301,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return "[String:" + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); @@ -390,7 +390,7 @@ public String toDefaultValue(Schema p) { @Override public String toInstantiationType(Schema p) { if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(p)); + String inner = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); return "[String:" + inner + "]"; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java index 556ae673ec63..0d101b890ba3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java @@ -111,7 +111,7 @@ public TypeScriptAngularClientCodegen() { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(schema)); + codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(this.openAPI, schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java index 1b6e80926395..c07b0b435121 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java @@ -164,7 +164,7 @@ public Map postProcessAllModels(Map objs) { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(schema)); + codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(this.openAPI, schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java index 990c206fca5d..aa9aebcdf6d3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java @@ -157,7 +157,7 @@ public String getTypeDeclaration(Schema p) { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(schema)); + codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(this.openAPI, schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java index 93f47c09b5e5..b5c0489cad63 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java @@ -76,7 +76,7 @@ public TypeScriptInversifyClientCodegen() { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(schema)); + codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(this.openAPI, schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java index c680840da7ad..b3a5cfef97d6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java @@ -112,7 +112,7 @@ public String getTypeDeclaration(String name) { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getSchemaType(ModelUtils.getAdditionalProperties(schema)); + codegenModel.additionalPropertiesType = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java index 6a46fbc78dd0..e4e80793ec4f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java @@ -316,7 +316,7 @@ private String getModelnameFromModelFilename(String filename) { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { super.addAdditionPropertiesToCodeGenModel(codegenModel, schema); - Schema additionalProperties = ModelUtils.getAdditionalProperties(schema); + Schema additionalProperties = ModelUtils.getAdditionalProperties(this.openAPI, schema); codegenModel.additionalPropertiesType = getSchemaType(additionalProperties); if ("array".equalsIgnoreCase(codegenModel.additionalPropertiesType)) { codegenModel.additionalPropertiesType += '<' + getSchemaType(((ArraySchema) additionalProperties).getItems()) + '>'; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java index 26f6fb6f06b3..92c788de9257 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java @@ -117,7 +117,7 @@ public String getTypeDeclaration(Schema p) { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(schema)); + codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(this.openAPI, schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java index 2d00d6b30a01..65794344730a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java @@ -117,7 +117,7 @@ public String getTypeDeclaration(Schema p) { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(schema)); + codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(this.openAPI, schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } From 12c55cab66977394f144b35b0d300b8f9310e0f8 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Fri, 15 May 2020 18:13:21 +0000 Subject: [PATCH 031/105] Add OpenAPI argument --- .../codegen/DefaultCodegenTest.java | 90 +++++++++++++++++++ .../codegen/utils/ModelUtilsTest.java | 11 +-- 2 files changed, 96 insertions(+), 5 deletions(-) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index 638e208469e6..22891daab385 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -222,6 +222,96 @@ public void testFormParameterHasDefaultValue() { Assert.assertEquals(codegenParameter.defaultValue, "-efg"); } + @Test + public void testAdditionalPropertiesV2Spec() { + OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml"); + DefaultCodegen codegen = new DefaultCodegen(); + codegen.setOpenAPI(openAPI); + + Schema schema = openAPI.getComponents().getSchemas().get("AdditionalPropertiesClass"); + Assert.assertEquals(schema.getAdditionalProperties(), null); + + Schema addProps = ModelUtils.getAdditionalProperties(openAPI, schema); + Assert.assertNull(addProps); + CodegenModel cm = codegen.fromModel("AdditionalPropertiesClass", schema); + Assert.assertEquals(cm.getAdditionalPropertiesType(), ""); + + Map m = schema.getProperties(); + Schema child = m.get("map_string"); + // This property has the following inline schema. + // additionalProperties: + // type: string + Assert.assertNotNull(child); + Assert.assertNotNull(child.getAdditionalProperties()); + + child = m.get("map_with_additional_properties"); + // This property has the following inline schema. + // additionalProperties: true + Assert.assertNotNull(child); + // It is unfortunate that child.getAdditionalProperties() returns null for a V2 schema. + // We cannot differentiate between 'additionalProperties' not present and + // additionalProperties: true. + Assert.assertNull(child.getAdditionalProperties()); + addProps = ModelUtils.getAdditionalProperties(openAPI, child); + Assert.assertNull(addProps); + cm = codegen.fromModel("AdditionalPropertiesClass", schema); + Assert.assertEquals(cm.getAdditionalPropertiesType(), ""); + + child = m.get("map_without_additional_properties"); + // This property has the following inline schema. + // additionalProperties: false + Assert.assertNotNull(child); + // It is unfortunate that child.getAdditionalProperties() returns null for a V2 schema. + // We cannot differentiate between 'additionalProperties' not present and + // additionalProperties: false. + Assert.assertNull(child.getAdditionalProperties()); + addProps = ModelUtils.getAdditionalProperties(openAPI, child); + Assert.assertNull(addProps); + cm = codegen.fromModel("AdditionalPropertiesClass", schema); + Assert.assertEquals(cm.getAdditionalPropertiesType(), ""); + } + + @Test + public void testAdditionalPropertiesV3Spec() { + OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml"); + DefaultCodegen codegen = new DefaultCodegen(); + codegen.setOpenAPI(openAPI); + + Schema schema = openAPI.getComponents().getSchemas().get("AdditionalPropertiesClass"); + Assert.assertEquals(schema.getAdditionalProperties(), null); + + Schema addProps = ModelUtils.getAdditionalProperties(openAPI, schema); + Assert.assertEquals(addProps, null); + CodegenModel cm = codegen.fromModel("AdditionalPropertiesClass", schema); + Assert.assertEquals(cm.getAdditionalPropertiesType(), ""); + + Map m = schema.getProperties(); + Schema child = m.get("map_string"); + // This property has the following inline schema. + // additionalProperties: + // type: string + Assert.assertNotNull(child); + Assert.assertNotNull(child.getAdditionalProperties()); + + child = m.get("map_with_additional_properties"); + // This property has the following inline schema. + // additionalProperties: true + Assert.assertNotNull(child); + // Unlike the V2 spec, in V3 we CAN differentiate between 'additionalProperties' not present and + // additionalProperties: true. + Assert.assertNotNull(child.getAdditionalProperties()); + Assert.assertEquals(child.getAdditionalProperties(), Boolean.TRUE); + + child = m.get("map_without_additional_properties"); + // This property has the following inline schema. + // additionalProperties: false + Assert.assertNotNull(child); + // Unlike the V2 spec, in V3 we CAN differentiate between 'additionalProperties' not present and + // additionalProperties: false. + Assert.assertNotNull(child.getAdditionalProperties()); + Assert.assertEquals(child.getAdditionalProperties(), Boolean.FALSE); + } + @Test public void testEnsureNoDuplicateProduces() { final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/two-responses.yaml"); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java index 5b0114d96ac4..221f13a70045 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java @@ -226,25 +226,26 @@ public void testAliasedTypeIsNotUnaliasedIfUsedForImportMapping(){ */ @Test public void testIsFreeFormObject() { + OpenAPI openAPI = new OpenAPI().openapi("3.0.0"); // Create initial "empty" object schema. ObjectSchema objSchema = new ObjectSchema(); - Assert.assertTrue(ModelUtils.isFreeFormObject(objSchema)); + Assert.assertTrue(ModelUtils.isFreeFormObject(openAPI, objSchema)); // Set additionalProperties to an empty ObjectSchema. objSchema.setAdditionalProperties(new ObjectSchema()); - Assert.assertTrue(ModelUtils.isFreeFormObject(objSchema)); + Assert.assertTrue(ModelUtils.isFreeFormObject(openAPI, objSchema)); // Add a single property to the schema (no longer a free-form object). Map props = new HashMap<>(); props.put("prop1", new StringSchema()); objSchema.setProperties(props); - Assert.assertFalse(ModelUtils.isFreeFormObject(objSchema)); + Assert.assertFalse(ModelUtils.isFreeFormObject(openAPI, objSchema)); // Test a non-object schema - Assert.assertFalse(ModelUtils.isFreeFormObject(new StringSchema())); + Assert.assertFalse(ModelUtils.isFreeFormObject(openAPI, new StringSchema())); // Test a null schema - Assert.assertFalse(ModelUtils.isFreeFormObject(null)); + Assert.assertFalse(ModelUtils.isFreeFormObject(openAPI, null)); } @Test From b0b198a8ed3c1d281fa42fb604f40f5c33bbdac2 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Fri, 15 May 2020 18:14:07 +0000 Subject: [PATCH 032/105] Add OpenAPI argument --- .../openapitools/codegen/DefaultCodegen.java | 32 ++++++------- .../codegen/DefaultGenerator.java | 2 +- .../codegen/InlineModelResolver.java | 48 +++++++++---------- .../codegen/examples/ExampleGenerator.java | 4 +- .../codegen/utils/ModelUtils.java | 33 ++++++++----- 5 files changed, 65 insertions(+), 54 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 6bdd13fe2af6..1c4f9dd20d97 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 @@ -806,7 +806,7 @@ public void preprocessOpenAPI(OpenAPI openAPI) { addOneOfInterfaceModel((ComposedSchema) items, nOneOf, openAPI); } } else if (ModelUtils.isMapSchema(s)) { - Schema addProps = ModelUtils.getAdditionalProperties(s); + Schema addProps = ModelUtils.getAdditionalProperties(this.openAPI, s); if (addProps != null && ModelUtils.isComposedSchema(addProps)) { addOneOfNameExtension((ComposedSchema) addProps, nOneOf); addOneOfInterfaceModel((ComposedSchema) addProps, nOneOf, openAPI); @@ -1602,7 +1602,7 @@ public String generateExamplePath(String path, Operation operation) { */ public String toInstantiationType(Schema schema) { if (ModelUtils.isMapSchema(schema)) { - Schema additionalProperties = ModelUtils.getAdditionalProperties(schema); + Schema additionalProperties = ModelUtils.getAdditionalProperties(this.openAPI, schema); String inner = getSchemaType(additionalProperties); return instantiationTypes.get("map") + ""; } else if (ModelUtils.isArraySchema(schema)) { @@ -1854,7 +1854,7 @@ protected Schema getSchemaItems(ArraySchema schema) { } protected Schema getSchemaAdditionalProperties(Schema schema) { - Schema inner = ModelUtils.getAdditionalProperties(schema); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, schema); if (inner == null) { LOGGER.error("`{}` (map property) does not have a proper inner type defined. Default to type:string", schema.getName()); inner = new StringSchema().description("TODO default missing map inner type to string"); @@ -2013,13 +2013,13 @@ private String getPrimitiveType(Schema schema) { return schema.getFormat(); } return "string"; - } else if (ModelUtils.isFreeFormObject(schema)) { + } else if (ModelUtils.isFreeFormObject(this.openAPI, schema)) { // Note: the value of a free-form object cannot be an arbitrary type. Per OAS specification, // it must be a map of string to values. return "object"; } else if (schema.getProperties() != null && !schema.getProperties().isEmpty()) { // having property implies it's a model return "object"; - } else if (ModelUtils.isAnyTypeSchema(schema)) { + } else if (ModelUtils.isAnyTypeSchema(this.openAPI, schema)) { return "AnyType"; } else if (StringUtils.isNotEmpty(schema.getType())) { LOGGER.warn("Unknown type found in the schema: " + schema.getType()); @@ -2200,7 +2200,7 @@ public CodegenModel fromModel(String name, Schema schema) { m.xmlNamespace = schema.getXml().getNamespace(); m.xmlName = schema.getXml().getName(); } - if (ModelUtils.isAnyTypeSchema(schema)) { + if (ModelUtils.isAnyTypeSchema(this.openAPI, schema)) { // The 'null' value is allowed when the OAS schema is 'any type'. // See https://github.com/OAI/OpenAPI-Specification/issues/1389 if (Boolean.FALSE.equals(schema.getNullable())) { @@ -3074,9 +3074,9 @@ public CodegenProperty fromProperty(String name, Schema p) { if (property.minimum != null || property.maximum != null) property.hasValidation = true; - } else if (ModelUtils.isFreeFormObject(p)) { + } else if (ModelUtils.isFreeFormObject(this.openAPI, p)) { property.isFreeFormObject = true; - } else if (ModelUtils.isAnyTypeSchema(p)) { + } else if (ModelUtils.isAnyTypeSchema(this.openAPI, p)) { // The 'null' value is allowed when the OAS schema is 'any type'. // See https://github.com/OAI/OpenAPI-Specification/issues/1389 if (Boolean.FALSE.equals(p.getNullable())) { @@ -3089,7 +3089,7 @@ public CodegenProperty fromProperty(String name, Schema p) { ArraySchema arraySchema = (ArraySchema) p; Schema innerSchema = ModelUtils.unaliasSchema(this.openAPI, getSchemaItems(arraySchema), importMapping); } else if (ModelUtils.isMapSchema(p)) { - Schema innerSchema = ModelUtils.unaliasSchema(this.openAPI, ModelUtils.getAdditionalProperties(p), + Schema innerSchema = ModelUtils.unaliasSchema(this.openAPI, ModelUtils.getAdditionalProperties(this.openAPI, p), importMapping); if (innerSchema == null) { LOGGER.error("Undefined map inner type for `{}`. Default to String.", p.getName()); @@ -3178,7 +3178,7 @@ public CodegenProperty fromProperty(String name, Schema p) { property.maxItems = p.getMaxProperties(); // handle inner property - Schema innerSchema = ModelUtils.unaliasSchema(this.openAPI, ModelUtils.getAdditionalProperties(p), + Schema innerSchema = ModelUtils.unaliasSchema(this.openAPI, ModelUtils.getAdditionalProperties(this.openAPI, p), importMapping); if (innerSchema == null) { LOGGER.error("Undefined map inner type for `{}`. Default to String.", p.getName()); @@ -3187,13 +3187,13 @@ public CodegenProperty fromProperty(String name, Schema p) { } CodegenProperty cp = fromProperty("inner", innerSchema); updatePropertyForMap(property, cp); - } else if (ModelUtils.isFreeFormObject(p)) { + } else if (ModelUtils.isFreeFormObject(this.openAPI, p)) { property.isFreeFormObject = true; property.baseType = getSchemaType(p); if (languageSpecificPrimitives.contains(property.dataType)) { property.isPrimitiveType = true; } - } else if (ModelUtils.isAnyTypeSchema(p)) { + } else if (ModelUtils.isAnyTypeSchema(this.openAPI, p)) { property.isAnyType = true; property.baseType = getSchemaType(p); if (languageSpecificPrimitives.contains(property.dataType)) { @@ -3429,7 +3429,7 @@ protected void handleMethodResponse(Operation operation, CodegenProperty innerProperty = fromProperty("response", getSchemaItems(as)); op.returnBaseType = innerProperty.baseType; } else if (ModelUtils.isMapSchema(responseSchema)) { - CodegenProperty innerProperty = fromProperty("response", ModelUtils.getAdditionalProperties(responseSchema)); + CodegenProperty innerProperty = fromProperty("response", ModelUtils.getAdditionalProperties(this.openAPI, responseSchema)); op.returnBaseType = innerProperty.baseType; } else { if (cm.complexType != null) { @@ -4094,7 +4094,7 @@ public CodegenParameter fromParameter(Parameter parameter, Set imports) } } else if (ModelUtils.isMapSchema(parameterSchema)) { // for map parameter - CodegenProperty codegenProperty = fromProperty("inner", ModelUtils.getAdditionalProperties(parameterSchema)); + CodegenProperty codegenProperty = fromProperty("inner", ModelUtils.getAdditionalProperties(this.openAPI, parameterSchema)); codegenParameter.items = codegenProperty; codegenParameter.mostInnerItems = codegenProperty.mostInnerItems; codegenParameter.baseType = codegenProperty.dataType; @@ -5807,7 +5807,7 @@ public CodegenParameter fromRequestBody(RequestBody body, Set imports, S if (ModelUtils.isGenerateAliasAsModel() && StringUtils.isNotBlank(name)) { this.addBodyModelSchema(codegenParameter, name, schema, imports, bodyParameterName, true); } else { - Schema inner = ModelUtils.getAdditionalProperties(schema); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, schema); if (inner == null) { LOGGER.error("No inner type supplied for map parameter `{}`. Default to type:string", schema.getName()); inner = new StringSchema().description("//TODO automatically added by openapi-generator"); @@ -5889,7 +5889,7 @@ public CodegenParameter fromRequestBody(RequestBody body, Set imports, S codegenProperty = codegenProperty.items; } } - } else if (ModelUtils.isFreeFormObject(schema)) { + } else if (ModelUtils.isFreeFormObject(this.openAPI, schema)) { // HTTP request body is free form object CodegenProperty codegenProperty = fromProperty("FREE_FORM_REQUEST_BODY", schema); if (codegenProperty != null) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java index 70a42907c97f..f83a918e83d9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java @@ -466,7 +466,7 @@ void generateModels(List files, List allModels, List unuse Schema schema = schemas.get(name); - if (ModelUtils.isFreeFormObject(schema)) { // check to see if it'a a free-form object + if (ModelUtils.isFreeFormObject(this.openAPI, schema)) { // check to see if it'a a free-form object LOGGER.info("Model {} not generated since it's a free-form object", name); continue; } else if (ModelUtils.isMapSchema(schema)) { // check to see if it's a "map" model diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java index c1f26c8ad771..9d632888f208 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java @@ -105,7 +105,7 @@ private void flattenRequestBody(OpenAPI openAPI, String pathname, Operation oper Schema obj = (Schema) model; if (obj.getType() == null || "object".equals(obj.getType())) { if (obj.getProperties() != null && obj.getProperties().size() > 0) { - flattenProperties(obj.getProperties(), pathname); + flattenProperties(openAPI, obj.getProperties(), pathname); // for model name, use "title" if defined, otherwise default to 'inline_object' String modelName = resolveModelName(obj.getTitle(), "inline_object"); addGenerated(modelName, model); @@ -156,10 +156,10 @@ private void flattenRequestBody(OpenAPI openAPI, String pathname, Operation oper if (inner instanceof ObjectSchema) { ObjectSchema op = (ObjectSchema) inner; if (op.getProperties() != null && op.getProperties().size() > 0) { - flattenProperties(op.getProperties(), pathname); + flattenProperties(openAPI, op.getProperties(), pathname); // Generate a unique model name based on the title. String modelName = resolveModelName(op.getTitle(), null); - Schema innerModel = modelFromProperty(op, modelName); + Schema innerModel = modelFromProperty(openAPI, op, modelName); String existing = matchGenerated(innerModel); if (existing != null) { Schema schema = new Schema().$ref(existing); @@ -200,7 +200,7 @@ private void flattenParameters(OpenAPI openAPI, String pathname, Operation opera Schema obj = (Schema) model; if (obj.getType() == null || "object".equals(obj.getType())) { if (obj.getProperties() != null && obj.getProperties().size() > 0) { - flattenProperties(obj.getProperties(), pathname); + flattenProperties(openAPI, obj.getProperties(), pathname); String modelName = resolveModelName(obj.getTitle(), parameter.getName()); parameter.$ref(modelName); @@ -214,9 +214,9 @@ private void flattenParameters(OpenAPI openAPI, String pathname, Operation opera if (inner instanceof ObjectSchema) { ObjectSchema op = (ObjectSchema) inner; if (op.getProperties() != null && op.getProperties().size() > 0) { - flattenProperties(op.getProperties(), pathname); + flattenProperties(openAPI, op.getProperties(), pathname); String modelName = resolveModelName(op.getTitle(), parameter.getName()); - Schema innerModel = modelFromProperty(op, modelName); + Schema innerModel = modelFromProperty(openAPI, op, modelName); String existing = matchGenerated(innerModel); if (existing != null) { Schema schema = new Schema().$ref(existing); @@ -259,7 +259,7 @@ private void flattenResponses(OpenAPI openAPI, String pathname, Operation operat ObjectSchema op = (ObjectSchema) property; if (op.getProperties() != null && op.getProperties().size() > 0) { String modelName = resolveModelName(op.getTitle(), "inline_response_" + key); - Schema model = modelFromProperty(op, modelName); + Schema model = modelFromProperty(openAPI, op, modelName); String existing = matchGenerated(model); Content content = response.getContent(); for (MediaType mediaType : content.values()) { @@ -282,10 +282,10 @@ private void flattenResponses(OpenAPI openAPI, String pathname, Operation operat if (inner instanceof ObjectSchema) { ObjectSchema op = (ObjectSchema) inner; if (op.getProperties() != null && op.getProperties().size() > 0) { - flattenProperties(op.getProperties(), pathname); + flattenProperties(openAPI, op.getProperties(), pathname); String modelName = resolveModelName(op.getTitle(), "inline_response_" + key); - Schema innerModel = modelFromProperty(op, modelName); + Schema innerModel = modelFromProperty(openAPI, op, modelName); String existing = matchGenerated(innerModel); if (existing != null) { Schema schema = this.makeSchema(existing, op); @@ -302,14 +302,14 @@ private void flattenResponses(OpenAPI openAPI, String pathname, Operation operat } } else if (property instanceof MapSchema) { MapSchema mp = (MapSchema) property; - Schema innerProperty = ModelUtils.getAdditionalProperties(mp); + Schema innerProperty = ModelUtils.getAdditionalProperties(openAPI, mp); if (innerProperty instanceof ObjectSchema) { ObjectSchema op = (ObjectSchema) innerProperty; if (op.getProperties() != null && op.getProperties().size() > 0) { - flattenProperties(op.getProperties(), pathname); + flattenProperties(openAPI, op.getProperties(), pathname); String modelName = resolveModelName(op.getTitle(), "inline_response_" + key); - Schema innerModel = modelFromProperty(op, modelName); + Schema innerModel = modelFromProperty(openAPI, op, modelName); String existing = matchGenerated(innerModel); if (existing != null) { Schema schema = new Schema().$ref(existing); @@ -378,7 +378,7 @@ private void flattenComposedChildren(OpenAPI openAPI, String key, List c // To have complete control of the model naming, one can define the model separately // instead of inline. String innerModelName = resolveModelName(op.getTitle(), key); - Schema innerModel = modelFromProperty(op, innerModelName); + Schema innerModel = modelFromProperty(openAPI, op, innerModelName); String existing = matchGenerated(innerModel); if (existing == null) { openAPI.getComponents().addSchemas(innerModelName, innerModel); @@ -421,7 +421,7 @@ private void flattenComponents(OpenAPI openAPI) { } else if (model instanceof Schema) { Schema m = (Schema) model; Map properties = m.getProperties(); - flattenProperties(properties, modelName); + flattenProperties(openAPI, properties, modelName); fixStringModel(m); } else if (ModelUtils.isArraySchema(model)) { ArraySchema m = (ArraySchema) model; @@ -430,7 +430,7 @@ private void flattenComponents(OpenAPI openAPI) { ObjectSchema op = (ObjectSchema) inner; if (op.getProperties() != null && op.getProperties().size() > 0) { String innerModelName = resolveModelName(op.getTitle(), modelName + "_inner"); - Schema innerModel = modelFromProperty(op, innerModelName); + Schema innerModel = modelFromProperty(openAPI, op, innerModelName); String existing = matchGenerated(innerModel); if (existing == null) { openAPI.getComponents().addSchemas(innerModelName, innerModel); @@ -526,7 +526,7 @@ private String uniqueName(final String name) { // TODO it would probably be a good idea to check against a list of used uniqueNames to make sure there are no collisions } - private void flattenProperties(Map properties, String path) { + private void flattenProperties(OpenAPI openAPI, Map properties, String path) { if (properties == null) { return; } @@ -538,7 +538,7 @@ private void flattenProperties(Map properties, String path) { && ((ObjectSchema) property).getProperties().size() > 0) { ObjectSchema op = (ObjectSchema) property; String modelName = resolveModelName(op.getTitle(), path + "_" + key); - Schema model = modelFromProperty(op, modelName); + Schema model = modelFromProperty(openAPI, op, modelName); String existing = matchGenerated(model); if (existing != null) { Schema schema = new Schema().$ref(existing); @@ -558,9 +558,9 @@ private void flattenProperties(Map properties, String path) { if (inner instanceof ObjectSchema) { ObjectSchema op = (ObjectSchema) inner; if (op.getProperties() != null && op.getProperties().size() > 0) { - flattenProperties(op.getProperties(), path); + flattenProperties(openAPI, op.getProperties(), path); String modelName = resolveModelName(op.getTitle(), path + "_" + key); - Schema innerModel = modelFromProperty(op, modelName); + Schema innerModel = modelFromProperty(openAPI, op, modelName); String existing = matchGenerated(innerModel); if (existing != null) { Schema schema = new Schema().$ref(existing); @@ -577,13 +577,13 @@ private void flattenProperties(Map properties, String path) { } } if (ModelUtils.isMapSchema(property)) { - Schema inner = ModelUtils.getAdditionalProperties(property); + Schema inner = ModelUtils.getAdditionalProperties(openAPI, property); if (inner instanceof ObjectSchema) { ObjectSchema op = (ObjectSchema) inner; if (op.getProperties() != null && op.getProperties().size() > 0) { - flattenProperties(op.getProperties(), path); + flattenProperties(openAPI, op.getProperties(), path); String modelName = resolveModelName(op.getTitle(), path + "_" + key); - Schema innerModel = modelFromProperty(op, modelName); + Schema innerModel = modelFromProperty(openAPI, op, modelName); String existing = matchGenerated(innerModel); if (existing != null) { Schema schema = new Schema().$ref(existing); @@ -611,7 +611,7 @@ private void flattenProperties(Map properties, String path) { } } - private Schema modelFromProperty(Schema object, String path) { + private Schema modelFromProperty(OpenAPI openAPI, Schema object, String path) { String description = object.getDescription(); String example = null; Object obj = object.getExample(); @@ -628,7 +628,7 @@ private Schema modelFromProperty(Schema object, String path) { model.setRequired(object.getRequired()); model.setNullable(object.getNullable()); if (properties != null) { - flattenProperties(properties, path); + flattenProperties(openAPI, properties, path); model.setProperties(properties); } return model; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java index ffc664c3cf44..c475da2105ab 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java @@ -269,10 +269,10 @@ private Object resolvePropertyToExample(String propertyName, String mediaType, S Map mp = new HashMap(); if (property.getName() != null) { mp.put(property.getName(), - resolvePropertyToExample(propertyName, mediaType, ModelUtils.getAdditionalProperties(property), processedModels)); + resolvePropertyToExample(propertyName, mediaType, ModelUtils.getAdditionalProperties(this.openAPI, property), processedModels)); } else { mp.put("key", - resolvePropertyToExample(propertyName, mediaType, ModelUtils.getAdditionalProperties(property), processedModels)); + resolvePropertyToExample(propertyName, mediaType, ModelUtils.getAdditionalProperties(this.openAPI, property), processedModels)); } return mp; } else if (ModelUtils.isUUIDSchema(property)) { 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 5dc7d792e2de..2e5d80a9e7dd 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 @@ -677,13 +677,13 @@ public static boolean isModel(Schema schema) { * @param schema the OAS schema. * @return true if the schema value can be an arbitrary type. */ - public static boolean isAnyTypeSchema(Schema schema) { + public static boolean isAnyTypeSchema(OpenAPI openAPI, Schema schema) { if (schema == null) { once(LOGGER).error("Schema cannot be null in isAnyTypeSchema check"); return false; } - if (isFreeFormObject(schema)) { + if (isFreeFormObject(openAPI, schema)) { // make sure it's not free form object return false; } @@ -729,7 +729,7 @@ public static boolean isAnyTypeSchema(Schema schema) { * @param schema potentially containing a '$ref' * @return true if it's a free-form object */ - public static boolean isFreeFormObject(Schema schema) { + public static boolean isFreeFormObject(OpenAPI openAPI, Schema schema) { if (schema == null) { // TODO: Is this message necessary? A null schema is not a free-form object, so the result is correct. once(LOGGER).error("Schema cannot be null in isFreeFormObject check"); @@ -749,7 +749,7 @@ public static boolean isFreeFormObject(Schema schema) { if ("object".equals(schema.getType())) { // no properties if ((schema.getProperties() == null || schema.getProperties().isEmpty())) { - Schema addlProps = getAdditionalProperties(schema); + Schema addlProps = getAdditionalProperties(openAPI, schema); // additionalProperties not defined if (addlProps == null) { return true; @@ -1091,17 +1091,28 @@ public static Schema unaliasSchema(OpenAPI openAPI, * any additional properties are allowed. This is equivalent to setting additionalProperties * to the boolean value True or setting additionalProperties: {} * + * @param openAPI the object that encapsulates the OAS document. * @param schema the input schema that may or may not have the additionalProperties keyword. * @return the Schema of the additionalProperties. The null value is returned if no additional * properties are allowed. */ - public static Schema getAdditionalProperties(Schema schema) { - if (schema.getAdditionalProperties() instanceof Schema) { - return (Schema) schema.getAdditionalProperties(); - } - if (schema.getAdditionalProperties() == null || - (schema.getAdditionalProperties() instanceof Boolean && - (Boolean) schema.getAdditionalProperties())) { + public static Schema getAdditionalProperties(OpenAPI openAPI, Schema schema) { + Object addProps = schema.getAdditionalProperties(); + if (addProps instanceof Schema) { + return (Schema) addProps; + } + if (addProps == null) { + SemVer version = new SemVer(openAPI.getOpenapi()); + if (version.major == 2) { + // The OAS version 2 parser sets Schema.additionalProperties to the null value + // even if the OAS document has additionalProperties: true|false + // So we are unable to determine if additional properties are allowed or not. + // The original behavior was to assume additionalProperties had been set to false, + // we retain that behavior. + return null; + } + } + if (addProps == null || (addProps instanceof Boolean && (Boolean) addProps)) { // Return ObjectSchema to specify any object (map) value is allowed. // Set nullable to specify the value of additional properties may be // the null value. From 628520d636588208bc2d1caa39dd7e9505d9e97c Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Fri, 15 May 2020 18:14:26 +0000 Subject: [PATCH 033/105] Add OpenAPI argument --- .../petstore-with-fake-endpoints-models-for-testing.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml index e21b8fb7d259..7f990bf0fa7d 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml @@ -1493,6 +1493,12 @@ definitions: type: object additionalProperties: type: object + map_with_additional_properties: + type: object + additionalProperties: true + map_without_additional_properties: + type: object + additionalProperties: false anytype_1: type: object anytype_2: {} From fa07164010cac1dbb964e67082e55b5ef2a4522e Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Fri, 15 May 2020 18:14:44 +0000 Subject: [PATCH 034/105] Add OpenAPI argument --- ...ke-endpoints-models-for-testing-with-http-signature.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index 74598c6ce709..2f94340420d6 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -1527,6 +1527,12 @@ components: type: object additionalProperties: type: string + map_with_additional_properties: + type: object + additionalProperties: true + map_without_additional_properties: + type: object + additionalProperties: false MixedPropertiesAndAdditionalPropertiesClass: type: object properties: From d45636bff706df8f728258e7f628f4c2663eebb4 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Fri, 15 May 2020 18:35:32 -0700 Subject: [PATCH 035/105] Handle additional property keyword with reference --- .../PythonClientExperimentalCodegen.java | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java index 02c58e98bc97..9788396a52cb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java @@ -909,6 +909,15 @@ private String getTypeString(Schema p, String prefix, String suffix) { if (")".equals(suffix)) { fullSuffix = "," + suffix; } + if (StringUtils.isNotEmpty(p.get$ref())) { + // The input schema is a reference. If the resolved schema is + // a composed schema, convert the name to a Python class. + Schema s = ModelUtils.getReferencedSchema(this.openAPI, p); + if (s instanceof ComposedSchema) { + String modelName = ModelUtils.getSimpleRef(p.get$ref()); + return prefix + toModelName(modelName) + fullSuffix; + } + } if (ModelUtils.isAnyTypeSchema(this.openAPI, p)) { return prefix + "bool, date, datetime, dict, float, int, list, str, none_type" + suffix; } @@ -938,7 +947,7 @@ private String getTypeString(Schema p, String prefix, String suffix) { } else { return prefix + getTypeString(inner, "[", "]") + fullSuffix; } - } + } if (ModelUtils.isFileSchema(p)) { return prefix + "file_type" + fullSuffix; } @@ -973,15 +982,11 @@ public String toInstantiationType(Schema property) { protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { Schema addProps = ModelUtils.getAdditionalProperties(this.openAPI, schema); if (addProps != null) { - if (StringUtils.isNotEmpty(addProps.get$ref())) { - // Resolve reference - addProps = ModelUtils.getReferencedSchema(this.openAPI, addProps); - } - if (addProps != null) { - // if AdditionalProperties exists, get its datatype and - // store it in codegenModel.additionalPropertiesType. - codegenModel.additionalPropertiesType = getTypeDeclaration(addProps); - } + // if AdditionalProperties exists, get its datatype and + // store it in codegenModel.additionalPropertiesType. + // The 'addProps' may be a reference, getTypeDeclaration will resolve + // the reference. + codegenModel.additionalPropertiesType = getTypeDeclaration(addProps); } // If addProps is null, the value of the 'additionalProperties' keyword is set // to false, i.e. no additional properties are allowed. From 8a1c42530e414b36e91ec6329d77f9828fab4349 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Fri, 15 May 2020 18:35:54 -0700 Subject: [PATCH 036/105] Handle additional property keyword with reference --- .../codegen/utils/ModelUtils.java | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) 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 2e5d80a9e7dd..471b6764c7d7 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 @@ -1102,15 +1102,25 @@ public static Schema getAdditionalProperties(OpenAPI openAPI, Schema schema) { return (Schema) addProps; } if (addProps == null) { - SemVer version = new SemVer(openAPI.getOpenapi()); - if (version.major == 2) { - // The OAS version 2 parser sets Schema.additionalProperties to the null value - // even if the OAS document has additionalProperties: true|false - // So we are unable to determine if additional properties are allowed or not. - // The original behavior was to assume additionalProperties had been set to false, - // we retain that behavior. - return null; - } + Map extensions = openAPI.getExtensions(); + if (extensions != null) { + // Get original swagger version from OAS extension. + // Note openAPI.getOpenapi() is always set to 3.x even when the document + // is converted from a OAS/Swagger 2.0 document. + // https://github.com/swagger-api/swagger-parser/pull/1374 + Object ext = extensions.get("x-original-swagger-version"); + if (ext instanceof String) { + SemVer version = new SemVer((String)ext); + if (version.major == 2) { + // The OAS version 2 parser sets Schema.additionalProperties to the null value + // even if the OAS document has additionalProperties: true|false + // So we are unable to determine if additional properties are allowed or not. + // The original behavior was to assume additionalProperties had been set to false, + // we retain that behavior. + return null; + } + } + } } if (addProps == null || (addProps instanceof Boolean && (Boolean) addProps)) { // Return ObjectSchema to specify any object (map) value is allowed. From ed36b759063b2b9a98050c3b16d1b4957f41fed4 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Fri, 15 May 2020 18:36:15 -0700 Subject: [PATCH 037/105] Handle additional property keyword with reference --- .../codegen/DefaultCodegenTest.java | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index 22891daab385..77d93f2ed236 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -225,6 +225,10 @@ public void testFormParameterHasDefaultValue() { @Test public void testAdditionalPropertiesV2Spec() { OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml"); + // The extension below is to track the original swagger version. + // See https://github.com/swagger-api/swagger-parser/pull/1374 + // Also see https://github.com/swagger-api/swagger-parser/issues/1369. + openAPI.addExtension("x-original-swagger-version", "2.0"); DefaultCodegen codegen = new DefaultCodegen(); codegen.setOpenAPI(openAPI); @@ -232,9 +236,14 @@ public void testAdditionalPropertiesV2Spec() { Assert.assertEquals(schema.getAdditionalProperties(), null); Schema addProps = ModelUtils.getAdditionalProperties(openAPI, schema); + // The petstore-with-fake-endpoints-models-for-testing.yaml does not set the + // 'additionalProperties' keyword for this model, hence assert the value to be null. Assert.assertNull(addProps); CodegenModel cm = codegen.fromModel("AdditionalPropertiesClass", schema); - Assert.assertEquals(cm.getAdditionalPropertiesType(), ""); + // When the 'additionalProperties' keyword is not present, the model + // should allow undeclared properties. However, due to bug + // https://github.com/swagger-api/swagger-parser/issues/1369, the swagger + // converter does not retain the value of the additionalProperties. Map m = schema.getProperties(); Schema child = m.get("map_string"); @@ -254,8 +263,6 @@ public void testAdditionalPropertiesV2Spec() { Assert.assertNull(child.getAdditionalProperties()); addProps = ModelUtils.getAdditionalProperties(openAPI, child); Assert.assertNull(addProps); - cm = codegen.fromModel("AdditionalPropertiesClass", schema); - Assert.assertEquals(cm.getAdditionalPropertiesType(), ""); child = m.get("map_without_additional_properties"); // This property has the following inline schema. @@ -267,8 +274,6 @@ public void testAdditionalPropertiesV2Spec() { Assert.assertNull(child.getAdditionalProperties()); addProps = ModelUtils.getAdditionalProperties(openAPI, child); Assert.assertNull(addProps); - cm = codegen.fromModel("AdditionalPropertiesClass", schema); - Assert.assertEquals(cm.getAdditionalPropertiesType(), ""); } @Test @@ -278,12 +283,14 @@ public void testAdditionalPropertiesV3Spec() { codegen.setOpenAPI(openAPI); Schema schema = openAPI.getComponents().getSchemas().get("AdditionalPropertiesClass"); - Assert.assertEquals(schema.getAdditionalProperties(), null); + Assert.assertNull(schema.getAdditionalProperties()); + // When the 'additionalProperties' keyword is not present, the schema may be + // extended with any undeclared properties. Schema addProps = ModelUtils.getAdditionalProperties(openAPI, schema); - Assert.assertEquals(addProps, null); + Assert.assertNotNull(addProps); + Assert.assertTrue(addProps instanceof ObjectSchema); CodegenModel cm = codegen.fromModel("AdditionalPropertiesClass", schema); - Assert.assertEquals(cm.getAdditionalPropertiesType(), ""); Map m = schema.getProperties(); Schema child = m.get("map_string"); @@ -301,6 +308,9 @@ public void testAdditionalPropertiesV3Spec() { // additionalProperties: true. Assert.assertNotNull(child.getAdditionalProperties()); Assert.assertEquals(child.getAdditionalProperties(), Boolean.TRUE); + addProps = ModelUtils.getAdditionalProperties(openAPI, child); + Assert.assertNotNull(addProps); + Assert.assertTrue(addProps instanceof ObjectSchema); child = m.get("map_without_additional_properties"); // This property has the following inline schema. @@ -310,6 +320,8 @@ public void testAdditionalPropertiesV3Spec() { // additionalProperties: false. Assert.assertNotNull(child.getAdditionalProperties()); Assert.assertEquals(child.getAdditionalProperties(), Boolean.FALSE); + addProps = ModelUtils.getAdditionalProperties(openAPI, child); + Assert.assertNull(addProps); } @Test From 230c2b8f948f095e9cdb65b47c86bcf5196c687c Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Fri, 15 May 2020 18:36:39 -0700 Subject: [PATCH 038/105] Handle additional property keyword with reference --- ...fake-endpoints-models-for-testing-with-http-signature.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index 2f94340420d6..cd67c5478f44 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -1533,6 +1533,10 @@ components: map_without_additional_properties: type: object additionalProperties: false + map_string: + type: object + additionalProperties: + type: string MixedPropertiesAndAdditionalPropertiesClass: type: object properties: From 726d47eab53dadda3f427a11653b8b458b14f9cb Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Fri, 15 May 2020 18:40:46 -0700 Subject: [PATCH 039/105] add additionalproperties attribute with boolean values --- .../petstore-with-fake-endpoints-models-for-testing.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml index ba8906a1a2dd..cd6d793ec819 100644 --- a/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml @@ -1356,6 +1356,8 @@ definitions: properties: breed: type: string + additionalProperties: false + additionalProperties: false Cat: allOf: - $ref: '#/definitions/Animal' @@ -1374,6 +1376,7 @@ definitions: color: type: string default: 'red' + additionalProperties: false AnimalFarm: type: array items: @@ -2070,6 +2073,7 @@ definitions: properties: interNet: type: boolean + additionalProperties: false GrandparentAnimal: type: object required: @@ -2102,4 +2106,4 @@ definitions: - type: object properties: lovesRocks: - type: boolean \ No newline at end of file + type: boolean From a67cc80ce4e6bb6de6f95841c3b9a8367e96dfc7 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Fri, 15 May 2020 18:43:58 -0700 Subject: [PATCH 040/105] Run sample scripts --- .../client/petstore/python-experimental/docs/Drawing.md | 2 +- .../petstore/python-experimental/petstore_api/models/drawing.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Drawing.md b/samples/openapi3/client/petstore/python-experimental/docs/Drawing.md index 244a31c548e6..36211a812539 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/Drawing.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/Drawing.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **main_shape** | [**shape.Shape**](Shape.md) | | [optional] **shapes** | [**[shape.Shape]**](Shape.md) | | [optional] -**any string name** | **one_ofapplebanana.OneOfapplebanana** | any string name can be used but the value must be the correct type | [optional] +**any string name** | **fruit.Fruit** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py index cbcd01161a9a..b870ecb8701c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py @@ -69,7 +69,7 @@ class Drawing(ModelNormal): validations = { } - additional_properties_type = (one_ofapplebanana.OneOfapplebanana,) # noqa: E501 + additional_properties_type = (fruit.Fruit,) # noqa: E501 @cached_property def openapi_types(): From cd1f8fd2c585e0a3f3f146bacad63f5ded40bc1b Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Fri, 15 May 2020 21:32:25 -0700 Subject: [PATCH 041/105] handle additional properties --- .../src/main/java/org/openapitools/codegen/CodegenModel.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java index c661e8965a48..e868c2b1131b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java @@ -107,8 +107,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties { * Used in map like objects, including composed schemas. * * In most programming languages, the additional (undeclared) properties are stored - * in a map data structure, such as HashMap in Java, map[string]interface{} - * in golang, or a dict in Python. + * in a map data structure, such as HashMap in Java, map in golang, or a dict in Python. * There are multiple ways to implement the additionalProperties keyword, depending * on the programming language and mustache template. * One way is to use class inheritance. For example in the generated Java code, the From 70f6207f6d7ceb75f47f8f6f2a768b568af46fa7 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Mon, 18 May 2020 16:45:30 -0700 Subject: [PATCH 042/105] Handle additionalProperties boolean values --- .../codegen/CodegenConstants.java | 12 + .../openapitools/codegen/DefaultCodegen.java | 214 ++++++++++- .../codegen/examples/ExampleGenerator.java | 4 +- .../codegen/languages/AbstractAdaCodegen.java | 2 +- .../languages/AbstractApexCodegen.java | 8 +- .../languages/AbstractCSharpCodegen.java | 2 +- .../languages/AbstractEiffelCodegen.java | 4 +- .../languages/AbstractFSharpCodegen.java | 2 +- .../codegen/languages/AbstractGoCodegen.java | 4 +- .../languages/AbstractJavaCodegen.java | 6 +- .../languages/AbstractKotlinCodegen.java | 2 +- .../codegen/languages/AbstractPhpCodegen.java | 2 +- .../languages/AbstractRubyCodegen.java | 2 +- .../languages/AbstractScalaCodegen.java | 6 +- .../AbstractTypeScriptClientCodegen.java | 2 +- .../languages/AndroidClientCodegen.java | 2 +- .../codegen/languages/ApexClientCodegen.java | 2 +- .../codegen/languages/BashClientCodegen.java | 2 +- .../languages/CSharpClientCodegen.java | 2 +- .../languages/CSharpNetCoreClientCodegen.java | 2 +- .../languages/ConfluenceWikiCodegen.java | 2 +- .../languages/CppPistacheServerCodegen.java | 4 +- .../languages/CppQt5AbstractCodegen.java | 4 +- .../languages/CppRestSdkClientCodegen.java | 6 +- .../languages/CppRestbedServerCodegen.java | 4 +- .../codegen/languages/DartClientCodegen.java | 2 +- .../languages/DartDioClientCodegen.java | 2 +- .../languages/ElixirClientCodegen.java | 2 +- .../codegen/languages/ElmClientCodegen.java | 2 +- .../languages/HaskellHttpClientCodegen.java | 4 +- .../languages/HaskellServantCodegen.java | 4 +- .../languages/JMeterClientCodegen.java | 2 +- .../JavascriptApolloClientCodegen.java | 6 +- .../languages/JavascriptClientCodegen.java | 6 +- ...JavascriptClosureAngularClientCodegen.java | 2 +- .../JavascriptFlowtypedClientCodegen.java | 2 +- .../codegen/languages/LuaClientCodegen.java | 2 +- .../codegen/languages/NimClientCodegen.java | 2 +- .../codegen/languages/OCamlClientCodegen.java | 2 +- .../codegen/languages/ObjcClientCodegen.java | 2 +- .../codegen/languages/PerlClientCodegen.java | 2 +- .../languages/PhpSilexServerCodegen.java | 2 +- .../languages/PhpSymfonyServerCodegen.java | 2 +- .../languages/ProtobufSchemaCodegen.java | 2 +- .../PythonAbstractConnexionServerCodegen.java | 2 +- .../languages/PythonClientCodegen.java | 2 +- .../PythonClientExperimentalCodegen.java | 10 +- .../codegen/languages/RClientCodegen.java | 2 +- .../codegen/languages/RubyClientCodegen.java | 2 +- .../codegen/languages/RustClientCodegen.java | 2 +- .../codegen/languages/RustServerCodegen.java | 6 +- .../languages/ScalaAkkaClientCodegen.java | 2 +- .../languages/ScalaFinchServerCodegen.java | 2 +- .../languages/ScalaGatlingCodegen.java | 2 +- .../ScalaPlayFrameworkServerCodegen.java | 2 +- .../languages/ScalazClientCodegen.java | 2 +- .../languages/StaticHtml2Generator.java | 2 +- .../languages/StaticHtmlGenerator.java | 2 +- .../codegen/languages/Swift4Codegen.java | 6 +- .../languages/Swift5ClientCodegen.java | 6 +- .../TypeScriptAngularClientCodegen.java | 2 +- .../TypeScriptAxiosClientCodegen.java | 2 +- .../TypeScriptFetchClientCodegen.java | 2 +- .../TypeScriptInversifyClientCodegen.java | 2 +- .../TypeScriptJqueryClientCodegen.java | 2 +- .../TypeScriptNodeClientCodegen.java | 2 +- .../TypeScriptReduxQueryClientCodegen.java | 2 +- .../TypeScriptRxjsClientCodegen.java | 2 +- .../codegen/utils/ModelUtils.java | 341 +++++++++++------- .../openapitools/codegen/utils/SemVer.java | 29 ++ .../codegen/DefaultCodegenTest.java | 40 +- .../org/openapitools/codegen/TestUtils.java | 13 +- .../options/BashClientOptionsProvider.java | 1 + .../options/DartClientOptionsProvider.java | 1 + .../options/DartDioClientOptionsProvider.java | 1 + .../options/ElixirClientOptionsProvider.java | 1 + .../options/GoGinServerOptionsProvider.java | 1 + .../options/GoServerOptionsProvider.java | 1 + .../HaskellServantOptionsProvider.java | 1 + .../options/PhpClientOptionsProvider.java | 1 + .../PhpLumenServerOptionsProvider.java | 1 + .../PhpSilexServerOptionsProvider.java | 1 + .../PhpSlim4ServerOptionsProvider.java | 1 + .../options/PhpSlimServerOptionsProvider.java | 1 + .../options/RubyClientOptionsProvider.java | 1 + .../ScalaAkkaClientOptionsProvider.java | 1 + .../ScalaHttpClientOptionsProvider.java | 1 + .../options/Swift4OptionsProvider.java | 1 + .../options/Swift5OptionsProvider.java | 1 + ...ypeScriptAngularClientOptionsProvider.java | 1 + ...eScriptAngularJsClientOptionsProvider.java | 1 + ...ypeScriptAureliaClientOptionsProvider.java | 1 + .../TypeScriptFetchClientOptionsProvider.java | 1 + .../TypeScriptNodeClientOptionsProvider.java | 1 + 94 files changed, 613 insertions(+), 252 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java index c0304aebb369..6ac76d37cbfc 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java @@ -359,4 +359,16 @@ public static enum ENUM_PROPERTY_NAMING_TYPE {camelCase, PascalCase, snake_case, public static final String USE_SINGLE_REQUEST_PARAMETER = "useSingleRequestParameter"; public static final String USE_SINGLE_REQUEST_PARAMETER_DESC = "Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter."; + // The reason this parameter exists is because there is a dependency + // on swagger-api/swagger-parser issue https://github.com/swagger-api/swagger-parser/issues/1369. + // When that issue is resolved, this parameter should be removed. + public static final String LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR = "legacyAdditionalPropertiesBehavior"; + public static final String LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR_DESC = "If true, the 'additionalProperties' keyword is implemented as specified in the OAS and JSON schema specifications. " + + "This is currently not supported when the input document is based on the OpenAPI 2.0 schema. " + + "If false, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. " + + "In the non-compliant mode, codegen uses the following interpretation: " + + "1) In a OpenAPI 2.0 document, boolean values of the 'additionalProperties' keyword are ignored." + + "2) In a OpenAPI 3.x document, the non-compliance is when the 'additionalProperties' keyword is not present in a schema. " + + "If the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed."; + } 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 fcb3c889ee91..6c8e21dc4b01 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 @@ -59,6 +59,7 @@ import org.openapitools.codegen.templating.mustache.*; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.OneOfImplementorAdditionalData; +import org.openapitools.codegen.utils.SemVer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -238,6 +239,10 @@ apiTemplateFiles are for API outputs only (controllers/handlers). // Support legacy logic for evaluating discriminators protected boolean legacyDiscriminatorBehavior = true; + // Support legacy logic for evaluating 'additionalProperties' keyword. + // See CodegenConstants.java for more details. + protected boolean legacyAdditionalPropertiesBehavior = true; + // make openapi available to all methods protected OpenAPI openAPI; @@ -334,6 +339,10 @@ public void processOpts() { this.setLegacyDiscriminatorBehavior(Boolean.valueOf(additionalProperties .get(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR).toString())); } + if (additionalProperties.containsKey(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR)) { + this.setLegacyAdditionalPropertiesBehavior(Boolean.valueOf(additionalProperties + .get(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR).toString())); + } } /*** @@ -707,9 +716,14 @@ public String toEnumVarName(String value, String datatype) { } } + /** + * Set the OpenAPI document. + * This method is invoked when the input OpenAPI document has been parsed and validated. + */ @Override public void setOpenAPI(OpenAPI openAPI) { this.openAPI = openAPI; + this.openAPI.addExtension("x-is-legacy-additional-properties-behavior", Boolean.toString(getLegacyAdditionalPropertiesBehavior())); } // override with any special post-processing @@ -806,7 +820,7 @@ public void preprocessOpenAPI(OpenAPI openAPI) { addOneOfInterfaceModel((ComposedSchema) items, nOneOf, openAPI); } } else if (ModelUtils.isMapSchema(s)) { - Schema addProps = ModelUtils.getAdditionalProperties(this.openAPI, s); + Schema addProps = getAdditionalProperties(s); if (addProps != null && ModelUtils.isComposedSchema(addProps)) { addOneOfNameExtension((ComposedSchema) addProps, nOneOf); addOneOfInterfaceModel((ComposedSchema) addProps, nOneOf, openAPI); @@ -1146,6 +1160,14 @@ public void setLegacyDiscriminatorBehavior(boolean val) { this.legacyDiscriminatorBehavior = val; } + public Boolean getLegacyAdditionalPropertiesBehavior() { + return legacyAdditionalPropertiesBehavior; + } + + public void setLegacyAdditionalPropertiesBehavior(boolean val) { + this.legacyAdditionalPropertiesBehavior = val; + } + public Boolean getAllowUnicodeIdentifiers() { return allowUnicodeIdentifiers; } @@ -1470,6 +1492,23 @@ public DefaultCodegen() { legacyDiscriminatorBehaviorOpt.setEnum(legacyDiscriminatorBehaviorOpts); cliOptions.add(legacyDiscriminatorBehaviorOpt); + // option to change how we process + set the data in the 'additionalProperties' keyword. + CliOption legacyAdditionalPropertiesBehaviorOpt = CliOption.newBoolean( + CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, + CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR_DESC).defaultValue(Boolean.TRUE.toString()); + Map legacyAdditionalPropertiesBehaviorOpts = new HashMap<>(); + legacyAdditionalPropertiesBehaviorOpts.put("true", + "The 'additionalProperties' keyword is implemented as specified in the OAS and JSON schema specifications. " + + "This is currently not supported when the input document is based on the OpenAPI 2.0 schema."); + legacyAdditionalPropertiesBehaviorOpts.put("false", + "Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. " + + "1) In a OpenAPI 2.0 document, boolean values of the 'additionalProperties' keyword are ignored." + + "2) In a OpenAPI 3.x document, the non-compliance is when the 'additionalProperties' keyword is not present in a schema. " + + "If the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed."); + legacyAdditionalPropertiesBehaviorOpt.setEnum(legacyAdditionalPropertiesBehaviorOpts); + cliOptions.add(legacyAdditionalPropertiesBehaviorOpt); + this.setLegacyAdditionalPropertiesBehavior(false); + // initialize special character mapping initalizeSpecialCharacterMapping(); @@ -1602,7 +1641,7 @@ public String generateExamplePath(String path, Operation operation) { */ public String toInstantiationType(Schema schema) { if (ModelUtils.isMapSchema(schema)) { - Schema additionalProperties = ModelUtils.getAdditionalProperties(this.openAPI, schema); + Schema additionalProperties = getAdditionalProperties(schema); String inner = getSchemaType(additionalProperties); return instantiationTypes.get("map") + ""; } else if (ModelUtils.isArraySchema(schema)) { @@ -1854,7 +1893,7 @@ protected Schema getSchemaItems(ArraySchema schema) { } protected Schema getSchemaAdditionalProperties(Schema schema) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, schema); + Schema inner = getAdditionalProperties(schema); if (inner == null) { LOGGER.error("`{}` (map property) does not have a proper inner type defined. Default to type:string", schema.getName()); inner = new StringSchema().description("TODO default missing map inner type to string"); @@ -2013,13 +2052,13 @@ private String getPrimitiveType(Schema schema) { return schema.getFormat(); } return "string"; - } else if (ModelUtils.isFreeFormObject(this.openAPI, schema)) { + } else if (isFreeFormObject(schema)) { // Note: the value of a free-form object cannot be an arbitrary type. Per OAS specification, // it must be a map of string to values. return "object"; } else if (schema.getProperties() != null && !schema.getProperties().isEmpty()) { // having property implies it's a model return "object"; - } else if (ModelUtils.isAnyTypeSchema(this.openAPI, schema)) { + } else if (isAnyTypeSchema(schema)) { return "AnyType"; } else if (StringUtils.isNotEmpty(schema.getType())) { LOGGER.warn("Unknown type found in the schema: " + schema.getType()); @@ -2200,7 +2239,7 @@ public CodegenModel fromModel(String name, Schema schema) { m.xmlNamespace = schema.getXml().getNamespace(); m.xmlName = schema.getXml().getName(); } - if (ModelUtils.isAnyTypeSchema(this.openAPI, schema)) { + if (isAnyTypeSchema(schema)) { // The 'null' value is allowed when the OAS schema is 'any type'. // See https://github.com/OAI/OpenAPI-Specification/issues/1389 if (Boolean.FALSE.equals(schema.getNullable())) { @@ -3078,9 +3117,9 @@ public CodegenProperty fromProperty(String name, Schema p) { property.hasValidation = true; } - } else if (ModelUtils.isFreeFormObject(this.openAPI, p)) { + } else if (isFreeFormObject(p)) { property.isFreeFormObject = true; - } else if (ModelUtils.isAnyTypeSchema(this.openAPI, p)) { + } else if (isAnyTypeSchema(p)) { // The 'null' value is allowed when the OAS schema is 'any type'. // See https://github.com/OAI/OpenAPI-Specification/issues/1389 if (Boolean.FALSE.equals(p.getNullable())) { @@ -3093,7 +3132,7 @@ public CodegenProperty fromProperty(String name, Schema p) { ArraySchema arraySchema = (ArraySchema) p; Schema innerSchema = ModelUtils.unaliasSchema(this.openAPI, getSchemaItems(arraySchema), importMapping); } else if (ModelUtils.isMapSchema(p)) { - Schema innerSchema = ModelUtils.unaliasSchema(this.openAPI, ModelUtils.getAdditionalProperties(this.openAPI, p), + Schema innerSchema = ModelUtils.unaliasSchema(this.openAPI, getAdditionalProperties(p), importMapping); if (innerSchema == null) { LOGGER.error("Undefined map inner type for `{}`. Default to String.", p.getName()); @@ -3182,7 +3221,7 @@ public CodegenProperty fromProperty(String name, Schema p) { property.maxItems = p.getMaxProperties(); // handle inner property - Schema innerSchema = ModelUtils.unaliasSchema(this.openAPI, ModelUtils.getAdditionalProperties(this.openAPI, p), + Schema innerSchema = ModelUtils.unaliasSchema(this.openAPI, getAdditionalProperties(p), importMapping); if (innerSchema == null) { LOGGER.error("Undefined map inner type for `{}`. Default to String.", p.getName()); @@ -3191,13 +3230,13 @@ public CodegenProperty fromProperty(String name, Schema p) { } CodegenProperty cp = fromProperty("inner", innerSchema); updatePropertyForMap(property, cp); - } else if (ModelUtils.isFreeFormObject(this.openAPI, p)) { + } else if (isFreeFormObject(p)) { property.isFreeFormObject = true; property.baseType = getSchemaType(p); if (languageSpecificPrimitives.contains(property.dataType)) { property.isPrimitiveType = true; } - } else if (ModelUtils.isAnyTypeSchema(this.openAPI, p)) { + } else if (isAnyTypeSchema(p)) { property.isAnyType = true; property.baseType = getSchemaType(p); if (languageSpecificPrimitives.contains(property.dataType)) { @@ -3433,7 +3472,7 @@ protected void handleMethodResponse(Operation operation, CodegenProperty innerProperty = fromProperty("response", getSchemaItems(as)); op.returnBaseType = innerProperty.baseType; } else if (ModelUtils.isMapSchema(responseSchema)) { - CodegenProperty innerProperty = fromProperty("response", ModelUtils.getAdditionalProperties(this.openAPI, responseSchema)); + CodegenProperty innerProperty = fromProperty("response", getAdditionalProperties(responseSchema)); op.returnBaseType = innerProperty.baseType; } else { if (cm.complexType != null) { @@ -4098,7 +4137,7 @@ public CodegenParameter fromParameter(Parameter parameter, Set imports) } } else if (ModelUtils.isMapSchema(parameterSchema)) { // for map parameter - CodegenProperty codegenProperty = fromProperty("inner", ModelUtils.getAdditionalProperties(this.openAPI, parameterSchema)); + CodegenProperty codegenProperty = fromProperty("inner", getAdditionalProperties(parameterSchema)); codegenParameter.items = codegenProperty; codegenParameter.mostInnerItems = codegenProperty.mostInnerItems; codegenParameter.baseType = codegenProperty.dataType; @@ -5811,7 +5850,7 @@ public CodegenParameter fromRequestBody(RequestBody body, Set imports, S if (ModelUtils.isGenerateAliasAsModel() && StringUtils.isNotBlank(name)) { this.addBodyModelSchema(codegenParameter, name, schema, imports, bodyParameterName, true); } else { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, schema); + Schema inner = getAdditionalProperties(schema); if (inner == null) { LOGGER.error("No inner type supplied for map parameter `{}`. Default to type:string", schema.getName()); inner = new StringSchema().description("//TODO automatically added by openapi-generator"); @@ -5893,7 +5932,7 @@ public CodegenParameter fromRequestBody(RequestBody body, Set imports, S codegenProperty = codegenProperty.items; } } - } else if (ModelUtils.isFreeFormObject(this.openAPI, schema)) { + } else if (isFreeFormObject(schema)) { // HTTP request body is free form object CodegenProperty codegenProperty = fromProperty("FREE_FORM_REQUEST_BODY", schema); if (codegenProperty != null) { @@ -6290,4 +6329,147 @@ public int hashCode() { return Objects.hash(getName(), getRemoveCharRegEx(), getExceptions()); } } + + /** + * Return true if the schema value can be any type, i.e. it can be + * the null value, integer, number, string, object or array. + * One use case is when the "type" attribute in the OAS schema is unspecified. + * + * Examples: + * + * arbitraryTypeValue: + * description: This is an arbitrary type schema. + * It is not a free-form object. + * The value can be any type except the 'null' value. + * arbitraryTypeNullableValue: + * description: This is an arbitrary type schema. + * It is not a free-form object. + * The value can be any type, including the 'null' value. + * nullable: true + * + * @param schema the OAS schema. + * @return true if the schema value can be an arbitrary type. + */ + public boolean isAnyTypeSchema(Schema schema) { + if (schema == null) { + once(LOGGER).error("Schema cannot be null in isAnyTypeSchema check"); + return false; + } + + if (isFreeFormObject(schema)) { + // make sure it's not free form object + return false; + } + + if (schema.getClass().equals(Schema.class) && schema.get$ref() == null && schema.getType() == null && + (schema.getProperties() == null || schema.getProperties().isEmpty()) && + schema.getAdditionalProperties() == null && schema.getNot() == null && + schema.getEnum() == null) { + return true; + // If and when type arrays are supported in a future OAS specification, + // we could return true if the type array includes all possible JSON schema types. + } + return false; + } + + /** + * Check to see if the schema is a free form object. + * + * A free form object is an object (i.e. 'type: object' in a OAS document) that: + * 1) Does not define properties, and + * 2) Is not a composed schema (no anyOf, oneOf, allOf), and + * 3) additionalproperties is not defined, or additionalproperties: true, or additionalproperties: {}. + * + * Examples: + * + * components: + * schemas: + * arbitraryObject: + * type: object + * description: This is a free-form object. + * The value must be a map of strings to values. The value cannot be 'null'. + * It cannot be array, string, integer, number. + * arbitraryNullableObject: + * type: object + * description: This is a free-form object. + * The value must be a map of strings to values. The value can be 'null', + * It cannot be array, string, integer, number. + * nullable: true + * arbitraryTypeValue: + * description: This is NOT a free-form object. + * The value can be any type except the 'null' value. + * + * @param schema potentially containing a '$ref' + * @return true if it's a free-form object + */ + protected boolean isFreeFormObject(Schema schema) { + return ModelUtils.isFreeFormObject(this.openAPI, schema); + } + + /** + * Returns the additionalProperties Schema for the specified input schema. + * + * The additionalProperties keyword is used to control the handling of additional, undeclared + * properties, that is, properties whose names are not listed in the properties keyword. + * The additionalProperties keyword may be either a boolean or an object. + * If additionalProperties is a boolean and set to false, no additional properties are allowed. + * By default when the additionalProperties keyword is not specified in the input schema, + * any additional properties are allowed. This is equivalent to setting additionalProperties + * to the boolean value True or setting additionalProperties: {} + * + * @param openAPI the object that encapsulates the OAS document. + * @param schema the input schema that may or may not have the additionalProperties keyword. + * @return the Schema of the additionalProperties. The null value is returned if no additional + * properties are allowed. + */ + protected Schema getAdditionalProperties(Schema schema) { + ModelUtils.getAdditionalProperties(openAPI, schema); + Object addProps = schema.getAdditionalProperties(); + if (addProps instanceof Schema) { + return (Schema) addProps; + } + if (this.getLegacyAdditionalPropertiesBehavior()) { + // Legacy, non-compliant mode. If the 'additionalProperties' keyword is not present in a OAS schema, + // interpret as if the 'additionalProperties' keyword had been set to false. + if (addProps instanceof Boolean && (Boolean) addProps) { + // Return ObjectSchema to specify any object (map) value is allowed. + // Set nullable to specify the value of additional properties may be + // the null value. + // Free-form additionalProperties don't need to have an inner + // additional properties, the type is already free-form. + return new ObjectSchema().additionalProperties(Boolean.FALSE).nullable(Boolean.TRUE); + } + } + if (addProps == null) { + Map extensions = openAPI.getExtensions(); + if (extensions != null) { + // Get original swagger version from OAS extension. + // Note openAPI.getOpenapi() is always set to 3.x even when the document + // is converted from a OAS/Swagger 2.0 document. + // https://github.com/swagger-api/swagger-parser/pull/1374 + Object ext = extensions.get("x-original-openapi-version"); + if (ext instanceof String) { + SemVer version = new SemVer((String)ext); + if (version.major == 2) { + // The OAS version 2 parser sets Schema.additionalProperties to the null value + // even if the OAS document has additionalProperties: true|false + // So we are unable to determine if additional properties are allowed or not. + // The original behavior was to assume additionalProperties had been set to false, + // we retain that behavior. + return null; + } + } + } + } + if (addProps == null || (addProps instanceof Boolean && (Boolean) addProps)) { + // Return ObjectSchema to specify any object (map) value is allowed. + // Set nullable to specify the value of additional properties may be + // the null value. + // Free-form additionalProperties don't need to have an inner + // additional properties, the type is already free-form. + return new ObjectSchema().additionalProperties(Boolean.FALSE).nullable(Boolean.TRUE); + } + return null; + } + } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java index c475da2105ab..6a6a807c6f20 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java @@ -269,10 +269,10 @@ private Object resolvePropertyToExample(String propertyName, String mediaType, S Map mp = new HashMap(); if (property.getName() != null) { mp.put(property.getName(), - resolvePropertyToExample(propertyName, mediaType, ModelUtils.getAdditionalProperties(this.openAPI, property), processedModels)); + resolvePropertyToExample(propertyName, mediaType, ModelUtils.getAdditionalProperties(openAPI, property), processedModels)); } else { mp.put("key", - resolvePropertyToExample(propertyName, mediaType, ModelUtils.getAdditionalProperties(this.openAPI, property), processedModels)); + resolvePropertyToExample(propertyName, mediaType, ModelUtils.getAdditionalProperties(openAPI, property), processedModels)); } return mp; } else if (ModelUtils.isUUIDSchema(property)) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java index 1322dc94c42c..d09d7ab2c02b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java @@ -347,7 +347,7 @@ public String getTypeDeclaration(Schema p) { return getTypeDeclaration(inner) + "_Vectors.Vector"; } if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); String name = getTypeDeclaration(inner) + "_Map"; if (name.startsWith("Swagger.")) { return name; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java index 24a25c5d5a61..196ac1aa1815 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java @@ -195,7 +195,7 @@ public String getTypeDeclaration(Schema p) { } return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); if (inner == null) { LOGGER.warn(p.getName() + "(map property) does not have a proper inner type defined"); @@ -228,11 +228,11 @@ public String toDefaultValue(Schema p) { } else if (ModelUtils.isMapSchema(p)) { final MapSchema ap = (MapSchema) p; final String pattern = "new HashMap<%s>()"; - if (ModelUtils.getAdditionalProperties(this.openAPI, ap) == null) { + if (getAdditionalProperties(ap) == null) { return null; } - return String.format(Locale.ROOT, pattern, String.format(Locale.ROOT, "String, %s", getTypeDeclaration(ModelUtils.getAdditionalProperties(this.openAPI, ap)))); + return String.format(Locale.ROOT, pattern, String.format(Locale.ROOT, "String, %s", getTypeDeclaration(getAdditionalProperties(ap)))); } else if (ModelUtils.isLongSchema(p)) { if (p.getDefault() != null) { return p.getDefault().toString() + "l"; @@ -365,7 +365,7 @@ public String toExampleValue(Schema p) { } else if (ModelUtils.isLongSchema(p)) { example = example.isEmpty() ? "123456789L" : example + "L"; } else if (ModelUtils.isMapSchema(p)) { - example = "new " + getTypeDeclaration(p) + "{'key'=>" + toExampleValue(ModelUtils.getAdditionalProperties(this.openAPI, p)) + "}"; + example = "new " + getTypeDeclaration(p) + "{'key'=>" + toExampleValue(getAdditionalProperties(p)) + "}"; } else if (ModelUtils.isPasswordSchema(p)) { example = example.isEmpty() ? "password123" : escapeText(example); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java index 3323eb2ff034..ee16ccdd0ebf 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java @@ -989,7 +989,7 @@ public String getTypeDeclaration(Schema p) { return getArrayTypeDeclaration((ArraySchema) p); } else if (ModelUtils.isMapSchema(p)) { // Should we also support maps of maps? - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + ""; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java index a0a17f1c9ce9..82eba4b189c5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java @@ -281,7 +281,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return "LIST [" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } @@ -549,7 +549,7 @@ public Map createMapping(String key, String value) { @Override public String toInstantiationType(Schema p) { if (ModelUtils.isMapSchema(p)) { - Schema additionalProperties2 = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema additionalProperties2 = getAdditionalProperties(p); String type = additionalProperties2.getType(); if (null == type) { LOGGER.error("No Type defined for Additional Schema " + additionalProperties2 + "\n" // diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java index 446fb8416733..c258b22eb097 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java @@ -881,7 +881,7 @@ public String getTypeDeclaration(Schema p) { return getArrayTypeDeclaration((ArraySchema) p); } else if (ModelUtils.isMapSchema(p)) { // Should we also support maps of maps? - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + ""; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java index 249cf3a437bb..47fda5b31190 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java @@ -344,7 +344,7 @@ public String getTypeDeclaration(Schema p) { } return "[]" + typDecl; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[string]" + getTypeDeclaration(ModelUtils.unaliasSchema(this.openAPI, inner)); } //return super.getTypeDeclaration(p); @@ -390,7 +390,7 @@ public String getSchemaType(Schema p) { if (ref != null && !ref.isEmpty()) { type = openAPIType; - } else if ("object".equals(openAPIType) && ModelUtils.isAnyTypeSchema(this.openAPI, p)) { + } else if ("object".equals(openAPIType) && isAnyTypeSchema(p)) { // Arbitrary type. Note this is not the same thing as free-form object. type = "interface{}"; } else if (typeMapping.containsKey(openAPIType)) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index 82513ed6a05b..03fba2462c4a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -804,11 +804,11 @@ public String toDefaultValue(Schema schema) { } else { pattern = "new HashMap<%s>()"; } - if (ModelUtils.getAdditionalProperties(this.openAPI, schema) == null) { + if (getAdditionalProperties(schema) == null) { return null; } - String typeDeclaration = String.format(Locale.ROOT, "String, %s", getTypeDeclaration(ModelUtils.getAdditionalProperties(this.openAPI, schema))); + String typeDeclaration = String.format(Locale.ROOT, "String, %s", getTypeDeclaration(getAdditionalProperties(schema))); Object java8obj = additionalProperties.get("java8"); if (java8obj != null) { Boolean java8 = Boolean.valueOf(java8obj.toString()); @@ -1642,7 +1642,7 @@ protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Sc super.addAdditionPropertiesToCodeGenModel(codegenModel, schema); // See https://github.com/OpenAPITools/openapi-generator/pull/1729#issuecomment-449937728 - codegenModel.additionalPropertiesType = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, schema)); + codegenModel.additionalPropertiesType = getSchemaType(getAdditionalProperties(schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java index 9a0909dcbff8..347ce1d07cfb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java @@ -310,7 +310,7 @@ public String getTypeDeclaration(Schema p) { if (ModelUtils.isArraySchema(p)) { return getArrayTypeDeclaration((ArraySchema) p); } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); // Maps will be keyed only by primitive Kotlin string return getSchemaType(p) + ""; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java index 8311fb29f4c2..eff7939d6e39 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java @@ -301,7 +301,7 @@ public String getTypeDeclaration(Schema p) { } return getTypeDeclaration(inner) + "[]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); if (inner == null) { LOGGER.warn(p.getName() + "(map property) does not have a proper inner type defined. Default to string"); inner = new StringSchema().description("TODO default missing map inner type to string"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java index 6e14557065c8..d035b2e84243 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java @@ -110,7 +110,7 @@ public String getTypeDeclaration(Schema schema) { Schema inner = ((ArraySchema) schema).getItems(); return getSchemaType(schema) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(schema)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, schema); + Schema inner = getAdditionalProperties(schema); return getSchemaType(schema) + ""; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java index a96dea59a929..6f87d96f13ef 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java @@ -325,7 +325,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } @@ -354,7 +354,7 @@ public String getSchemaType(Schema p) { @Override public String toInstantiationType(Schema p) { if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); + String inner = getSchemaType(getAdditionalProperties(p)); return instantiationTypes.get("map") + "[String, " + inner + "]"; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; @@ -383,7 +383,7 @@ public String toDefaultValue(Schema p) { } else if (ModelUtils.isIntegerSchema(p)) { return null; } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); + String inner = getSchemaType(getAdditionalProperties(p)); return "new HashMap[String, " + inner + "]() "; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java index 1ebded4cb87b..e16404b27972 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java @@ -389,7 +389,7 @@ protected String getParameterDataType(Parameter parameter, Schema p) { inner = mp1.getItems(); return this.getSchemaType(p) + "<" + this.getParameterDataType(parameter, inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + inner = getAdditionalProperties(p); return "{ [key: string]: " + this.getParameterDataType(parameter, inner) + "; }"; } else if (ModelUtils.isStringSchema(p)) { // Handle string enums diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java index 793d593a2c02..6a5e2ee83afa 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java @@ -216,7 +216,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + ""; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java index 9e4f889a287c..d7e5889c173e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java @@ -238,7 +238,7 @@ public String toDefaultValue(Schema p) { Long def = (Long) p.getDefault(); out = def == null ? out : def.toString() + "L"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); String s = inner == null ? "Object" : getTypeDeclaration(inner); out = String.format(Locale.ROOT, "new Map()", s); } else if (ModelUtils.isStringSchema(p)) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java index 79b02bd32748..93e9d09e470e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java @@ -428,7 +428,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index 748b54fa00af..495ccf72f6ba 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -982,7 +982,7 @@ public Mustache.Compiler processCompiler(Mustache.Compiler compiler) { @Override public String toInstantiationType(Schema schema) { if (ModelUtils.isMapSchema(schema)) { - Schema additionalProperties = ModelUtils.getAdditionalProperties(this.openAPI, schema); + Schema additionalProperties = getAdditionalProperties(schema); String inner = getSchemaType(additionalProperties); if (ModelUtils.isMapSchema(additionalProperties)) { inner = toInstantiationType(additionalProperties); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java index e9235266d44d..2d2f563bf210 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java @@ -917,7 +917,7 @@ protected String getTargetFrameworkVersion() { @Override public String toInstantiationType(Schema schema) { if (ModelUtils.isMapSchema(schema)) { - Schema additionalProperties = ModelUtils.getAdditionalProperties(this.openAPI, schema); + Schema additionalProperties = getAdditionalProperties(schema); String inner = getSchemaType(additionalProperties); if (ModelUtils.isMapSchema(additionalProperties)) { inner = toInstantiationType(additionalProperties); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java index a323067cb8fe..c2cadfa17028 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java @@ -107,7 +107,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java index 45aaa1c5b13e..6a2368cd319f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java @@ -363,7 +363,7 @@ public String getTypeDeclaration(Schema p) { return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + ""; } else if (ModelUtils.isByteArraySchema(p)) { return "std::string"; @@ -399,7 +399,7 @@ public String toDefaultValue(Schema p) { } else if (ModelUtils.isByteArraySchema(p)) { return "\"\""; } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); + String inner = getSchemaType(getAdditionalProperties(p)); return "std::map()"; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java index 8acde46deee6..c32271822145 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java @@ -186,7 +186,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + ""; } else if (ModelUtils.isBinarySchema(p)) { return getSchemaType(p); @@ -222,7 +222,7 @@ public String toDefaultValue(Schema p) { } return "0"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return "QMap()"; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java index f183491f7e27..149a10be6dd1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java @@ -349,7 +349,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + ""; } else if (ModelUtils.isFileSchema(p) || ModelUtils.isBinarySchema(p)) { return "std::shared_ptr<" + openAPIType + ">"; @@ -382,7 +382,7 @@ public String toDefaultValue(Schema p) { } return "0"; } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); + String inner = getSchemaType(getAdditionalProperties(p)); return "std::map()"; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; @@ -395,7 +395,7 @@ public String toDefaultValue(Schema p) { return "new " + toModelName(ModelUtils.getSimpleRef(p.get$ref())) + "()"; } else if (ModelUtils.isStringSchema(p)) { return "utility::conversions::to_string_t(\"\")"; - } else if (ModelUtils.isFreeFormObject(this.openAPI, p)) { + } else if (isFreeFormObject(p)) { return "new Object()"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java index 47520177e939..09626e7a327f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java @@ -355,7 +355,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + ""; } else if (ModelUtils.isByteArraySchema(p)) { return "std::string"; @@ -430,7 +430,7 @@ public String toDefaultValue(Schema p) { return "\"\""; } } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); + String inner = getSchemaType(getAdditionalProperties(p)); return "std::map()"; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java index 3db621ed8403..2ba3d7be485a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java @@ -425,7 +425,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + ""; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java index 31394c5fc078..2a8de81aff62 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java @@ -142,7 +142,7 @@ public String toDefaultValue(Schema p) { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { //super.addAdditionPropertiesToCodeGenModel(codegenModel, schema); - codegenModel.additionalPropertiesType = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, schema)); + codegenModel.additionalPropertiesType = getSchemaType(getAdditionalProperties(schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java index c1e21a14e189..5524a78cba8d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java @@ -495,7 +495,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return "%{optional(String.t) => " + getTypeDeclaration(inner) + "}"; } else if (ModelUtils.isPasswordSchema(p)) { return "String.t"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java index cac59737d3bc..630c720ccefa 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java @@ -428,7 +428,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getTypeDeclaration(inner); } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getTypeDeclaration(inner); } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java index 5e590e6f08bc..512c2645f0cb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java @@ -647,7 +647,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return "(Map.Map String " + getTypeDeclaration(inner) + ")"; } return super.getTypeDeclaration(p); @@ -669,7 +669,7 @@ public String getSchemaType(Schema p) { @Override public String toInstantiationType(Schema p) { if (ModelUtils.isMapSchema(p)) { - Schema additionalProperties2 = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema additionalProperties2 = getAdditionalProperties(p); String type = additionalProperties2.getType(); if (null == type) { LOGGER.error("No Type defined for Additional Schema " + additionalProperties2 + "\n" // diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java index 6eb0f48fcf00..857bc4a55e42 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java @@ -374,7 +374,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return "(Map.Map String " + getTypeDeclaration(inner) + ")"; } return fixModelChars(super.getTypeDeclaration(p)); @@ -409,7 +409,7 @@ public String getSchemaType(Schema p) { @Override public String toInstantiationType(Schema p) { if (ModelUtils.isMapSchema(p)) { - Schema additionalProperties2 = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema additionalProperties2 = getAdditionalProperties(p); String type = additionalProperties2.getType(); if (null == type) { LOGGER.error("No Type defined for Additional Property " + additionalProperties2 + "\n" // diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java index 1096e2d81acb..9678d29c8809 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java @@ -206,7 +206,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java index 378307c3eddb..a08486854ab6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java @@ -565,7 +565,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return "{String: " + getTypeDeclaration(inner) + "}"; } return super.getTypeDeclaration(p); @@ -835,8 +835,8 @@ public CodegenModel fromModel(String name, Schema model) { codegenModel.vendorExtensions.put("x-item-type", itemType); } } else if (ModelUtils.isMapSchema(model)) { - if (codegenModel != null && ModelUtils.getAdditionalProperties(this.openAPI, model) != null) { - String itemType = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, model)); + if (codegenModel != null && getAdditionalProperties(model) != null) { + String itemType = getSchemaType(getAdditionalProperties(model)); codegenModel.vendorExtensions.put("x-isMap", true); // TODO: 5.0 Remove codegenModel.vendorExtensions.put("x-is-map", true); codegenModel.vendorExtensions.put("x-itemType", itemType); // TODO: 5.0 Remove diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java index 26d2a334fa57..886fd869ec83 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java @@ -611,7 +611,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return "{String: " + getTypeDeclaration(inner) + "}"; } return super.getTypeDeclaration(p); @@ -881,8 +881,8 @@ public CodegenModel fromModel(String name, Schema model) { codegenModel.vendorExtensions.put("x-item-type", itemType); } } else if (ModelUtils.isMapSchema(model)) { - if (codegenModel != null && ModelUtils.getAdditionalProperties(this.openAPI, model) != null) { - String itemType = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, model)); + if (codegenModel != null && getAdditionalProperties(model) != null) { + String itemType = getSchemaType(getAdditionalProperties(model)); codegenModel.vendorExtensions.put("x-isMap", true); // TODO: 5.0 Remove codegenModel.vendorExtensions.put("x-is-map", true); codegenModel.vendorExtensions.put("x-itemType", itemType); // TODO: 5.0 Remove diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java index 60abe7528a78..877db877e4d7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java @@ -225,7 +225,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + ""; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return "Object"; } else if (ModelUtils.isFileSchema(p)) { return "Object"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java index 418e79201ab6..84c10840c44d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java @@ -107,7 +107,7 @@ public JavascriptFlowtypedClientCodegen() { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(this.openAPI, schema)); + codegenModel.additionalPropertiesType = getTypeDeclaration(getAdditionalProperties(schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java index 900ed1120a2a..f69352db3a92 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java @@ -367,7 +367,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getTypeDeclaration(inner); } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getTypeDeclaration(inner); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java index dee46f19c377..6e754097c5c1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java @@ -278,7 +278,7 @@ public String getTypeDeclaration(Schema p) { } return "seq[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); if (inner == null) { inner = new StringSchema(); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java index 6dd901199f8d..4d6d038c73be 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java @@ -584,7 +584,7 @@ public String getTypeDeclaration(Schema p) { } return getTypeDeclaration(inner) + " list"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); if (inner == null) { LOGGER.warn(p.getName() + "(map property) does not have a proper inner type defined. Default to string"); inner = new StringSchema().description("TODO default missing map inner type to string"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java index 0501c0cf3b04..abeeeffa2697 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java @@ -389,7 +389,7 @@ public String getTypeDeclaration(Schema p) { return getSchemaType(p) + "<" + innerTypeDeclaration + ">*"; } } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); String innerTypeDeclaration = getTypeDeclaration(inner); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java index a4641d79049e..5546e79a92ab 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java @@ -256,7 +256,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[string," + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java index 4396979d2b14..71512e350aec 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java @@ -176,7 +176,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[string," + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java index 8c9bd4b7c5a9..31e66bc67bf4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java @@ -558,7 +558,7 @@ public String getTypeDeclaration(Schema p) { } if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getTypeDeclaration(inner); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java index c2bd0793147d..6cefe264da5e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java @@ -459,7 +459,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[str, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java index fbd5c513c999..6105a43bf9ad 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java @@ -350,7 +350,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[str, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java index 84d465fc7ef8..b03f83ef271a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java @@ -460,7 +460,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "(str, " + getTypeDeclaration(inner) + ")"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java index 9788396a52cb..085bd92aca65 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java @@ -918,18 +918,18 @@ private String getTypeString(Schema p, String prefix, String suffix) { return prefix + toModelName(modelName) + fullSuffix; } } - if (ModelUtils.isAnyTypeSchema(this.openAPI, p)) { + if (isAnyTypeSchema(p)) { return prefix + "bool, date, datetime, dict, float, int, list, str, none_type" + suffix; } // Resolve $ref because ModelUtils.isXYZ methods do not automatically resolve references. if (ModelUtils.isNullable(ModelUtils.getReferencedSchema(this.openAPI, p))) { fullSuffix = ", none_type" + suffix; } - if (ModelUtils.isFreeFormObject(this.openAPI, p) && ModelUtils.getAdditionalProperties(this.openAPI, p) == null) { + if (isFreeFormObject(p) && getAdditionalProperties(p) == null) { return prefix + "bool, date, datetime, dict, float, int, list, str" + fullSuffix; } - if ((ModelUtils.isMapSchema(p) || "object".equals(p.getType())) && ModelUtils.getAdditionalProperties(this.openAPI, p) != null) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + if ((ModelUtils.isMapSchema(p) || "object".equals(p.getType())) && getAdditionalProperties(p) != null) { + Schema inner = getAdditionalProperties(p); return prefix + "{str: " + getTypeString(inner, "(", ")") + "}" + fullSuffix; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; @@ -980,7 +980,7 @@ public String toInstantiationType(Schema property) { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - Schema addProps = ModelUtils.getAdditionalProperties(this.openAPI, schema); + Schema addProps = getAdditionalProperties(schema); if (addProps != null) { // if AdditionalProperties exists, get its datatype and // store it in codegenModel.additionalPropertiesType. diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java index 2a5683847564..c719f5ebfb42 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java @@ -360,7 +360,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner)+ "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "(" + getTypeDeclaration(inner) + ")"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java index 8a73b4694457..d893636abf62 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java @@ -659,7 +659,7 @@ public void setGemAuthorEmail(String gemAuthorEmail) { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - final Schema additionalProperties = ModelUtils.getAdditionalProperties(this.openAPI, schema); + final Schema additionalProperties = getAdditionalProperties(schema); if (additionalProperties != null) { codegenModel.additionalPropertiesType = getSchemaType(additionalProperties); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java index 5416b2cfc0e4..1307f27f6928 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java @@ -421,7 +421,7 @@ public String getTypeDeclaration(Schema p) { } return "Vec<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); if (inner == null) { LOGGER.warn(p.getName() + "(map property) does not have a proper inner type defined. Default to string"); inner = new StringSchema().description("TODO default missing map inner type to string"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java index fb18ed017586..80fd3dd58e24 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java @@ -1177,7 +1177,7 @@ public String getTypeDeclaration(Schema p) { String innerType = getTypeDeclaration(inner); return typeMapping.get("array") + "<" + innerType + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); String innerType = getTypeDeclaration(inner); StringBuilder typeDeclaration = new StringBuilder(typeMapping.get("map")).append("<").append(typeMapping.get("string")).append(", "); typeDeclaration.append(innerType).append(">"); @@ -1211,7 +1211,7 @@ public String toInstantiationType(Schema p) { Schema inner = ap.getItems(); return instantiationTypes.get("array") + "<" + getSchemaType(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return instantiationTypes.get("map") + "<" + typeMapping.get("string") + ", " + getSchemaType(inner) + ">"; } else { return null; @@ -1274,7 +1274,7 @@ public CodegenModel fromModel(String name, Schema model) { additionalProperties.put("usesXmlNamespaces", true); } - Schema additionalProperties = ModelUtils.getAdditionalProperties(this.openAPI, model); + Schema additionalProperties = getAdditionalProperties(model); if (additionalProperties != null) { mdl.additionalPropertiesType = getSchemaType(additionalProperties); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java index e2dc12109934..6c06262a5ec9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java @@ -288,7 +288,7 @@ public String toDefaultValue(Schema p) { } else if (ModelUtils.isIntegerSchema(p)) { return null; } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); + String inner = getSchemaType(getAdditionalProperties(p)); return "Map[String, " + inner + "].empty "; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java index bf697e60ddb2..50e4ffc684e7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java @@ -265,7 +265,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java index 42392373d8f5..30d8c83d1309 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java @@ -387,7 +387,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java index 9d8becf59612..18ad995d1f59 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java @@ -374,7 +374,7 @@ public String toDefaultValue(Schema p) { } if (ModelUtils.isMapSchema(p)) { - Schema ap = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema ap = getAdditionalProperties(p); String inner = getSchemaType(ap); return "Map.empty[String, " + inner + "]"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java index b046930aacf2..036970066f5b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java @@ -182,7 +182,7 @@ public String toDefaultValue(Schema p) { } else if (ModelUtils.isIntegerSchema(p)) { return null; } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); + String inner = getSchemaType(getAdditionalProperties(p)); return "Map.empty[String, " + inner + "] "; } else if (ModelUtils.isArraySchema(p)) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java index b19fb328d873..a0aaec724861 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java @@ -135,7 +135,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java index 3637bf4da744..3804de3160a8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java @@ -117,7 +117,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java index 8f3621cd4719..0c389b58e72d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java @@ -341,7 +341,7 @@ public String getHelp() { protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - final Schema additionalProperties = ModelUtils.getAdditionalProperties(this.openAPI, schema); + final Schema additionalProperties = getAdditionalProperties(schema); if (additionalProperties != null) { codegenModel.additionalPropertiesType = getSchemaType(additionalProperties); @@ -516,7 +516,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return "[String:" + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); @@ -629,7 +629,7 @@ public String toDefaultValue(Schema p) { @Override public String toInstantiationType(Schema p) { if (ModelUtils.isMapSchema(p)) { - return getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); + return getSchemaType(getAdditionalProperties(p)); } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; String inner = getSchemaType(ap.getItems()); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java index 92773a9ab99d..ccd1b7ad3d0e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java @@ -330,7 +330,7 @@ public String getHelp() { protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - final Schema additionalProperties = ModelUtils.getAdditionalProperties(this.openAPI, schema); + final Schema additionalProperties = getAdditionalProperties(schema); if (additionalProperties != null) { codegenModel.additionalPropertiesType = getSchemaType(additionalProperties); @@ -522,7 +522,7 @@ public String getTypeDeclaration(Schema p) { Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return "[String:" + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); @@ -635,7 +635,7 @@ public String toDefaultValue(Schema p) { @Override public String toInstantiationType(Schema p) { if (ModelUtils.isMapSchema(p)) { - return getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); + return getSchemaType(getAdditionalProperties(p)); } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; String inner = getSchemaType(ap.getItems()); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java index f04803764847..6f948578b292 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java @@ -111,7 +111,7 @@ public TypeScriptAngularClientCodegen() { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(this.openAPI, schema)); + codegenModel.additionalPropertiesType = getTypeDeclaration(getAdditionalProperties(schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java index d7ba3f167ff2..95ded86dce5e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java @@ -166,7 +166,7 @@ public Map postProcessAllModels(Map objs) { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(this.openAPI, schema)); + codegenModel.additionalPropertiesType = getTypeDeclaration(getAdditionalProperties(schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java index aa9aebcdf6d3..c5b857ef2cd9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java @@ -157,7 +157,7 @@ public String getTypeDeclaration(Schema p) { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(this.openAPI, schema)); + codegenModel.additionalPropertiesType = getTypeDeclaration(getAdditionalProperties(schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java index b5c0489cad63..8bff85a02adb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java @@ -76,7 +76,7 @@ public TypeScriptInversifyClientCodegen() { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(this.openAPI, schema)); + codegenModel.additionalPropertiesType = getTypeDeclaration(getAdditionalProperties(schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java index b3a5cfef97d6..6e4e2fad7b1b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java @@ -112,7 +112,7 @@ public String getTypeDeclaration(String name) { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, schema)); + codegenModel.additionalPropertiesType = getSchemaType(getAdditionalProperties(schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java index e4e80793ec4f..09d5ae4df4e8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java @@ -316,7 +316,7 @@ private String getModelnameFromModelFilename(String filename) { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { super.addAdditionPropertiesToCodeGenModel(codegenModel, schema); - Schema additionalProperties = ModelUtils.getAdditionalProperties(this.openAPI, schema); + Schema additionalProperties = getAdditionalProperties(schema); codegenModel.additionalPropertiesType = getSchemaType(additionalProperties); if ("array".equalsIgnoreCase(codegenModel.additionalPropertiesType)) { codegenModel.additionalPropertiesType += '<' + getSchemaType(((ArraySchema) additionalProperties).getItems()) + '>'; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java index 92c788de9257..aac1d6bc8d90 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java @@ -117,7 +117,7 @@ public String getTypeDeclaration(Schema p) { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(this.openAPI, schema)); + codegenModel.additionalPropertiesType = getTypeDeclaration(getAdditionalProperties(schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java index 65794344730a..ec5ddb557fde 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java @@ -117,7 +117,7 @@ public String getTypeDeclaration(Schema p) { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(this.openAPI, schema)); + codegenModel.additionalPropertiesType = getTypeDeclaration(getAdditionalProperties(schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } 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 471b6764c7d7..9a13e85370b9 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 @@ -17,6 +17,8 @@ package org.openapitools.codegen.utils; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.PathItem; @@ -26,6 +28,10 @@ import io.swagger.v3.oas.models.parameters.Parameter; import io.swagger.v3.oas.models.parameters.RequestBody; import io.swagger.v3.oas.models.responses.ApiResponse; +import io.swagger.v3.parser.core.models.AuthorizationValue; +import io.swagger.v3.parser.util.ClasspathHelper; +import io.swagger.v3.parser.ObjectMapperFactory; +import io.swagger.v3.parser.util.RemoteUrl; import io.swagger.v3.parser.util.SchemaTypeUtil; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.CodegenModel; @@ -33,11 +39,16 @@ import org.openapitools.codegen.config.GlobalSettings; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.apache.commons.io.FileUtils; import java.math.BigDecimal; +import java.net.URI; import java.util.*; import java.util.Map.Entry; import java.util.stream.Collectors; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import static org.openapitools.codegen.utils.OnceLogger.once; @@ -48,6 +59,15 @@ public class ModelUtils { private static final String generateAliasAsModelKey = "generateAliasAsModel"; + private static final String openapiVersionExtension = "x-original-openapi-version"; + + private static ObjectMapper JSON_MAPPER, YAML_MAPPER; + + static { + JSON_MAPPER = ObjectMapperFactory.createJson(); + YAML_MAPPER = ObjectMapperFactory.createYaml(); + } + public static void setGenerateAliasAsModel(boolean value) { GlobalSettings.setProperty(generateAliasAsModelKey, Boolean.toString(value)); } @@ -657,122 +677,6 @@ public static boolean isModel(Schema schema) { return schema instanceof ComposedSchema; } - /** - * Return true if the schema value can be any type, i.e. it can be - * the null value, integer, number, string, object or array. - * One use case is when the "type" attribute in the OAS schema is unspecified. - * - * Examples: - * - * arbitraryTypeValue: - * description: This is an arbitrary type schema. - * It is not a free-form object. - * The value can be any type except the 'null' value. - * arbitraryTypeNullableValue: - * description: This is an arbitrary type schema. - * It is not a free-form object. - * The value can be any type, including the 'null' value. - * nullable: true - * - * @param schema the OAS schema. - * @return true if the schema value can be an arbitrary type. - */ - public static boolean isAnyTypeSchema(OpenAPI openAPI, Schema schema) { - if (schema == null) { - once(LOGGER).error("Schema cannot be null in isAnyTypeSchema check"); - return false; - } - - if (isFreeFormObject(openAPI, schema)) { - // make sure it's not free form object - return false; - } - - if (schema.getClass().equals(Schema.class) && schema.get$ref() == null && schema.getType() == null && - (schema.getProperties() == null || schema.getProperties().isEmpty()) && - schema.getAdditionalProperties() == null && schema.getNot() == null && - schema.getEnum() == null) { - return true; - // If and when type arrays are supported in a future OAS specification, - // we could return true if the type array includes all possible JSON schema types. - } - return false; - } - - /** - * Check to see if the schema is a free form object. - * - * A free form object is an object (i.e. 'type: object' in a OAS document) that: - * 1) Does not define properties, and - * 2) Is not a composed schema (no anyOf, oneOf, allOf), and - * 3) additionalproperties is not defined, or additionalproperties: true, or additionalproperties: {}. - * - * Examples: - * - * components: - * schemas: - * arbitraryObject: - * type: object - * description: This is a free-form object. - * The value must be a map of strings to values. The value cannot be 'null'. - * It cannot be array, string, integer, number. - * arbitraryNullableObject: - * type: object - * description: This is a free-form object. - * The value must be a map of strings to values. The value can be 'null', - * It cannot be array, string, integer, number. - * nullable: true - * arbitraryTypeValue: - * description: This is NOT a free-form object. - * The value can be any type except the 'null' value. - * - * @param schema potentially containing a '$ref' - * @return true if it's a free-form object - */ - public static boolean isFreeFormObject(OpenAPI openAPI, Schema schema) { - if (schema == null) { - // TODO: Is this message necessary? A null schema is not a free-form object, so the result is correct. - once(LOGGER).error("Schema cannot be null in isFreeFormObject check"); - return false; - } - - // not free-form if allOf, anyOf, oneOf is not empty - if (schema instanceof ComposedSchema) { - ComposedSchema cs = (ComposedSchema) schema; - List interfaces = getInterfaces(cs); - if (interfaces != null && !interfaces.isEmpty()) { - return false; - } - } - - // has at least one property - if ("object".equals(schema.getType())) { - // no properties - if ((schema.getProperties() == null || schema.getProperties().isEmpty())) { - Schema addlProps = getAdditionalProperties(openAPI, schema); - // additionalProperties not defined - if (addlProps == null) { - return true; - } else { - if (addlProps instanceof ObjectSchema) { - ObjectSchema objSchema = (ObjectSchema) addlProps; - // additionalProperties defined as {} - if (objSchema.getProperties() == null || objSchema.getProperties().isEmpty()) { - return true; - } - } else if (addlProps instanceof Schema) { - // additionalProperties defined as {} - if (addlProps.getType() == null && (addlProps.getProperties() == null || addlProps.getProperties().isEmpty())) { - return true; - } - } - } - } - } - - return false; - } - /** * If a Schema contains a reference to another Schema with '$ref', returns the referenced Schema if it is found or the actual Schema in the other cases. * @@ -1080,6 +984,79 @@ public static Schema unaliasSchema(OpenAPI openAPI, return schema; } + /** + * Check to see if the schema is a free form object. + * + * A free form object is an object (i.e. 'type: object' in a OAS document) that: + * 1) Does not define properties, and + * 2) Is not a composed schema (no anyOf, oneOf, allOf), and + * 3) additionalproperties is not defined, or additionalproperties: true, or additionalproperties: {}. + * + * Examples: + * + * components: + * schemas: + * arbitraryObject: + * type: object + * description: This is a free-form object. + * The value must be a map of strings to values. The value cannot be 'null'. + * It cannot be array, string, integer, number. + * arbitraryNullableObject: + * type: object + * description: This is a free-form object. + * The value must be a map of strings to values. The value can be 'null', + * It cannot be array, string, integer, number. + * nullable: true + * arbitraryTypeValue: + * description: This is NOT a free-form object. + * The value can be any type except the 'null' value. + * + * @param schema potentially containing a '$ref' + * @return true if it's a free-form object + */ + public static boolean isFreeFormObject(OpenAPI openAPI, Schema schema) { + if (schema == null) { + // TODO: Is this message necessary? A null schema is not a free-form object, so the result is correct. + once(LOGGER).error("Schema cannot be null in isFreeFormObject check"); + return false; + } + + // not free-form if allOf, anyOf, oneOf is not empty + if (schema instanceof ComposedSchema) { + ComposedSchema cs = (ComposedSchema) schema; + List interfaces = ModelUtils.getInterfaces(cs); + if (interfaces != null && !interfaces.isEmpty()) { + return false; + } + } + + // has at least one property + if ("object".equals(schema.getType())) { + // no properties + if ((schema.getProperties() == null || schema.getProperties().isEmpty())) { + Schema addlProps = getAdditionalProperties(openAPI, schema); + // additionalProperties not defined + if (addlProps == null) { + return true; + } else { + if (addlProps instanceof ObjectSchema) { + ObjectSchema objSchema = (ObjectSchema) addlProps; + // additionalProperties defined as {} + if (objSchema.getProperties() == null || objSchema.getProperties().isEmpty()) { + return true; + } + } else if (addlProps instanceof Schema) { + // additionalProperties defined as {} + if (addlProps.getType() == null && (addlProps.getProperties() == null || addlProps.getProperties().isEmpty())) { + return true; + } + } + } + } + } + return false; + } + /** * Returns the additionalProperties Schema for the specified input schema. * @@ -1102,25 +1079,41 @@ public static Schema getAdditionalProperties(OpenAPI openAPI, Schema schema) { return (Schema) addProps; } if (addProps == null) { + // Because of the https://github.com/swagger-api/swagger-parser/issues/1369 issue, + // there is a problem processing the 'additionalProperties' keyword. + // * When OAS 2.0 documents are parsed, the 'additionalProperties' keyword is ignored + // if the value is boolean. That means codegen is unable to determine whether + // additional properties are allowed or not. + // * When OAS 3.0 documents are parsed, the 'additionalProperties' keyword is properly + // parsed. + // + // The original behavior was to assume additionalProperties had been set to false. Map extensions = openAPI.getExtensions(); - if (extensions != null) { - // Get original swagger version from OAS extension. - // Note openAPI.getOpenapi() is always set to 3.x even when the document - // is converted from a OAS/Swagger 2.0 document. - // https://github.com/swagger-api/swagger-parser/pull/1374 - Object ext = extensions.get("x-original-swagger-version"); - if (ext instanceof String) { - SemVer version = new SemVer((String)ext); - if (version.major == 2) { - // The OAS version 2 parser sets Schema.additionalProperties to the null value - // even if the OAS document has additionalProperties: true|false - // So we are unable to determine if additional properties are allowed or not. - // The original behavior was to assume additionalProperties had been set to false, - // we retain that behavior. - return null; - } + if (extensions != null && extensions.containsKey("x-is-legacy-additional-properties-behavior")) { + boolean isLegacyAdditionalPropertiesBehavior = + Boolean.parseBoolean((String)extensions.get("x-is-legacy-additional-properties-behavior")); + if (isLegacyAdditionalPropertiesBehavior) { + // Legacy, non-compliant mode. If the 'additionalProperties' keyword is not present in a OAS schema, + // interpret as if the 'additionalProperties' keyword had been set to false. + return null; } } + // The 'x-is-legacy-additional-properties-behavior' extension has been set to true, + // but for now that only works with OAS 3.0 documents. + // The new behavior does not work with OAS 2.0 documents because of the + // https://github.com/swagger-api/swagger-parser/issues/1369 issue. + if (extensions == null || !extensions.containsKey(openapiVersionExtension)) { + // Fallback to the legacy behavior. + return null; + } + // Get original swagger version from OAS extension. + // Note openAPI.getOpenapi() is always set to 3.x even when the document + // is converted from a OAS/Swagger 2.0 document. + // https://github.com/swagger-api/swagger-parser/pull/1374 + SemVer version = new SemVer((String)extensions.get(openapiVersionExtension)); + if (version.major != 3) { + return null; + } } if (addProps == null || (addProps instanceof Boolean && (Boolean) addProps)) { // Return ObjectSchema to specify any object (map) value is allowed. @@ -1132,7 +1125,7 @@ public static Schema getAdditionalProperties(OpenAPI openAPI, Schema schema) { } return null; } - + public static Header getReferencedHeader(OpenAPI openAPI, Header header) { if (header != null && StringUtils.isNotEmpty(header.get$ref())) { String name = getSimpleRef(header.get$ref()); @@ -1456,4 +1449,86 @@ public static void syncValidationProperties(Schema schema, IJsonSchemaValidation if (maxProperties != null) target.setMaxProperties(maxProperties); } } + + private static ObjectMapper getRightMapper(String data) { + ObjectMapper mapper; + if(data.trim().startsWith("{")) { + mapper = JSON_MAPPER; + } else { + mapper = YAML_MAPPER; + } + return mapper; + } + + /** + * Parse and return a JsonNode representation of the input OAS document. + * + * @param location the URL of the OAS document. + * @param auths the list of authorization values to access the remote URL. + * + * @return A JsonNode representation of the input OAS document. + */ + public static JsonNode readWithInfo(String location, List auths) throws Exception { + String data; + location = location.replaceAll("\\\\","/"); + if (location.toLowerCase().startsWith("http")) { + data = RemoteUrl.urlToString(location, auths); + } else { + final String fileScheme = "file:"; + Path path; + if (location.toLowerCase().startsWith(fileScheme)) { + path = Paths.get(URI.create(location)); + } else { + path = Paths.get(location); + } + if (Files.exists(path)) { + data = FileUtils.readFileToString(path.toFile(), "UTF-8"); + } else { + data = ClasspathHelper.loadFileFromClasspath(location); + } + } + return getRightMapper(data).readTree(data); + } + + /** + * Return the version of the OAS document as specified in the source document. + * For OAS 2.0 documents, return the value of the 'swagger' attribute. + * For OAS 3.x documents, return the value of the 'openapi' attribute. + * + * @param location the URL of the OAS document. + * @param auths the list of authorization values to access the remote URL. + */ + public static SemVer getOpenApiVersion(OpenAPI openapi, String location, List auths) { + String version; + try { + JsonNode document = readWithInfo(location, auths); + JsonNode value = document.findValue("swagger"); + if (value == null) { + // This is not a OAS 2.0 document. + // Note: we cannot simply return the value of the "openapi" attribute + // because the 2.0 to 3.0 converter always sets the value to '3.0'. + value = document.findValue("openapi"); + } + version = value.asText(); + } catch (Exception ex) { + // Fallback to using the 'openapi' attribute. + LOGGER.warn("Unable to read swagger/openapi attribute"); + version = openapi.getOpenapi(); + } + return new SemVer(version); + } + + /** + * Get the original version of the OAS document as specified in the source document, + * and set the "x-original-openapi-version" with the original version. + * + * @param openapi the OpenAPI document. + * @param location the URL of the OAS document. + * @param auths the list of authorization values to access the remote URL. + * @return + */ + public static void addOpenApiVersionExtension(OpenAPI openapi, String location, List auths) { + SemVer version = getOpenApiVersion(openapi, location, auths); + openapi.addExtension(openapiVersionExtension, version.toString()); + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/SemVer.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/SemVer.java index b2b58a8da3b0..0dc350677794 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/SemVer.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/SemVer.java @@ -47,4 +47,33 @@ public boolean atLeast(String other) { public String toString() { return major + "." + minor + "." + revision; } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + major; + result = prime * result + minor; + result = prime * result + revision; + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + SemVer other = (SemVer) obj; + if (major != other.major) + return false; + if (minor != other.minor) + return false; + if (revision != other.revision) + return false; + return true; + } + } \ No newline at end of file diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index 77d93f2ed236..11d11a4e1455 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -40,6 +40,7 @@ import org.openapitools.codegen.templating.mustache.TitlecaseLambda; import org.openapitools.codegen.templating.mustache.UppercaseLambda; import org.openapitools.codegen.utils.ModelUtils; +import org.openapitools.codegen.utils.SemVer; import org.testng.Assert; import org.testng.annotations.Test; @@ -222,14 +223,26 @@ public void testFormParameterHasDefaultValue() { Assert.assertEquals(codegenParameter.defaultValue, "-efg"); } + @Test + public void testOriginalOpenApiDocumentVersion() { + // Test with OAS 2.0 document. + String location = "src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml"; + OpenAPI openAPI = TestUtils.parseFlattenSpec(location); + SemVer version = ModelUtils.getOpenApiVersion(openAPI, location, null); + Assert.assertEquals(version, new SemVer("2.0.0")); + + // Test with OAS 3.0 document. + location = "src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml"; + openAPI = TestUtils.parseFlattenSpec(location); + version = ModelUtils.getOpenApiVersion(openAPI, location, null); + Assert.assertEquals(version, new SemVer("3.0.0")); + } + @Test public void testAdditionalPropertiesV2Spec() { OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml"); - // The extension below is to track the original swagger version. - // See https://github.com/swagger-api/swagger-parser/pull/1374 - // Also see https://github.com/swagger-api/swagger-parser/issues/1369. - openAPI.addExtension("x-original-swagger-version", "2.0"); DefaultCodegen codegen = new DefaultCodegen(); + codegen.setLegacyAdditionalPropertiesBehavior(true); codegen.setOpenAPI(openAPI); Schema schema = openAPI.getComponents().getSchemas().get("AdditionalPropertiesClass"); @@ -280,6 +293,7 @@ public void testAdditionalPropertiesV2Spec() { public void testAdditionalPropertiesV3Spec() { OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml"); DefaultCodegen codegen = new DefaultCodegen(); + codegen.setLegacyAdditionalPropertiesBehavior(false); codegen.setOpenAPI(openAPI); Schema schema = openAPI.getComponents().getSchemas().get("AdditionalPropertiesClass"); @@ -324,6 +338,24 @@ public void testAdditionalPropertiesV3Spec() { Assert.assertNull(addProps); } + @Test + public void testAdditionalPropertiesV3SpecLegacy() { + OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml"); + DefaultCodegen codegen = new DefaultCodegen(); + codegen.setLegacyAdditionalPropertiesBehavior(true); + codegen.setOpenAPI(openAPI); + + Schema schema = openAPI.getComponents().getSchemas().get("AdditionalPropertiesClass"); + Assert.assertNull(schema.getAdditionalProperties()); + + // As per OAS spec, when the 'additionalProperties' keyword is not present, the schema may be + // extended with any undeclared properties. + // However, in legacy 'additionalProperties' mode, this is interpreted as + // 'no additional properties are allowed'. + Schema addProps = ModelUtils.getAdditionalProperties(openAPI, schema); + Assert.assertNull(addProps); + } + @Test public void testEnsureNoDuplicateProduces() { final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/two-responses.yaml"); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java index 077268f2408b..714558172d53 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java @@ -18,6 +18,7 @@ import io.swagger.v3.parser.core.models.ParseOptions; import org.openapitools.codegen.MockDefaultGenerator.WrittenTemplateBasedFile; +import org.openapitools.codegen.utils.ModelUtils; import org.testng.Assert; import java.io.File; @@ -52,11 +53,19 @@ public static OpenAPI parseFlattenSpec(String specFilePath) { * @return A "raw" OpenAPI document */ public static OpenAPI parseSpec(String specFilePath) { - return new OpenAPIParser().readLocation(specFilePath, null, new ParseOptions()).getOpenAPI(); + OpenAPI openAPI = new OpenAPIParser().readLocation(specFilePath, null, new ParseOptions()).getOpenAPI(); + // The extension below is to track the original swagger version. + // See https://github.com/swagger-api/swagger-parser/pull/1374 + // Also see https://github.com/swagger-api/swagger-parser/issues/1369. + ModelUtils.addOpenApiVersionExtension(openAPI, specFilePath, null); + return openAPI; } public static OpenAPI parseContent(String jsonOrYaml) { - return new OpenAPIParser().readContents(jsonOrYaml, null, null).getOpenAPI(); + OpenAPI openAPI = new OpenAPIParser().readContents(jsonOrYaml, null, null).getOpenAPI(); + // The extension below is to track the original swagger version. + ModelUtils.addOpenApiVersionExtension(openAPI, jsonOrYaml, null); + return openAPI; } public static OpenAPI createOpenAPI() { diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/BashClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/BashClientOptionsProvider.java index 45b03efcccef..901bfaf70463 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/BashClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/BashClientOptionsProvider.java @@ -71,6 +71,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartClientOptionsProvider.java index 79cf084234f1..368e1d5022e3 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartClientOptionsProvider.java @@ -63,6 +63,7 @@ public Map createOptions() { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(DartClientCodegen.SUPPORT_DART2, "false") .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java index 9e54e028f7ff..dc5f8cd783d0 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java @@ -68,6 +68,7 @@ public Map createOptions() { .put(DartDioClientCodegen.DATE_LIBRARY, DATE_LIBRARY) .put(DartDioClientCodegen.NULLABLE_FIELDS, NULLABLE_FIELDS) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ElixirClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ElixirClientOptionsProvider.java index f6efa94aa517..95f186b27f2c 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ElixirClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ElixirClientOptionsProvider.java @@ -44,6 +44,7 @@ public Map createOptions() { .put(CodegenConstants.PACKAGE_NAME, "yay_pets") .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoGinServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoGinServerOptionsProvider.java index 0684591597b1..df39bc9b02c9 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoGinServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoGinServerOptionsProvider.java @@ -39,6 +39,7 @@ public Map createOptions() { .put(CodegenConstants.ENSURE_UNIQUE_PARAMS, ENSURE_UNIQUE_PARAMS_VALUE) .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, "true") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoServerOptionsProvider.java index 767c81b336ba..d56996c4d438 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoServerOptionsProvider.java @@ -40,6 +40,7 @@ public Map createOptions() { .put(CodegenConstants.ENSURE_UNIQUE_PARAMS, ENSURE_UNIQUE_PARAMS_VALUE) .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, "true") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/HaskellServantOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/HaskellServantOptionsProvider.java index f883ebbed197..8a7459228b76 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/HaskellServantOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/HaskellServantOptionsProvider.java @@ -49,6 +49,7 @@ public Map createOptions() { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(HaskellServantCodegen.PROP_SERVE_STATIC, HaskellServantCodegen.PROP_SERVE_STATIC_DEFAULT.toString()) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpClientOptionsProvider.java index 245957be4076..0c61168604f4 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpClientOptionsProvider.java @@ -59,6 +59,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpLumenServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpLumenServerOptionsProvider.java index 97ad8132ce43..0bfe24f2fe38 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpLumenServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpLumenServerOptionsProvider.java @@ -58,6 +58,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSilexServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSilexServerOptionsProvider.java index a3f32f9b4a00..3d68f10321ac 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSilexServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSilexServerOptionsProvider.java @@ -43,6 +43,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlim4ServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlim4ServerOptionsProvider.java index 4bf91932a3f0..f4bbb41abc5a 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlim4ServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlim4ServerOptionsProvider.java @@ -61,6 +61,7 @@ public Map createOptions() { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(PhpSlim4ServerCodegen.PSR7_IMPLEMENTATION, PSR7_IMPLEMENTATION_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java index 537b7b10c664..fe41ab8ef96d 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java @@ -58,6 +58,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/RubyClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/RubyClientOptionsProvider.java index 09bd0dceabc1..db3cc18e6a84 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/RubyClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/RubyClientOptionsProvider.java @@ -67,6 +67,7 @@ public Map createOptions() { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LIBRARY, LIBRARY) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaAkkaClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaAkkaClientOptionsProvider.java index 4b982932b98a..689ef6eebef1 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaAkkaClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaAkkaClientOptionsProvider.java @@ -56,6 +56,7 @@ public Map createOptions() { .put(CodegenConstants.MODEL_PROPERTY_NAMING, MODEL_PROPERTY_NAMING) .put("dateLibrary", DATE_LIBRARY) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaHttpClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaHttpClientOptionsProvider.java index 11825e2ec129..92efba318ed6 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaHttpClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaHttpClientOptionsProvider.java @@ -53,6 +53,7 @@ public Map createOptions() { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put("dateLibrary", DATE_LIBRARY) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift4OptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift4OptionsProvider.java index aa2d61f28294..7f545974f200 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift4OptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift4OptionsProvider.java @@ -82,6 +82,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java index 58b3ae01fd3a..826affdaba6d 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java @@ -83,6 +83,7 @@ public Map createOptions() { .put(CodegenConstants.API_NAME_PREFIX, "") .put(CodegenConstants.LIBRARY, LIBRARY_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java index 51b62748e3c5..d7ccf464f80a 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java @@ -82,6 +82,7 @@ public Map createOptions() { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(TypeScriptAngularClientCodegen.FILE_NAMING, FILE_NAMING_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java index 1e008de1ed16..c87ef629bc54 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java @@ -54,6 +54,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java index 58b5aa61826a..2d39d635a104 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java @@ -60,6 +60,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java index 7bec81c9ae36..97baf5fea7a9 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java @@ -67,6 +67,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java index a2dc76d63f41..c74f404df38e 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java @@ -64,6 +64,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") .build(); } From c4d049f26d0086b0331435b097f6fdb2deca54c0 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Mon, 18 May 2020 18:27:59 -0700 Subject: [PATCH 043/105] Run sample scripts --- ...endpoints-models-for-testing-with-http-signature.yaml | 6 ++++++ .../docs/AdditionalPropertiesClass.md | 3 +++ .../client/petstore/python-experimental/docs/Drawing.md | 2 +- .../petstore/python-experimental/docs/NullableShape.md | 1 + .../petstore/python-experimental/docs/ShapeOrNull.md | 1 + .../petstore_api/models/additional_properties_class.py | 9 +++++++++ .../python-experimental/petstore_api/models/drawing.py | 4 ++-- .../petstore_api/models/nullable_shape.py | 2 +- .../petstore_api/models/shape_or_null.py | 2 +- 9 files changed, 25 insertions(+), 5 deletions(-) diff --git a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index 0d17d281f2f7..f4824e487713 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -1539,6 +1539,12 @@ components: type: object additionalProperties: type: string + anytype_1: + type: object + anytype_2: {} + anytype_3: + type: object + properties: {} MixedPropertiesAndAdditionalPropertiesClass: type: object properties: diff --git a/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md index 4df80090d8ec..39f1b70930e3 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md @@ -5,6 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **map_property** | **{str: (str,)}** | | [optional] **map_of_map_property** | **{str: ({str: (str,)},)}** | | [optional] +**anytype_1** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**anytype_2** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] +**anytype_3** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Drawing.md b/samples/openapi3/client/petstore/python-experimental/docs/Drawing.md index a42f97eb1206..1583a1dea01d 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/Drawing.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/Drawing.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **main_shape** | [**shape.Shape**](Shape.md) | | [optional] **shape_or_null** | [**shape_or_null.ShapeOrNull**](ShapeOrNull.md) | | [optional] -**nullable_shape** | [**nullable_shape.NullableShape, none_type**](NullableShape.md) | | [optional] +**nullable_shape** | [**nullable_shape.NullableShape**](NullableShape.md) | | [optional] **shapes** | [**[shape.Shape]**](Shape.md) | | [optional] **any string name** | **fruit.Fruit** | any string name can be used but the value must be the correct type | [optional] diff --git a/samples/openapi3/client/petstore/python-experimental/docs/NullableShape.md b/samples/openapi3/client/petstore/python-experimental/docs/NullableShape.md index 6b29731c533a..82b0d9494066 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/NullableShape.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/NullableShape.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **shape_type** | **str** | | **quadrilateral_type** | **str** | | defaults to nulltype.Null **triangle_type** | **str** | | defaults to nulltype.Null +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ShapeOrNull.md b/samples/openapi3/client/petstore/python-experimental/docs/ShapeOrNull.md index 990e93ee87d6..0f52dcbd3168 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/ShapeOrNull.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/ShapeOrNull.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **shape_type** | **str** | | **quadrilateral_type** | **str** | | defaults to nulltype.Null **triangle_type** | **str** | | defaults to nulltype.Null +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py index 0dc65073d31e..56d1272ca5e7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py @@ -79,6 +79,9 @@ def openapi_types(): return { 'map_property': ({str: (str,)},), # noqa: E501 'map_of_map_property': ({str: ({str: (str,)},)},), # noqa: E501 + 'anytype_1': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'anytype_2': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'anytype_3': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 } @cached_property @@ -88,6 +91,9 @@ def discriminator(): attribute_map = { 'map_property': 'map_property', # noqa: E501 'map_of_map_property': 'map_of_map_property', # noqa: E501 + 'anytype_1': 'anytype_1', # noqa: E501 + 'anytype_2': 'anytype_2', # noqa: E501 + 'anytype_3': 'anytype_3', # noqa: E501 } _composed_schemas = {} @@ -136,6 +142,9 @@ def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _conf _visited_composed_classes = (Animal,) map_property ({str: (str,)}): [optional] # noqa: E501 map_of_map_property ({str: ({str: (str,)},)}): [optional] # noqa: E501 + anytype_1 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + anytype_2 (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 + anytype_3 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 """ self._data_store = {} diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py index d809be68ac68..66f00673b8b2 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py @@ -94,7 +94,7 @@ def openapi_types(): return { 'main_shape': (shape.Shape,), # noqa: E501 'shape_or_null': (shape_or_null.ShapeOrNull,), # noqa: E501 - 'nullable_shape': (nullable_shape.NullableShape, none_type,), # noqa: E501 + 'nullable_shape': (nullable_shape.NullableShape,), # noqa: E501 'shapes': ([shape.Shape],), # noqa: E501 } @@ -155,7 +155,7 @@ def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _conf _visited_composed_classes = (Animal,) main_shape (shape.Shape): [optional] # noqa: E501 shape_or_null (shape_or_null.ShapeOrNull): [optional] # noqa: E501 - nullable_shape (nullable_shape.NullableShape, none_type): [optional] # noqa: E501 + nullable_shape (nullable_shape.NullableShape): [optional] # noqa: E501 shapes ([shape.Shape]): [optional] # noqa: E501 """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_shape.py index 5ea4593b1fae..c7859f39f7dc 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_shape.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_shape.py @@ -74,7 +74,7 @@ class NullableShape(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_or_null.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_or_null.py index 6f884f082ab5..de463e352814 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_or_null.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_or_null.py @@ -74,7 +74,7 @@ class ShapeOrNull(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 @cached_property def openapi_types(): From 98e862abc3f3a0fceed4720c09c2300182054b01 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Mon, 18 May 2020 21:28:29 -0700 Subject: [PATCH 044/105] fix javadoc issues --- .../main/java/org/openapitools/codegen/DefaultCodegen.java | 1 - .../java/org/openapitools/codegen/utils/ModelUtils.java | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 6c8e21dc4b01..dcf57e0b2637 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 @@ -6417,7 +6417,6 @@ protected boolean isFreeFormObject(Schema schema) { * any additional properties are allowed. This is equivalent to setting additionalProperties * to the boolean value True or setting additionalProperties: {} * - * @param openAPI the object that encapsulates the OAS document. * @param schema the input schema that may or may not have the additionalProperties keyword. * @return the Schema of the additionalProperties. The null value is returned if no additional * properties are allowed. 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 9a13e85370b9..b5f69d58deba 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 @@ -1011,6 +1011,7 @@ public static Schema unaliasSchema(OpenAPI openAPI, * description: This is NOT a free-form object. * The value can be any type except the 'null' value. * + * @param openAPI the object that encapsulates the OAS document. * @param schema potentially containing a '$ref' * @return true if it's a free-form object */ @@ -1466,6 +1467,8 @@ private static ObjectMapper getRightMapper(String data) { * @param location the URL of the OAS document. * @param auths the list of authorization values to access the remote URL. * + * @throws java.lang.Exception if an error occurs while retrieving the OpenAPI document. + * * @return A JsonNode representation of the input OAS document. */ public static JsonNode readWithInfo(String location, List auths) throws Exception { @@ -1495,8 +1498,11 @@ public static JsonNode readWithInfo(String location, List au * For OAS 2.0 documents, return the value of the 'swagger' attribute. * For OAS 3.x documents, return the value of the 'openapi' attribute. * + * @param openAPI the object that encapsulates the OAS document. * @param location the URL of the OAS document. * @param auths the list of authorization values to access the remote URL. + * + * @return the version of the OpenAPI document. */ public static SemVer getOpenApiVersion(OpenAPI openapi, String location, List auths) { String version; @@ -1525,7 +1531,6 @@ public static SemVer getOpenApiVersion(OpenAPI openapi, String location, List auths) { SemVer version = getOpenApiVersion(openapi, location, auths); From 86d6733f1d24229e1cc82b0a0a812a83acbf739f Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Mon, 18 May 2020 21:33:14 -0700 Subject: [PATCH 045/105] fix javadoc issues --- .../main/java/org/openapitools/codegen/utils/ModelUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 b5f69d58deba..a2ca8e5991a5 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 @@ -1504,7 +1504,7 @@ public static JsonNode readWithInfo(String location, List au * * @return the version of the OpenAPI document. */ - public static SemVer getOpenApiVersion(OpenAPI openapi, String location, List auths) { + public static SemVer getOpenApiVersion(OpenAPI openAPI, String location, List auths) { String version; try { JsonNode document = readWithInfo(location, auths); @@ -1519,7 +1519,7 @@ public static SemVer getOpenApiVersion(OpenAPI openapi, String location, List Date: Mon, 18 May 2020 21:42:28 -0700 Subject: [PATCH 046/105] Add Locale to String.toLowerCase --- .../main/java/org/openapitools/codegen/utils/ModelUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 a2ca8e5991a5..3d3e30754d31 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 @@ -1474,12 +1474,12 @@ private static ObjectMapper getRightMapper(String data) { public static JsonNode readWithInfo(String location, List auths) throws Exception { String data; location = location.replaceAll("\\\\","/"); - if (location.toLowerCase().startsWith("http")) { + if (location.toLowerCase(Locale.ROOT).startsWith("http")) { data = RemoteUrl.urlToString(location, auths); } else { final String fileScheme = "file:"; Path path; - if (location.toLowerCase().startsWith(fileScheme)) { + if (location.toLowerCase(Locale.ROOT).startsWith(fileScheme)) { path = Paths.get(URI.create(location)); } else { path = Paths.get(location); From 886d41209f384ba82455686cfa74e941640cd019 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Tue, 19 May 2020 05:32:04 +0000 Subject: [PATCH 047/105] execute sample scripts --- .../docs/AdditionalPropertiesClass.md | 2 + .../models/additional_properties_class.py | 54 ++++++++++++++++++- .../docs/AdditionalPropertiesClass.md | 2 + .../models/additional_properties_class.py | 54 ++++++++++++++++++- .../python/docs/AdditionalPropertiesClass.md | 2 + .../models/additional_properties_class.py | 54 ++++++++++++++++++- 6 files changed, 165 insertions(+), 3 deletions(-) diff --git a/samples/client/petstore/python-asyncio/docs/AdditionalPropertiesClass.md b/samples/client/petstore/python-asyncio/docs/AdditionalPropertiesClass.md index eb3e0524de1a..7b56820212d0 100644 --- a/samples/client/petstore/python-asyncio/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/python-asyncio/docs/AdditionalPropertiesClass.md @@ -11,6 +11,8 @@ Name | Type | Description | Notes **map_array_anytype** | **dict(str, list[object])** | | [optional] **map_map_string** | **dict(str, dict(str, str))** | | [optional] **map_map_anytype** | **dict(str, dict(str, object))** | | [optional] +**map_with_additional_properties** | **object** | | [optional] +**map_without_additional_properties** | **object** | | [optional] **anytype_1** | **object** | | [optional] **anytype_2** | **object** | | [optional] **anytype_3** | **object** | | [optional] diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_class.py index be4455c683bf..b3e6326015b2 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_class.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_class.py @@ -41,6 +41,8 @@ class AdditionalPropertiesClass(object): 'map_array_anytype': 'dict(str, list[object])', 'map_map_string': 'dict(str, dict(str, str))', 'map_map_anytype': 'dict(str, dict(str, object))', + 'map_with_additional_properties': 'object', + 'map_without_additional_properties': 'object', 'anytype_1': 'object', 'anytype_2': 'object', 'anytype_3': 'object' @@ -55,12 +57,14 @@ class AdditionalPropertiesClass(object): 'map_array_anytype': 'map_array_anytype', 'map_map_string': 'map_map_string', 'map_map_anytype': 'map_map_anytype', + 'map_with_additional_properties': 'map_with_additional_properties', + 'map_without_additional_properties': 'map_without_additional_properties', 'anytype_1': 'anytype_1', 'anytype_2': 'anytype_2', 'anytype_3': 'anytype_3' } - def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, anytype_1=None, anytype_2=None, anytype_3=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, map_with_additional_properties=None, map_without_additional_properties=None, anytype_1=None, anytype_2=None, anytype_3=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -74,6 +78,8 @@ def __init__(self, map_string=None, map_number=None, map_integer=None, map_boole self._map_array_anytype = None self._map_map_string = None self._map_map_anytype = None + self._map_with_additional_properties = None + self._map_without_additional_properties = None self._anytype_1 = None self._anytype_2 = None self._anytype_3 = None @@ -95,6 +101,10 @@ def __init__(self, map_string=None, map_number=None, map_integer=None, map_boole self.map_map_string = map_map_string if map_map_anytype is not None: self.map_map_anytype = map_map_anytype + if map_with_additional_properties is not None: + self.map_with_additional_properties = map_with_additional_properties + if map_without_additional_properties is not None: + self.map_without_additional_properties = map_without_additional_properties if anytype_1 is not None: self.anytype_1 = anytype_1 if anytype_2 is not None: @@ -270,6 +280,48 @@ def map_map_anytype(self, map_map_anytype): self._map_map_anytype = map_map_anytype + @property + def map_with_additional_properties(self): + """Gets the map_with_additional_properties of this AdditionalPropertiesClass. # noqa: E501 + + + :return: The map_with_additional_properties of this AdditionalPropertiesClass. # noqa: E501 + :rtype: object + """ + return self._map_with_additional_properties + + @map_with_additional_properties.setter + def map_with_additional_properties(self, map_with_additional_properties): + """Sets the map_with_additional_properties of this AdditionalPropertiesClass. + + + :param map_with_additional_properties: The map_with_additional_properties of this AdditionalPropertiesClass. # noqa: E501 + :type: object + """ + + self._map_with_additional_properties = map_with_additional_properties + + @property + def map_without_additional_properties(self): + """Gets the map_without_additional_properties of this AdditionalPropertiesClass. # noqa: E501 + + + :return: The map_without_additional_properties of this AdditionalPropertiesClass. # noqa: E501 + :rtype: object + """ + return self._map_without_additional_properties + + @map_without_additional_properties.setter + def map_without_additional_properties(self, map_without_additional_properties): + """Sets the map_without_additional_properties of this AdditionalPropertiesClass. + + + :param map_without_additional_properties: The map_without_additional_properties of this AdditionalPropertiesClass. # noqa: E501 + :type: object + """ + + self._map_without_additional_properties = map_without_additional_properties + @property def anytype_1(self): """Gets the anytype_1 of this AdditionalPropertiesClass. # noqa: E501 diff --git a/samples/client/petstore/python-tornado/docs/AdditionalPropertiesClass.md b/samples/client/petstore/python-tornado/docs/AdditionalPropertiesClass.md index eb3e0524de1a..7b56820212d0 100644 --- a/samples/client/petstore/python-tornado/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/python-tornado/docs/AdditionalPropertiesClass.md @@ -11,6 +11,8 @@ Name | Type | Description | Notes **map_array_anytype** | **dict(str, list[object])** | | [optional] **map_map_string** | **dict(str, dict(str, str))** | | [optional] **map_map_anytype** | **dict(str, dict(str, object))** | | [optional] +**map_with_additional_properties** | **object** | | [optional] +**map_without_additional_properties** | **object** | | [optional] **anytype_1** | **object** | | [optional] **anytype_2** | **object** | | [optional] **anytype_3** | **object** | | [optional] diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_class.py index be4455c683bf..b3e6326015b2 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_class.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_class.py @@ -41,6 +41,8 @@ class AdditionalPropertiesClass(object): 'map_array_anytype': 'dict(str, list[object])', 'map_map_string': 'dict(str, dict(str, str))', 'map_map_anytype': 'dict(str, dict(str, object))', + 'map_with_additional_properties': 'object', + 'map_without_additional_properties': 'object', 'anytype_1': 'object', 'anytype_2': 'object', 'anytype_3': 'object' @@ -55,12 +57,14 @@ class AdditionalPropertiesClass(object): 'map_array_anytype': 'map_array_anytype', 'map_map_string': 'map_map_string', 'map_map_anytype': 'map_map_anytype', + 'map_with_additional_properties': 'map_with_additional_properties', + 'map_without_additional_properties': 'map_without_additional_properties', 'anytype_1': 'anytype_1', 'anytype_2': 'anytype_2', 'anytype_3': 'anytype_3' } - def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, anytype_1=None, anytype_2=None, anytype_3=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, map_with_additional_properties=None, map_without_additional_properties=None, anytype_1=None, anytype_2=None, anytype_3=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -74,6 +78,8 @@ def __init__(self, map_string=None, map_number=None, map_integer=None, map_boole self._map_array_anytype = None self._map_map_string = None self._map_map_anytype = None + self._map_with_additional_properties = None + self._map_without_additional_properties = None self._anytype_1 = None self._anytype_2 = None self._anytype_3 = None @@ -95,6 +101,10 @@ def __init__(self, map_string=None, map_number=None, map_integer=None, map_boole self.map_map_string = map_map_string if map_map_anytype is not None: self.map_map_anytype = map_map_anytype + if map_with_additional_properties is not None: + self.map_with_additional_properties = map_with_additional_properties + if map_without_additional_properties is not None: + self.map_without_additional_properties = map_without_additional_properties if anytype_1 is not None: self.anytype_1 = anytype_1 if anytype_2 is not None: @@ -270,6 +280,48 @@ def map_map_anytype(self, map_map_anytype): self._map_map_anytype = map_map_anytype + @property + def map_with_additional_properties(self): + """Gets the map_with_additional_properties of this AdditionalPropertiesClass. # noqa: E501 + + + :return: The map_with_additional_properties of this AdditionalPropertiesClass. # noqa: E501 + :rtype: object + """ + return self._map_with_additional_properties + + @map_with_additional_properties.setter + def map_with_additional_properties(self, map_with_additional_properties): + """Sets the map_with_additional_properties of this AdditionalPropertiesClass. + + + :param map_with_additional_properties: The map_with_additional_properties of this AdditionalPropertiesClass. # noqa: E501 + :type: object + """ + + self._map_with_additional_properties = map_with_additional_properties + + @property + def map_without_additional_properties(self): + """Gets the map_without_additional_properties of this AdditionalPropertiesClass. # noqa: E501 + + + :return: The map_without_additional_properties of this AdditionalPropertiesClass. # noqa: E501 + :rtype: object + """ + return self._map_without_additional_properties + + @map_without_additional_properties.setter + def map_without_additional_properties(self, map_without_additional_properties): + """Sets the map_without_additional_properties of this AdditionalPropertiesClass. + + + :param map_without_additional_properties: The map_without_additional_properties of this AdditionalPropertiesClass. # noqa: E501 + :type: object + """ + + self._map_without_additional_properties = map_without_additional_properties + @property def anytype_1(self): """Gets the anytype_1 of this AdditionalPropertiesClass. # noqa: E501 diff --git a/samples/client/petstore/python/docs/AdditionalPropertiesClass.md b/samples/client/petstore/python/docs/AdditionalPropertiesClass.md index eb3e0524de1a..7b56820212d0 100644 --- a/samples/client/petstore/python/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/python/docs/AdditionalPropertiesClass.md @@ -11,6 +11,8 @@ Name | Type | Description | Notes **map_array_anytype** | **dict(str, list[object])** | | [optional] **map_map_string** | **dict(str, dict(str, str))** | | [optional] **map_map_anytype** | **dict(str, dict(str, object))** | | [optional] +**map_with_additional_properties** | **object** | | [optional] +**map_without_additional_properties** | **object** | | [optional] **anytype_1** | **object** | | [optional] **anytype_2** | **object** | | [optional] **anytype_3** | **object** | | [optional] diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python/petstore_api/models/additional_properties_class.py index be4455c683bf..b3e6326015b2 100644 --- a/samples/client/petstore/python/petstore_api/models/additional_properties_class.py +++ b/samples/client/petstore/python/petstore_api/models/additional_properties_class.py @@ -41,6 +41,8 @@ class AdditionalPropertiesClass(object): 'map_array_anytype': 'dict(str, list[object])', 'map_map_string': 'dict(str, dict(str, str))', 'map_map_anytype': 'dict(str, dict(str, object))', + 'map_with_additional_properties': 'object', + 'map_without_additional_properties': 'object', 'anytype_1': 'object', 'anytype_2': 'object', 'anytype_3': 'object' @@ -55,12 +57,14 @@ class AdditionalPropertiesClass(object): 'map_array_anytype': 'map_array_anytype', 'map_map_string': 'map_map_string', 'map_map_anytype': 'map_map_anytype', + 'map_with_additional_properties': 'map_with_additional_properties', + 'map_without_additional_properties': 'map_without_additional_properties', 'anytype_1': 'anytype_1', 'anytype_2': 'anytype_2', 'anytype_3': 'anytype_3' } - def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, anytype_1=None, anytype_2=None, anytype_3=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, map_with_additional_properties=None, map_without_additional_properties=None, anytype_1=None, anytype_2=None, anytype_3=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -74,6 +78,8 @@ def __init__(self, map_string=None, map_number=None, map_integer=None, map_boole self._map_array_anytype = None self._map_map_string = None self._map_map_anytype = None + self._map_with_additional_properties = None + self._map_without_additional_properties = None self._anytype_1 = None self._anytype_2 = None self._anytype_3 = None @@ -95,6 +101,10 @@ def __init__(self, map_string=None, map_number=None, map_integer=None, map_boole self.map_map_string = map_map_string if map_map_anytype is not None: self.map_map_anytype = map_map_anytype + if map_with_additional_properties is not None: + self.map_with_additional_properties = map_with_additional_properties + if map_without_additional_properties is not None: + self.map_without_additional_properties = map_without_additional_properties if anytype_1 is not None: self.anytype_1 = anytype_1 if anytype_2 is not None: @@ -270,6 +280,48 @@ def map_map_anytype(self, map_map_anytype): self._map_map_anytype = map_map_anytype + @property + def map_with_additional_properties(self): + """Gets the map_with_additional_properties of this AdditionalPropertiesClass. # noqa: E501 + + + :return: The map_with_additional_properties of this AdditionalPropertiesClass. # noqa: E501 + :rtype: object + """ + return self._map_with_additional_properties + + @map_with_additional_properties.setter + def map_with_additional_properties(self, map_with_additional_properties): + """Sets the map_with_additional_properties of this AdditionalPropertiesClass. + + + :param map_with_additional_properties: The map_with_additional_properties of this AdditionalPropertiesClass. # noqa: E501 + :type: object + """ + + self._map_with_additional_properties = map_with_additional_properties + + @property + def map_without_additional_properties(self): + """Gets the map_without_additional_properties of this AdditionalPropertiesClass. # noqa: E501 + + + :return: The map_without_additional_properties of this AdditionalPropertiesClass. # noqa: E501 + :rtype: object + """ + return self._map_without_additional_properties + + @map_without_additional_properties.setter + def map_without_additional_properties(self, map_without_additional_properties): + """Sets the map_without_additional_properties of this AdditionalPropertiesClass. + + + :param map_without_additional_properties: The map_without_additional_properties of this AdditionalPropertiesClass. # noqa: E501 + :type: object + """ + + self._map_without_additional_properties = map_without_additional_properties + @property def anytype_1(self): """Gets the anytype_1 of this AdditionalPropertiesClass. # noqa: E501 From 4bdf1114144164cfa95eb1bc140d21f54f0883fb Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Tue, 19 May 2020 08:17:40 -0700 Subject: [PATCH 048/105] handle additional properties --- .../openapitools/codegen/DefaultCodegen.java | 48 +------------------ .../codegen/config/CodegenConfigurator.java | 4 ++ .../docs/AdditionalPropertiesAnyType.md | 2 +- .../docs/AdditionalPropertiesArray.md | 2 +- .../docs/AdditionalPropertiesClass.md | 10 ++-- .../docs/AdditionalPropertiesObject.md | 2 +- .../petstore/python-experimental/docs/Cat.md | 1 - .../python-experimental/docs/Child.md | 1 - .../python-experimental/docs/ChildCat.md | 1 - .../python-experimental/docs/ChildDog.md | 1 - .../python-experimental/docs/ChildLizard.md | 1 - .../petstore/python-experimental/docs/Dog.md | 1 - .../python-experimental/docs/Parent.md | 1 - .../python-experimental/docs/ParentPet.md | 1 - .../models/additional_properties_any_type.py | 2 +- .../models/additional_properties_array.py | 2 +- .../models/additional_properties_class.py | 20 ++++---- .../models/additional_properties_object.py | 2 +- .../petstore_api/models/cat.py | 2 +- .../petstore_api/models/child.py | 2 +- .../petstore_api/models/child_cat.py | 2 +- .../petstore_api/models/child_dog.py | 2 +- .../petstore_api/models/child_lizard.py | 2 +- .../petstore_api/models/dog.py | 2 +- .../petstore_api/models/parent.py | 2 +- .../petstore_api/models/parent_pet.py | 2 +- 26 files changed, 34 insertions(+), 84 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index dcf57e0b2637..ee026429960c 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 @@ -6422,53 +6422,7 @@ protected boolean isFreeFormObject(Schema schema) { * properties are allowed. */ protected Schema getAdditionalProperties(Schema schema) { - ModelUtils.getAdditionalProperties(openAPI, schema); - Object addProps = schema.getAdditionalProperties(); - if (addProps instanceof Schema) { - return (Schema) addProps; - } - if (this.getLegacyAdditionalPropertiesBehavior()) { - // Legacy, non-compliant mode. If the 'additionalProperties' keyword is not present in a OAS schema, - // interpret as if the 'additionalProperties' keyword had been set to false. - if (addProps instanceof Boolean && (Boolean) addProps) { - // Return ObjectSchema to specify any object (map) value is allowed. - // Set nullable to specify the value of additional properties may be - // the null value. - // Free-form additionalProperties don't need to have an inner - // additional properties, the type is already free-form. - return new ObjectSchema().additionalProperties(Boolean.FALSE).nullable(Boolean.TRUE); - } - } - if (addProps == null) { - Map extensions = openAPI.getExtensions(); - if (extensions != null) { - // Get original swagger version from OAS extension. - // Note openAPI.getOpenapi() is always set to 3.x even when the document - // is converted from a OAS/Swagger 2.0 document. - // https://github.com/swagger-api/swagger-parser/pull/1374 - Object ext = extensions.get("x-original-openapi-version"); - if (ext instanceof String) { - SemVer version = new SemVer((String)ext); - if (version.major == 2) { - // The OAS version 2 parser sets Schema.additionalProperties to the null value - // even if the OAS document has additionalProperties: true|false - // So we are unable to determine if additional properties are allowed or not. - // The original behavior was to assume additionalProperties had been set to false, - // we retain that behavior. - return null; - } - } - } - } - if (addProps == null || (addProps instanceof Boolean && (Boolean) addProps)) { - // Return ObjectSchema to specify any object (map) value is allowed. - // Set nullable to specify the value of additional properties may be - // the null value. - // Free-form additionalProperties don't need to have an inner - // additional properties, the type is already free-form. - return new ObjectSchema().additionalProperties(Boolean.FALSE).nullable(Boolean.TRUE); - } - return null; + return ModelUtils.getAdditionalProperties(openAPI, schema); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java index 840790ed4c8d..3456b2fc41e0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java @@ -463,6 +463,10 @@ public Context toContext() { // TODO: Move custom validations to a separate type as part of a "Workflow" Set validationMessages = new HashSet<>(result.getMessages()); OpenAPI specification = result.getOpenAPI(); + // The line below could be removed when at least one of the issue below has been resolved. + // https://github.com/swagger-api/swagger-parser/issues/1369 + // https://github.com/swagger-api/swagger-parser/pull/1374 + ModelUtils.addOpenApiVersionExtension(specification, inputSpec, authorizationValues); // NOTE: We will only expose errors+warnings if there are already errors in the spec. if (validationMessages.size() > 0) { diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesAnyType.md index 62eee911ea26..d27928ab7527 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesAnyType.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] -**any string name** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | any string name can be used but the value must be the correct type | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesArray.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesArray.md index 46be89a5b23e..6eac3ace2eca 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesArray.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] -**any string name** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]** | any string name can be used but the value must be the correct type | [optional] +**any string name** | **[bool, date, datetime, dict, float, int, list, str]** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md index cf00d9d4c816..4b232aa174af 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md @@ -8,12 +8,12 @@ Name | Type | Description | Notes **map_integer** | **{str: (int,)}** | | [optional] **map_boolean** | **{str: (bool,)}** | | [optional] **map_array_integer** | **{str: ([int],)}** | | [optional] -**map_array_anytype** | **{str: ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],)}** | | [optional] +**map_array_anytype** | **{str: ([bool, date, datetime, dict, float, int, list, str],)}** | | [optional] **map_map_string** | **{str: ({str: (str,)},)}** | | [optional] -**map_map_anytype** | **{str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)}** | | [optional] -**anytype_1** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] -**anytype_2** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] -**anytype_3** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**map_map_anytype** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)}** | | [optional] +**anytype_1** | **bool, date, datetime, dict, float, int, list, str** | | [optional] +**anytype_2** | **bool, date, datetime, dict, float, int, list, str** | | [optional] +**anytype_3** | **bool, date, datetime, dict, float, int, list, str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesObject.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesObject.md index 15763836ddb1..36026fe72f82 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesObject.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] -**any string name** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}** | any string name can be used but the value must be the correct type | [optional] +**any string name** | **{str: (bool, date, datetime, dict, float, int, list, str,)}** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/Cat.md b/samples/client/petstore/python-experimental/docs/Cat.md index 846a97c82a84..1d7b5b26d715 100644 --- a/samples/client/petstore/python-experimental/docs/Cat.md +++ b/samples/client/petstore/python-experimental/docs/Cat.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes **class_name** | **str** | | **declawed** | **bool** | | [optional] **color** | **str** | | [optional] if omitted the server will use the default value of 'red' -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/Child.md b/samples/client/petstore/python-experimental/docs/Child.md index 4e43e94825b7..bc3c7f3922d3 100644 --- a/samples/client/petstore/python-experimental/docs/Child.md +++ b/samples/client/petstore/python-experimental/docs/Child.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes **radio_waves** | **bool** | | [optional] **tele_vision** | **bool** | | [optional] **inter_net** | **bool** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/ChildCat.md b/samples/client/petstore/python-experimental/docs/ChildCat.md index bee23082474c..8f5ea4b2ced0 100644 --- a/samples/client/petstore/python-experimental/docs/ChildCat.md +++ b/samples/client/petstore/python-experimental/docs/ChildCat.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pet_type** | **str** | | **name** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/ChildDog.md b/samples/client/petstore/python-experimental/docs/ChildDog.md index 631b0362886c..2680d987a452 100644 --- a/samples/client/petstore/python-experimental/docs/ChildDog.md +++ b/samples/client/petstore/python-experimental/docs/ChildDog.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pet_type** | **str** | | **bark** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/ChildLizard.md b/samples/client/petstore/python-experimental/docs/ChildLizard.md index 2e315eb2f21b..97b8891a27e2 100644 --- a/samples/client/petstore/python-experimental/docs/ChildLizard.md +++ b/samples/client/petstore/python-experimental/docs/ChildLizard.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pet_type** | **str** | | **loves_rocks** | **bool** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/Dog.md b/samples/client/petstore/python-experimental/docs/Dog.md index 4c0497d67698..ec98b99dcec5 100644 --- a/samples/client/petstore/python-experimental/docs/Dog.md +++ b/samples/client/petstore/python-experimental/docs/Dog.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes **class_name** | **str** | | **breed** | **str** | | [optional] **color** | **str** | | [optional] if omitted the server will use the default value of 'red' -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/Parent.md b/samples/client/petstore/python-experimental/docs/Parent.md index 74beb2c531ce..2437d3c81ac9 100644 --- a/samples/client/petstore/python-experimental/docs/Parent.md +++ b/samples/client/petstore/python-experimental/docs/Parent.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **radio_waves** | **bool** | | [optional] **tele_vision** | **bool** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/ParentPet.md b/samples/client/petstore/python-experimental/docs/ParentPet.md index 78693cf8f0e6..12bfa5c7fe5c 100644 --- a/samples/client/petstore/python-experimental/docs/ParentPet.md +++ b/samples/client/petstore/python-experimental/docs/ParentPet.md @@ -4,7 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pet_type** | **str** | | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py index 8e2932ce5925..4fec91d87358 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py @@ -64,7 +64,7 @@ class AdditionalPropertiesAnyType(ModelNormal): validations = { } - additional_properties_type = ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},) # noqa: E501 + additional_properties_type = (bool, date, datetime, dict, float, int, list, str,) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py index 3664cdd79071..345d5c970c9c 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py @@ -64,7 +64,7 @@ class AdditionalPropertiesArray(ModelNormal): validations = { } - additional_properties_type = ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],) # noqa: E501 + additional_properties_type = ([bool, date, datetime, dict, float, int, list, str],) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py index 0c8f013cd486..4ef564793dc0 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py @@ -82,12 +82,12 @@ def openapi_types(): 'map_integer': ({str: (int,)},), # noqa: E501 'map_boolean': ({str: (bool,)},), # noqa: E501 'map_array_integer': ({str: ([int],)},), # noqa: E501 - 'map_array_anytype': ({str: ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],)},), # noqa: E501 + 'map_array_anytype': ({str: ([bool, date, datetime, dict, float, int, list, str],)},), # noqa: E501 'map_map_string': ({str: ({str: (str,)},)},), # noqa: E501 - 'map_map_anytype': ({str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)},), # noqa: E501 - 'anytype_1': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'anytype_2': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'anytype_3': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'map_map_anytype': ({str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)},), # noqa: E501 + 'anytype_1': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 + 'anytype_2': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 + 'anytype_3': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 } @cached_property @@ -157,12 +157,12 @@ def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _conf map_integer ({str: (int,)}): [optional] # noqa: E501 map_boolean ({str: (bool,)}): [optional] # noqa: E501 map_array_integer ({str: ([int],)}): [optional] # noqa: E501 - map_array_anytype ({str: ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],)}): [optional] # noqa: E501 + map_array_anytype ({str: ([bool, date, datetime, dict, float, int, list, str],)}): [optional] # noqa: E501 map_map_string ({str: ({str: (str,)},)}): [optional] # noqa: E501 - map_map_anytype ({str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)}): [optional] # noqa: E501 - anytype_1 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 - anytype_2 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 - anytype_3 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + map_map_anytype ({str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)}): [optional] # noqa: E501 + anytype_1 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 + anytype_2 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 + anytype_3 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 """ self._data_store = {} diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py index 38483bcfd925..749e3ada66e5 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py @@ -64,7 +64,7 @@ class AdditionalPropertiesObject(ModelNormal): validations = { } - additional_properties_type = ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},) # noqa: E501 + additional_properties_type = ({str: (bool, date, datetime, dict, float, int, list, str,)},) # noqa: E501 @cached_property def openapi_types(): diff --git a/samples/client/petstore/python-experimental/petstore_api/models/cat.py b/samples/client/petstore/python-experimental/petstore_api/models/cat.py index a947a3f1ce17..bb0b08667d24 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/cat.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/cat.py @@ -74,7 +74,7 @@ class Cat(ModelComposed): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None @cached_property def openapi_types(): diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child.py b/samples/client/petstore/python-experimental/petstore_api/models/child.py index e250585bd018..3587e28fdcb7 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child.py @@ -74,7 +74,7 @@ class Child(ModelComposed): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None @cached_property def openapi_types(): diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py b/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py index f2f66828aa2f..f382aa023ce4 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py @@ -74,7 +74,7 @@ class ChildCat(ModelComposed): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None @cached_property def openapi_types(): diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py b/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py index f3f1fc4104a4..c95da553350a 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py @@ -74,7 +74,7 @@ class ChildDog(ModelComposed): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None @cached_property def openapi_types(): diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py index 1c0c437e28b0..04b98e500c43 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py @@ -74,7 +74,7 @@ class ChildLizard(ModelComposed): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None @cached_property def openapi_types(): diff --git a/samples/client/petstore/python-experimental/petstore_api/models/dog.py b/samples/client/petstore/python-experimental/petstore_api/models/dog.py index fc05f2889898..de8d27972b1a 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/dog.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/dog.py @@ -74,7 +74,7 @@ class Dog(ModelComposed): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None @cached_property def openapi_types(): diff --git a/samples/client/petstore/python-experimental/petstore_api/models/parent.py b/samples/client/petstore/python-experimental/petstore_api/models/parent.py index 50c99bdf0727..16bb62ed0fbd 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/parent.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/parent.py @@ -74,7 +74,7 @@ class Parent(ModelComposed): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None @cached_property def openapi_types(): diff --git a/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py b/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py index c463a789b710..5012af9ae1b0 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py @@ -84,7 +84,7 @@ class ParentPet(ModelComposed): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None @cached_property def openapi_types(): From b05b4150b8c7e99d34bb6c6658a5da400ff2bac9 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Tue, 19 May 2020 17:34:03 +0000 Subject: [PATCH 049/105] Add code comments --- .../java/org/openapitools/codegen/CodegenConstants.java | 6 ++++-- .../main/java/org/openapitools/codegen/DefaultCodegen.java | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java index 6ac76d37cbfc..575d4464a21d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java @@ -363,8 +363,10 @@ public static enum ENUM_PROPERTY_NAMING_TYPE {camelCase, PascalCase, snake_case, // on swagger-api/swagger-parser issue https://github.com/swagger-api/swagger-parser/issues/1369. // When that issue is resolved, this parameter should be removed. public static final String LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR = "legacyAdditionalPropertiesBehavior"; - public static final String LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR_DESC = "If true, the 'additionalProperties' keyword is implemented as specified in the OAS and JSON schema specifications. " + - "This is currently not supported when the input document is based on the OpenAPI 2.0 schema. " + + public static final String LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR_DESC = + "If true, the 'additionalProperties' keyword is implemented as specified in the OAS and JSON schema specifications. " + + "Full compliance currently works with OAS 3.0 documents only. " + + "It is not supported for 2.0 documents until issues #1369 and #1371 have been resolved in the dependent swagger-parser project. " + "If false, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. " + "In the non-compliant mode, codegen uses the following interpretation: " + "1) In a OpenAPI 2.0 document, boolean values of the 'additionalProperties' keyword are ignored." + 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 ee026429960c..19810521a315 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 @@ -723,6 +723,9 @@ public String toEnumVarName(String value, String datatype) { @Override public void setOpenAPI(OpenAPI openAPI) { this.openAPI = openAPI; + // Set vendor extension such that helper functions can lookup the value + // of this CLI option. The code below can be removed when issues #1369 and #1371 + // have been resolved at https://github.com/swagger-api/swagger-parser. this.openAPI.addExtension("x-is-legacy-additional-properties-behavior", Boolean.toString(getLegacyAdditionalPropertiesBehavior())); } From f57338d2110e0694dec7c0e07c9966c914c74359 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Tue, 19 May 2020 13:34:51 -0700 Subject: [PATCH 050/105] Handle imports of referenced models in additional properties --- .../PythonClientExperimentalCodegen.java | 35 +++++++++++++++---- .../petstore_api/models/drawing.py | 5 +++ 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java index 085bd92aca65..41017200a946 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java @@ -50,6 +50,8 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { private static final Logger LOGGER = LoggerFactory.getLogger(PythonClientExperimentalCodegen.class); + private static final String referencedModelNamesExtension = "x-python-referenced-model-names"; + public PythonClientExperimentalCodegen() { super(); @@ -361,7 +363,9 @@ private void fixModelImports(Set imports) { } } - // override with any special post-processing for all models + /** + * Override with special post-processing for all models. + */ @SuppressWarnings({"static-method", "unchecked"}) public Map postProcessAllModels(Map objs) { // loop through all models and delete ones where type!=object and the model has no validations and enums @@ -373,6 +377,14 @@ public Map postProcessAllModels(Map objs) { for (Map mo : models) { CodegenModel cm = (CodegenModel) mo.get("model"); + // Make sure the models listed in 'additionalPropertiesType' are included in imports. + List refModelNames = (List) cm.vendorExtensions.get(referencedModelNamesExtension); + if (refModelNames != null) { + for (String refModelName : refModelNames) { + cm.imports.add(refModelName); + } + } + // make sure discriminator models are included in imports CodegenDiscriminator discriminator = cm.discriminator; if (discriminator != null) { @@ -901,9 +913,11 @@ public String getSimpleTypeDeclaration(Schema schema) { * @param p The OAS schema. * @param prefix prepended to the returned value. * @param suffix appended to the returned value. + * @param referencedModelNames a list of models that are being referenced while generating the types, + * may be used to generate imports. * @return a comma-separated string representation of the Python types */ - private String getTypeString(Schema p, String prefix, String suffix) { + private String getTypeString(Schema p, String prefix, String suffix, List referencedModelNames) { // this is used to set dataType, which defines a python tuple of classes String fullSuffix = suffix; if (")".equals(suffix)) { @@ -915,6 +929,9 @@ private String getTypeString(Schema p, String prefix, String suffix) { Schema s = ModelUtils.getReferencedSchema(this.openAPI, p); if (s instanceof ComposedSchema) { String modelName = ModelUtils.getSimpleRef(p.get$ref()); + if (referencedModelNames != null) { + referencedModelNames.add(modelName); + } return prefix + toModelName(modelName) + fullSuffix; } } @@ -930,7 +947,7 @@ private String getTypeString(Schema p, String prefix, String suffix) { } if ((ModelUtils.isMapSchema(p) || "object".equals(p.getType())) && getAdditionalProperties(p) != null) { Schema inner = getAdditionalProperties(p); - return prefix + "{str: " + getTypeString(inner, "(", ")") + "}" + fullSuffix; + return prefix + "{str: " + getTypeString(inner, "(", ")", referencedModelNames) + "}" + fullSuffix; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; Schema inner = ap.getItems(); @@ -943,9 +960,9 @@ private String getTypeString(Schema p, String prefix, String suffix) { // "[bool, date, datetime, dict, float, int, list, str, none_type]" // Using recursion to wrap the allowed python types in an array. Schema anyType = new Schema(); // A Schema without any attribute represents 'any type'. - return getTypeString(anyType, "[", "]"); + return getTypeString(anyType, "[", "]", referencedModelNames); } else { - return prefix + getTypeString(inner, "[", "]") + fullSuffix; + return prefix + getTypeString(inner, "[", "]", referencedModelNames) + fullSuffix; } } if (ModelUtils.isFileSchema(p)) { @@ -967,7 +984,7 @@ public String getTypeDeclaration(Schema p) { // in Python we will wrap this in () to make it a tuple but here we // will omit the parens so the generated documentaion will not include // them - return getTypeString(p, "", ""); + return getTypeString(p, "", "", null); } @Override @@ -986,7 +1003,11 @@ protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Sc // store it in codegenModel.additionalPropertiesType. // The 'addProps' may be a reference, getTypeDeclaration will resolve // the reference. - codegenModel.additionalPropertiesType = getTypeDeclaration(addProps); + List referencedModelNames = new ArrayList(); + codegenModel.additionalPropertiesType = getTypeString(addProps, "", "", referencedModelNames); + if (referencedModelNames.size() != 0) { + codegenModel.vendorExtensions.put(referencedModelNamesExtension, referencedModelNames); + } } // If addProps is null, the value of the 'additionalProperties' keyword is set // to false, i.e. no additional properties are allowed. diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py index 66f00673b8b2..8b81b46da6ff 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py @@ -32,6 +32,11 @@ str, validate_get_composed_info, ) +try: + from petstore_api.models import fruit +except ImportError: + fruit = sys.modules[ + 'petstore_api.models.fruit'] try: from petstore_api.models import nullable_shape except ImportError: From be49ab4b3f75b2861c46a87e79ae9fe98affd0fa Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Tue, 19 May 2020 15:43:39 -0700 Subject: [PATCH 051/105] Handle isNullable class --- .../main/java/org/openapitools/codegen/DefaultCodegen.java | 4 ++++ .../python-experimental/model_templates/classvars.mustache | 2 ++ .../resources/python/python-experimental/model_utils.mustache | 2 +- .../petstore/python-experimental/petstore_api/model_utils.py | 2 +- .../petstore_api/models/additional_properties_any_type.py | 2 ++ .../petstore_api/models/additional_properties_array.py | 2 ++ .../petstore_api/models/additional_properties_boolean.py | 2 ++ .../petstore_api/models/additional_properties_class.py | 2 ++ .../petstore_api/models/additional_properties_integer.py | 2 ++ .../petstore_api/models/additional_properties_number.py | 2 ++ .../petstore_api/models/additional_properties_object.py | 2 ++ .../petstore_api/models/additional_properties_string.py | 2 ++ .../python-experimental/petstore_api/models/animal.py | 2 ++ .../python-experimental/petstore_api/models/api_response.py | 2 ++ .../petstore_api/models/array_of_array_of_number_only.py | 2 ++ .../petstore_api/models/array_of_number_only.py | 2 ++ .../python-experimental/petstore_api/models/array_test.py | 2 ++ .../python-experimental/petstore_api/models/capitalization.py | 2 ++ .../petstore/python-experimental/petstore_api/models/cat.py | 2 ++ .../python-experimental/petstore_api/models/cat_all_of.py | 2 ++ .../python-experimental/petstore_api/models/category.py | 2 ++ .../petstore/python-experimental/petstore_api/models/child.py | 2 ++ .../python-experimental/petstore_api/models/child_all_of.py | 2 ++ .../python-experimental/petstore_api/models/child_cat.py | 2 ++ .../petstore_api/models/child_cat_all_of.py | 2 ++ .../python-experimental/petstore_api/models/child_dog.py | 2 ++ .../petstore_api/models/child_dog_all_of.py | 2 ++ .../python-experimental/petstore_api/models/child_lizard.py | 2 ++ .../petstore_api/models/child_lizard_all_of.py | 2 ++ .../python-experimental/petstore_api/models/class_model.py | 2 ++ .../python-experimental/petstore_api/models/client.py | 2 ++ .../petstore/python-experimental/petstore_api/models/dog.py | 2 ++ .../python-experimental/petstore_api/models/dog_all_of.py | 2 ++ .../python-experimental/petstore_api/models/enum_arrays.py | 2 ++ .../python-experimental/petstore_api/models/enum_class.py | 2 ++ .../python-experimental/petstore_api/models/enum_test.py | 2 ++ .../petstore/python-experimental/petstore_api/models/file.py | 2 ++ .../petstore_api/models/file_schema_test_class.py | 2 ++ .../python-experimental/petstore_api/models/format_test.py | 2 ++ .../python-experimental/petstore_api/models/grandparent.py | 2 ++ .../petstore_api/models/grandparent_animal.py | 2 ++ .../petstore_api/models/has_only_read_only.py | 2 ++ .../petstore/python-experimental/petstore_api/models/list.py | 2 ++ .../python-experimental/petstore_api/models/map_test.py | 2 ++ .../mixed_properties_and_additional_properties_class.py | 2 ++ .../petstore_api/models/model200_response.py | 2 ++ .../python-experimental/petstore_api/models/model_return.py | 2 ++ .../petstore/python-experimental/petstore_api/models/name.py | 2 ++ .../python-experimental/petstore_api/models/number_only.py | 2 ++ .../petstore/python-experimental/petstore_api/models/order.py | 2 ++ .../petstore_api/models/outer_composite.py | 2 ++ .../python-experimental/petstore_api/models/outer_enum.py | 2 ++ .../python-experimental/petstore_api/models/outer_number.py | 2 ++ .../python-experimental/petstore_api/models/parent.py | 2 ++ .../python-experimental/petstore_api/models/parent_all_of.py | 2 ++ .../python-experimental/petstore_api/models/parent_pet.py | 2 ++ .../petstore/python-experimental/petstore_api/models/pet.py | 2 ++ .../python-experimental/petstore_api/models/player.py | 2 ++ .../petstore_api/models/read_only_first.py | 2 ++ .../petstore_api/models/special_model_name.py | 2 ++ .../petstore_api/models/string_boolean_map.py | 2 ++ .../petstore/python-experimental/petstore_api/models/tag.py | 2 ++ .../petstore_api/models/type_holder_default.py | 2 ++ .../petstore_api/models/type_holder_example.py | 2 ++ .../petstore/python-experimental/petstore_api/models/user.py | 2 ++ .../python-experimental/petstore_api/models/xml_item.py | 2 ++ .../petstore/python-experimental/petstore_api/model_utils.py | 2 +- .../petstore_api/models/additional_properties_class.py | 2 ++ .../python-experimental/petstore_api/models/address.py | 2 ++ .../python-experimental/petstore_api/models/animal.py | 2 ++ .../python-experimental/petstore_api/models/api_response.py | 2 ++ .../petstore/python-experimental/petstore_api/models/apple.py | 2 ++ .../python-experimental/petstore_api/models/apple_req.py | 2 ++ .../petstore_api/models/array_of_array_of_number_only.py | 2 ++ .../petstore_api/models/array_of_number_only.py | 2 ++ .../python-experimental/petstore_api/models/array_test.py | 2 ++ .../python-experimental/petstore_api/models/banana.py | 2 ++ .../python-experimental/petstore_api/models/banana_req.py | 2 ++ .../petstore_api/models/biology_chordate.py | 2 ++ .../petstore_api/models/biology_hominid.py | 2 ++ .../python-experimental/petstore_api/models/biology_mammal.py | 2 ++ .../petstore_api/models/biology_primate.py | 2 ++ .../petstore_api/models/biology_reptile.py | 2 ++ .../python-experimental/petstore_api/models/capitalization.py | 2 ++ .../petstore/python-experimental/petstore_api/models/cat.py | 2 ++ .../python-experimental/petstore_api/models/cat_all_of.py | 2 ++ .../python-experimental/petstore_api/models/category.py | 2 ++ .../python-experimental/petstore_api/models/class_model.py | 2 ++ .../python-experimental/petstore_api/models/client.py | 2 ++ .../petstore_api/models/complex_quadrilateral.py | 2 ++ .../petstore/python-experimental/petstore_api/models/dog.py | 2 ++ .../python-experimental/petstore_api/models/dog_all_of.py | 2 ++ .../python-experimental/petstore_api/models/drawing.py | 2 ++ .../python-experimental/petstore_api/models/enum_arrays.py | 2 ++ .../python-experimental/petstore_api/models/enum_class.py | 2 ++ .../python-experimental/petstore_api/models/enum_test.py | 2 ++ .../petstore_api/models/equilateral_triangle.py | 2 ++ .../petstore/python-experimental/petstore_api/models/file.py | 2 ++ .../petstore_api/models/file_schema_test_class.py | 2 ++ .../petstore/python-experimental/petstore_api/models/foo.py | 2 ++ .../python-experimental/petstore_api/models/format_test.py | 2 ++ .../petstore/python-experimental/petstore_api/models/fruit.py | 2 ++ .../python-experimental/petstore_api/models/fruit_req.py | 2 ++ .../python-experimental/petstore_api/models/gm_fruit.py | 2 ++ .../petstore_api/models/has_only_read_only.py | 2 ++ .../petstore_api/models/health_check_result.py | 2 ++ .../python-experimental/petstore_api/models/inline_object.py | 2 ++ .../python-experimental/petstore_api/models/inline_object1.py | 2 ++ .../python-experimental/petstore_api/models/inline_object2.py | 2 ++ .../python-experimental/petstore_api/models/inline_object3.py | 2 ++ .../python-experimental/petstore_api/models/inline_object4.py | 2 ++ .../python-experimental/petstore_api/models/inline_object5.py | 2 ++ .../petstore_api/models/inline_response_default.py | 2 ++ .../petstore_api/models/isosceles_triangle.py | 2 ++ .../petstore/python-experimental/petstore_api/models/list.py | 2 ++ .../python-experimental/petstore_api/models/mammal.py | 2 ++ .../python-experimental/petstore_api/models/map_test.py | 2 ++ .../mixed_properties_and_additional_properties_class.py | 2 ++ .../petstore_api/models/model200_response.py | 2 ++ .../python-experimental/petstore_api/models/model_return.py | 2 ++ .../petstore/python-experimental/petstore_api/models/name.py | 2 ++ .../python-experimental/petstore_api/models/nullable_class.py | 2 ++ .../python-experimental/petstore_api/models/nullable_shape.py | 2 ++ .../python-experimental/petstore_api/models/number_only.py | 2 ++ .../petstore/python-experimental/petstore_api/models/order.py | 2 ++ .../petstore_api/models/outer_composite.py | 2 ++ .../python-experimental/petstore_api/models/outer_enum.py | 2 ++ .../petstore_api/models/outer_enum_default_value.py | 2 ++ .../petstore_api/models/outer_enum_integer.py | 2 ++ .../petstore_api/models/outer_enum_integer_default_value.py | 2 ++ .../petstore/python-experimental/petstore_api/models/pet.py | 2 ++ .../python-experimental/petstore_api/models/quadrilateral.py | 2 ++ .../petstore_api/models/quadrilateral_interface.py | 2 ++ .../petstore_api/models/read_only_first.py | 2 ++ .../petstore_api/models/scalene_triangle.py | 2 ++ .../petstore/python-experimental/petstore_api/models/shape.py | 2 ++ .../petstore_api/models/shape_interface.py | 2 ++ .../python-experimental/petstore_api/models/shape_or_null.py | 2 ++ .../petstore_api/models/simple_quadrilateral.py | 2 ++ .../petstore_api/models/special_model_name.py | 2 ++ .../petstore_api/models/string_boolean_map.py | 2 ++ .../petstore/python-experimental/petstore_api/models/tag.py | 2 ++ .../python-experimental/petstore_api/models/triangle.py | 2 ++ .../petstore_api/models/triangle_interface.py | 2 ++ .../petstore/python-experimental/petstore_api/models/user.py | 2 ++ .../petstore/python-experimental/petstore_api/models/whale.py | 2 ++ .../petstore/python-experimental/petstore_api/models/zebra.py | 2 ++ 147 files changed, 293 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 19810521a315..4e96356ca50f 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 @@ -2428,6 +2428,10 @@ public CodegenModel fromModel(String name, Schema schema) { // 'Codegen.parent' to the first child schema of the 'allOf' schema. addAdditionPropertiesToCodeGenModel(m, schema); } + + if (Boolean.TRUE.equals(schema.getNullable())) { + m.isNullable = Boolean.TRUE; + } // end of code block for composed schema } else { m.dataType = getSchemaType(schema); diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/classvars.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/classvars.mustache index 471c16c10a96..9fc3f83433a8 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/classvars.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/classvars.mustache @@ -100,6 +100,8 @@ additional_properties_type = {{#additionalPropertiesType}}({{{additionalPropertiesType}}},) # noqa: E501{{/additionalPropertiesType}}{{^additionalPropertiesType}}None{{/additionalPropertiesType}} + _nullable = {{#isNullable}}True{{/isNullable}}{{^isNullable}}False{{/isNullable}} + @cached_property def openapi_types(): """ diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache index 1c163a915a23..af6e0f32538a 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache @@ -928,7 +928,7 @@ def is_type_nullable(input_type): Returns: bool """ - if input_type is none_type: + if input_type is none_type or input_type._nullable: return True if issubclass(input_type, ModelComposed): # If oneOf/anyOf, check if the 'null' type is one of the allowed types. diff --git a/samples/client/petstore/python-experimental/petstore_api/model_utils.py b/samples/client/petstore/python-experimental/petstore_api/model_utils.py index baf22c61d192..d1b74a5df844 100644 --- a/samples/client/petstore/python-experimental/petstore_api/model_utils.py +++ b/samples/client/petstore/python-experimental/petstore_api/model_utils.py @@ -1195,7 +1195,7 @@ def is_type_nullable(input_type): Returns: bool """ - if input_type is none_type: + if input_type is none_type or input_type._nullable: return True if issubclass(input_type, ModelComposed): # If oneOf/anyOf, check if the 'null' type is one of the allowed types. diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py index 4fec91d87358..bd6a44a0f9f4 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py @@ -66,6 +66,8 @@ class AdditionalPropertiesAnyType(ModelNormal): additional_properties_type = (bool, date, datetime, dict, float, int, list, str,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py index 345d5c970c9c..cc4654bf99cb 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py @@ -66,6 +66,8 @@ class AdditionalPropertiesArray(ModelNormal): additional_properties_type = ([bool, date, datetime, dict, float, int, list, str],) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_boolean.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_boolean.py index 22b604b631f7..ec59cff57fd7 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_boolean.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_boolean.py @@ -66,6 +66,8 @@ class AdditionalPropertiesBoolean(ModelNormal): additional_properties_type = (bool,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py index 4ef564793dc0..14479b04c10c 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py @@ -66,6 +66,8 @@ class AdditionalPropertiesClass(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_integer.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_integer.py index c309826f2e82..32e75b99d0c5 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_integer.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_integer.py @@ -66,6 +66,8 @@ class AdditionalPropertiesInteger(ModelNormal): additional_properties_type = (int,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_number.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_number.py index 8bbd629023ea..b85acf7cee64 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_number.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_number.py @@ -66,6 +66,8 @@ class AdditionalPropertiesNumber(ModelNormal): additional_properties_type = (float,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py index 749e3ada66e5..2a60e948cf71 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py @@ -66,6 +66,8 @@ class AdditionalPropertiesObject(ModelNormal): additional_properties_type = ({str: (bool, date, datetime, dict, float, int, list, str,)},) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_string.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_string.py index 88fb6a5e15bc..c88e688698c1 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_string.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_string.py @@ -66,6 +66,8 @@ class AdditionalPropertiesString(ModelNormal): additional_properties_type = (str,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/animal.py b/samples/client/petstore/python-experimental/petstore_api/models/animal.py index dc87c6bf9e14..dc2ceeabbe6a 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/animal.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/animal.py @@ -76,6 +76,8 @@ class Animal(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/api_response.py b/samples/client/petstore/python-experimental/petstore_api/models/api_response.py index aa85a8d32c8e..86fffc9425a1 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/api_response.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/api_response.py @@ -66,6 +66,8 @@ class ApiResponse(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py b/samples/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py index 8648ca8e101e..8c7543dcfbb4 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py @@ -66,6 +66,8 @@ class ArrayOfArrayOfNumberOnly(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py b/samples/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py index b457b27a8cb5..eff67c1208d6 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py @@ -66,6 +66,8 @@ class ArrayOfNumberOnly(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/array_test.py b/samples/client/petstore/python-experimental/petstore_api/models/array_test.py index 3733298e843c..dc9429e91220 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/array_test.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/array_test.py @@ -71,6 +71,8 @@ class ArrayTest(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/capitalization.py b/samples/client/petstore/python-experimental/petstore_api/models/capitalization.py index 3ca42fba60be..7477b0c6fbab 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/capitalization.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/capitalization.py @@ -66,6 +66,8 @@ class Capitalization(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/cat.py b/samples/client/petstore/python-experimental/petstore_api/models/cat.py index bb0b08667d24..12c170e6883b 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/cat.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/cat.py @@ -76,6 +76,8 @@ class Cat(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/cat_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/cat_all_of.py index f008695b43ac..1e18f17dcdde 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/cat_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/cat_all_of.py @@ -66,6 +66,8 @@ class CatAllOf(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/category.py b/samples/client/petstore/python-experimental/petstore_api/models/category.py index b34ba8ac0206..452e5a5a93e5 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/category.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/category.py @@ -66,6 +66,8 @@ class Category(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child.py b/samples/client/petstore/python-experimental/petstore_api/models/child.py index 3587e28fdcb7..d06bcd743754 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child.py @@ -76,6 +76,8 @@ class Child(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/child_all_of.py index c416862240f8..8ed440045db4 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_all_of.py @@ -66,6 +66,8 @@ class ChildAllOf(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py b/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py index f382aa023ce4..ec9a0577bf43 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py @@ -76,6 +76,8 @@ class ChildCat(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py index 2f0cf1bdc607..f2d167c58574 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py @@ -66,6 +66,8 @@ class ChildCatAllOf(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py b/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py index c95da553350a..c94e72607eaa 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py @@ -76,6 +76,8 @@ class ChildDog(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_dog_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/child_dog_all_of.py index 1ab97028ee48..4a9d0c6e0252 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_dog_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_dog_all_of.py @@ -66,6 +66,8 @@ class ChildDogAllOf(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py index 04b98e500c43..de0626ed942c 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py @@ -76,6 +76,8 @@ class ChildLizard(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard_all_of.py index 41bd842225fd..ca8d8a610b10 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard_all_of.py @@ -66,6 +66,8 @@ class ChildLizardAllOf(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/class_model.py b/samples/client/petstore/python-experimental/petstore_api/models/class_model.py index a492a47164e7..d976b65e405d 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/class_model.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/class_model.py @@ -66,6 +66,8 @@ class ClassModel(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/client.py b/samples/client/petstore/python-experimental/petstore_api/models/client.py index 195e3d4209ca..65a454d5eb33 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/client.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/client.py @@ -66,6 +66,8 @@ class Client(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/dog.py b/samples/client/petstore/python-experimental/petstore_api/models/dog.py index de8d27972b1a..3ceb88c7ee23 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/dog.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/dog.py @@ -76,6 +76,8 @@ class Dog(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py index 6278289267d5..8b17c6fd9d49 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py @@ -66,6 +66,8 @@ class DogAllOf(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/enum_arrays.py b/samples/client/petstore/python-experimental/petstore_api/models/enum_arrays.py index 107e1f3e0f8f..2acb81da6abf 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/enum_arrays.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/enum_arrays.py @@ -74,6 +74,8 @@ class EnumArrays(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/enum_class.py b/samples/client/petstore/python-experimental/petstore_api/models/enum_class.py index 4323ac7f0856..5ec80335d17b 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/enum_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/enum_class.py @@ -67,6 +67,8 @@ class EnumClass(ModelSimple): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/enum_test.py b/samples/client/petstore/python-experimental/petstore_api/models/enum_test.py index 160db49fd14c..4cc8ae93b1ea 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/enum_test.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/enum_test.py @@ -89,6 +89,8 @@ class EnumTest(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/file.py b/samples/client/petstore/python-experimental/petstore_api/models/file.py index 0f21a84df498..d0ec72ffaac4 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/file.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/file.py @@ -66,6 +66,8 @@ class File(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py b/samples/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py index 2715cfdbfd55..059c5226692f 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py @@ -71,6 +71,8 @@ class FileSchemaTestClass(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/format_test.py b/samples/client/petstore/python-experimental/petstore_api/models/format_test.py index b22bc0b30527..915cf431c560 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/format_test.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/format_test.py @@ -101,6 +101,8 @@ class FormatTest(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/grandparent.py b/samples/client/petstore/python-experimental/petstore_api/models/grandparent.py index bb5188acaf02..f2ac86acc3a7 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/grandparent.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/grandparent.py @@ -66,6 +66,8 @@ class Grandparent(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py b/samples/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py index f7157154f136..cdaba89d918e 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py @@ -86,6 +86,8 @@ class GrandparentAnimal(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py b/samples/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py index 974136a56a6f..62064f877f43 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py @@ -66,6 +66,8 @@ class HasOnlyReadOnly(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/list.py b/samples/client/petstore/python-experimental/petstore_api/models/list.py index 3f85acb2e4d3..38d9a345bb08 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/list.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/list.py @@ -66,6 +66,8 @@ class List(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/map_test.py b/samples/client/petstore/python-experimental/petstore_api/models/map_test.py index e3510cef772f..e611a2d88fcd 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/map_test.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/map_test.py @@ -75,6 +75,8 @@ class MapTest(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py index 36f5add3db88..304c28dccdbb 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -71,6 +71,8 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/model200_response.py b/samples/client/petstore/python-experimental/petstore_api/models/model200_response.py index 96d39402d563..e9c0d5075930 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/model200_response.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/model200_response.py @@ -66,6 +66,8 @@ class Model200Response(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/model_return.py b/samples/client/petstore/python-experimental/petstore_api/models/model_return.py index f9213c37ea7e..b1c7c21543e6 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/model_return.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/model_return.py @@ -66,6 +66,8 @@ class ModelReturn(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/name.py b/samples/client/petstore/python-experimental/petstore_api/models/name.py index b2fce89ec9b7..cf2ca0db8609 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/name.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/name.py @@ -66,6 +66,8 @@ class Name(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/number_only.py b/samples/client/petstore/python-experimental/petstore_api/models/number_only.py index 896757360765..f6608a0753c3 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/number_only.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/number_only.py @@ -66,6 +66,8 @@ class NumberOnly(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/order.py b/samples/client/petstore/python-experimental/petstore_api/models/order.py index 6ff62a572333..fef235e51f69 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/order.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/order.py @@ -71,6 +71,8 @@ class Order(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/outer_composite.py b/samples/client/petstore/python-experimental/petstore_api/models/outer_composite.py index d34d654e0845..c8b34fbc3e72 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/outer_composite.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/outer_composite.py @@ -71,6 +71,8 @@ class OuterComposite(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/outer_enum.py b/samples/client/petstore/python-experimental/petstore_api/models/outer_enum.py index e85ac1b87ebb..03dea72d1c75 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/outer_enum.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/outer_enum.py @@ -67,6 +67,8 @@ class OuterEnum(ModelSimple): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/outer_number.py b/samples/client/petstore/python-experimental/petstore_api/models/outer_number.py index df65a2d3d047..da810f245ec3 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/outer_number.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/outer_number.py @@ -66,6 +66,8 @@ class OuterNumber(ModelSimple): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/parent.py b/samples/client/petstore/python-experimental/petstore_api/models/parent.py index 16bb62ed0fbd..8a83c2cee86d 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/parent.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/parent.py @@ -76,6 +76,8 @@ class Parent(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/parent_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/parent_all_of.py index 6ee6983a4abc..112aa2f71d86 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/parent_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/parent_all_of.py @@ -66,6 +66,8 @@ class ParentAllOf(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py b/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py index 5012af9ae1b0..e44885186433 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py @@ -86,6 +86,8 @@ class ParentPet(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/pet.py b/samples/client/petstore/python-experimental/petstore_api/models/pet.py index 1b34db901312..29b3dd29c5dd 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/pet.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/pet.py @@ -81,6 +81,8 @@ class Pet(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/player.py b/samples/client/petstore/python-experimental/petstore_api/models/player.py index 147bf2ff6f97..f9e6289e7732 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/player.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/player.py @@ -66,6 +66,8 @@ class Player(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/read_only_first.py b/samples/client/petstore/python-experimental/petstore_api/models/read_only_first.py index 8c6d80c71f16..ddc94abd3125 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/read_only_first.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/read_only_first.py @@ -66,6 +66,8 @@ class ReadOnlyFirst(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/special_model_name.py b/samples/client/petstore/python-experimental/petstore_api/models/special_model_name.py index 168554fa343e..aaa77621506e 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/special_model_name.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/special_model_name.py @@ -66,6 +66,8 @@ class SpecialModelName(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py b/samples/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py index 10d0a9882261..065085755394 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py @@ -66,6 +66,8 @@ class StringBooleanMap(ModelNormal): additional_properties_type = (bool,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/tag.py b/samples/client/petstore/python-experimental/petstore_api/models/tag.py index fdd4ff690009..dc1168592063 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/tag.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/tag.py @@ -66,6 +66,8 @@ class Tag(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/type_holder_default.py b/samples/client/petstore/python-experimental/petstore_api/models/type_holder_default.py index 442f9837881b..35b3d31bb84e 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/type_holder_default.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/type_holder_default.py @@ -66,6 +66,8 @@ class TypeHolderDefault(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/type_holder_example.py b/samples/client/petstore/python-experimental/petstore_api/models/type_holder_example.py index 0c08758bf04a..0c51486f25d0 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/type_holder_example.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/type_holder_example.py @@ -75,6 +75,8 @@ class TypeHolderExample(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/user.py b/samples/client/petstore/python-experimental/petstore_api/models/user.py index 1f1095d3773c..249413c7078c 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/user.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/user.py @@ -66,6 +66,8 @@ class User(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/client/petstore/python-experimental/petstore_api/models/xml_item.py b/samples/client/petstore/python-experimental/petstore_api/models/xml_item.py index aad4db483aa4..2db2980bbf85 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/xml_item.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/xml_item.py @@ -66,6 +66,8 @@ class XmlItem(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model_utils.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model_utils.py index baf22c61d192..d1b74a5df844 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model_utils.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model_utils.py @@ -1195,7 +1195,7 @@ def is_type_nullable(input_type): Returns: bool """ - if input_type is none_type: + if input_type is none_type or input_type._nullable: return True if issubclass(input_type, ModelComposed): # If oneOf/anyOf, check if the 'null' type is one of the allowed types. diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py index 56d1272ca5e7..3ddfdf1360fa 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py @@ -66,6 +66,8 @@ class AdditionalPropertiesClass(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/address.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/address.py index a8a541d6c21c..1190653cc378 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/address.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/address.py @@ -66,6 +66,8 @@ class Address(ModelNormal): additional_properties_type = (int,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/animal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/animal.py index dc87c6bf9e14..dc2ceeabbe6a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/animal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/animal.py @@ -76,6 +76,8 @@ class Animal(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/api_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/api_response.py index aa85a8d32c8e..86fffc9425a1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/api_response.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/api_response.py @@ -66,6 +66,8 @@ class ApiResponse(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple.py index 1f4652a636e5..45a1ae1d18e6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple.py @@ -77,6 +77,8 @@ class Apple(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple_req.py index e0209f490b43..6f38eeb06227 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple_req.py @@ -66,6 +66,8 @@ class AppleReq(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py index 8648ca8e101e..8c7543dcfbb4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py @@ -66,6 +66,8 @@ class ArrayOfArrayOfNumberOnly(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py index b457b27a8cb5..eff67c1208d6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py @@ -66,6 +66,8 @@ class ArrayOfNumberOnly(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_test.py index 3733298e843c..dc9429e91220 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_test.py @@ -71,6 +71,8 @@ class ArrayTest(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana.py index ea8e0969a483..25a9756814bb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana.py @@ -66,6 +66,8 @@ class Banana(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana_req.py index 180a51d33a62..c25a35552815 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana_req.py @@ -66,6 +66,8 @@ class BananaReq(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_chordate.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_chordate.py index 8fc8df668123..835107f47621 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_chordate.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_chordate.py @@ -86,6 +86,8 @@ class BiologyChordate(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_hominid.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_hominid.py index 82542e8e709c..c5f804be52f1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_hominid.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_hominid.py @@ -71,6 +71,8 @@ class BiologyHominid(ModelComposed): additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_mammal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_mammal.py index f2adcf604183..920ce08dee3b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_mammal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_mammal.py @@ -81,6 +81,8 @@ class BiologyMammal(ModelComposed): additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_primate.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_primate.py index b6c40431aec0..2494ae53c625 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_primate.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_primate.py @@ -76,6 +76,8 @@ class BiologyPrimate(ModelComposed): additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_reptile.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_reptile.py index 7fa03fda3f8d..0a84065cec88 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_reptile.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_reptile.py @@ -71,6 +71,8 @@ class BiologyReptile(ModelComposed): additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/capitalization.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/capitalization.py index 3ca42fba60be..7477b0c6fbab 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/capitalization.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/capitalization.py @@ -66,6 +66,8 @@ class Capitalization(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat.py index 6a95e862ac32..0e1228b18bd3 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat.py @@ -81,6 +81,8 @@ class Cat(ModelComposed): additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat_all_of.py index f008695b43ac..1e18f17dcdde 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat_all_of.py @@ -66,6 +66,8 @@ class CatAllOf(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/category.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/category.py index b34ba8ac0206..452e5a5a93e5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/category.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/category.py @@ -66,6 +66,8 @@ class Category(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/class_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/class_model.py index a492a47164e7..d976b65e405d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/class_model.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/class_model.py @@ -66,6 +66,8 @@ class ClassModel(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/client.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/client.py index 195e3d4209ca..65a454d5eb33 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/client.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/client.py @@ -66,6 +66,8 @@ class Client(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/complex_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/complex_quadrilateral.py index 401be7b0dd95..8702e7a64e29 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/complex_quadrilateral.py @@ -76,6 +76,8 @@ class ComplexQuadrilateral(ModelComposed): additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog.py index fc05f2889898..b824e584180a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog.py @@ -76,6 +76,8 @@ class Dog(ModelComposed): additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog_all_of.py index 6278289267d5..8b17c6fd9d49 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog_all_of.py @@ -66,6 +66,8 @@ class DogAllOf(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py index 8b81b46da6ff..273de67f9a74 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py @@ -86,6 +86,8 @@ class Drawing(ModelNormal): additional_properties_type = (fruit.Fruit,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_arrays.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_arrays.py index 107e1f3e0f8f..2acb81da6abf 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_arrays.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_arrays.py @@ -74,6 +74,8 @@ class EnumArrays(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_class.py index 4323ac7f0856..5ec80335d17b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_class.py @@ -67,6 +67,8 @@ class EnumClass(ModelSimple): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_test.py index 83043b7c4315..169b3b1ab20c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_test.py @@ -104,6 +104,8 @@ class EnumTest(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/equilateral_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/equilateral_triangle.py index 85d5be3b80ae..c6aca47f5532 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/equilateral_triangle.py @@ -76,6 +76,8 @@ class EquilateralTriangle(ModelComposed): additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file.py index 0f21a84df498..d0ec72ffaac4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file.py @@ -66,6 +66,8 @@ class File(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py index 2715cfdbfd55..059c5226692f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py @@ -71,6 +71,8 @@ class FileSchemaTestClass(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/foo.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/foo.py index 6e88c734c966..e199e3ca8d63 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/foo.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/foo.py @@ -66,6 +66,8 @@ class Foo(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/format_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/format_test.py index 24601b9499c2..fc7dfe54ed84 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/format_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/format_test.py @@ -109,6 +109,8 @@ class FormatTest(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit.py index cc33a3d9ec3e..93ea32d9d564 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit.py @@ -87,6 +87,8 @@ class Fruit(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit_req.py index 130f8781a7f3..7e3a4756a333 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit_req.py @@ -76,6 +76,8 @@ class FruitReq(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/gm_fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/gm_fruit.py index d40836a3076f..73e43a17ecaa 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/gm_fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/gm_fruit.py @@ -87,6 +87,8 @@ class GmFruit(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py index 974136a56a6f..62064f877f43 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py @@ -66,6 +66,8 @@ class HasOnlyReadOnly(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/health_check_result.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/health_check_result.py index 662cf79189ff..f408f2741094 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/health_check_result.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/health_check_result.py @@ -66,6 +66,8 @@ class HealthCheckResult(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object.py index 5de65e44476e..f06a40c13ab2 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object.py @@ -66,6 +66,8 @@ class InlineObject(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object1.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object1.py index 03ec7a1908c9..3457f059cb50 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object1.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object1.py @@ -66,6 +66,8 @@ class InlineObject1(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object2.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object2.py index 701f8f8985b9..5bc6b6415a5d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object2.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object2.py @@ -75,6 +75,8 @@ class InlineObject2(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object3.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object3.py index e720690a0550..273788597723 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object3.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object3.py @@ -100,6 +100,8 @@ class InlineObject3(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object4.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object4.py index dd5ade491376..5e464a101318 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object4.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object4.py @@ -66,6 +66,8 @@ class InlineObject4(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object5.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object5.py index b133b4026884..271ca0435e4f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object5.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object5.py @@ -66,6 +66,8 @@ class InlineObject5(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_response_default.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_response_default.py index 1ef604607e67..406bb68ef655 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_response_default.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_response_default.py @@ -71,6 +71,8 @@ class InlineResponseDefault(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/isosceles_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/isosceles_triangle.py index 6ef7500c2c62..2b5e315162ff 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/isosceles_triangle.py @@ -76,6 +76,8 @@ class IsoscelesTriangle(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/list.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/list.py index 3f85acb2e4d3..38d9a345bb08 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/list.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/list.py @@ -66,6 +66,8 @@ class List(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mammal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mammal.py index 0b35ac17cf50..8aceb5d85ca3 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mammal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mammal.py @@ -81,6 +81,8 @@ class Mammal(ModelComposed): additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/map_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/map_test.py index e3510cef772f..e611a2d88fcd 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/map_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/map_test.py @@ -75,6 +75,8 @@ class MapTest(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py index 36f5add3db88..304c28dccdbb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -71,6 +71,8 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model200_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model200_response.py index 96d39402d563..e9c0d5075930 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model200_response.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model200_response.py @@ -66,6 +66,8 @@ class Model200Response(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model_return.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model_return.py index f9213c37ea7e..b1c7c21543e6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model_return.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model_return.py @@ -66,6 +66,8 @@ class ModelReturn(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/name.py index b2fce89ec9b7..cf2ca0db8609 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/name.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/name.py @@ -66,6 +66,8 @@ class Name(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_class.py index cad529c4dc00..ceb15a3356d5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_class.py @@ -66,6 +66,8 @@ class NullableClass(ModelNormal): additional_properties_type = ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_shape.py index c7859f39f7dc..32b9a5312de8 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_shape.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_shape.py @@ -76,6 +76,8 @@ class NullableShape(ModelComposed): additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + _nullable = True + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/number_only.py index 896757360765..f6608a0753c3 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/number_only.py @@ -66,6 +66,8 @@ class NumberOnly(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/order.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/order.py index 6ff62a572333..fef235e51f69 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/order.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/order.py @@ -71,6 +71,8 @@ class Order(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_composite.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_composite.py index da7cbd159058..8f3fc3032cb7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_composite.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_composite.py @@ -66,6 +66,8 @@ class OuterComposite(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum.py index 7c09a5b8d59a..8bbc48699a6c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum.py @@ -68,6 +68,8 @@ class OuterEnum(ModelSimple): additional_properties_type = None + _nullable = True + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_default_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_default_value.py index fdc882ee5dba..1f667c9f1a27 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_default_value.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_default_value.py @@ -67,6 +67,8 @@ class OuterEnumDefaultValue(ModelSimple): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer.py index 187a714b33bf..cc1dbaa76c6d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer.py @@ -67,6 +67,8 @@ class OuterEnumInteger(ModelSimple): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer_default_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer_default_value.py index 41da57604fc8..81a65b315eb0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer_default_value.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer_default_value.py @@ -67,6 +67,8 @@ class OuterEnumIntegerDefaultValue(ModelSimple): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/pet.py index 1b34db901312..29b3dd29c5dd 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/pet.py @@ -81,6 +81,8 @@ class Pet(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral.py index dfe8ab46c5f7..69a7fa7956a2 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral.py @@ -76,6 +76,8 @@ class Quadrilateral(ModelComposed): additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral_interface.py index 2f60ea9362dc..59dad2d832b6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral_interface.py @@ -66,6 +66,8 @@ class QuadrilateralInterface(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/read_only_first.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/read_only_first.py index 8c6d80c71f16..ddc94abd3125 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/read_only_first.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/read_only_first.py @@ -66,6 +66,8 @@ class ReadOnlyFirst(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/scalene_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/scalene_triangle.py index bdcb7b18b0b6..29f7fd1098ba 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/scalene_triangle.py @@ -76,6 +76,8 @@ class ScaleneTriangle(ModelComposed): additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape.py index 138419c1a27e..7693d05fbf58 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape.py @@ -76,6 +76,8 @@ class Shape(ModelComposed): additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_interface.py index 1152adfc8a48..c3da504ce6c1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_interface.py @@ -66,6 +66,8 @@ class ShapeInterface(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_or_null.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_or_null.py index de463e352814..f535ab5f6705 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_or_null.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_or_null.py @@ -76,6 +76,8 @@ class ShapeOrNull(ModelComposed): additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/simple_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/simple_quadrilateral.py index a55f0ac8bed7..e6e9dd6d3e44 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/simple_quadrilateral.py @@ -76,6 +76,8 @@ class SimpleQuadrilateral(ModelComposed): additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/special_model_name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/special_model_name.py index 168554fa343e..aaa77621506e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/special_model_name.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/special_model_name.py @@ -66,6 +66,8 @@ class SpecialModelName(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py index 10d0a9882261..065085755394 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py @@ -66,6 +66,8 @@ class StringBooleanMap(ModelNormal): additional_properties_type = (bool,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/tag.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/tag.py index 26cdd6f50922..c2b328638734 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/tag.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/tag.py @@ -66,6 +66,8 @@ class Tag(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle.py index e270cfcf8549..20d205195c5c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle.py @@ -81,6 +81,8 @@ class Triangle(ModelComposed): additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle_interface.py index 5881e3c94728..94e9b0ae7f1f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle_interface.py @@ -66,6 +66,8 @@ class TriangleInterface(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/user.py index bce02d2b8d43..3cddc7287bfd 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/user.py @@ -66,6 +66,8 @@ class User(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/whale.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/whale.py index c89497b6b556..55eb69bc6cbf 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/whale.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/whale.py @@ -66,6 +66,8 @@ class Whale(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/zebra.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/zebra.py index bb2e1a7615c7..b169310cdf7e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/zebra.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/zebra.py @@ -71,6 +71,8 @@ class Zebra(ModelNormal): additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ From faecafdf61dbcb04be46c7e72087106aca9b4ee3 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Tue, 19 May 2020 17:17:55 -0700 Subject: [PATCH 052/105] handle nullable type --- .../resources/python/python-experimental/model_utils.mustache | 4 +++- .../petstore/python-experimental/petstore_api/model_utils.py | 4 +++- .../petstore/python-experimental/petstore_api/model_utils.py | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache index af6e0f32538a..e89a2a2e9597 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache @@ -928,7 +928,9 @@ def is_type_nullable(input_type): Returns: bool """ - if input_type is none_type or input_type._nullable: + if input_type is none_type: + return True + if issubclass(input_type, OpenApiModel) and input_type._nullable: return True if issubclass(input_type, ModelComposed): # If oneOf/anyOf, check if the 'null' type is one of the allowed types. diff --git a/samples/client/petstore/python-experimental/petstore_api/model_utils.py b/samples/client/petstore/python-experimental/petstore_api/model_utils.py index d1b74a5df844..02c609f16ff9 100644 --- a/samples/client/petstore/python-experimental/petstore_api/model_utils.py +++ b/samples/client/petstore/python-experimental/petstore_api/model_utils.py @@ -1195,7 +1195,9 @@ def is_type_nullable(input_type): Returns: bool """ - if input_type is none_type or input_type._nullable: + if input_type is none_type: + return True + if issubclass(input_type, OpenApiModel) and input_type._nullable: return True if issubclass(input_type, ModelComposed): # If oneOf/anyOf, check if the 'null' type is one of the allowed types. diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model_utils.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model_utils.py index d1b74a5df844..02c609f16ff9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model_utils.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model_utils.py @@ -1195,7 +1195,9 @@ def is_type_nullable(input_type): Returns: bool """ - if input_type is none_type or input_type._nullable: + if input_type is none_type: + return True + if issubclass(input_type, OpenApiModel) and input_type._nullable: return True if issubclass(input_type, ModelComposed): # If oneOf/anyOf, check if the 'null' type is one of the allowed types. From cbfa01857ef4ff5b775360402695a5338dd088b3 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Tue, 19 May 2020 19:21:11 -0700 Subject: [PATCH 053/105] improve documentation, run sample scripts --- .../codegen/CodegenConstants.java | 19 +-- .../openapitools/codegen/DefaultCodegen.java | 10 +- .../model/additional_properties_class.ex | 4 + .../go-petstore/api/openapi.yaml | 8 ++ .../docs/AdditionalPropertiesClass.md | 52 +++++++++ .../model_additional_properties_class.go | 72 ++++++++++++ .../go-petstore/api/openapi.yaml | 12 ++ .../docs/AdditionalPropertiesClass.md | 78 +++++++++++++ .../model_additional_properties_class.go | 108 ++++++++++++++++++ 9 files changed, 349 insertions(+), 14 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java index 575d4464a21d..db6c931339d1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java @@ -364,13 +364,16 @@ public static enum ENUM_PROPERTY_NAMING_TYPE {camelCase, PascalCase, snake_case, // When that issue is resolved, this parameter should be removed. public static final String LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR = "legacyAdditionalPropertiesBehavior"; public static final String LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR_DESC = - "If true, the 'additionalProperties' keyword is implemented as specified in the OAS and JSON schema specifications. " + - "Full compliance currently works with OAS 3.0 documents only. " + - "It is not supported for 2.0 documents until issues #1369 and #1371 have been resolved in the dependent swagger-parser project. " + - "If false, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. " + - "In the non-compliant mode, codegen uses the following interpretation: " + - "1) In a OpenAPI 2.0 document, boolean values of the 'additionalProperties' keyword are ignored." + - "2) In a OpenAPI 3.x document, the non-compliance is when the 'additionalProperties' keyword is not present in a schema. " + - "If the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed."; + "If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. " + + "This is the default value.\n" + + + "If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. " + + "When the 'additionalProperties' keyword is not present in a schema, " + + "it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.\n" + + + "This setting is currently ignored for OAS 2.0 documents: " + + " 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. " + + " 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed." + + "Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project."; } 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 4e96356ca50f..01ebbed33e88 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 @@ -1500,14 +1500,12 @@ public DefaultCodegen() { CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR_DESC).defaultValue(Boolean.TRUE.toString()); Map legacyAdditionalPropertiesBehaviorOpts = new HashMap<>(); - legacyAdditionalPropertiesBehaviorOpts.put("true", - "The 'additionalProperties' keyword is implemented as specified in the OAS and JSON schema specifications. " + - "This is currently not supported when the input document is based on the OpenAPI 2.0 schema."); legacyAdditionalPropertiesBehaviorOpts.put("false", + "The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications."); + legacyAdditionalPropertiesBehaviorOpts.put("true", "Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. " + - "1) In a OpenAPI 2.0 document, boolean values of the 'additionalProperties' keyword are ignored." + - "2) In a OpenAPI 3.x document, the non-compliance is when the 'additionalProperties' keyword is not present in a schema. " + - "If the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed."); + "When the 'additionalProperties' keyword is not present in a schema, " + + "it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed."); legacyAdditionalPropertiesBehaviorOpt.setEnum(legacyAdditionalPropertiesBehaviorOpts); cliOptions.add(legacyAdditionalPropertiesBehaviorOpt); this.setLegacyAdditionalPropertiesBehavior(false); diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/additional_properties_class.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/additional_properties_class.ex index 08d6d28d82db..200a6c4be306 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/additional_properties_class.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/additional_properties_class.ex @@ -17,6 +17,8 @@ defmodule OpenapiPetstore.Model.AdditionalPropertiesClass do :"map_array_anytype", :"map_map_string", :"map_map_anytype", + :"map_with_additional_properties", + :"map_without_additional_properties", :"anytype_1", :"anytype_2", :"anytype_3" @@ -31,6 +33,8 @@ defmodule OpenapiPetstore.Model.AdditionalPropertiesClass do :"map_array_anytype" => %{optional(String.t) => [Map]} | nil, :"map_map_string" => %{optional(String.t) => %{optional(String.t) => String.t}} | nil, :"map_map_anytype" => %{optional(String.t) => %{optional(String.t) => Map}} | nil, + :"map_with_additional_properties" => Map | nil, + :"map_without_additional_properties" => Map | nil, :"anytype_1" => Map | nil, :"anytype_2" => Map | nil, :"anytype_3" => Map | nil diff --git a/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml b/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml index 5313659ef237..636f81711d57 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml +++ b/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml @@ -1586,6 +1586,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2119,3 +2125,5 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md index a035ff98c8f6..1691c3308908 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md @@ -12,6 +12,8 @@ Name | Type | Description | Notes **MapArrayAnytype** | Pointer to [**map[string][]map[string]interface{}**](array.md) | | [optional] **MapMapString** | Pointer to [**map[string]map[string]string**](map.md) | | [optional] **MapMapAnytype** | Pointer to [**map[string]map[string]map[string]interface{}**](map.md) | | [optional] +**MapWithAdditionalProperties** | Pointer to **map[string]interface{}** | | [optional] +**MapWithoutAdditionalProperties** | Pointer to **map[string]interface{}** | | [optional] **Anytype1** | Pointer to **map[string]interface{}** | | [optional] **Anytype2** | Pointer to **map[string]interface{}** | | [optional] **Anytype3** | Pointer to **map[string]interface{}** | | [optional] @@ -235,6 +237,56 @@ SetMapMapAnytype sets MapMapAnytype field to given value. HasMapMapAnytype returns a boolean if a field has been set. +### GetMapWithAdditionalProperties + +`func (o *AdditionalPropertiesClass) GetMapWithAdditionalProperties() map[string]interface{}` + +GetMapWithAdditionalProperties returns the MapWithAdditionalProperties field if non-nil, zero value otherwise. + +### GetMapWithAdditionalPropertiesOk + +`func (o *AdditionalPropertiesClass) GetMapWithAdditionalPropertiesOk() (*map[string]interface{}, bool)` + +GetMapWithAdditionalPropertiesOk returns a tuple with the MapWithAdditionalProperties field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMapWithAdditionalProperties + +`func (o *AdditionalPropertiesClass) SetMapWithAdditionalProperties(v map[string]interface{})` + +SetMapWithAdditionalProperties sets MapWithAdditionalProperties field to given value. + +### HasMapWithAdditionalProperties + +`func (o *AdditionalPropertiesClass) HasMapWithAdditionalProperties() bool` + +HasMapWithAdditionalProperties returns a boolean if a field has been set. + +### GetMapWithoutAdditionalProperties + +`func (o *AdditionalPropertiesClass) GetMapWithoutAdditionalProperties() map[string]interface{}` + +GetMapWithoutAdditionalProperties returns the MapWithoutAdditionalProperties field if non-nil, zero value otherwise. + +### GetMapWithoutAdditionalPropertiesOk + +`func (o *AdditionalPropertiesClass) GetMapWithoutAdditionalPropertiesOk() (*map[string]interface{}, bool)` + +GetMapWithoutAdditionalPropertiesOk returns a tuple with the MapWithoutAdditionalProperties field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMapWithoutAdditionalProperties + +`func (o *AdditionalPropertiesClass) SetMapWithoutAdditionalProperties(v map[string]interface{})` + +SetMapWithoutAdditionalProperties sets MapWithoutAdditionalProperties field to given value. + +### HasMapWithoutAdditionalProperties + +`func (o *AdditionalPropertiesClass) HasMapWithoutAdditionalProperties() bool` + +HasMapWithoutAdditionalProperties returns a boolean if a field has been set. + ### GetAnytype1 `func (o *AdditionalPropertiesClass) GetAnytype1() map[string]interface{}` diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go index 046e91b90752..cc9d1e8167b1 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go @@ -23,6 +23,8 @@ type AdditionalPropertiesClass struct { MapArrayAnytype *map[string][]map[string]interface{} `json:"map_array_anytype,omitempty"` MapMapString *map[string]map[string]string `json:"map_map_string,omitempty"` MapMapAnytype *map[string]map[string]map[string]interface{} `json:"map_map_anytype,omitempty"` + MapWithAdditionalProperties *map[string]interface{} `json:"map_with_additional_properties,omitempty"` + MapWithoutAdditionalProperties *map[string]interface{} `json:"map_without_additional_properties,omitempty"` Anytype1 *map[string]interface{} `json:"anytype_1,omitempty"` Anytype2 *map[string]interface{} `json:"anytype_2,omitempty"` Anytype3 *map[string]interface{} `json:"anytype_3,omitempty"` @@ -301,6 +303,70 @@ func (o *AdditionalPropertiesClass) SetMapMapAnytype(v map[string]map[string]map o.MapMapAnytype = &v } +// GetMapWithAdditionalProperties returns the MapWithAdditionalProperties field value if set, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapWithAdditionalProperties() map[string]interface{} { + if o == nil || o.MapWithAdditionalProperties == nil { + var ret map[string]interface{} + return ret + } + return *o.MapWithAdditionalProperties +} + +// GetMapWithAdditionalPropertiesOk returns a tuple with the MapWithAdditionalProperties field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapWithAdditionalPropertiesOk() (*map[string]interface{}, bool) { + if o == nil || o.MapWithAdditionalProperties == nil { + return nil, false + } + return o.MapWithAdditionalProperties, true +} + +// HasMapWithAdditionalProperties returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapWithAdditionalProperties() bool { + if o != nil && o.MapWithAdditionalProperties != nil { + return true + } + + return false +} + +// SetMapWithAdditionalProperties gets a reference to the given map[string]interface{} and assigns it to the MapWithAdditionalProperties field. +func (o *AdditionalPropertiesClass) SetMapWithAdditionalProperties(v map[string]interface{}) { + o.MapWithAdditionalProperties = &v +} + +// GetMapWithoutAdditionalProperties returns the MapWithoutAdditionalProperties field value if set, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapWithoutAdditionalProperties() map[string]interface{} { + if o == nil || o.MapWithoutAdditionalProperties == nil { + var ret map[string]interface{} + return ret + } + return *o.MapWithoutAdditionalProperties +} + +// GetMapWithoutAdditionalPropertiesOk returns a tuple with the MapWithoutAdditionalProperties field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapWithoutAdditionalPropertiesOk() (*map[string]interface{}, bool) { + if o == nil || o.MapWithoutAdditionalProperties == nil { + return nil, false + } + return o.MapWithoutAdditionalProperties, true +} + +// HasMapWithoutAdditionalProperties returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapWithoutAdditionalProperties() bool { + if o != nil && o.MapWithoutAdditionalProperties != nil { + return true + } + + return false +} + +// SetMapWithoutAdditionalProperties gets a reference to the given map[string]interface{} and assigns it to the MapWithoutAdditionalProperties field. +func (o *AdditionalPropertiesClass) SetMapWithoutAdditionalProperties(v map[string]interface{}) { + o.MapWithoutAdditionalProperties = &v +} + // GetAnytype1 returns the Anytype1 field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetAnytype1() map[string]interface{} { if o == nil || o.Anytype1 == nil { @@ -423,6 +489,12 @@ func (o AdditionalPropertiesClass) MarshalJSON() ([]byte, error) { if o.MapMapAnytype != nil { toSerialize["map_map_anytype"] = o.MapMapAnytype } + if o.MapWithAdditionalProperties != nil { + toSerialize["map_with_additional_properties"] = o.MapWithAdditionalProperties + } + if o.MapWithoutAdditionalProperties != nil { + toSerialize["map_without_additional_properties"] = o.MapWithoutAdditionalProperties + } if o.Anytype1 != nil { toSerialize["anytype_1"] = o.Anytype1 } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml b/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml index f7bec5630719..dfbdf4d07dd9 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml @@ -1621,6 +1621,16 @@ components: type: string type: object type: object + map_with_additional_properties: + additionalProperties: true + type: object + map_without_additional_properties: + additionalProperties: false + type: object + map_string: + additionalProperties: + type: string + type: object type: object MixedPropertiesAndAdditionalPropertiesClass: properties: @@ -2168,3 +2178,5 @@ components: http_signature_test: scheme: signature type: http +x-original-openapi-version: 3.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md index 19719e709f8f..d2b6ab0cca53 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md @@ -6,6 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **MapProperty** | Pointer to **map[string]string** | | [optional] **MapOfMapProperty** | Pointer to [**map[string]map[string]string**](map.md) | | [optional] +**MapWithAdditionalProperties** | Pointer to **map[string]map[string]interface{}** | | [optional] +**MapWithoutAdditionalProperties** | Pointer to **map[string]interface{}** | | [optional] +**MapString** | Pointer to **map[string]string** | | [optional] ## Methods @@ -76,6 +79,81 @@ SetMapOfMapProperty sets MapOfMapProperty field to given value. HasMapOfMapProperty returns a boolean if a field has been set. +### GetMapWithAdditionalProperties + +`func (o *AdditionalPropertiesClass) GetMapWithAdditionalProperties() map[string]map[string]interface{}` + +GetMapWithAdditionalProperties returns the MapWithAdditionalProperties field if non-nil, zero value otherwise. + +### GetMapWithAdditionalPropertiesOk + +`func (o *AdditionalPropertiesClass) GetMapWithAdditionalPropertiesOk() (*map[string]map[string]interface{}, bool)` + +GetMapWithAdditionalPropertiesOk returns a tuple with the MapWithAdditionalProperties field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMapWithAdditionalProperties + +`func (o *AdditionalPropertiesClass) SetMapWithAdditionalProperties(v map[string]map[string]interface{})` + +SetMapWithAdditionalProperties sets MapWithAdditionalProperties field to given value. + +### HasMapWithAdditionalProperties + +`func (o *AdditionalPropertiesClass) HasMapWithAdditionalProperties() bool` + +HasMapWithAdditionalProperties returns a boolean if a field has been set. + +### GetMapWithoutAdditionalProperties + +`func (o *AdditionalPropertiesClass) GetMapWithoutAdditionalProperties() map[string]interface{}` + +GetMapWithoutAdditionalProperties returns the MapWithoutAdditionalProperties field if non-nil, zero value otherwise. + +### GetMapWithoutAdditionalPropertiesOk + +`func (o *AdditionalPropertiesClass) GetMapWithoutAdditionalPropertiesOk() (*map[string]interface{}, bool)` + +GetMapWithoutAdditionalPropertiesOk returns a tuple with the MapWithoutAdditionalProperties field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMapWithoutAdditionalProperties + +`func (o *AdditionalPropertiesClass) SetMapWithoutAdditionalProperties(v map[string]interface{})` + +SetMapWithoutAdditionalProperties sets MapWithoutAdditionalProperties field to given value. + +### HasMapWithoutAdditionalProperties + +`func (o *AdditionalPropertiesClass) HasMapWithoutAdditionalProperties() bool` + +HasMapWithoutAdditionalProperties returns a boolean if a field has been set. + +### GetMapString + +`func (o *AdditionalPropertiesClass) GetMapString() map[string]string` + +GetMapString returns the MapString field if non-nil, zero value otherwise. + +### GetMapStringOk + +`func (o *AdditionalPropertiesClass) GetMapStringOk() (*map[string]string, bool)` + +GetMapStringOk returns a tuple with the MapString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMapString + +`func (o *AdditionalPropertiesClass) SetMapString(v map[string]string)` + +SetMapString sets MapString field to given value. + +### HasMapString + +`func (o *AdditionalPropertiesClass) HasMapString() bool` + +HasMapString returns a boolean if a field has been set. + [[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/openapi3/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go index 941f00027dbb..48de99351d7e 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go @@ -17,6 +17,9 @@ import ( type AdditionalPropertiesClass struct { MapProperty *map[string]string `json:"map_property,omitempty"` MapOfMapProperty *map[string]map[string]string `json:"map_of_map_property,omitempty"` + MapWithAdditionalProperties *map[string]map[string]interface{} `json:"map_with_additional_properties,omitempty"` + MapWithoutAdditionalProperties *map[string]interface{} `json:"map_without_additional_properties,omitempty"` + MapString *map[string]string `json:"map_string,omitempty"` } // NewAdditionalPropertiesClass instantiates a new AdditionalPropertiesClass object @@ -100,6 +103,102 @@ func (o *AdditionalPropertiesClass) SetMapOfMapProperty(v map[string]map[string] o.MapOfMapProperty = &v } +// GetMapWithAdditionalProperties returns the MapWithAdditionalProperties field value if set, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapWithAdditionalProperties() map[string]map[string]interface{} { + if o == nil || o.MapWithAdditionalProperties == nil { + var ret map[string]map[string]interface{} + return ret + } + return *o.MapWithAdditionalProperties +} + +// GetMapWithAdditionalPropertiesOk returns a tuple with the MapWithAdditionalProperties field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapWithAdditionalPropertiesOk() (*map[string]map[string]interface{}, bool) { + if o == nil || o.MapWithAdditionalProperties == nil { + return nil, false + } + return o.MapWithAdditionalProperties, true +} + +// HasMapWithAdditionalProperties returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapWithAdditionalProperties() bool { + if o != nil && o.MapWithAdditionalProperties != nil { + return true + } + + return false +} + +// SetMapWithAdditionalProperties gets a reference to the given map[string]map[string]interface{} and assigns it to the MapWithAdditionalProperties field. +func (o *AdditionalPropertiesClass) SetMapWithAdditionalProperties(v map[string]map[string]interface{}) { + o.MapWithAdditionalProperties = &v +} + +// GetMapWithoutAdditionalProperties returns the MapWithoutAdditionalProperties field value if set, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapWithoutAdditionalProperties() map[string]interface{} { + if o == nil || o.MapWithoutAdditionalProperties == nil { + var ret map[string]interface{} + return ret + } + return *o.MapWithoutAdditionalProperties +} + +// GetMapWithoutAdditionalPropertiesOk returns a tuple with the MapWithoutAdditionalProperties field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapWithoutAdditionalPropertiesOk() (*map[string]interface{}, bool) { + if o == nil || o.MapWithoutAdditionalProperties == nil { + return nil, false + } + return o.MapWithoutAdditionalProperties, true +} + +// HasMapWithoutAdditionalProperties returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapWithoutAdditionalProperties() bool { + if o != nil && o.MapWithoutAdditionalProperties != nil { + return true + } + + return false +} + +// SetMapWithoutAdditionalProperties gets a reference to the given map[string]interface{} and assigns it to the MapWithoutAdditionalProperties field. +func (o *AdditionalPropertiesClass) SetMapWithoutAdditionalProperties(v map[string]interface{}) { + o.MapWithoutAdditionalProperties = &v +} + +// GetMapString returns the MapString field value if set, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapString() map[string]string { + if o == nil || o.MapString == nil { + var ret map[string]string + return ret + } + return *o.MapString +} + +// GetMapStringOk returns a tuple with the MapString field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapStringOk() (*map[string]string, bool) { + if o == nil || o.MapString == nil { + return nil, false + } + return o.MapString, true +} + +// HasMapString returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapString() bool { + if o != nil && o.MapString != nil { + return true + } + + return false +} + +// SetMapString gets a reference to the given map[string]string and assigns it to the MapString field. +func (o *AdditionalPropertiesClass) SetMapString(v map[string]string) { + o.MapString = &v +} + func (o AdditionalPropertiesClass) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.MapProperty != nil { @@ -108,6 +207,15 @@ func (o AdditionalPropertiesClass) MarshalJSON() ([]byte, error) { if o.MapOfMapProperty != nil { toSerialize["map_of_map_property"] = o.MapOfMapProperty } + if o.MapWithAdditionalProperties != nil { + toSerialize["map_with_additional_properties"] = o.MapWithAdditionalProperties + } + if o.MapWithoutAdditionalProperties != nil { + toSerialize["map_without_additional_properties"] = o.MapWithoutAdditionalProperties + } + if o.MapString != nil { + toSerialize["map_string"] = o.MapString + } return json.Marshal(toSerialize) } From 45959d85ae919e2e063eff0352300fdf12a44595 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Tue, 19 May 2020 19:24:54 -0700 Subject: [PATCH 054/105] improve documentation, run sample scripts --- .../src/main/java/org/openapitools/codegen/DefaultCodegen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 01ebbed33e88..3cbe22bdfc98 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 @@ -241,7 +241,7 @@ apiTemplateFiles are for API outputs only (controllers/handlers). // Support legacy logic for evaluating 'additionalProperties' keyword. // See CodegenConstants.java for more details. - protected boolean legacyAdditionalPropertiesBehavior = true; + protected boolean legacyAdditionalPropertiesBehavior = false; // make openapi available to all methods protected OpenAPI openAPI; From 1cc405c9858b7478976fcf963070907d905c32be Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 06:15:28 -0700 Subject: [PATCH 055/105] execute sample scripts --- .../docs/AdditionalPropertiesClass.md | 2 + .../Model/AdditionalPropertiesClass.cs | 34 +++++++++- .../docs/AdditionalPropertiesClass.md | 8 ++- .../Model/AdditionalPropertiesClass.cs | 34 +++++++++- .../docs/AdditionalPropertiesClass.md | 8 ++- .../Model/AdditionalPropertiesClass.cs | 34 +++++++++- .../Org.OpenAPITools.sln | 10 +-- .../docs/AdditionalPropertiesClass.md | 8 ++- .../Model/AdditionalPropertiesClass.cs | 34 +++++++++- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 2 +- .../docs/AdditionalPropertiesClass.md | 8 ++- .../Model/AdditionalPropertiesClass.cs | 34 +++++++++- .../go/go-petstore-withXml/api/openapi.yaml | 8 +++ .../docs/AdditionalPropertiesClass.md | 2 + .../model_additional_properties_class.go | 2 + .../petstore/go/go-petstore/api/openapi.yaml | 8 +++ .../docs/AdditionalPropertiesClass.md | 2 + .../model_additional_properties_class.go | 2 + .../petstore/java/feign/api/openapi.yaml | 8 +++ .../model/AdditionalPropertiesClass.java | 64 ++++++++++++++++- .../petstore/java/feign10x/api/openapi.yaml | 8 +++ .../model/AdditionalPropertiesClass.java | 64 ++++++++++++++++- .../java/google-api-client/api/openapi.yaml | 8 +++ .../docs/AdditionalPropertiesClass.md | 2 + .../model/AdditionalPropertiesClass.java | 64 ++++++++++++++++- .../petstore/java/jersey1/api/openapi.yaml | 8 +++ .../jersey1/docs/AdditionalPropertiesClass.md | 2 + .../model/AdditionalPropertiesClass.java | 64 ++++++++++++++++- .../java/jersey2-java6/api/openapi.yaml | 8 +++ .../docs/AdditionalPropertiesClass.md | 2 + .../model/AdditionalPropertiesClass.java | 60 +++++++++++++++- .../java/jersey2-java7/api/openapi.yaml | 8 +++ .../docs/AdditionalPropertiesClass.md | 2 + .../model/AdditionalPropertiesClass.java | 64 ++++++++++++++++- .../java/jersey2-java8/api/openapi.yaml | 8 +++ .../docs/AdditionalPropertiesClass.md | 2 + .../model/AdditionalPropertiesClass.java | 64 ++++++++++++++++- .../petstore/java/native/api/openapi.yaml | 8 +++ .../native/docs/AdditionalPropertiesClass.md | 2 + .../model/AdditionalPropertiesClass.java | 64 ++++++++++++++++- .../api/openapi.yaml | 8 +++ .../docs/AdditionalPropertiesClass.md | 2 + .../model/AdditionalPropertiesClass.java | 64 ++++++++++++++++- .../java/okhttp-gson/api/openapi.yaml | 8 +++ .../docs/AdditionalPropertiesClass.md | 2 + .../model/AdditionalPropertiesClass.java | 60 +++++++++++++++- .../rest-assured-jackson/api/openapi.yaml | 8 +++ .../docs/AdditionalPropertiesClass.md | 2 + .../model/AdditionalPropertiesClass.java | 64 ++++++++++++++++- .../model/AdditionalPropertiesClassTest.java | 16 +++++ .../java/rest-assured/api/openapi.yaml | 8 +++ .../docs/AdditionalPropertiesClass.md | 2 + .../model/AdditionalPropertiesClass.java | 60 +++++++++++++++- .../petstore/java/resteasy/api/openapi.yaml | 8 +++ .../docs/AdditionalPropertiesClass.md | 2 + .../model/AdditionalPropertiesClass.java | 64 ++++++++++++++++- .../resttemplate-withXml/api/openapi.yaml | 8 +++ .../docs/AdditionalPropertiesClass.md | 2 + .../model/AdditionalPropertiesClass.java | 68 ++++++++++++++++++- .../java/resttemplate/api/openapi.yaml | 8 +++ .../docs/AdditionalPropertiesClass.md | 2 + .../model/AdditionalPropertiesClass.java | 64 ++++++++++++++++- .../petstore/java/retrofit/api/openapi.yaml | 8 +++ .../model/AdditionalPropertiesClass.java | 60 +++++++++++++++- .../java/retrofit2-play24/api/openapi.yaml | 8 +++ .../docs/AdditionalPropertiesClass.md | 2 + .../model/AdditionalPropertiesClass.java | 64 ++++++++++++++++- .../java/retrofit2-play25/api/openapi.yaml | 8 +++ .../docs/AdditionalPropertiesClass.md | 2 + .../model/AdditionalPropertiesClass.java | 64 ++++++++++++++++- .../java/retrofit2-play26/api/openapi.yaml | 8 +++ .../docs/AdditionalPropertiesClass.md | 2 + .../model/AdditionalPropertiesClass.java | 64 ++++++++++++++++- .../petstore/java/retrofit2/api/openapi.yaml | 8 +++ .../docs/AdditionalPropertiesClass.md | 2 + .../model/AdditionalPropertiesClass.java | 60 +++++++++++++++- .../java/retrofit2rx/api/openapi.yaml | 8 +++ .../docs/AdditionalPropertiesClass.md | 2 + .../model/AdditionalPropertiesClass.java | 60 +++++++++++++++- .../java/retrofit2rx2/api/openapi.yaml | 8 +++ .../docs/AdditionalPropertiesClass.md | 2 + .../model/AdditionalPropertiesClass.java | 60 +++++++++++++++- .../petstore/java/vertx/api/openapi.yaml | 8 +++ .../vertx/docs/AdditionalPropertiesClass.md | 2 + .../model/AdditionalPropertiesClass.java | 64 ++++++++++++++++- .../petstore/java/webclient/api/openapi.yaml | 8 +++ .../docs/AdditionalPropertiesClass.md | 2 + .../model/AdditionalPropertiesClass.java | 64 ++++++++++++++++- 88 files changed, 1955 insertions(+), 47 deletions(-) diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesClass.md index 12f3292db0bf..4b2311590cc6 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesClass.md @@ -13,6 +13,8 @@ Name | Type | Description | Notes **MapArrayAnytype** | **Dictionary<string, List<Object>>** | | [optional] **MapMapString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] **MapMapAnytype** | **Dictionary<string, Dictionary<string, Object>>** | | [optional] +**MapWithAdditionalProperties** | **Object** | | [optional] +**MapWithoutAdditionalProperties** | **Object** | | [optional] **Anytype1** | **Object** | | [optional] **Anytype2** | **Object** | | [optional] **Anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 8a4e6b78b30f..7f971ad070a3 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -41,10 +41,12 @@ public partial class AdditionalPropertiesClass : IEquatablemapArrayAnytype. /// mapMapString. /// mapMapAnytype. + /// mapWithAdditionalProperties. + /// mapWithoutAdditionalProperties. /// anytype1. /// anytype2. /// anytype3. - public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) + public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object mapWithAdditionalProperties = default(Object), Object mapWithoutAdditionalProperties = default(Object), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) { this.MapString = mapString; this.MapNumber = mapNumber; @@ -54,6 +56,8 @@ public partial class AdditionalPropertiesClass : IEquatable> MapMapAnytype { get; set; } + /// + /// Gets or Sets MapWithAdditionalProperties + /// + [DataMember(Name="map_with_additional_properties", EmitDefaultValue=false)] + public Object MapWithAdditionalProperties { get; set; } + + /// + /// Gets or Sets MapWithoutAdditionalProperties + /// + [DataMember(Name="map_without_additional_properties", EmitDefaultValue=false)] + public Object MapWithoutAdditionalProperties { get; set; } + /// /// Gets or Sets Anytype1 /// @@ -141,6 +157,8 @@ public override string ToString() sb.Append(" MapArrayAnytype: ").Append(MapArrayAnytype).Append("\n"); sb.Append(" MapMapString: ").Append(MapMapString).Append("\n"); sb.Append(" MapMapAnytype: ").Append(MapMapAnytype).Append("\n"); + sb.Append(" MapWithAdditionalProperties: ").Append(MapWithAdditionalProperties).Append("\n"); + sb.Append(" MapWithoutAdditionalProperties: ").Append(MapWithoutAdditionalProperties).Append("\n"); sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); sb.Append(" Anytype2: ").Append(Anytype2).Append("\n"); sb.Append(" Anytype3: ").Append(Anytype3).Append("\n"); @@ -226,6 +244,16 @@ public bool Equals(AdditionalPropertiesClass input) input.MapMapAnytype != null && this.MapMapAnytype.SequenceEqual(input.MapMapAnytype) ) && + ( + this.MapWithAdditionalProperties == input.MapWithAdditionalProperties || + (this.MapWithAdditionalProperties != null && + this.MapWithAdditionalProperties.Equals(input.MapWithAdditionalProperties)) + ) && + ( + this.MapWithoutAdditionalProperties == input.MapWithoutAdditionalProperties || + (this.MapWithoutAdditionalProperties != null && + this.MapWithoutAdditionalProperties.Equals(input.MapWithoutAdditionalProperties)) + ) && ( this.Anytype1 == input.Anytype1 || (this.Anytype1 != null && @@ -268,6 +296,10 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.MapMapString.GetHashCode(); if (this.MapMapAnytype != null) hashCode = hashCode * 59 + this.MapMapAnytype.GetHashCode(); + if (this.MapWithAdditionalProperties != null) + hashCode = hashCode * 59 + this.MapWithAdditionalProperties.GetHashCode(); + if (this.MapWithoutAdditionalProperties != null) + hashCode = hashCode * 59 + this.MapWithoutAdditionalProperties.GetHashCode(); if (this.Anytype1 != null) hashCode = hashCode * 59 + this.Anytype1.GetHashCode(); if (this.Anytype2 != null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesClass.md index d07f57619d5e..4b2311590cc6 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesClass.md @@ -13,9 +13,11 @@ Name | Type | Description | Notes **MapArrayAnytype** | **Dictionary<string, List<Object>>** | | [optional] **MapMapString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] **MapMapAnytype** | **Dictionary<string, Dictionary<string, Object>>** | | [optional] -**Anytype1** | [**Object**](.md) | | [optional] -**Anytype2** | [**Object**](.md) | | [optional] -**Anytype3** | [**Object**](.md) | | [optional] +**MapWithAdditionalProperties** | **Object** | | [optional] +**MapWithoutAdditionalProperties** | **Object** | | [optional] +**Anytype1** | **Object** | | [optional] +**Anytype2** | **Object** | | [optional] +**Anytype3** | **Object** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index d56cf173ddf2..c9efb170ac48 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -41,10 +41,12 @@ public partial class AdditionalPropertiesClass : IEquatablemapArrayAnytype. /// mapMapString. /// mapMapAnytype. + /// mapWithAdditionalProperties. + /// mapWithoutAdditionalProperties. /// anytype1. /// anytype2. /// anytype3. - public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) + public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object mapWithAdditionalProperties = default(Object), Object mapWithoutAdditionalProperties = default(Object), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) { this.MapString = mapString; this.MapNumber = mapNumber; @@ -54,6 +56,8 @@ public partial class AdditionalPropertiesClass : IEquatable> MapMapAnytype { get; set; } + /// + /// Gets or Sets MapWithAdditionalProperties + /// + [DataMember(Name="map_with_additional_properties", EmitDefaultValue=false)] + public Object MapWithAdditionalProperties { get; set; } + + /// + /// Gets or Sets MapWithoutAdditionalProperties + /// + [DataMember(Name="map_without_additional_properties", EmitDefaultValue=false)] + public Object MapWithoutAdditionalProperties { get; set; } + /// /// Gets or Sets Anytype1 /// @@ -141,6 +157,8 @@ public override string ToString() sb.Append(" MapArrayAnytype: ").Append(MapArrayAnytype).Append("\n"); sb.Append(" MapMapString: ").Append(MapMapString).Append("\n"); sb.Append(" MapMapAnytype: ").Append(MapMapAnytype).Append("\n"); + sb.Append(" MapWithAdditionalProperties: ").Append(MapWithAdditionalProperties).Append("\n"); + sb.Append(" MapWithoutAdditionalProperties: ").Append(MapWithoutAdditionalProperties).Append("\n"); sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); sb.Append(" Anytype2: ").Append(Anytype2).Append("\n"); sb.Append(" Anytype3: ").Append(Anytype3).Append("\n"); @@ -226,6 +244,16 @@ public bool Equals(AdditionalPropertiesClass input) input.MapMapAnytype != null && this.MapMapAnytype.SequenceEqual(input.MapMapAnytype) ) && + ( + this.MapWithAdditionalProperties == input.MapWithAdditionalProperties || + (this.MapWithAdditionalProperties != null && + this.MapWithAdditionalProperties.Equals(input.MapWithAdditionalProperties)) + ) && + ( + this.MapWithoutAdditionalProperties == input.MapWithoutAdditionalProperties || + (this.MapWithoutAdditionalProperties != null && + this.MapWithoutAdditionalProperties.Equals(input.MapWithoutAdditionalProperties)) + ) && ( this.Anytype1 == input.Anytype1 || (this.Anytype1 != null && @@ -268,6 +296,10 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.MapMapString.GetHashCode(); if (this.MapMapAnytype != null) hashCode = hashCode * 59 + this.MapMapAnytype.GetHashCode(); + if (this.MapWithAdditionalProperties != null) + hashCode = hashCode * 59 + this.MapWithAdditionalProperties.GetHashCode(); + if (this.MapWithoutAdditionalProperties != null) + hashCode = hashCode * 59 + this.MapWithoutAdditionalProperties.GetHashCode(); if (this.Anytype1 != null) hashCode = hashCode * 59 + this.Anytype1.GetHashCode(); if (this.Anytype2 != null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesClass.md index d07f57619d5e..4b2311590cc6 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesClass.md @@ -13,9 +13,11 @@ Name | Type | Description | Notes **MapArrayAnytype** | **Dictionary<string, List<Object>>** | | [optional] **MapMapString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] **MapMapAnytype** | **Dictionary<string, Dictionary<string, Object>>** | | [optional] -**Anytype1** | [**Object**](.md) | | [optional] -**Anytype2** | [**Object**](.md) | | [optional] -**Anytype3** | [**Object**](.md) | | [optional] +**MapWithAdditionalProperties** | **Object** | | [optional] +**MapWithoutAdditionalProperties** | **Object** | | [optional] +**Anytype1** | **Object** | | [optional] +**Anytype2** | **Object** | | [optional] +**Anytype3** | **Object** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 8a4e6b78b30f..7f971ad070a3 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -41,10 +41,12 @@ public partial class AdditionalPropertiesClass : IEquatablemapArrayAnytype. /// mapMapString. /// mapMapAnytype. + /// mapWithAdditionalProperties. + /// mapWithoutAdditionalProperties. /// anytype1. /// anytype2. /// anytype3. - public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) + public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object mapWithAdditionalProperties = default(Object), Object mapWithoutAdditionalProperties = default(Object), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) { this.MapString = mapString; this.MapNumber = mapNumber; @@ -54,6 +56,8 @@ public partial class AdditionalPropertiesClass : IEquatable> MapMapAnytype { get; set; } + /// + /// Gets or Sets MapWithAdditionalProperties + /// + [DataMember(Name="map_with_additional_properties", EmitDefaultValue=false)] + public Object MapWithAdditionalProperties { get; set; } + + /// + /// Gets or Sets MapWithoutAdditionalProperties + /// + [DataMember(Name="map_without_additional_properties", EmitDefaultValue=false)] + public Object MapWithoutAdditionalProperties { get; set; } + /// /// Gets or Sets Anytype1 /// @@ -141,6 +157,8 @@ public override string ToString() sb.Append(" MapArrayAnytype: ").Append(MapArrayAnytype).Append("\n"); sb.Append(" MapMapString: ").Append(MapMapString).Append("\n"); sb.Append(" MapMapAnytype: ").Append(MapMapAnytype).Append("\n"); + sb.Append(" MapWithAdditionalProperties: ").Append(MapWithAdditionalProperties).Append("\n"); + sb.Append(" MapWithoutAdditionalProperties: ").Append(MapWithoutAdditionalProperties).Append("\n"); sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); sb.Append(" Anytype2: ").Append(Anytype2).Append("\n"); sb.Append(" Anytype3: ").Append(Anytype3).Append("\n"); @@ -226,6 +244,16 @@ public bool Equals(AdditionalPropertiesClass input) input.MapMapAnytype != null && this.MapMapAnytype.SequenceEqual(input.MapMapAnytype) ) && + ( + this.MapWithAdditionalProperties == input.MapWithAdditionalProperties || + (this.MapWithAdditionalProperties != null && + this.MapWithAdditionalProperties.Equals(input.MapWithAdditionalProperties)) + ) && + ( + this.MapWithoutAdditionalProperties == input.MapWithoutAdditionalProperties || + (this.MapWithoutAdditionalProperties != null && + this.MapWithoutAdditionalProperties.Equals(input.MapWithoutAdditionalProperties)) + ) && ( this.Anytype1 == input.Anytype1 || (this.Anytype1 != null && @@ -268,6 +296,10 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.MapMapString.GetHashCode(); if (this.MapMapAnytype != null) hashCode = hashCode * 59 + this.MapMapAnytype.GetHashCode(); + if (this.MapWithAdditionalProperties != null) + hashCode = hashCode * 59 + this.MapWithAdditionalProperties.GetHashCode(); + if (this.MapWithoutAdditionalProperties != null) + hashCode = hashCode * 59 + this.MapWithoutAdditionalProperties.GetHashCode(); if (this.Anytype1 != null) hashCode = hashCode * 59 + this.Anytype1.GetHashCode(); if (this.Anytype2 != null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/Org.OpenAPITools.sln b/samples/client/petstore/csharp/OpenAPIClientNetStandard/Org.OpenAPITools.sln index 4f3b7e0fdef6..8d85f5b71f0b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/Org.OpenAPITools.sln +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/Org.OpenAPITools.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{3AB1F259-1769-484B-9411-84505FCCBD55}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{321C8C3F-0156-40C1-AE42-D59761FB9B6C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -10,10 +10,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3AB1F259-1769-484B-9411-84505FCCBD55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3AB1F259-1769-484B-9411-84505FCCBD55}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3AB1F259-1769-484B-9411-84505FCCBD55}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3AB1F259-1769-484B-9411-84505FCCBD55}.Release|Any CPU.Build.0 = Release|Any CPU + {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Release|Any CPU.Build.0 = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesClass.md index d07f57619d5e..4b2311590cc6 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesClass.md @@ -13,9 +13,11 @@ Name | Type | Description | Notes **MapArrayAnytype** | **Dictionary<string, List<Object>>** | | [optional] **MapMapString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] **MapMapAnytype** | **Dictionary<string, Dictionary<string, Object>>** | | [optional] -**Anytype1** | [**Object**](.md) | | [optional] -**Anytype2** | [**Object**](.md) | | [optional] -**Anytype3** | [**Object**](.md) | | [optional] +**MapWithAdditionalProperties** | **Object** | | [optional] +**MapWithoutAdditionalProperties** | **Object** | | [optional] +**Anytype1** | **Object** | | [optional] +**Anytype2** | **Object** | | [optional] +**Anytype3** | **Object** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index f56db9cd1655..ccd3f80fda9b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -39,10 +39,12 @@ public partial class AdditionalPropertiesClass : IEquatablemapArrayAnytype. /// mapMapString. /// mapMapAnytype. + /// mapWithAdditionalProperties. + /// mapWithoutAdditionalProperties. /// anytype1. /// anytype2. /// anytype3. - public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) + public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object mapWithAdditionalProperties = default(Object), Object mapWithoutAdditionalProperties = default(Object), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) { this.MapString = mapString; this.MapNumber = mapNumber; @@ -52,6 +54,8 @@ public partial class AdditionalPropertiesClass : IEquatable> MapMapAnytype { get; set; } + /// + /// Gets or Sets MapWithAdditionalProperties + /// + [DataMember(Name="map_with_additional_properties", EmitDefaultValue=false)] + public Object MapWithAdditionalProperties { get; set; } + + /// + /// Gets or Sets MapWithoutAdditionalProperties + /// + [DataMember(Name="map_without_additional_properties", EmitDefaultValue=false)] + public Object MapWithoutAdditionalProperties { get; set; } + /// /// Gets or Sets Anytype1 /// @@ -139,6 +155,8 @@ public override string ToString() sb.Append(" MapArrayAnytype: ").Append(MapArrayAnytype).Append("\n"); sb.Append(" MapMapString: ").Append(MapMapString).Append("\n"); sb.Append(" MapMapAnytype: ").Append(MapMapAnytype).Append("\n"); + sb.Append(" MapWithAdditionalProperties: ").Append(MapWithAdditionalProperties).Append("\n"); + sb.Append(" MapWithoutAdditionalProperties: ").Append(MapWithoutAdditionalProperties).Append("\n"); sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); sb.Append(" Anytype2: ").Append(Anytype2).Append("\n"); sb.Append(" Anytype3: ").Append(Anytype3).Append("\n"); @@ -224,6 +242,16 @@ public bool Equals(AdditionalPropertiesClass input) input.MapMapAnytype != null && this.MapMapAnytype.SequenceEqual(input.MapMapAnytype) ) && + ( + this.MapWithAdditionalProperties == input.MapWithAdditionalProperties || + (this.MapWithAdditionalProperties != null && + this.MapWithAdditionalProperties.Equals(input.MapWithAdditionalProperties)) + ) && + ( + this.MapWithoutAdditionalProperties == input.MapWithoutAdditionalProperties || + (this.MapWithoutAdditionalProperties != null && + this.MapWithoutAdditionalProperties.Equals(input.MapWithoutAdditionalProperties)) + ) && ( this.Anytype1 == input.Anytype1 || (this.Anytype1 != null && @@ -266,6 +294,10 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.MapMapString.GetHashCode(); if (this.MapMapAnytype != null) hashCode = hashCode * 59 + this.MapMapAnytype.GetHashCode(); + if (this.MapWithAdditionalProperties != null) + hashCode = hashCode * 59 + this.MapWithAdditionalProperties.GetHashCode(); + if (this.MapWithoutAdditionalProperties != null) + hashCode = hashCode * 59 + this.MapWithoutAdditionalProperties.GetHashCode(); if (this.Anytype1 != null) hashCode = hashCode * 59 + this.Anytype1.GetHashCode(); if (this.Anytype2 != null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 0b8a73d6143f..7c827a81c332 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -12,7 +12,7 @@ The version of the OpenAPI document: 1.0.0 14.0 Debug AnyCPU - {3AB1F259-1769-484B-9411-84505FCCBD55} + {321C8C3F-0156-40C1-AE42-D59761FB9B6C} Library Properties Org.OpenAPITools diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesClass.md index d07f57619d5e..4b2311590cc6 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesClass.md @@ -13,9 +13,11 @@ Name | Type | Description | Notes **MapArrayAnytype** | **Dictionary<string, List<Object>>** | | [optional] **MapMapString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] **MapMapAnytype** | **Dictionary<string, Dictionary<string, Object>>** | | [optional] -**Anytype1** | [**Object**](.md) | | [optional] -**Anytype2** | [**Object**](.md) | | [optional] -**Anytype3** | [**Object**](.md) | | [optional] +**MapWithAdditionalProperties** | **Object** | | [optional] +**MapWithoutAdditionalProperties** | **Object** | | [optional] +**Anytype1** | **Object** | | [optional] +**Anytype2** | **Object** | | [optional] +**Anytype3** | **Object** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 53e2fbc1d03b..7b53578ded36 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -44,10 +44,12 @@ public partial class AdditionalPropertiesClass : IEquatablemapArrayAnytype. /// mapMapString. /// mapMapAnytype. + /// mapWithAdditionalProperties. + /// mapWithoutAdditionalProperties. /// anytype1. /// anytype2. /// anytype3. - public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) + public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object mapWithAdditionalProperties = default(Object), Object mapWithoutAdditionalProperties = default(Object), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) { this.MapString = mapString; this.MapNumber = mapNumber; @@ -57,6 +59,8 @@ public partial class AdditionalPropertiesClass : IEquatable> MapMapAnytype { get; set; } + /// + /// Gets or Sets MapWithAdditionalProperties + /// + [DataMember(Name="map_with_additional_properties", EmitDefaultValue=true)] + public Object MapWithAdditionalProperties { get; set; } + + /// + /// Gets or Sets MapWithoutAdditionalProperties + /// + [DataMember(Name="map_without_additional_properties", EmitDefaultValue=true)] + public Object MapWithoutAdditionalProperties { get; set; } + /// /// Gets or Sets Anytype1 /// @@ -144,6 +160,8 @@ public override string ToString() sb.Append(" MapArrayAnytype: ").Append(MapArrayAnytype).Append("\n"); sb.Append(" MapMapString: ").Append(MapMapString).Append("\n"); sb.Append(" MapMapAnytype: ").Append(MapMapAnytype).Append("\n"); + sb.Append(" MapWithAdditionalProperties: ").Append(MapWithAdditionalProperties).Append("\n"); + sb.Append(" MapWithoutAdditionalProperties: ").Append(MapWithoutAdditionalProperties).Append("\n"); sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); sb.Append(" Anytype2: ").Append(Anytype2).Append("\n"); sb.Append(" Anytype3: ").Append(Anytype3).Append("\n"); @@ -229,6 +247,16 @@ public bool Equals(AdditionalPropertiesClass input) input.MapMapAnytype != null && this.MapMapAnytype.SequenceEqual(input.MapMapAnytype) ) && + ( + this.MapWithAdditionalProperties == input.MapWithAdditionalProperties || + (this.MapWithAdditionalProperties != null && + this.MapWithAdditionalProperties.Equals(input.MapWithAdditionalProperties)) + ) && + ( + this.MapWithoutAdditionalProperties == input.MapWithoutAdditionalProperties || + (this.MapWithoutAdditionalProperties != null && + this.MapWithoutAdditionalProperties.Equals(input.MapWithoutAdditionalProperties)) + ) && ( this.Anytype1 == input.Anytype1 || (this.Anytype1 != null && @@ -271,6 +299,10 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.MapMapString.GetHashCode(); if (this.MapMapAnytype != null) hashCode = hashCode * 59 + this.MapMapAnytype.GetHashCode(); + if (this.MapWithAdditionalProperties != null) + hashCode = hashCode * 59 + this.MapWithAdditionalProperties.GetHashCode(); + if (this.MapWithoutAdditionalProperties != null) + hashCode = hashCode * 59 + this.MapWithoutAdditionalProperties.GetHashCode(); if (this.Anytype1 != null) hashCode = hashCode * 59 + this.Anytype1.GetHashCode(); if (this.Anytype2 != null) diff --git a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml index 5313659ef237..636f81711d57 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml @@ -1586,6 +1586,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2119,3 +2125,5 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md index 0dd3f328f41d..54a41452ee88 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md @@ -12,6 +12,8 @@ Name | Type | Description | Notes **MapArrayAnytype** | [**map[string][]map[string]interface{}**](array.md) | | [optional] **MapMapString** | [**map[string]map[string]string**](map.md) | | [optional] **MapMapAnytype** | [**map[string]map[string]map[string]interface{}**](map.md) | | [optional] +**MapWithAdditionalProperties** | **map[string]interface{}** | | [optional] +**MapWithoutAdditionalProperties** | **map[string]interface{}** | | [optional] **Anytype1** | **map[string]interface{}** | | [optional] **Anytype2** | **map[string]interface{}** | | [optional] **Anytype3** | **map[string]interface{}** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go index 35aafa9f6029..9636d9f1b2e0 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go @@ -19,6 +19,8 @@ type AdditionalPropertiesClass struct { MapArrayAnytype map[string][]map[string]interface{} `json:"map_array_anytype,omitempty" xml:"map_array_anytype"` MapMapString map[string]map[string]string `json:"map_map_string,omitempty" xml:"map_map_string"` MapMapAnytype map[string]map[string]map[string]interface{} `json:"map_map_anytype,omitempty" xml:"map_map_anytype"` + MapWithAdditionalProperties map[string]interface{} `json:"map_with_additional_properties,omitempty" xml:"map_with_additional_properties"` + MapWithoutAdditionalProperties map[string]interface{} `json:"map_without_additional_properties,omitempty" xml:"map_without_additional_properties"` Anytype1 map[string]interface{} `json:"anytype_1,omitempty" xml:"anytype_1"` Anytype2 map[string]interface{} `json:"anytype_2,omitempty" xml:"anytype_2"` Anytype3 map[string]interface{} `json:"anytype_3,omitempty" xml:"anytype_3"` diff --git a/samples/client/petstore/go/go-petstore/api/openapi.yaml b/samples/client/petstore/go/go-petstore/api/openapi.yaml index 5313659ef237..636f81711d57 100644 --- a/samples/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore/api/openapi.yaml @@ -1586,6 +1586,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2119,3 +2125,5 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md index 0dd3f328f41d..54a41452ee88 100644 --- a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md @@ -12,6 +12,8 @@ Name | Type | Description | Notes **MapArrayAnytype** | [**map[string][]map[string]interface{}**](array.md) | | [optional] **MapMapString** | [**map[string]map[string]string**](map.md) | | [optional] **MapMapAnytype** | [**map[string]map[string]map[string]interface{}**](map.md) | | [optional] +**MapWithAdditionalProperties** | **map[string]interface{}** | | [optional] +**MapWithoutAdditionalProperties** | **map[string]interface{}** | | [optional] **Anytype1** | **map[string]interface{}** | | [optional] **Anytype2** | **map[string]interface{}** | | [optional] **Anytype3** | **map[string]interface{}** | | [optional] diff --git a/samples/client/petstore/go/go-petstore/model_additional_properties_class.go b/samples/client/petstore/go/go-petstore/model_additional_properties_class.go index 00ca7fb44061..71be988998b6 100644 --- a/samples/client/petstore/go/go-petstore/model_additional_properties_class.go +++ b/samples/client/petstore/go/go-petstore/model_additional_properties_class.go @@ -18,6 +18,8 @@ type AdditionalPropertiesClass struct { MapArrayAnytype map[string][]map[string]interface{} `json:"map_array_anytype,omitempty"` MapMapString map[string]map[string]string `json:"map_map_string,omitempty"` MapMapAnytype map[string]map[string]map[string]interface{} `json:"map_map_anytype,omitempty"` + MapWithAdditionalProperties map[string]interface{} `json:"map_with_additional_properties,omitempty"` + MapWithoutAdditionalProperties map[string]interface{} `json:"map_without_additional_properties,omitempty"` Anytype1 map[string]interface{} `json:"anytype_1,omitempty"` Anytype2 map[string]interface{} `json:"anytype_2,omitempty"` Anytype3 map[string]interface{} `json:"anytype_3,omitempty"` diff --git a/samples/client/petstore/java/feign/api/openapi.yaml b/samples/client/petstore/java/feign/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/feign/api/openapi.yaml +++ b/samples/client/petstore/java/feign/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index e35f2cca9ab1..019d1418dfb4 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -39,6 +39,8 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -70,6 +72,12 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; + public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + private Object mapWithAdditionalProperties; + + public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + private Object mapWithoutAdditionalProperties; + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -344,6 +352,56 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -436,6 +494,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -443,7 +503,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -459,6 +519,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/feign10x/api/openapi.yaml b/samples/client/petstore/java/feign10x/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/feign10x/api/openapi.yaml +++ b/samples/client/petstore/java/feign10x/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 781d4686e981..694d92080510 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -39,6 +39,8 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -69,6 +71,12 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; + public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + private Object mapWithAdditionalProperties; + + public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + private Object mapWithoutAdditionalProperties; + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -343,6 +351,56 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -435,6 +493,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -442,7 +502,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -458,6 +518,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/google-api-client/api/openapi.yaml b/samples/client/petstore/java/google-api-client/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/google-api-client/api/openapi.yaml +++ b/samples/client/petstore/java/google-api-client/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesClass.md index ffab911c1be8..ae396ec513ca 100644 --- a/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesClass.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 781d4686e981..694d92080510 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -39,6 +39,8 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -69,6 +71,12 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; + public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + private Object mapWithAdditionalProperties; + + public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + private Object mapWithoutAdditionalProperties; + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -343,6 +351,56 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -435,6 +493,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -442,7 +502,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -458,6 +518,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/jersey1/api/openapi.yaml b/samples/client/petstore/java/jersey1/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/jersey1/api/openapi.yaml +++ b/samples/client/petstore/java/jersey1/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesClass.md index ffab911c1be8..ae396ec513ca 100644 --- a/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesClass.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 781d4686e981..694d92080510 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -39,6 +39,8 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -69,6 +71,12 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; + public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + private Object mapWithAdditionalProperties; + + public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + private Object mapWithoutAdditionalProperties; + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -343,6 +351,56 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -435,6 +493,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -442,7 +502,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -458,6 +518,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/jersey2-java6/api/openapi.yaml b/samples/client/petstore/java/jersey2-java6/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/jersey2-java6/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java6/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/jersey2-java6/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/jersey2-java6/docs/AdditionalPropertiesClass.md index ffab911c1be8..ae396ec513ca 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/jersey2-java6/docs/AdditionalPropertiesClass.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 58772627a0df..e18e379ebb30 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -64,6 +64,14 @@ public class AdditionalPropertiesClass { @SerializedName(SERIALIZED_NAME_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; + public static final String SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + @SerializedName(SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES) + private Object mapWithAdditionalProperties; + + public static final String SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + @SerializedName(SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + private Object mapWithoutAdditionalProperties; + public static final String SERIALIZED_NAME_ANYTYPE1 = "anytype_1"; @SerializedName(SERIALIZED_NAME_ANYTYPE1) private Object anytype1; @@ -325,6 +333,52 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -411,6 +465,8 @@ public boolean equals(java.lang.Object o) { ObjectUtils.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && ObjectUtils.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && ObjectUtils.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + ObjectUtils.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + ObjectUtils.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && ObjectUtils.equals(this.anytype1, additionalPropertiesClass.anytype1) && ObjectUtils.equals(this.anytype2, additionalPropertiesClass.anytype2) && ObjectUtils.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -418,7 +474,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return ObjectUtils.hashCodeMulti(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return ObjectUtils.hashCodeMulti(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -434,6 +490,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/jersey2-java7/api/openapi.yaml b/samples/client/petstore/java/jersey2-java7/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/jersey2-java7/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java7/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/jersey2-java7/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/jersey2-java7/docs/AdditionalPropertiesClass.md index ffab911c1be8..ae396ec513ca 100644 --- a/samples/client/petstore/java/jersey2-java7/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/jersey2-java7/docs/AdditionalPropertiesClass.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/jersey2-java7/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-java7/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 781d4686e981..694d92080510 100644 --- a/samples/client/petstore/java/jersey2-java7/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey2-java7/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -39,6 +39,8 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -69,6 +71,12 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; + public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + private Object mapWithAdditionalProperties; + + public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + private Object mapWithoutAdditionalProperties; + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -343,6 +351,56 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -435,6 +493,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -442,7 +502,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -458,6 +518,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesClass.md index ffab911c1be8..ae396ec513ca 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesClass.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index fa85ab77596a..0ced388db4e4 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -39,6 +39,8 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -69,6 +71,12 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; + public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + private Object mapWithAdditionalProperties; + + public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + private Object mapWithoutAdditionalProperties; + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -343,6 +351,56 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -435,6 +493,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -442,7 +502,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -458,6 +518,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/native/api/openapi.yaml b/samples/client/petstore/java/native/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/native/api/openapi.yaml +++ b/samples/client/petstore/java/native/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/native/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/native/docs/AdditionalPropertiesClass.md index ffab911c1be8..ae396ec513ca 100644 --- a/samples/client/petstore/java/native/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/native/docs/AdditionalPropertiesClass.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index fa85ab77596a..0ced388db4e4 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -39,6 +39,8 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -69,6 +71,12 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; + public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + private Object mapWithAdditionalProperties; + + public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + private Object mapWithoutAdditionalProperties; + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -343,6 +351,56 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -435,6 +493,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -442,7 +502,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -458,6 +518,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesClass.md index 70d8b5839fac..fdc052d56b55 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesClass.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 4d1400b1d913..d3d7bc379703 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -67,6 +67,14 @@ public class AdditionalPropertiesClass implements Parcelable { @SerializedName(SERIALIZED_NAME_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; + public static final String SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + @SerializedName(SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES) + private Object mapWithAdditionalProperties; + + public static final String SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + @SerializedName(SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + private Object mapWithoutAdditionalProperties; + public static final String SERIALIZED_NAME_ANYTYPE1 = "anytype_1"; @SerializedName(SERIALIZED_NAME_ANYTYPE1) private Object anytype1; @@ -330,6 +338,52 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -416,6 +470,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -423,7 +479,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -439,6 +495,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); @@ -467,6 +525,8 @@ public void writeToParcel(Parcel out, int flags) { out.writeValue(mapArrayAnytype); out.writeValue(mapMapString); out.writeValue(mapMapAnytype); + out.writeValue(mapWithAdditionalProperties); + out.writeValue(mapWithoutAdditionalProperties); out.writeValue(anytype1); out.writeValue(anytype2); out.writeValue(anytype3); @@ -481,6 +541,8 @@ public void writeToParcel(Parcel out, int flags) { mapArrayAnytype = (Map>)in.readValue(List.class.getClassLoader()); mapMapString = (Map>)in.readValue(Map.class.getClassLoader()); mapMapAnytype = (Map>)in.readValue(Map.class.getClassLoader()); + mapWithAdditionalProperties = (Object)in.readValue(null); + mapWithoutAdditionalProperties = (Object)in.readValue(null); anytype1 = (Object)in.readValue(null); anytype2 = (Object)in.readValue(null); anytype3 = (Object)in.readValue(null); diff --git a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/okhttp-gson/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/okhttp-gson/docs/AdditionalPropertiesClass.md index ffab911c1be8..ae396ec513ca 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/okhttp-gson/docs/AdditionalPropertiesClass.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index a067b01ec979..383a75e58c78 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -65,6 +65,14 @@ public class AdditionalPropertiesClass { @SerializedName(SERIALIZED_NAME_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; + public static final String SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + @SerializedName(SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES) + private Object mapWithAdditionalProperties; + + public static final String SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + @SerializedName(SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + private Object mapWithoutAdditionalProperties; + public static final String SERIALIZED_NAME_ANYTYPE1 = "anytype_1"; @SerializedName(SERIALIZED_NAME_ANYTYPE1) private Object anytype1; @@ -326,6 +334,52 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -412,6 +466,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -419,7 +475,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -435,6 +491,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesClass.md index ffab911c1be8..ae396ec513ca 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesClass.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 803715a970f3..8fa80fa45318 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -42,6 +42,8 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -72,6 +74,12 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; + public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + private Object mapWithAdditionalProperties; + + public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + private Object mapWithoutAdditionalProperties; + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -351,6 +359,56 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -443,6 +501,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -450,7 +510,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -466,6 +526,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index 2e3844ba9756..38091db3bd34 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -106,6 +106,22 @@ public void mapMapAnytypeTest() { // TODO: test mapMapAnytype } + /** + * Test the property 'mapWithAdditionalProperties' + */ + @Test + public void mapWithAdditionalPropertiesTest() { + // TODO: test mapWithAdditionalProperties + } + + /** + * Test the property 'mapWithoutAdditionalProperties' + */ + @Test + public void mapWithoutAdditionalPropertiesTest() { + // TODO: test mapWithoutAdditionalProperties + } + /** * Test the property 'anytype1' */ diff --git a/samples/client/petstore/java/rest-assured/api/openapi.yaml b/samples/client/petstore/java/rest-assured/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/rest-assured/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesClass.md index ffab911c1be8..ae396ec513ca 100644 --- a/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesClass.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index a72f9a9889e8..7864d47805fc 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -68,6 +68,14 @@ public class AdditionalPropertiesClass { @SerializedName(SERIALIZED_NAME_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; + public static final String SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + @SerializedName(SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES) + private Object mapWithAdditionalProperties; + + public static final String SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + @SerializedName(SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + private Object mapWithoutAdditionalProperties; + public static final String SERIALIZED_NAME_ANYTYPE1 = "anytype_1"; @SerializedName(SERIALIZED_NAME_ANYTYPE1) private Object anytype1; @@ -334,6 +342,52 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -420,6 +474,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -427,7 +483,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -443,6 +499,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/resteasy/api/openapi.yaml b/samples/client/petstore/java/resteasy/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/resteasy/api/openapi.yaml +++ b/samples/client/petstore/java/resteasy/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesClass.md index ffab911c1be8..ae396ec513ca 100644 --- a/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesClass.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 781d4686e981..694d92080510 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -39,6 +39,8 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -69,6 +71,12 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; + public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + private Object mapWithAdditionalProperties; + + public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + private Object mapWithoutAdditionalProperties; + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -343,6 +351,56 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -435,6 +493,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -442,7 +502,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -458,6 +518,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesClass.md index ffab911c1be8..ae396ec513ca 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesClass.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index c8b96f0db2dd..c816033dfd06 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -41,6 +41,8 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -106,6 +108,14 @@ public class AdditionalPropertiesClass { @XmlElement(name = "inner") private Map> mapMapAnytype = null; + public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + @XmlElement(name = "map_with_additional_properties") + private Object mapWithAdditionalProperties; + + public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + @XmlElement(name = "map_without_additional_properties") + private Object mapWithoutAdditionalProperties; + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; @XmlElement(name = "anytype_1") private Object anytype1; @@ -383,6 +393,58 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "map_with_additional_properties") + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "map_without_additional_properties") + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -478,6 +540,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -485,7 +549,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -501,6 +565,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/resttemplate/api/openapi.yaml b/samples/client/petstore/java/resttemplate/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/resttemplate/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/resttemplate/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/resttemplate/docs/AdditionalPropertiesClass.md index ffab911c1be8..ae396ec513ca 100644 --- a/samples/client/petstore/java/resttemplate/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/resttemplate/docs/AdditionalPropertiesClass.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 781d4686e981..694d92080510 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -39,6 +39,8 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -69,6 +71,12 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; + public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + private Object mapWithAdditionalProperties; + + public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + private Object mapWithoutAdditionalProperties; + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -343,6 +351,56 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -435,6 +493,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -442,7 +502,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -458,6 +518,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/retrofit/api/openapi.yaml b/samples/client/petstore/java/retrofit/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/retrofit/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index a067b01ec979..383a75e58c78 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -65,6 +65,14 @@ public class AdditionalPropertiesClass { @SerializedName(SERIALIZED_NAME_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; + public static final String SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + @SerializedName(SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES) + private Object mapWithAdditionalProperties; + + public static final String SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + @SerializedName(SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + private Object mapWithoutAdditionalProperties; + public static final String SERIALIZED_NAME_ANYTYPE1 = "anytype_1"; @SerializedName(SERIALIZED_NAME_ANYTYPE1) private Object anytype1; @@ -326,6 +334,52 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -412,6 +466,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -419,7 +475,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -435,6 +491,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/retrofit2-play24/api/openapi.yaml b/samples/client/petstore/java/retrofit2-play24/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/retrofit2-play24/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2-play24/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/retrofit2-play24/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2-play24/docs/AdditionalPropertiesClass.md index ffab911c1be8..ae396ec513ca 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/AdditionalPropertiesClass.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 294c05c7334c..55852c495430 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -41,6 +41,8 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -71,6 +73,12 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; + public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + private Object mapWithAdditionalProperties; + + public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + private Object mapWithoutAdditionalProperties; + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -350,6 +358,56 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -442,6 +500,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -449,7 +509,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -465,6 +525,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/retrofit2-play25/api/openapi.yaml b/samples/client/petstore/java/retrofit2-play25/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/retrofit2-play25/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2-play25/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/retrofit2-play25/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2-play25/docs/AdditionalPropertiesClass.md index ffab911c1be8..ae396ec513ca 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/AdditionalPropertiesClass.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 294c05c7334c..55852c495430 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -41,6 +41,8 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -71,6 +73,12 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; + public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + private Object mapWithAdditionalProperties; + + public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + private Object mapWithoutAdditionalProperties; + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -350,6 +358,56 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -442,6 +500,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -449,7 +509,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -465,6 +525,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml b/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/retrofit2-play26/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2-play26/docs/AdditionalPropertiesClass.md index ffab911c1be8..ae396ec513ca 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/AdditionalPropertiesClass.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 294c05c7334c..55852c495430 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -41,6 +41,8 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -71,6 +73,12 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; + public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + private Object mapWithAdditionalProperties; + + public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + private Object mapWithoutAdditionalProperties; + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -350,6 +358,56 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -442,6 +500,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -449,7 +509,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -465,6 +525,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/retrofit2/api/openapi.yaml b/samples/client/petstore/java/retrofit2/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/retrofit2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesClass.md index ffab911c1be8..ae396ec513ca 100644 --- a/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesClass.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index a067b01ec979..383a75e58c78 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -65,6 +65,14 @@ public class AdditionalPropertiesClass { @SerializedName(SERIALIZED_NAME_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; + public static final String SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + @SerializedName(SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES) + private Object mapWithAdditionalProperties; + + public static final String SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + @SerializedName(SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + private Object mapWithoutAdditionalProperties; + public static final String SERIALIZED_NAME_ANYTYPE1 = "anytype_1"; @SerializedName(SERIALIZED_NAME_ANYTYPE1) private Object anytype1; @@ -326,6 +334,52 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -412,6 +466,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -419,7 +475,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -435,6 +491,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/retrofit2rx/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/retrofit2rx/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/retrofit2rx/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2rx/docs/AdditionalPropertiesClass.md index ffab911c1be8..ae396ec513ca 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/retrofit2rx/docs/AdditionalPropertiesClass.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index a067b01ec979..383a75e58c78 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -65,6 +65,14 @@ public class AdditionalPropertiesClass { @SerializedName(SERIALIZED_NAME_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; + public static final String SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + @SerializedName(SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES) + private Object mapWithAdditionalProperties; + + public static final String SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + @SerializedName(SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + private Object mapWithoutAdditionalProperties; + public static final String SERIALIZED_NAME_ANYTYPE1 = "anytype_1"; @SerializedName(SERIALIZED_NAME_ANYTYPE1) private Object anytype1; @@ -326,6 +334,52 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -412,6 +466,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -419,7 +475,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -435,6 +491,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesClass.md index ffab911c1be8..ae396ec513ca 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesClass.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index a067b01ec979..383a75e58c78 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -65,6 +65,14 @@ public class AdditionalPropertiesClass { @SerializedName(SERIALIZED_NAME_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; + public static final String SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + @SerializedName(SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES) + private Object mapWithAdditionalProperties; + + public static final String SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + @SerializedName(SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + private Object mapWithoutAdditionalProperties; + public static final String SERIALIZED_NAME_ANYTYPE1 = "anytype_1"; @SerializedName(SERIALIZED_NAME_ANYTYPE1) private Object anytype1; @@ -326,6 +334,52 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -412,6 +466,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -419,7 +475,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -435,6 +491,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/vertx/api/openapi.yaml b/samples/client/petstore/java/vertx/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/vertx/api/openapi.yaml +++ b/samples/client/petstore/java/vertx/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/vertx/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/vertx/docs/AdditionalPropertiesClass.md index ffab911c1be8..ae396ec513ca 100644 --- a/samples/client/petstore/java/vertx/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/vertx/docs/AdditionalPropertiesClass.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index fa85ab77596a..0ced388db4e4 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -39,6 +39,8 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -69,6 +71,12 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; + public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + private Object mapWithAdditionalProperties; + + public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + private Object mapWithoutAdditionalProperties; + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -343,6 +351,56 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -435,6 +493,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -442,7 +502,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -458,6 +518,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/webclient/api/openapi.yaml b/samples/client/petstore/java/webclient/api/openapi.yaml index 30aad25824c8..aebe8a8917ac 100644 --- a/samples/client/petstore/java/webclient/api/openapi.yaml +++ b/samples/client/petstore/java/webclient/api/openapi.yaml @@ -1647,6 +1647,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2180,4 +2186,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/java/webclient/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/webclient/docs/AdditionalPropertiesClass.md index ffab911c1be8..ae396ec513ca 100644 --- a/samples/client/petstore/java/webclient/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/webclient/docs/AdditionalPropertiesClass.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index fa85ab77596a..0ced388db4e4 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -39,6 +39,8 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -69,6 +71,12 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; + public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + private Object mapWithAdditionalProperties; + + public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + private Object mapWithoutAdditionalProperties; + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -343,6 +351,56 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -435,6 +493,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -442,7 +502,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -458,6 +518,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); From f55c2f0dc705348f0deeacc6cdaa89ea6b94b0f5 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 06:19:46 -0700 Subject: [PATCH 056/105] execute sample scripts --- .../model/AdditionalPropertiesClass.java | 44 +++++++++++++++ .../model/AdditionalPropertiesClass.java | 56 ++++++++++++++++++- .../model/AdditionalPropertiesClass.java | 44 ++++++++++++++- .../src/main/openapi/openapi.yaml | 8 +++ .../model/AdditionalPropertiesClass.java | 44 ++++++++++++++- .../jaxrs-spec/src/main/openapi/openapi.yaml | 8 +++ .../model/AdditionalPropertiesClass.java | 56 ++++++++++++++++++- .../model/AdditionalPropertiesClass.java | 56 ++++++++++++++++++- .../model/AdditionalPropertiesClass.java | 56 ++++++++++++++++++- .../model/AdditionalPropertiesClass.java | 56 ++++++++++++++++++- 10 files changed, 421 insertions(+), 7 deletions(-) diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index 8dd83cb66108..52e44cfac413 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -48,6 +48,12 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; + @ApiModelProperty(value = "") + private Object mapWithAdditionalProperties; + + @ApiModelProperty(value = "") + private Object mapWithoutAdditionalProperties; + @ApiModelProperty(value = "") private Object anytype1; @@ -240,6 +246,42 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> mapMapAnytype = null; + public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) + private Object mapWithAdditionalProperties; + + public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + private Object mapWithoutAdditionalProperties; + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; @JsonProperty(JSON_PROPERTY_ANYTYPE1) private Object anytype1; @@ -313,6 +323,46 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @JsonProperty("map_with_additional_properties") + @ApiModelProperty(value = "") + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @JsonProperty("map_without_additional_properties") + @ApiModelProperty(value = "") + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -391,6 +441,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -398,7 +450,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -415,6 +467,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index f2332eb2a607..651625c5921e 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -28,6 +28,8 @@ public class AdditionalPropertiesClass implements Serializable { private @Valid Map> mapArrayAnytype = new HashMap>(); private @Valid Map> mapMapString = new HashMap>(); private @Valid Map> mapMapAnytype = new HashMap>(); + private @Valid Object mapWithAdditionalProperties; + private @Valid Object mapWithoutAdditionalProperties; private @Valid Object anytype1; private @Valid Object anytype2; private @Valid Object anytype3; @@ -178,6 +180,42 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; }/** **/ + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + + + + @ApiModelProperty(value = "") + @JsonProperty("map_with_additional_properties") + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + }/** + **/ + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + + + + @ApiModelProperty(value = "") + @JsonProperty("map_without_additional_properties") + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + }/** + **/ public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -249,6 +287,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -256,7 +296,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @Override @@ -272,6 +312,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml index f6f5c60294f7..333eb07e0c2d 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml @@ -1721,6 +1721,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2254,3 +2260,5 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index f2332eb2a607..651625c5921e 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -28,6 +28,8 @@ public class AdditionalPropertiesClass implements Serializable { private @Valid Map> mapArrayAnytype = new HashMap>(); private @Valid Map> mapMapString = new HashMap>(); private @Valid Map> mapMapAnytype = new HashMap>(); + private @Valid Object mapWithAdditionalProperties; + private @Valid Object mapWithoutAdditionalProperties; private @Valid Object anytype1; private @Valid Object anytype2; private @Valid Object anytype3; @@ -178,6 +180,42 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; }/** **/ + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + + + + @ApiModelProperty(value = "") + @JsonProperty("map_with_additional_properties") + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + }/** + **/ + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + + + + @ApiModelProperty(value = "") + @JsonProperty("map_without_additional_properties") + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + }/** + **/ public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -249,6 +287,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -256,7 +296,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @Override @@ -272,6 +312,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml index f6f5c60294f7..333eb07e0c2d 100644 --- a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml @@ -1721,6 +1721,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2254,3 +2260,5 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index 239ebd876168..f0c285650141 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -38,6 +38,8 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -76,6 +78,14 @@ public class AdditionalPropertiesClass { @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; + public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) + private Object mapWithAdditionalProperties; + + public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + private Object mapWithoutAdditionalProperties; + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; @JsonProperty(JSON_PROPERTY_ANYTYPE1) private Object anytype1; @@ -312,6 +322,46 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @JsonProperty("map_with_additional_properties") + @ApiModelProperty(value = "") + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @JsonProperty("map_without_additional_properties") + @ApiModelProperty(value = "") + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -390,6 +440,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -397,7 +449,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -414,6 +466,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index 239ebd876168..f0c285650141 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -38,6 +38,8 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -76,6 +78,14 @@ public class AdditionalPropertiesClass { @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; + public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) + private Object mapWithAdditionalProperties; + + public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + private Object mapWithoutAdditionalProperties; + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; @JsonProperty(JSON_PROPERTY_ANYTYPE1) private Object anytype1; @@ -312,6 +322,46 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @JsonProperty("map_with_additional_properties") + @ApiModelProperty(value = "") + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @JsonProperty("map_without_additional_properties") + @ApiModelProperty(value = "") + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -390,6 +440,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -397,7 +449,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -414,6 +466,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index 239ebd876168..f0c285650141 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -38,6 +38,8 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -76,6 +78,14 @@ public class AdditionalPropertiesClass { @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; + public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) + private Object mapWithAdditionalProperties; + + public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + private Object mapWithoutAdditionalProperties; + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; @JsonProperty(JSON_PROPERTY_ANYTYPE1) private Object anytype1; @@ -312,6 +322,46 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @JsonProperty("map_with_additional_properties") + @ApiModelProperty(value = "") + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @JsonProperty("map_without_additional_properties") + @ApiModelProperty(value = "") + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -390,6 +440,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -397,7 +449,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -414,6 +466,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index 239ebd876168..f0c285650141 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -38,6 +38,8 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -76,6 +78,14 @@ public class AdditionalPropertiesClass { @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; + public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; + @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) + private Object mapWithAdditionalProperties; + + public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; + @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) + private Object mapWithoutAdditionalProperties; + public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; @JsonProperty(JSON_PROPERTY_ANYTYPE1) private Object anytype1; @@ -312,6 +322,46 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @JsonProperty("map_with_additional_properties") + @ApiModelProperty(value = "") + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @JsonProperty("map_without_additional_properties") + @ApiModelProperty(value = "") + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -390,6 +440,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -397,7 +449,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @@ -414,6 +466,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); From c41d5fc7278fa3ff320fa16f9ffa888343018e69 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 16:28:39 +0000 Subject: [PATCH 057/105] Execute sample scripts --- .../lib/OpenAPIPetstore/Model.hs | 8 + .../lib/OpenAPIPetstore/ModelLens.hs | 10 + .../petstore/haskell-http-client/openapi.yaml | 8 + .../haskell-http-client/tests/Instances.hs | 2 + .../docs/AdditionalPropertiesClass.md | 2 + .../src/model/AdditionalPropertiesClass.js | 16 ++ .../docs/AdditionalPropertiesClass.md | 2 + .../src/model/AdditionalPropertiesClass.js | 16 ++ .../docs/AdditionalPropertiesClass.md | 2 + .../src/model/AdditionalPropertiesClass.js | 14 ++ .../docs/AdditionalPropertiesClass.md | 2 + .../src/model/AdditionalPropertiesClass.js | 14 ++ .../perl/docs/AdditionalPropertiesClass.md | 2 + .../Object/AdditionalPropertiesClass.pm | 18 ++ .../docs/Model/AdditionalPropertiesClass.md | 2 + .../lib/Model/AdditionalPropertiesClass.php | 60 +++++ .../Model/AdditionalPropertiesClassTest.php | 14 ++ .../docs/AdditionalPropertiesClass.md | 4 + .../models/additional_properties_class.rb | 20 +- .../ruby/docs/AdditionalPropertiesClass.md | 4 + .../models/additional_properties_class.rb | 20 +- .../additional_properties_class_spec.rb | 12 + .../public/openapi.json | 4 +- .../public/openapi.json | 4 +- .../public/openapi.json | 4 +- .../apimodels/AdditionalPropertiesClass.java | 46 +++- .../public/openapi.json | 12 +- .../public/openapi.json | 4 +- .../public/openapi.json | 4 +- .../public/openapi.json | 4 +- .../public/openapi.json | 4 +- .../java-play-framework/public/openapi.json | 4 +- .../output/multipart-v3/api/openapi.yaml | 2 + .../output/no-example-v3/api/openapi.yaml | 2 + .../output/openapi-v3/api/openapi.yaml | 2 + .../output/openapi-v3/src/models.rs | 220 ++++++++++++++++++ .../output/ops-v3/api/openapi.yaml | 2 + .../api/openapi.yaml | 2 + .../output/rust-server-test/api/openapi.yaml | 2 + .../model/AdditionalPropertiesClass.java | 52 ++++- .../model/AdditionalPropertiesClass.java | 52 ++++- .../model/AdditionalPropertiesClass.java | 52 ++++- .../model/AdditionalPropertiesClass.java | 52 ++++- .../model/AdditionalPropertiesClass.java | 52 ++++- .../model/AdditionalPropertiesClass.java | 52 ++++- .../model/AdditionalPropertiesClass.java | 52 ++++- .../model/AdditionalPropertiesClass.java | 52 ++++- .../src/main/resources/openapi.yaml | 8 + .../model/AdditionalPropertiesClass.java | 52 ++++- .../model/AdditionalPropertiesClass.java | 52 ++++- .../model/AdditionalPropertiesClass.java | 52 ++++- 51 files changed, 1131 insertions(+), 23 deletions(-) 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 1331ed4b237d..d67cc9387403 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs @@ -323,6 +323,8 @@ data AdditionalPropertiesClass = AdditionalPropertiesClass , additionalPropertiesClassMapArrayAnytype :: !(Maybe (Map.Map String [A.Value])) -- ^ "map_array_anytype" , additionalPropertiesClassMapMapString :: !(Maybe (Map.Map String (Map.Map String Text))) -- ^ "map_map_string" , additionalPropertiesClassMapMapAnytype :: !(Maybe (Map.Map String (Map.Map String A.Value))) -- ^ "map_map_anytype" + , additionalPropertiesClassMapWithAdditionalProperties :: !(Maybe A.Value) -- ^ "map_with_additional_properties" + , additionalPropertiesClassMapWithoutAdditionalProperties :: !(Maybe A.Value) -- ^ "map_without_additional_properties" , additionalPropertiesClassAnytype1 :: !(Maybe A.Value) -- ^ "anytype_1" , additionalPropertiesClassAnytype2 :: !(Maybe A.Value) -- ^ "anytype_2" , additionalPropertiesClassAnytype3 :: !(Maybe A.Value) -- ^ "anytype_3" @@ -340,6 +342,8 @@ instance A.FromJSON AdditionalPropertiesClass where <*> (o .:? "map_array_anytype") <*> (o .:? "map_map_string") <*> (o .:? "map_map_anytype") + <*> (o .:? "map_with_additional_properties") + <*> (o .:? "map_without_additional_properties") <*> (o .:? "anytype_1") <*> (o .:? "anytype_2") <*> (o .:? "anytype_3") @@ -356,6 +360,8 @@ instance A.ToJSON AdditionalPropertiesClass where , "map_array_anytype" .= additionalPropertiesClassMapArrayAnytype , "map_map_string" .= additionalPropertiesClassMapMapString , "map_map_anytype" .= additionalPropertiesClassMapMapAnytype + , "map_with_additional_properties" .= additionalPropertiesClassMapWithAdditionalProperties + , "map_without_additional_properties" .= additionalPropertiesClassMapWithoutAdditionalProperties , "anytype_1" .= additionalPropertiesClassAnytype1 , "anytype_2" .= additionalPropertiesClassAnytype2 , "anytype_3" .= additionalPropertiesClassAnytype3 @@ -375,6 +381,8 @@ mkAdditionalPropertiesClass = , additionalPropertiesClassMapArrayAnytype = Nothing , additionalPropertiesClassMapMapString = Nothing , additionalPropertiesClassMapMapAnytype = Nothing + , additionalPropertiesClassMapWithAdditionalProperties = Nothing + , additionalPropertiesClassMapWithoutAdditionalProperties = Nothing , additionalPropertiesClassAnytype1 = Nothing , additionalPropertiesClassAnytype2 = Nothing , additionalPropertiesClassAnytype3 = Nothing 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 32c3b2159809..0cf20648375a 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs @@ -105,6 +105,16 @@ additionalPropertiesClassMapMapAnytypeL :: Lens_' AdditionalPropertiesClass (May additionalPropertiesClassMapMapAnytypeL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapMapAnytype -> AdditionalPropertiesClass { additionalPropertiesClassMapMapAnytype, ..} ) <$> f additionalPropertiesClassMapMapAnytype {-# INLINE additionalPropertiesClassMapMapAnytypeL #-} +-- | 'additionalPropertiesClassMapWithAdditionalProperties' Lens +additionalPropertiesClassMapWithAdditionalPropertiesL :: Lens_' AdditionalPropertiesClass (Maybe A.Value) +additionalPropertiesClassMapWithAdditionalPropertiesL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapWithAdditionalProperties -> AdditionalPropertiesClass { additionalPropertiesClassMapWithAdditionalProperties, ..} ) <$> f additionalPropertiesClassMapWithAdditionalProperties +{-# INLINE additionalPropertiesClassMapWithAdditionalPropertiesL #-} + +-- | 'additionalPropertiesClassMapWithoutAdditionalProperties' Lens +additionalPropertiesClassMapWithoutAdditionalPropertiesL :: Lens_' AdditionalPropertiesClass (Maybe A.Value) +additionalPropertiesClassMapWithoutAdditionalPropertiesL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapWithoutAdditionalProperties -> AdditionalPropertiesClass { additionalPropertiesClassMapWithoutAdditionalProperties, ..} ) <$> f additionalPropertiesClassMapWithoutAdditionalProperties +{-# INLINE additionalPropertiesClassMapWithoutAdditionalPropertiesL #-} + -- | 'additionalPropertiesClassAnytype1' Lens additionalPropertiesClassAnytype1L :: Lens_' AdditionalPropertiesClass (Maybe A.Value) additionalPropertiesClassAnytype1L f AdditionalPropertiesClass{..} = (\additionalPropertiesClassAnytype1 -> AdditionalPropertiesClass { additionalPropertiesClassAnytype1, ..} ) <$> f additionalPropertiesClassAnytype1 diff --git a/samples/client/petstore/haskell-http-client/openapi.yaml b/samples/client/petstore/haskell-http-client/openapi.yaml index 5313659ef237..636f81711d57 100644 --- a/samples/client/petstore/haskell-http-client/openapi.yaml +++ b/samples/client/petstore/haskell-http-client/openapi.yaml @@ -1586,6 +1586,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2119,3 +2125,5 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/client/petstore/haskell-http-client/tests/Instances.hs b/samples/client/petstore/haskell-http-client/tests/Instances.hs index bb674c55b3a4..33e2143e22c1 100644 --- a/samples/client/petstore/haskell-http-client/tests/Instances.hs +++ b/samples/client/petstore/haskell-http-client/tests/Instances.hs @@ -142,6 +142,8 @@ genAdditionalPropertiesClass n = <*> arbitraryReducedMaybe n -- additionalPropertiesClassMapArrayAnytype :: Maybe (Map.Map String [A.Value]) <*> arbitraryReducedMaybe n -- additionalPropertiesClassMapMapString :: Maybe (Map.Map String (Map.Map String Text)) <*> arbitraryReducedMaybe n -- additionalPropertiesClassMapMapAnytype :: Maybe (Map.Map String (Map.Map String A.Value)) + <*> arbitraryReducedMaybeValue n -- additionalPropertiesClassMapWithAdditionalProperties :: Maybe A.Value + <*> arbitraryReducedMaybeValue n -- additionalPropertiesClassMapWithoutAdditionalProperties :: Maybe A.Value <*> arbitraryReducedMaybeValue n -- additionalPropertiesClassAnytype1 :: Maybe A.Value <*> arbitraryReducedMaybeValue n -- additionalPropertiesClassAnytype2 :: Maybe A.Value <*> arbitraryReducedMaybeValue n -- additionalPropertiesClassAnytype3 :: Maybe A.Value diff --git a/samples/client/petstore/javascript-es6/docs/AdditionalPropertiesClass.md b/samples/client/petstore/javascript-es6/docs/AdditionalPropertiesClass.md index 9f8a26bcc612..1316a3c382e8 100644 --- a/samples/client/petstore/javascript-es6/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/javascript-es6/docs/AdditionalPropertiesClass.md @@ -12,6 +12,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | **{String: [Object]}** | | [optional] **mapMapString** | **{String: {String: String}}** | | [optional] **mapMapAnytype** | **{String: {String: Object}}** | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/javascript-es6/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript-es6/src/model/AdditionalPropertiesClass.js index a6e1a88e3b40..25530a2622e2 100644 --- a/samples/client/petstore/javascript-es6/src/model/AdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript-es6/src/model/AdditionalPropertiesClass.js @@ -71,6 +71,12 @@ class AdditionalPropertiesClass { if (data.hasOwnProperty('map_map_anytype')) { obj['map_map_anytype'] = ApiClient.convertToType(data['map_map_anytype'], {'String': {'String': Object}}); } + if (data.hasOwnProperty('map_with_additional_properties')) { + obj['map_with_additional_properties'] = ApiClient.convertToType(data['map_with_additional_properties'], Object); + } + if (data.hasOwnProperty('map_without_additional_properties')) { + obj['map_without_additional_properties'] = ApiClient.convertToType(data['map_without_additional_properties'], Object); + } if (data.hasOwnProperty('anytype_1')) { obj['anytype_1'] = ApiClient.convertToType(data['anytype_1'], Object); } @@ -127,6 +133,16 @@ AdditionalPropertiesClass.prototype['map_map_string'] = undefined; */ AdditionalPropertiesClass.prototype['map_map_anytype'] = undefined; +/** + * @member {Object} map_with_additional_properties + */ +AdditionalPropertiesClass.prototype['map_with_additional_properties'] = undefined; + +/** + * @member {Object} map_without_additional_properties + */ +AdditionalPropertiesClass.prototype['map_without_additional_properties'] = undefined; + /** * @member {Object} anytype_1 */ diff --git a/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesClass.md b/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesClass.md index 9f8a26bcc612..1316a3c382e8 100644 --- a/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesClass.md @@ -12,6 +12,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | **{String: [Object]}** | | [optional] **mapMapString** | **{String: {String: String}}** | | [optional] **mapMapAnytype** | **{String: {String: Object}}** | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesClass.js index a6e1a88e3b40..25530a2622e2 100644 --- a/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesClass.js @@ -71,6 +71,12 @@ class AdditionalPropertiesClass { if (data.hasOwnProperty('map_map_anytype')) { obj['map_map_anytype'] = ApiClient.convertToType(data['map_map_anytype'], {'String': {'String': Object}}); } + if (data.hasOwnProperty('map_with_additional_properties')) { + obj['map_with_additional_properties'] = ApiClient.convertToType(data['map_with_additional_properties'], Object); + } + if (data.hasOwnProperty('map_without_additional_properties')) { + obj['map_without_additional_properties'] = ApiClient.convertToType(data['map_without_additional_properties'], Object); + } if (data.hasOwnProperty('anytype_1')) { obj['anytype_1'] = ApiClient.convertToType(data['anytype_1'], Object); } @@ -127,6 +133,16 @@ AdditionalPropertiesClass.prototype['map_map_string'] = undefined; */ AdditionalPropertiesClass.prototype['map_map_anytype'] = undefined; +/** + * @member {Object} map_with_additional_properties + */ +AdditionalPropertiesClass.prototype['map_with_additional_properties'] = undefined; + +/** + * @member {Object} map_without_additional_properties + */ +AdditionalPropertiesClass.prototype['map_without_additional_properties'] = undefined; + /** * @member {Object} anytype_1 */ diff --git a/samples/client/petstore/javascript-promise/docs/AdditionalPropertiesClass.md b/samples/client/petstore/javascript-promise/docs/AdditionalPropertiesClass.md index 9f8a26bcc612..1316a3c382e8 100644 --- a/samples/client/petstore/javascript-promise/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/javascript-promise/docs/AdditionalPropertiesClass.md @@ -12,6 +12,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | **{String: [Object]}** | | [optional] **mapMapString** | **{String: {String: String}}** | | [optional] **mapMapAnytype** | **{String: {String: Object}}** | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js index 2b19a95b4862..9dd5c539404e 100644 --- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js @@ -82,6 +82,12 @@ if (data.hasOwnProperty('map_map_anytype')) { obj['map_map_anytype'] = ApiClient.convertToType(data['map_map_anytype'], {'String': {'String': Object}}); } + if (data.hasOwnProperty('map_with_additional_properties')) { + obj['map_with_additional_properties'] = ApiClient.convertToType(data['map_with_additional_properties'], Object); + } + if (data.hasOwnProperty('map_without_additional_properties')) { + obj['map_without_additional_properties'] = ApiClient.convertToType(data['map_without_additional_properties'], Object); + } if (data.hasOwnProperty('anytype_1')) { obj['anytype_1'] = ApiClient.convertToType(data['anytype_1'], Object); } @@ -127,6 +133,14 @@ * @member {Object.>} map_map_anytype */ exports.prototype['map_map_anytype'] = undefined; + /** + * @member {Object} map_with_additional_properties + */ + exports.prototype['map_with_additional_properties'] = undefined; + /** + * @member {Object} map_without_additional_properties + */ + exports.prototype['map_without_additional_properties'] = undefined; /** * @member {Object} anytype_1 */ diff --git a/samples/client/petstore/javascript/docs/AdditionalPropertiesClass.md b/samples/client/petstore/javascript/docs/AdditionalPropertiesClass.md index 9f8a26bcc612..1316a3c382e8 100644 --- a/samples/client/petstore/javascript/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/javascript/docs/AdditionalPropertiesClass.md @@ -12,6 +12,8 @@ Name | Type | Description | Notes **mapArrayAnytype** | **{String: [Object]}** | | [optional] **mapMapString** | **{String: {String: String}}** | | [optional] **mapMapAnytype** | **{String: {String: Object}}** | | [optional] +**mapWithAdditionalProperties** | **Object** | | [optional] +**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js index 2b19a95b4862..9dd5c539404e 100644 --- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js @@ -82,6 +82,12 @@ if (data.hasOwnProperty('map_map_anytype')) { obj['map_map_anytype'] = ApiClient.convertToType(data['map_map_anytype'], {'String': {'String': Object}}); } + if (data.hasOwnProperty('map_with_additional_properties')) { + obj['map_with_additional_properties'] = ApiClient.convertToType(data['map_with_additional_properties'], Object); + } + if (data.hasOwnProperty('map_without_additional_properties')) { + obj['map_without_additional_properties'] = ApiClient.convertToType(data['map_without_additional_properties'], Object); + } if (data.hasOwnProperty('anytype_1')) { obj['anytype_1'] = ApiClient.convertToType(data['anytype_1'], Object); } @@ -127,6 +133,14 @@ * @member {Object.>} map_map_anytype */ exports.prototype['map_map_anytype'] = undefined; + /** + * @member {Object} map_with_additional_properties + */ + exports.prototype['map_with_additional_properties'] = undefined; + /** + * @member {Object} map_without_additional_properties + */ + exports.prototype['map_without_additional_properties'] = undefined; /** * @member {Object} anytype_1 */ diff --git a/samples/client/petstore/perl/docs/AdditionalPropertiesClass.md b/samples/client/petstore/perl/docs/AdditionalPropertiesClass.md index a878436c1a17..211621aa76d4 100644 --- a/samples/client/petstore/perl/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/perl/docs/AdditionalPropertiesClass.md @@ -16,6 +16,8 @@ Name | Type | Description | Notes **map_array_anytype** | **HASH[string,ARRAY[object]]** | | [optional] **map_map_string** | **HASH[string,HASH[string,string]]** | | [optional] **map_map_anytype** | **HASH[string,HASH[string,object]]** | | [optional] +**map_with_additional_properties** | **object** | | [optional] +**map_without_additional_properties** | **object** | | [optional] **anytype_1** | **object** | | [optional] **anytype_2** | **object** | | [optional] **anytype_3** | **object** | | [optional] diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm index f388c3a4d1d9..2f024e8fe0e8 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm @@ -217,6 +217,20 @@ __PACKAGE__->method_documentation({ format => '', read_only => '', }, + 'map_with_additional_properties' => { + datatype => 'object', + base_name => 'map_with_additional_properties', + description => '', + format => '', + read_only => '', + }, + 'map_without_additional_properties' => { + datatype => 'object', + base_name => 'map_without_additional_properties', + description => '', + format => '', + read_only => '', + }, 'anytype_1' => { datatype => 'object', base_name => 'anytype_1', @@ -249,6 +263,8 @@ __PACKAGE__->openapi_types( { 'map_array_anytype' => 'HASH[string,ARRAY[object]]', 'map_map_string' => 'HASH[string,HASH[string,string]]', 'map_map_anytype' => 'HASH[string,HASH[string,object]]', + 'map_with_additional_properties' => 'object', + 'map_without_additional_properties' => 'object', 'anytype_1' => 'object', 'anytype_2' => 'object', 'anytype_3' => 'object' @@ -263,6 +279,8 @@ __PACKAGE__->attribute_map( { 'map_array_anytype' => 'map_array_anytype', 'map_map_string' => 'map_map_string', 'map_map_anytype' => 'map_map_anytype', + 'map_with_additional_properties' => 'map_with_additional_properties', + 'map_without_additional_properties' => 'map_without_additional_properties', 'anytype_1' => 'anytype_1', 'anytype_2' => 'anytype_2', 'anytype_3' => 'anytype_3' diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/AdditionalPropertiesClass.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/AdditionalPropertiesClass.md index fc9b2c66e81a..237015ce8417 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/AdditionalPropertiesClass.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/AdditionalPropertiesClass.md @@ -12,6 +12,8 @@ Name | Type | Description | Notes **map_array_anytype** | [**map[string,object[]]**](array.md) | | [optional] **map_map_string** | [**map[string,map[string,string]]**](map.md) | | [optional] **map_map_anytype** | [**map[string,map[string,object]]**](map.md) | | [optional] +**map_with_additional_properties** | **object** | | [optional] +**map_without_additional_properties** | **object** | | [optional] **anytype_1** | **object** | | [optional] **anytype_2** | **object** | | [optional] **anytype_3** | **object** | | [optional] diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php index b063cb419863..d4d804091073 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php @@ -65,6 +65,8 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess 'map_array_anytype' => 'map[string,object[]]', 'map_map_string' => 'map[string,map[string,string]]', 'map_map_anytype' => 'map[string,map[string,object]]', + 'map_with_additional_properties' => 'object', + 'map_without_additional_properties' => 'object', 'anytype_1' => 'object', 'anytype_2' => 'object', 'anytype_3' => 'object' @@ -84,6 +86,8 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess 'map_array_anytype' => null, 'map_map_string' => null, 'map_map_anytype' => null, + 'map_with_additional_properties' => null, + 'map_without_additional_properties' => null, 'anytype_1' => null, 'anytype_2' => null, 'anytype_3' => null @@ -124,6 +128,8 @@ public static function openAPIFormats() 'map_array_anytype' => 'map_array_anytype', 'map_map_string' => 'map_map_string', 'map_map_anytype' => 'map_map_anytype', + 'map_with_additional_properties' => 'map_with_additional_properties', + 'map_without_additional_properties' => 'map_without_additional_properties', 'anytype_1' => 'anytype_1', 'anytype_2' => 'anytype_2', 'anytype_3' => 'anytype_3' @@ -143,6 +149,8 @@ public static function openAPIFormats() 'map_array_anytype' => 'setMapArrayAnytype', 'map_map_string' => 'setMapMapString', 'map_map_anytype' => 'setMapMapAnytype', + 'map_with_additional_properties' => 'setMapWithAdditionalProperties', + 'map_without_additional_properties' => 'setMapWithoutAdditionalProperties', 'anytype_1' => 'setAnytype1', 'anytype_2' => 'setAnytype2', 'anytype_3' => 'setAnytype3' @@ -162,6 +170,8 @@ public static function openAPIFormats() 'map_array_anytype' => 'getMapArrayAnytype', 'map_map_string' => 'getMapMapString', 'map_map_anytype' => 'getMapMapAnytype', + 'map_with_additional_properties' => 'getMapWithAdditionalProperties', + 'map_without_additional_properties' => 'getMapWithoutAdditionalProperties', 'anytype_1' => 'getAnytype1', 'anytype_2' => 'getAnytype2', 'anytype_3' => 'getAnytype3' @@ -235,6 +245,8 @@ public function __construct(array $data = null) $this->container['map_array_anytype'] = isset($data['map_array_anytype']) ? $data['map_array_anytype'] : null; $this->container['map_map_string'] = isset($data['map_map_string']) ? $data['map_map_string'] : null; $this->container['map_map_anytype'] = isset($data['map_map_anytype']) ? $data['map_map_anytype'] : null; + $this->container['map_with_additional_properties'] = isset($data['map_with_additional_properties']) ? $data['map_with_additional_properties'] : null; + $this->container['map_without_additional_properties'] = isset($data['map_without_additional_properties']) ? $data['map_without_additional_properties'] : null; $this->container['anytype_1'] = isset($data['anytype_1']) ? $data['anytype_1'] : null; $this->container['anytype_2'] = isset($data['anytype_2']) ? $data['anytype_2'] : null; $this->container['anytype_3'] = isset($data['anytype_3']) ? $data['anytype_3'] : null; @@ -456,6 +468,54 @@ public function setMapMapAnytype($map_map_anytype) return $this; } + /** + * Gets map_with_additional_properties + * + * @return object|null + */ + public function getMapWithAdditionalProperties() + { + return $this->container['map_with_additional_properties']; + } + + /** + * Sets map_with_additional_properties + * + * @param object|null $map_with_additional_properties map_with_additional_properties + * + * @return $this + */ + public function setMapWithAdditionalProperties($map_with_additional_properties) + { + $this->container['map_with_additional_properties'] = $map_with_additional_properties; + + return $this; + } + + /** + * Gets map_without_additional_properties + * + * @return object|null + */ + public function getMapWithoutAdditionalProperties() + { + return $this->container['map_without_additional_properties']; + } + + /** + * Sets map_without_additional_properties + * + * @param object|null $map_without_additional_properties map_without_additional_properties + * + * @return $this + */ + public function setMapWithoutAdditionalProperties($map_without_additional_properties) + { + $this->container['map_without_additional_properties'] = $map_without_additional_properties; + + return $this; + } + /** * Gets anytype_1 * diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php index d71078b0c218..5b922ddbabbc 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php @@ -134,6 +134,20 @@ public function testPropertyMapMapAnytype() { } + /** + * Test attribute "map_with_additional_properties" + */ + public function testPropertyMapWithAdditionalProperties() + { + } + + /** + * Test attribute "map_without_additional_properties" + */ + public function testPropertyMapWithoutAdditionalProperties() + { + } + /** * Test attribute "anytype_1" */ diff --git a/samples/client/petstore/ruby-faraday/docs/AdditionalPropertiesClass.md b/samples/client/petstore/ruby-faraday/docs/AdditionalPropertiesClass.md index 353033010b29..915bfabaa8e5 100644 --- a/samples/client/petstore/ruby-faraday/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/ruby-faraday/docs/AdditionalPropertiesClass.md @@ -12,6 +12,8 @@ Name | Type | Description | Notes **map_array_anytype** | **Hash<String, Array<Object>>** | | [optional] **map_map_string** | **Hash<String, Hash<String, String>>** | | [optional] **map_map_anytype** | **Hash<String, Hash<String, Object>>** | | [optional] +**map_with_additional_properties** | **Object** | | [optional] +**map_without_additional_properties** | **Object** | | [optional] **anytype_1** | **Object** | | [optional] **anytype_2** | **Object** | | [optional] **anytype_3** | **Object** | | [optional] @@ -29,6 +31,8 @@ instance = Petstore::AdditionalPropertiesClass.new(map_string: null, map_array_anytype: null, map_map_string: null, map_map_anytype: null, + map_with_additional_properties: null, + map_without_additional_properties: null, anytype_1: null, anytype_2: null, anytype_3: null) diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb index ff8841189f78..1495d8523ac3 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb @@ -30,6 +30,10 @@ class AdditionalPropertiesClass attr_accessor :map_map_anytype + attr_accessor :map_with_additional_properties + + attr_accessor :map_without_additional_properties + attr_accessor :anytype_1 attr_accessor :anytype_2 @@ -47,6 +51,8 @@ def self.attribute_map :'map_array_anytype' => :'map_array_anytype', :'map_map_string' => :'map_map_string', :'map_map_anytype' => :'map_map_anytype', + :'map_with_additional_properties' => :'map_with_additional_properties', + :'map_without_additional_properties' => :'map_without_additional_properties', :'anytype_1' => :'anytype_1', :'anytype_2' => :'anytype_2', :'anytype_3' => :'anytype_3' @@ -64,6 +70,8 @@ def self.openapi_types :'map_array_anytype' => :'Hash>', :'map_map_string' => :'Hash>', :'map_map_anytype' => :'Hash>', + :'map_with_additional_properties' => :'Object', + :'map_without_additional_properties' => :'Object', :'anytype_1' => :'Object', :'anytype_2' => :'Object', :'anytype_3' => :'Object' @@ -139,6 +147,14 @@ def initialize(attributes = {}) end end + if attributes.key?(:'map_with_additional_properties') + self.map_with_additional_properties = attributes[:'map_with_additional_properties'] + end + + if attributes.key?(:'map_without_additional_properties') + self.map_without_additional_properties = attributes[:'map_without_additional_properties'] + end + if attributes.key?(:'anytype_1') self.anytype_1 = attributes[:'anytype_1'] end @@ -178,6 +194,8 @@ def ==(o) map_array_anytype == o.map_array_anytype && map_map_string == o.map_map_string && map_map_anytype == o.map_map_anytype && + map_with_additional_properties == o.map_with_additional_properties && + map_without_additional_properties == o.map_without_additional_properties && anytype_1 == o.anytype_1 && anytype_2 == o.anytype_2 && anytype_3 == o.anytype_3 @@ -192,7 +210,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [map_string, map_number, map_integer, map_boolean, map_array_integer, map_array_anytype, map_map_string, map_map_anytype, anytype_1, anytype_2, anytype_3].hash + [map_string, map_number, map_integer, map_boolean, map_array_integer, map_array_anytype, map_map_string, map_map_anytype, map_with_additional_properties, map_without_additional_properties, anytype_1, anytype_2, anytype_3].hash end # Builds the object from hash diff --git a/samples/client/petstore/ruby/docs/AdditionalPropertiesClass.md b/samples/client/petstore/ruby/docs/AdditionalPropertiesClass.md index 353033010b29..915bfabaa8e5 100644 --- a/samples/client/petstore/ruby/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/ruby/docs/AdditionalPropertiesClass.md @@ -12,6 +12,8 @@ Name | Type | Description | Notes **map_array_anytype** | **Hash<String, Array<Object>>** | | [optional] **map_map_string** | **Hash<String, Hash<String, String>>** | | [optional] **map_map_anytype** | **Hash<String, Hash<String, Object>>** | | [optional] +**map_with_additional_properties** | **Object** | | [optional] +**map_without_additional_properties** | **Object** | | [optional] **anytype_1** | **Object** | | [optional] **anytype_2** | **Object** | | [optional] **anytype_3** | **Object** | | [optional] @@ -29,6 +31,8 @@ instance = Petstore::AdditionalPropertiesClass.new(map_string: null, map_array_anytype: null, map_map_string: null, map_map_anytype: null, + map_with_additional_properties: null, + map_without_additional_properties: null, anytype_1: null, anytype_2: null, anytype_3: null) diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb index ff8841189f78..1495d8523ac3 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb @@ -30,6 +30,10 @@ class AdditionalPropertiesClass attr_accessor :map_map_anytype + attr_accessor :map_with_additional_properties + + attr_accessor :map_without_additional_properties + attr_accessor :anytype_1 attr_accessor :anytype_2 @@ -47,6 +51,8 @@ def self.attribute_map :'map_array_anytype' => :'map_array_anytype', :'map_map_string' => :'map_map_string', :'map_map_anytype' => :'map_map_anytype', + :'map_with_additional_properties' => :'map_with_additional_properties', + :'map_without_additional_properties' => :'map_without_additional_properties', :'anytype_1' => :'anytype_1', :'anytype_2' => :'anytype_2', :'anytype_3' => :'anytype_3' @@ -64,6 +70,8 @@ def self.openapi_types :'map_array_anytype' => :'Hash>', :'map_map_string' => :'Hash>', :'map_map_anytype' => :'Hash>', + :'map_with_additional_properties' => :'Object', + :'map_without_additional_properties' => :'Object', :'anytype_1' => :'Object', :'anytype_2' => :'Object', :'anytype_3' => :'Object' @@ -139,6 +147,14 @@ def initialize(attributes = {}) end end + if attributes.key?(:'map_with_additional_properties') + self.map_with_additional_properties = attributes[:'map_with_additional_properties'] + end + + if attributes.key?(:'map_without_additional_properties') + self.map_without_additional_properties = attributes[:'map_without_additional_properties'] + end + if attributes.key?(:'anytype_1') self.anytype_1 = attributes[:'anytype_1'] end @@ -178,6 +194,8 @@ def ==(o) map_array_anytype == o.map_array_anytype && map_map_string == o.map_map_string && map_map_anytype == o.map_map_anytype && + map_with_additional_properties == o.map_with_additional_properties && + map_without_additional_properties == o.map_without_additional_properties && anytype_1 == o.anytype_1 && anytype_2 == o.anytype_2 && anytype_3 == o.anytype_3 @@ -192,7 +210,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [map_string, map_number, map_integer, map_boolean, map_array_integer, map_array_anytype, map_map_string, map_map_anytype, anytype_1, anytype_2, anytype_3].hash + [map_string, map_number, map_integer, map_boolean, map_array_integer, map_array_anytype, map_map_string, map_map_anytype, map_with_additional_properties, map_without_additional_properties, anytype_1, anytype_2, anytype_3].hash end # Builds the object from hash diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb index ee65b12fcc11..ff252ca8af4a 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb @@ -80,6 +80,18 @@ end end + describe 'test attribute "map_with_additional_properties"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "map_without_additional_properties"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "anytype_1"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json index 1a863721712a..dde6ecc444fb 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json +++ b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json @@ -1037,5 +1037,7 @@ "type" : "apiKey" } } - } + }, + "x-original-openapi-version" : "2.0.0", + "x-is-legacy-additional-properties-behavior" : "false" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-async/public/openapi.json b/samples/server/petstore/java-play-framework-async/public/openapi.json index 1a863721712a..dde6ecc444fb 100644 --- a/samples/server/petstore/java-play-framework-async/public/openapi.json +++ b/samples/server/petstore/java-play-framework-async/public/openapi.json @@ -1037,5 +1037,7 @@ "type" : "apiKey" } } - } + }, + "x-original-openapi-version" : "2.0.0", + "x-is-legacy-additional-properties-behavior" : "false" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json index 1a863721712a..dde6ecc444fb 100644 --- a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json +++ b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json @@ -1037,5 +1037,7 @@ "type" : "apiKey" } } - } + }, + "x-original-openapi-version" : "2.0.0", + "x-is-legacy-additional-properties-behavior" : "false" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesClass.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesClass.java index 5fbc69ab84f0..3e48a58493de 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesClass.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesClass.java @@ -39,6 +39,12 @@ public class AdditionalPropertiesClass { @JsonProperty("map_map_anytype") private Map> mapMapAnytype = null; + @JsonProperty("map_with_additional_properties") + private Object mapWithAdditionalProperties; + + @JsonProperty("map_without_additional_properties") + private Object mapWithoutAdditionalProperties; + @JsonProperty("anytype_1") private Object anytype1; @@ -253,6 +259,40 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -322,6 +362,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(anytype1, additionalPropertiesClass.anytype1) && Objects.equals(anytype2, additionalPropertiesClass.anytype2) && Objects.equals(anytype3, additionalPropertiesClass.anytype3); @@ -329,7 +371,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @SuppressWarnings("StringBufferReplaceableByString") @@ -346,6 +388,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json index edbfa20608bc..39480011bc4c 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json @@ -2133,6 +2133,14 @@ }, "type" : "object" }, + "map_with_additional_properties" : { + "properties" : { }, + "type" : "object" + }, + "map_without_additional_properties" : { + "properties" : { }, + "type" : "object" + }, "anytype_1" : { "properties" : { }, "type" : "object" @@ -2873,5 +2881,7 @@ "type" : "http" } } - } + }, + "x-original-openapi-version" : "2.0.0", + "x-is-legacy-additional-properties-behavior" : "false" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json index 1a863721712a..dde6ecc444fb 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json @@ -1037,5 +1037,7 @@ "type" : "apiKey" } } - } + }, + "x-original-openapi-version" : "2.0.0", + "x-is-legacy-additional-properties-behavior" : "false" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json index 1a863721712a..dde6ecc444fb 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json @@ -1037,5 +1037,7 @@ "type" : "apiKey" } } - } + }, + "x-original-openapi-version" : "2.0.0", + "x-is-legacy-additional-properties-behavior" : "false" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json index 1a863721712a..dde6ecc444fb 100644 --- a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json @@ -1037,5 +1037,7 @@ "type" : "apiKey" } } - } + }, + "x-original-openapi-version" : "2.0.0", + "x-is-legacy-additional-properties-behavior" : "false" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json b/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json index 1a863721712a..dde6ecc444fb 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json @@ -1037,5 +1037,7 @@ "type" : "apiKey" } } - } + }, + "x-original-openapi-version" : "2.0.0", + "x-is-legacy-additional-properties-behavior" : "false" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/public/openapi.json b/samples/server/petstore/java-play-framework/public/openapi.json index 1a863721712a..dde6ecc444fb 100644 --- a/samples/server/petstore/java-play-framework/public/openapi.json +++ b/samples/server/petstore/java-play-framework/public/openapi.json @@ -1037,5 +1037,7 @@ "type" : "apiKey" } } - } + }, + "x-original-openapi-version" : "2.0.0", + "x-is-legacy-additional-properties-behavior" : "false" } \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/multipart-v3/api/openapi.yaml b/samples/server/petstore/rust-server/output/multipart-v3/api/openapi.yaml index cc003383b966..b73bb2f1cfa9 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/multipart-v3/api/openapi.yaml @@ -132,4 +132,6 @@ components: type: array required: - field_a +x-original-openapi-version: 3.0.1 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/server/petstore/rust-server/output/no-example-v3/api/openapi.yaml b/samples/server/petstore/rust-server/output/no-example-v3/api/openapi.yaml index 0e9e1377ea91..25ca643466b9 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/no-example-v3/api/openapi.yaml @@ -38,4 +38,6 @@ components: required: - property type: object +x-original-openapi-version: 3.0.1 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/server/petstore/rust-server/output/openapi-v3/api/openapi.yaml b/samples/server/petstore/rust-server/output/openapi-v3/api/openapi.yaml index 894bb1537ab6..8e0342c51f26 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/openapi-v3/api/openapi.yaml @@ -591,4 +591,6 @@ components: test.write: Allowed to change state. tokenUrl: http://example.org type: oauth2 +x-original-openapi-version: 3.0.1 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/server/petstore/rust-server/output/openapi-v3/src/models.rs b/samples/server/petstore/rust-server/output/openapi-v3/src/models.rs index 884dab3b875b..6c37adcb734b 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/src/models.rs +++ b/samples/server/petstore/rust-server/output/openapi-v3/src/models.rs @@ -195,6 +195,26 @@ impl std::ops::DerefMut for AnotherXmlInner { } } +/// Converts the AnotherXmlInner value to the Query Parameters representation (style=form, explode=false) +/// specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde serializer +impl ::std::string::ToString for AnotherXmlInner { + fn to_string(&self) -> String { + // Skipping additionalProperties in query parameter serialization + "".to_string() + } +} + +/// Converts Query Parameters representation (style=form, explode=false) to a AnotherXmlInner value +/// as specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde deserializer +impl ::std::str::FromStr for AnotherXmlInner { + type Err = &'static str; + + fn from_str(s: &str) -> std::result::Result { + std::result::Result::Err("Parsing additionalProperties for AnotherXmlInner is not supported") + } +} impl AnotherXmlInner { /// Helper function to allow us to convert this model to an XML string. @@ -578,6 +598,26 @@ impl std::ops::DerefMut for Err { } } +/// Converts the Err value to the Query Parameters representation (style=form, explode=false) +/// specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde serializer +impl ::std::string::ToString for Err { + fn to_string(&self) -> String { + // Skipping additionalProperties in query parameter serialization + "".to_string() + } +} + +/// Converts Query Parameters representation (style=form, explode=false) to a Err value +/// as specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde deserializer +impl ::std::str::FromStr for Err { + type Err = &'static str; + + fn from_str(s: &str) -> std::result::Result { + std::result::Result::Err("Parsing additionalProperties for Err is not supported") + } +} impl Err { /// Helper function to allow us to convert this model to an XML string. @@ -630,6 +670,26 @@ impl std::ops::DerefMut for Error { } } +/// Converts the Error value to the Query Parameters representation (style=form, explode=false) +/// specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde serializer +impl ::std::string::ToString for Error { + fn to_string(&self) -> String { + // Skipping additionalProperties in query parameter serialization + "".to_string() + } +} + +/// Converts Query Parameters representation (style=form, explode=false) to a Error value +/// as specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde deserializer +impl ::std::str::FromStr for Error { + type Err = &'static str; + + fn from_str(s: &str) -> std::result::Result { + std::result::Result::Err("Parsing additionalProperties for Error is not supported") + } +} impl Error { /// Helper function to allow us to convert this model to an XML string. @@ -795,6 +855,26 @@ impl std::ops::DerefMut for MyId { } } +/// Converts the MyId value to the Query Parameters representation (style=form, explode=false) +/// specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde serializer +impl ::std::string::ToString for MyId { + fn to_string(&self) -> String { + // Skipping additionalProperties in query parameter serialization + "".to_string() + } +} + +/// Converts Query Parameters representation (style=form, explode=false) to a MyId value +/// as specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde deserializer +impl ::std::str::FromStr for MyId { + type Err = &'static str; + + fn from_str(s: &str) -> std::result::Result { + std::result::Result::Err("Parsing additionalProperties for MyId is not supported") + } +} impl MyId { /// Helper function to allow us to convert this model to an XML string. @@ -1716,6 +1796,26 @@ impl std::ops::DerefMut for Ok { } } +/// Converts the Ok value to the Query Parameters representation (style=form, explode=false) +/// specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde serializer +impl ::std::string::ToString for Ok { + fn to_string(&self) -> String { + // Skipping additionalProperties in query parameter serialization + "".to_string() + } +} + +/// Converts Query Parameters representation (style=form, explode=false) to a Ok value +/// as specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde deserializer +impl ::std::str::FromStr for Ok { + type Err = &'static str; + + fn from_str(s: &str) -> std::result::Result { + std::result::Result::Err("Parsing additionalProperties for Ok is not supported") + } +} impl Ok { /// Helper function to allow us to convert this model to an XML string. @@ -1756,6 +1856,26 @@ impl std::ops::DerefMut for OptionalObjectHeader { } } +/// Converts the OptionalObjectHeader value to the Query Parameters representation (style=form, explode=false) +/// specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde serializer +impl ::std::string::ToString for OptionalObjectHeader { + fn to_string(&self) -> String { + // Skipping additionalProperties in query parameter serialization + "".to_string() + } +} + +/// Converts Query Parameters representation (style=form, explode=false) to a OptionalObjectHeader value +/// as specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde deserializer +impl ::std::str::FromStr for OptionalObjectHeader { + type Err = &'static str; + + fn from_str(s: &str) -> std::result::Result { + std::result::Result::Err("Parsing additionalProperties for OptionalObjectHeader is not supported") + } +} impl OptionalObjectHeader { /// Helper function to allow us to convert this model to an XML string. @@ -1796,6 +1916,26 @@ impl std::ops::DerefMut for RequiredObjectHeader { } } +/// Converts the RequiredObjectHeader value to the Query Parameters representation (style=form, explode=false) +/// specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde serializer +impl ::std::string::ToString for RequiredObjectHeader { + fn to_string(&self) -> String { + // Skipping additionalProperties in query parameter serialization + "".to_string() + } +} + +/// Converts Query Parameters representation (style=form, explode=false) to a RequiredObjectHeader value +/// as specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde deserializer +impl ::std::str::FromStr for RequiredObjectHeader { + type Err = &'static str; + + fn from_str(s: &str) -> std::result::Result { + std::result::Result::Err("Parsing additionalProperties for RequiredObjectHeader is not supported") + } +} impl RequiredObjectHeader { /// Helper function to allow us to convert this model to an XML string. @@ -1848,6 +1988,26 @@ impl std::ops::DerefMut for Result { } } +/// Converts the Result value to the Query Parameters representation (style=form, explode=false) +/// specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde serializer +impl ::std::string::ToString for Result { + fn to_string(&self) -> String { + // Skipping additionalProperties in query parameter serialization + "".to_string() + } +} + +/// Converts Query Parameters representation (style=form, explode=false) to a Result value +/// as specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde deserializer +impl ::std::str::FromStr for Result { + type Err = &'static str; + + fn from_str(s: &str) -> std::result::Result { + std::result::Result::Err("Parsing additionalProperties for Result is not supported") + } +} impl Result { /// Helper function to allow us to convert this model to an XML string. @@ -1944,6 +2104,26 @@ impl std::ops::DerefMut for StringObject { } } +/// Converts the StringObject value to the Query Parameters representation (style=form, explode=false) +/// specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde serializer +impl ::std::string::ToString for StringObject { + fn to_string(&self) -> String { + // Skipping additionalProperties in query parameter serialization + "".to_string() + } +} + +/// Converts Query Parameters representation (style=form, explode=false) to a StringObject value +/// as specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde deserializer +impl ::std::str::FromStr for StringObject { + type Err = &'static str; + + fn from_str(s: &str) -> std::result::Result { + std::result::Result::Err("Parsing additionalProperties for StringObject is not supported") + } +} impl StringObject { /// Helper function to allow us to convert this model to an XML string. @@ -1985,6 +2165,26 @@ impl std::ops::DerefMut for UuidObject { } } +/// Converts the UuidObject value to the Query Parameters representation (style=form, explode=false) +/// specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde serializer +impl ::std::string::ToString for UuidObject { + fn to_string(&self) -> String { + // Skipping additionalProperties in query parameter serialization + "".to_string() + } +} + +/// Converts Query Parameters representation (style=form, explode=false) to a UuidObject value +/// as specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde deserializer +impl ::std::str::FromStr for UuidObject { + type Err = &'static str; + + fn from_str(s: &str) -> std::result::Result { + std::result::Result::Err("Parsing additionalProperties for UuidObject is not supported") + } +} impl UuidObject { /// Helper function to allow us to convert this model to an XML string. @@ -2185,6 +2385,26 @@ impl std::ops::DerefMut for XmlInner { } } +/// Converts the XmlInner value to the Query Parameters representation (style=form, explode=false) +/// specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde serializer +impl ::std::string::ToString for XmlInner { + fn to_string(&self) -> String { + // Skipping additionalProperties in query parameter serialization + "".to_string() + } +} + +/// Converts Query Parameters representation (style=form, explode=false) to a XmlInner value +/// as specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde deserializer +impl ::std::str::FromStr for XmlInner { + type Err = &'static str; + + fn from_str(s: &str) -> std::result::Result { + std::result::Result::Err("Parsing additionalProperties for XmlInner is not supported") + } +} impl XmlInner { /// Helper function to allow us to convert this model to an XML string. diff --git a/samples/server/petstore/rust-server/output/ops-v3/api/openapi.yaml b/samples/server/petstore/rust-server/output/ops-v3/api/openapi.yaml index c0129798aa6d..034234f656cb 100644 --- a/samples/server/petstore/rust-server/output/ops-v3/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/ops-v3/api/openapi.yaml @@ -192,4 +192,6 @@ paths: description: OK components: schemas: {} +x-original-openapi-version: 3.0.1 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml index 27f96b0bef1a..2166608b4cec 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml @@ -1589,4 +1589,6 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml b/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml index 276349f7a0e7..bb43f7aab925 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml @@ -211,4 +211,6 @@ components: type: integer required: - required_thing +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 44e1e29d741e..164cd1500d6f 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -50,6 +50,12 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; + @JsonProperty("map_with_additional_properties") + private Object mapWithAdditionalProperties; + + @JsonProperty("map_without_additional_properties") + private Object mapWithoutAdditionalProperties; + @JsonProperty("anytype_1") private Object anytype1; @@ -288,6 +294,46 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + */ + @ApiModelProperty(value = "") + + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + */ + @ApiModelProperty(value = "") + + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -366,6 +412,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -373,7 +421,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @Override @@ -389,6 +437,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 44e1e29d741e..164cd1500d6f 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -50,6 +50,12 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; + @JsonProperty("map_with_additional_properties") + private Object mapWithAdditionalProperties; + + @JsonProperty("map_without_additional_properties") + private Object mapWithoutAdditionalProperties; + @JsonProperty("anytype_1") private Object anytype1; @@ -288,6 +294,46 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + */ + @ApiModelProperty(value = "") + + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + */ + @ApiModelProperty(value = "") + + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -366,6 +412,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -373,7 +421,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @Override @@ -389,6 +437,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 16b3408f323b..21f6f266a31a 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -50,6 +50,12 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; + @JsonProperty("map_with_additional_properties") + private Object mapWithAdditionalProperties; + + @JsonProperty("map_without_additional_properties") + private Object mapWithoutAdditionalProperties; + @JsonProperty("anytype_1") private Object anytype1; @@ -288,6 +294,46 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + */ + @ApiModelProperty(value = "") + + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + */ + @ApiModelProperty(value = "") + + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -366,6 +412,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -373,7 +421,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @Override @@ -389,6 +437,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 16b3408f323b..21f6f266a31a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -50,6 +50,12 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; + @JsonProperty("map_with_additional_properties") + private Object mapWithAdditionalProperties; + + @JsonProperty("map_without_additional_properties") + private Object mapWithoutAdditionalProperties; + @JsonProperty("anytype_1") private Object anytype1; @@ -288,6 +294,46 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + */ + @ApiModelProperty(value = "") + + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + */ + @ApiModelProperty(value = "") + + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -366,6 +412,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -373,7 +421,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @Override @@ -389,6 +437,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 44e1e29d741e..164cd1500d6f 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -50,6 +50,12 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; + @JsonProperty("map_with_additional_properties") + private Object mapWithAdditionalProperties; + + @JsonProperty("map_without_additional_properties") + private Object mapWithoutAdditionalProperties; + @JsonProperty("anytype_1") private Object anytype1; @@ -288,6 +294,46 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + */ + @ApiModelProperty(value = "") + + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + */ + @ApiModelProperty(value = "") + + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -366,6 +412,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -373,7 +421,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @Override @@ -389,6 +437,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 16b3408f323b..21f6f266a31a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -50,6 +50,12 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; + @JsonProperty("map_with_additional_properties") + private Object mapWithAdditionalProperties; + + @JsonProperty("map_without_additional_properties") + private Object mapWithoutAdditionalProperties; + @JsonProperty("anytype_1") private Object anytype1; @@ -288,6 +294,46 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + */ + @ApiModelProperty(value = "") + + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + */ + @ApiModelProperty(value = "") + + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -366,6 +412,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -373,7 +421,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @Override @@ -389,6 +437,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 44e1e29d741e..164cd1500d6f 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -50,6 +50,12 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; + @JsonProperty("map_with_additional_properties") + private Object mapWithAdditionalProperties; + + @JsonProperty("map_without_additional_properties") + private Object mapWithoutAdditionalProperties; + @JsonProperty("anytype_1") private Object anytype1; @@ -288,6 +294,46 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + */ + @ApiModelProperty(value = "") + + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + */ + @ApiModelProperty(value = "") + + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -366,6 +412,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -373,7 +421,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @Override @@ -389,6 +437,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 44e1e29d741e..164cd1500d6f 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -50,6 +50,12 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; + @JsonProperty("map_with_additional_properties") + private Object mapWithAdditionalProperties; + + @JsonProperty("map_without_additional_properties") + private Object mapWithoutAdditionalProperties; + @JsonProperty("anytype_1") private Object anytype1; @@ -288,6 +294,46 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + */ + @ApiModelProperty(value = "") + + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + */ + @ApiModelProperty(value = "") + + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -366,6 +412,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -373,7 +421,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @Override @@ -389,6 +437,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml index f6f5c60294f7..333eb07e0c2d 100644 --- a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -1721,6 +1721,12 @@ components: type: object type: object type: object + map_with_additional_properties: + properties: {} + type: object + map_without_additional_properties: + properties: {} + type: object anytype_1: properties: {} type: object @@ -2254,3 +2260,5 @@ components: http_basic_test: scheme: basic type: http +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "false" diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 44e1e29d741e..164cd1500d6f 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -50,6 +50,12 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; + @JsonProperty("map_with_additional_properties") + private Object mapWithAdditionalProperties; + + @JsonProperty("map_without_additional_properties") + private Object mapWithoutAdditionalProperties; + @JsonProperty("anytype_1") private Object anytype1; @@ -288,6 +294,46 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + */ + @ApiModelProperty(value = "") + + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + */ + @ApiModelProperty(value = "") + + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -366,6 +412,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -373,7 +421,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @Override @@ -389,6 +437,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java index bf1af7c2e709..a93408ddf180 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java @@ -50,6 +50,12 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; + @JsonProperty("map_with_additional_properties") + private Object mapWithAdditionalProperties; + + @JsonProperty("map_without_additional_properties") + private Object mapWithoutAdditionalProperties; + @JsonProperty("anytype_1") private Object anytype1; @@ -288,6 +294,46 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + */ + @ApiModelProperty(value = "") + + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + */ + @ApiModelProperty(value = "") + + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -366,6 +412,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -373,7 +421,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @Override @@ -389,6 +437,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 44e1e29d741e..164cd1500d6f 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -50,6 +50,12 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; + @JsonProperty("map_with_additional_properties") + private Object mapWithAdditionalProperties; + + @JsonProperty("map_without_additional_properties") + private Object mapWithoutAdditionalProperties; + @JsonProperty("anytype_1") private Object anytype1; @@ -288,6 +294,46 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + */ + @ApiModelProperty(value = "") + + + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + */ + @ApiModelProperty(value = "") + + + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -366,6 +412,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && + Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -373,7 +421,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); } @Override @@ -389,6 +437,8 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); + sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); From 2cb7acd6c1c82a368f23206739dd33324d185402 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 16:33:40 +0000 Subject: [PATCH 058/105] Run samples scripts --- docs/generators/ada-server.md | 3 +++ docs/generators/ada.md | 3 +++ docs/generators/android.md | 3 +++ docs/generators/apache2.md | 3 +++ docs/generators/apex.md | 3 +++ docs/generators/asciidoc.md | 3 +++ docs/generators/avro-schema.md | 3 +++ docs/generators/bash.md | 3 +++ docs/generators/c.md | 3 +++ docs/generators/clojure.md | 3 +++ docs/generators/cpp-qt5-client.md | 3 +++ docs/generators/cpp-qt5-qhttpengine-server.md | 3 +++ docs/generators/cpp-tizen.md | 3 +++ docs/generators/cwiki.md | 3 +++ docs/generators/dart-dio.md | 3 +++ docs/generators/dart-jaguar.md | 3 +++ docs/generators/dart.md | 3 +++ docs/generators/dynamic-html.md | 3 +++ docs/generators/elixir.md | 3 +++ docs/generators/fsharp-functions.md | 3 +++ docs/generators/groovy.md | 3 +++ docs/generators/haskell-http-client.md | 3 +++ docs/generators/haskell.md | 3 +++ docs/generators/html.md | 3 +++ docs/generators/html2.md | 3 +++ docs/generators/java-inflector.md | 3 +++ docs/generators/java-msf4j.md | 3 +++ docs/generators/java-pkmst.md | 3 +++ docs/generators/java-play-framework.md | 3 +++ docs/generators/java-undertow-server.md | 3 +++ docs/generators/java-vertx-web.md | 3 +++ docs/generators/java-vertx.md | 3 +++ docs/generators/java.md | 3 +++ docs/generators/javascript-apollo.md | 3 +++ docs/generators/javascript-closure-angular.md | 3 +++ docs/generators/javascript-flowtyped.md | 3 +++ docs/generators/javascript.md | 3 +++ docs/generators/jaxrs-cxf-cdi.md | 3 +++ docs/generators/jaxrs-cxf-client.md | 3 +++ docs/generators/jaxrs-cxf-extended.md | 3 +++ docs/generators/jaxrs-cxf.md | 3 +++ docs/generators/jaxrs-jersey.md | 3 +++ docs/generators/jaxrs-resteasy-eap.md | 3 +++ docs/generators/jaxrs-resteasy.md | 3 +++ docs/generators/jaxrs-spec.md | 3 +++ docs/generators/jmeter.md | 3 +++ docs/generators/k6.md | 3 +++ docs/generators/markdown.md | 3 +++ docs/generators/nim.md | 3 +++ docs/generators/nodejs-express-server.md | 3 +++ docs/generators/nodejs-server-deprecated.md | 3 +++ docs/generators/ocaml.md | 3 +++ docs/generators/openapi-yaml.md | 3 +++ docs/generators/openapi.md | 3 +++ docs/generators/php-laravel.md | 3 +++ docs/generators/php-lumen.md | 3 +++ docs/generators/php-silex-deprecated.md | 3 +++ docs/generators/php-slim-deprecated.md | 3 +++ docs/generators/php-slim4.md | 3 +++ docs/generators/php-symfony.md | 3 +++ docs/generators/php-ze-ph.md | 3 +++ docs/generators/php.md | 3 +++ docs/generators/plantuml.md | 3 +++ docs/generators/python-aiohttp.md | 3 +++ docs/generators/python-blueplanet.md | 3 +++ docs/generators/python-flask.md | 3 +++ docs/generators/ruby.md | 3 +++ docs/generators/scala-akka-http-server.md | 3 +++ docs/generators/scala-akka.md | 3 +++ docs/generators/scala-gatling.md | 3 +++ docs/generators/scala-httpclient-deprecated.md | 3 +++ docs/generators/scala-lagom-server.md | 3 +++ docs/generators/scala-play-server.md | 3 +++ docs/generators/scala-sttp.md | 3 +++ docs/generators/scalatra.md | 3 +++ docs/generators/scalaz.md | 3 +++ docs/generators/spring.md | 3 +++ docs/generators/swift4-deprecated.md | 3 +++ docs/generators/swift5.md | 3 +++ docs/generators/typescript-angular.md | 3 +++ docs/generators/typescript-angularjs.md | 3 +++ docs/generators/typescript-aurelia.md | 3 +++ docs/generators/typescript-axios.md | 3 +++ docs/generators/typescript-fetch.md | 3 +++ docs/generators/typescript-inversify.md | 3 +++ docs/generators/typescript-jquery.md | 3 +++ docs/generators/typescript-node.md | 3 +++ docs/generators/typescript-redux-query.md | 3 +++ docs/generators/typescript-rxjs.md | 3 +++ 89 files changed, 267 insertions(+) diff --git a/docs/generators/ada-server.md b/docs/generators/ada-server.md index 85bfb5b5d02c..c6b9fb5f4bc2 100644 --- a/docs/generators/ada-server.md +++ b/docs/generators/ada-server.md @@ -7,6 +7,9 @@ sidebar_label: ada-server | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |projectName|GNAT project name| |defaultProject| diff --git a/docs/generators/ada.md b/docs/generators/ada.md index 66114165a03e..bc016e48361d 100644 --- a/docs/generators/ada.md +++ b/docs/generators/ada.md @@ -7,6 +7,9 @@ sidebar_label: ada | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |projectName|GNAT project name| |defaultProject| diff --git a/docs/generators/android.md b/docs/generators/android.md index 48cef4ce53c9..e12c6b012172 100644 --- a/docs/generators/android.md +++ b/docs/generators/android.md @@ -15,6 +15,9 @@ sidebar_label: android |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |groupId|groupId for use in the generated build.gradle and pom.xml| |null| |invokerPackage|root package for generated code| |null| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template) to use|
**volley**
HTTP client: Volley 1.0.19 (default)
**httpclient**
HTTP client: Apache HttpClient 4.3.6. JSON processing: Gson 2.3.1. IMPORTANT: Android client using HttpClient is not actively maintained and will be depecreated in the next major release.
|null| |modelPackage|package for generated models| |null| diff --git a/docs/generators/apache2.md b/docs/generators/apache2.md index d097e39d84a9..7a5585fb7aa6 100644 --- a/docs/generators/apache2.md +++ b/docs/generators/apache2.md @@ -7,6 +7,9 @@ sidebar_label: apache2 | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/apex.md b/docs/generators/apex.md index 9ead87c94e96..ebcf3c22cfd7 100644 --- a/docs/generators/apex.md +++ b/docs/generators/apex.md @@ -10,6 +10,9 @@ sidebar_label: apex |buildMethod|The build method for this package.| |null| |classPrefix|Prefix for generated classes. Set this to avoid overwriting existing classes in your org.| |null| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |namedCredential|The named credential name for the HTTP callouts| |null| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/asciidoc.md b/docs/generators/asciidoc.md index 01683b0a323e..814bc0d401f9 100644 --- a/docs/generators/asciidoc.md +++ b/docs/generators/asciidoc.md @@ -16,6 +16,9 @@ sidebar_label: asciidoc |infoEmail|an email address to contact for inquiries about the application| |null| |infoUrl|a URL where users can get more information about the application| |null| |invokerPackage|root package for generated code| |null| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseInfo|a short description of the license| |null| |licenseUrl|a URL pointing to the full license| |null| diff --git a/docs/generators/avro-schema.md b/docs/generators/avro-schema.md index da33df520012..0705b3a9940b 100644 --- a/docs/generators/avro-schema.md +++ b/docs/generators/avro-schema.md @@ -7,6 +7,9 @@ sidebar_label: avro-schema | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |packageName|package for generated classes (where supported)| |null| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/bash.md b/docs/generators/bash.md index 724e3d9a4704..b8c03a992d37 100644 --- a/docs/generators/bash.md +++ b/docs/generators/bash.md @@ -13,6 +13,9 @@ sidebar_label: bash |generateBashCompletion|Whether to generate the Bash completion script| |false| |generateZshCompletion|Whether to generate the Zsh completion script| |false| |hostEnvironmentVariable|Name of environment variable where host can be defined (e.g. PETSTORE_HOST='http://api.openapitools.org:8080')| |null| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |processMarkdown|Convert all Markdown Markup into terminal formatting| |false| diff --git a/docs/generators/c.md b/docs/generators/c.md index 80e50635f4c5..0f6d97ec2046 100644 --- a/docs/generators/c.md +++ b/docs/generators/c.md @@ -8,6 +8,9 @@ sidebar_label: c |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/clojure.md b/docs/generators/clojure.md index f2a755332bfb..b6d76ced8726 100644 --- a/docs/generators/clojure.md +++ b/docs/generators/clojure.md @@ -8,6 +8,9 @@ sidebar_label: clojure |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |baseNamespace|the base/top namespace (Default: generated from projectName)| |null| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |projectDescription|description of the project (Default: using info.description or "Client library of <projectName>")| |null| diff --git a/docs/generators/cpp-qt5-client.md b/docs/generators/cpp-qt5-client.md index 8e2bf7ab98b7..dd69dc5103fc 100644 --- a/docs/generators/cpp-qt5-client.md +++ b/docs/generators/cpp-qt5-client.md @@ -9,6 +9,9 @@ sidebar_label: cpp-qt5-client |contentCompression|Enable Compressed Content Encoding for requests and responses| |false| |cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelNamePrefix|Prefix that will be prepended to all model names.| |OAI| |optionalProjectFile|Generate client.pri.| |true| diff --git a/docs/generators/cpp-qt5-qhttpengine-server.md b/docs/generators/cpp-qt5-qhttpengine-server.md index 9e2f0e75e5c6..3ea9cbee65e4 100644 --- a/docs/generators/cpp-qt5-qhttpengine-server.md +++ b/docs/generators/cpp-qt5-qhttpengine-server.md @@ -9,6 +9,9 @@ sidebar_label: cpp-qt5-qhttpengine-server |contentCompression|Enable Compressed Content Encoding for requests and responses| |false| |cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelNamePrefix|Prefix that will be prepended to all model names.| |OAI| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/cpp-tizen.md b/docs/generators/cpp-tizen.md index dd887f704784..556952ea68e6 100644 --- a/docs/generators/cpp-tizen.md +++ b/docs/generators/cpp-tizen.md @@ -7,6 +7,9 @@ sidebar_label: cpp-tizen | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |reservedWordPrefix|Prefix to prepend to reserved words in order to avoid conflicts| |r_| diff --git a/docs/generators/cwiki.md b/docs/generators/cwiki.md index 2804a1bb2b8f..bff265cbbcc0 100644 --- a/docs/generators/cwiki.md +++ b/docs/generators/cwiki.md @@ -15,6 +15,9 @@ sidebar_label: cwiki |infoEmail|an email address to contact for inquiries about the application| |null| |infoUrl|a URL where users can get more information about the application| |null| |invokerPackage|root package for generated code| |null| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseInfo|a short description of the license| |null| |licenseUrl|a URL pointing to the full license| |null| diff --git a/docs/generators/dart-dio.md b/docs/generators/dart-dio.md index 5bab2b35a21d..11ae81bd03ca 100644 --- a/docs/generators/dart-dio.md +++ b/docs/generators/dart-dio.md @@ -9,6 +9,9 @@ sidebar_label: dart-dio |browserClient|Is the client browser based (for Dart 1.x only)| |null| |dateLibrary|Option. Date library to use|
**core**
Dart core library (DateTime)
**timemachine**
Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.
|core| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |nullableFields|Is the null fields should be in the JSON payload| |null| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/dart-jaguar.md b/docs/generators/dart-jaguar.md index a23282c5095c..ba951a1a77d9 100644 --- a/docs/generators/dart-jaguar.md +++ b/docs/generators/dart-jaguar.md @@ -8,6 +8,9 @@ sidebar_label: dart-jaguar |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |browserClient|Is the client browser based (for Dart 1.x only)| |null| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |nullableFields|Is the null fields should be in the JSON payload| |null| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/dart.md b/docs/generators/dart.md index b6ff9ba8eef8..36ce04b65c30 100644 --- a/docs/generators/dart.md +++ b/docs/generators/dart.md @@ -8,6 +8,9 @@ sidebar_label: dart |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |browserClient|Is the client browser based (for Dart 1.x only)| |null| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |pubAuthor|Author name in generated pubspec| |null| diff --git a/docs/generators/dynamic-html.md b/docs/generators/dynamic-html.md index 9766b76b426f..904d67186835 100644 --- a/docs/generators/dynamic-html.md +++ b/docs/generators/dynamic-html.md @@ -11,6 +11,9 @@ sidebar_label: dynamic-html |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |groupId|groupId in generated pom.xml| |null| |invokerPackage|root package for generated code| |null| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/elixir.md b/docs/generators/elixir.md index c13f447d0c89..627d9debcf85 100644 --- a/docs/generators/elixir.md +++ b/docs/generators/elixir.md @@ -8,6 +8,9 @@ sidebar_label: elixir |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay.Pets| |null| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseHeader|The license header to prepend to the top of all source files.| |null| |packageName|Elixir package name (convention: lowercase).| |null| diff --git a/docs/generators/fsharp-functions.md b/docs/generators/fsharp-functions.md index 07b7aa3ded2b..314ffaa55414 100644 --- a/docs/generators/fsharp-functions.md +++ b/docs/generators/fsharp-functions.md @@ -7,6 +7,9 @@ sidebar_label: fsharp-functions | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |NoLicense| |licenseUrl|The URL of the license| |http://localhost| diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index d5efbbd4ba4b..c6f3b79860fc 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -25,6 +25,9 @@ sidebar_label: groovy |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/haskell-http-client.md b/docs/generators/haskell-http-client.md index a1ecfc5a4b04..c023a6823d81 100644 --- a/docs/generators/haskell-http-client.md +++ b/docs/generators/haskell-http-client.md @@ -24,6 +24,9 @@ sidebar_label: haskell-http-client |generateModelConstructors|Generate smart constructors (only supply required fields) for models| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |inlineMimeTypes|Inline (hardcode) the content-type and accept parameters on operations, when there is only 1 option| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelDeriving|Additional classes to include in the deriving() clause of Models| |null| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/haskell.md b/docs/generators/haskell.md index 1fef8d922d29..1c0046c2c6ab 100644 --- a/docs/generators/haskell.md +++ b/docs/generators/haskell.md @@ -8,6 +8,9 @@ sidebar_label: haskell |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/html.md b/docs/generators/html.md index b5603e1888aa..ea8e8ae0dcb3 100644 --- a/docs/generators/html.md +++ b/docs/generators/html.md @@ -15,6 +15,9 @@ sidebar_label: html |infoEmail|an email address to contact for inquiries about the application| |null| |infoUrl|a URL where users can get more information about the application| |null| |invokerPackage|root package for generated code| |null| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseInfo|a short description of the license| |null| |licenseUrl|a URL pointing to the full license| |null| diff --git a/docs/generators/html2.md b/docs/generators/html2.md index 6641bcfa3e49..08f3d27526ae 100644 --- a/docs/generators/html2.md +++ b/docs/generators/html2.md @@ -15,6 +15,9 @@ sidebar_label: html2 |infoEmail|an email address to contact for inquiries about the application| |null| |infoUrl|a URL where users can get more information about the application| |null| |invokerPackage|root package for generated code| |null| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseInfo|a short description of the license| |null| |licenseUrl|a URL pointing to the full license| |null| diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index 240a6bb85e25..3531aa17cde1 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -27,6 +27,9 @@ sidebar_label: java-inflector |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |invokerPackage|root package for generated code| |org.openapitools.controllers| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index 2a7c74842272..4eae70a3f838 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -28,6 +28,9 @@ sidebar_label: java-msf4j |implFolder|folder for generated implementation code| |src/main/java| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template)|
**jersey1**
Jersey core 1.x
**jersey2**
Jersey core 2.x
|jersey2| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index 360cecdad37b..aafda3a1ff99 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -29,6 +29,9 @@ sidebar_label: java-pkmst |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |invokerPackage|root package for generated code| |com.prokarma.pkmst.controller| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index db5a6cce52d7..9717875c6f45 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -31,6 +31,9 @@ sidebar_label: java-play-framework |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index 2975825ef19c..8ef69f09438d 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -27,6 +27,9 @@ sidebar_label: java-undertow-server |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |invokerPackage|root package for generated code| |org.openapitools.handler| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md index 96c7193b2881..7f191c70225a 100644 --- a/docs/generators/java-vertx-web.md +++ b/docs/generators/java-vertx-web.md @@ -27,6 +27,9 @@ sidebar_label: java-vertx-web |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |invokerPackage|root package for generated code| |org.openapitools.vertxweb.server| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index 626eca2911f9..503ad3402369 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -27,6 +27,9 @@ sidebar_label: java-vertx |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |invokerPackage|root package for generated code| |org.openapitools| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/java.md b/docs/generators/java.md index 716c1beb9b57..d62d14394daa 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -30,6 +30,9 @@ sidebar_label: java |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |invokerPackage|root package for generated code| |org.openapitools.client| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template) to use|
**jersey1**
HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead.
**jersey2**
HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x
**feign**
HTTP client: OpenFeign 9.x (deprecated) or 10.x (default). JSON processing: Jackson 2.9.x.
**okhttp-gson**
[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
**retrofit**
HTTP client: OkHttp 2.x. JSON processing: Gson 2.x (Retrofit 1.9.0). IMPORTANT NOTE: retrofit1.x is no longer actively maintained so please upgrade to 'retrofit2' instead.
**retrofit2**
HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)
**resttemplate**
HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x
**webclient**
HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
**resteasy**
HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x
**vertx**
HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x
**google-api-client**
HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x
**rest-assured**
HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8
**native**
HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+
**microprofile**
HTTP client: Microprofile client X.x. JSON processing: Jackson 2.9.x
|okhttp-gson| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/javascript-apollo.md b/docs/generators/javascript-apollo.md index ca26bb0c0616..86074ce7da8b 100644 --- a/docs/generators/javascript-apollo.md +++ b/docs/generators/javascript-apollo.md @@ -11,6 +11,9 @@ sidebar_label: javascript-apollo |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |invokerPackage|root package for generated code| |null| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|name of the license the project uses (Default: using info.license.name)| |null| |modelPackage|package for generated models| |null| diff --git a/docs/generators/javascript-closure-angular.md b/docs/generators/javascript-closure-angular.md index e870e567eaca..b4c622a62ca4 100644 --- a/docs/generators/javascript-closure-angular.md +++ b/docs/generators/javascript-closure-angular.md @@ -8,6 +8,9 @@ sidebar_label: javascript-closure-angular |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/javascript-flowtyped.md b/docs/generators/javascript-flowtyped.md index 8c7f5973aa79..993f6188b69a 100644 --- a/docs/generators/javascript-flowtyped.md +++ b/docs/generators/javascript-flowtyped.md @@ -9,6 +9,9 @@ sidebar_label: javascript-flowtyped |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/javascript.md b/docs/generators/javascript.md index 49dabe82ea2e..07ea5e6abab1 100644 --- a/docs/generators/javascript.md +++ b/docs/generators/javascript.md @@ -12,6 +12,9 @@ sidebar_label: javascript |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |invokerPackage|root package for generated code| |null| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|name of the license the project uses (Default: using info.license.name)| |null| |modelPackage|package for generated models| |null| diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index d42714ad38ed..772302214821 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -31,6 +31,9 @@ sidebar_label: jaxrs-cxf-cdi |interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template)|
**<default>**
JAXRS spec only, to be deployed in an app server (TomEE, JBoss, WLS, ...)
**quarkus**
Server using Quarkus
**thorntail**
Server using Thorntail
**openliberty**
Server using Open Liberty
**helidon**
Server using Helidon
|<default>| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index cea106975e6e..fc9e828b4c1f 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -27,6 +27,9 @@ sidebar_label: jaxrs-cxf-client |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index b514e1d4b0f6..5297b836979b 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -34,6 +34,9 @@ sidebar_label: jaxrs-cxf-extended |implFolder|folder for generated implementation code| |src/main/java| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index b65f8d844bc9..bab820493652 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -33,6 +33,9 @@ sidebar_label: jaxrs-cxf |implFolder|folder for generated implementation code| |src/main/java| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index 9618f052ab6b..3886f2c5005a 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -28,6 +28,9 @@ sidebar_label: jaxrs-jersey |implFolder|folder for generated implementation code| |src/main/java| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template)|
**jersey1**
Jersey core 1.x
**jersey2**
Jersey core 2.x
|jersey2| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index 8961c6da03dd..acb98c4d496f 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -29,6 +29,9 @@ sidebar_label: jaxrs-resteasy-eap |implFolder|folder for generated implementation code| |src/main/java| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index bcff6b2d13a0..4fab9c31c06c 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -29,6 +29,9 @@ sidebar_label: jaxrs-resteasy |implFolder|folder for generated implementation code| |src/main/java| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index 3deb5c4260a2..37fad5b3419e 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -31,6 +31,9 @@ sidebar_label: jaxrs-spec |interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template)|
**<default>**
JAXRS spec only, to be deployed in an app server (TomEE, JBoss, WLS, ...)
**quarkus**
Server using Quarkus
**thorntail**
Server using Thorntail
**openliberty**
Server using Open Liberty
**helidon**
Server using Helidon
|<default>| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/jmeter.md b/docs/generators/jmeter.md index 16825e5dee41..4f9bbde97d03 100644 --- a/docs/generators/jmeter.md +++ b/docs/generators/jmeter.md @@ -7,6 +7,9 @@ sidebar_label: jmeter | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/k6.md b/docs/generators/k6.md index 7d2b09f46ebe..f95db7ddcd1e 100644 --- a/docs/generators/k6.md +++ b/docs/generators/k6.md @@ -7,6 +7,9 @@ sidebar_label: k6 | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/markdown.md b/docs/generators/markdown.md index fef2cddc340d..6a2ea8092129 100644 --- a/docs/generators/markdown.md +++ b/docs/generators/markdown.md @@ -7,6 +7,9 @@ sidebar_label: markdown | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/nim.md b/docs/generators/nim.md index 5b72fb3575a9..ce12410444c8 100644 --- a/docs/generators/nim.md +++ b/docs/generators/nim.md @@ -7,6 +7,9 @@ sidebar_label: nim | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/nodejs-express-server.md b/docs/generators/nodejs-express-server.md index 5ded08347aa2..c7fcd09b4e08 100644 --- a/docs/generators/nodejs-express-server.md +++ b/docs/generators/nodejs-express-server.md @@ -7,6 +7,9 @@ sidebar_label: nodejs-express-server | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |serverPort|TCP port to listen on.| |null| diff --git a/docs/generators/nodejs-server-deprecated.md b/docs/generators/nodejs-server-deprecated.md index 981b7b9fffec..22fea94fb8f4 100644 --- a/docs/generators/nodejs-server-deprecated.md +++ b/docs/generators/nodejs-server-deprecated.md @@ -9,6 +9,9 @@ sidebar_label: nodejs-server-deprecated |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |exportedName|When the generated code will be deployed to Google Cloud Functions, this option can be used to update the name of the exported function. By default, it refers to the basePath. This does not affect normal standalone nodejs server code.| |null| |googleCloudFunctions|When specified, it will generate the code which runs within Google Cloud Functions instead of standalone Node.JS server. See https://cloud.google.com/functions/docs/quickstart for the details of how to deploy the generated code.| |false| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |serverPort|TCP port to listen on.| |null| diff --git a/docs/generators/ocaml.md b/docs/generators/ocaml.md index 403a8eff9e76..c6a462b0234e 100644 --- a/docs/generators/ocaml.md +++ b/docs/generators/ocaml.md @@ -7,6 +7,9 @@ sidebar_label: ocaml | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/openapi-yaml.md b/docs/generators/openapi-yaml.md index 3fde0dfd3bb6..ffed6c525f53 100644 --- a/docs/generators/openapi-yaml.md +++ b/docs/generators/openapi-yaml.md @@ -7,6 +7,9 @@ sidebar_label: openapi-yaml | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |outputFile|Output filename| |openapi/openapi.yaml| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/openapi.md b/docs/generators/openapi.md index fe7fe0cfa509..b832185c0d42 100644 --- a/docs/generators/openapi.md +++ b/docs/generators/openapi.md @@ -7,6 +7,9 @@ sidebar_label: openapi | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/php-laravel.md b/docs/generators/php-laravel.md index f6447b33d5c4..a88e08abec2f 100644 --- a/docs/generators/php-laravel.md +++ b/docs/generators/php-laravel.md @@ -10,6 +10,9 @@ sidebar_label: php-laravel |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |packageName|The main package name for classes. e.g. GeneratedPetstore| |null| diff --git a/docs/generators/php-lumen.md b/docs/generators/php-lumen.md index 33efe2cc794f..89b4d57f79ae 100644 --- a/docs/generators/php-lumen.md +++ b/docs/generators/php-lumen.md @@ -10,6 +10,9 @@ sidebar_label: php-lumen |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |packageName|The main package name for classes. e.g. GeneratedPetstore| |null| diff --git a/docs/generators/php-silex-deprecated.md b/docs/generators/php-silex-deprecated.md index df20864fb936..b1550056cfef 100644 --- a/docs/generators/php-silex-deprecated.md +++ b/docs/generators/php-silex-deprecated.md @@ -7,6 +7,9 @@ sidebar_label: php-silex-deprecated | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/php-slim-deprecated.md b/docs/generators/php-slim-deprecated.md index d97ebb8060d9..fa494ab05a19 100644 --- a/docs/generators/php-slim-deprecated.md +++ b/docs/generators/php-slim-deprecated.md @@ -10,6 +10,9 @@ sidebar_label: php-slim-deprecated |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |packageName|The main package name for classes. e.g. GeneratedPetstore| |null| diff --git a/docs/generators/php-slim4.md b/docs/generators/php-slim4.md index ff5ee683ab1d..03c119d6383c 100644 --- a/docs/generators/php-slim4.md +++ b/docs/generators/php-slim4.md @@ -10,6 +10,9 @@ sidebar_label: php-slim4 |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |packageName|The main package name for classes. e.g. GeneratedPetstore| |null| diff --git a/docs/generators/php-symfony.md b/docs/generators/php-symfony.md index 1c781a04c97b..606ae0319e87 100644 --- a/docs/generators/php-symfony.md +++ b/docs/generators/php-symfony.md @@ -15,6 +15,9 @@ sidebar_label: php-symfony |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |packageName|The main package name for classes. e.g. GeneratedPetstore| |null| diff --git a/docs/generators/php-ze-ph.md b/docs/generators/php-ze-ph.md index b6852f1087d6..24643714ec6d 100644 --- a/docs/generators/php-ze-ph.md +++ b/docs/generators/php-ze-ph.md @@ -10,6 +10,9 @@ sidebar_label: php-ze-ph |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |packageName|The main package name for classes. e.g. GeneratedPetstore| |null| diff --git a/docs/generators/php.md b/docs/generators/php.md index 329969e42fdc..f65f48fc83cf 100644 --- a/docs/generators/php.md +++ b/docs/generators/php.md @@ -11,6 +11,9 @@ sidebar_label: php |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |packageName|The main package name for classes. e.g. GeneratedPetstore| |null| diff --git a/docs/generators/plantuml.md b/docs/generators/plantuml.md index 9f64e8218348..125b735465c7 100644 --- a/docs/generators/plantuml.md +++ b/docs/generators/plantuml.md @@ -7,6 +7,9 @@ sidebar_label: plantuml | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/python-aiohttp.md b/docs/generators/python-aiohttp.md index 522e75b3866e..466973fce5ed 100644 --- a/docs/generators/python-aiohttp.md +++ b/docs/generators/python-aiohttp.md @@ -9,6 +9,9 @@ sidebar_label: python-aiohttp |controllerPackage|controller package| |controllers| |defaultController|default controller| |default_controller| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |packageName|python package name (convention: snake_case).| |openapi_server| |packageVersion|python package version.| |1.0.0| diff --git a/docs/generators/python-blueplanet.md b/docs/generators/python-blueplanet.md index 2192715c9850..c7453a01d758 100644 --- a/docs/generators/python-blueplanet.md +++ b/docs/generators/python-blueplanet.md @@ -9,6 +9,9 @@ sidebar_label: python-blueplanet |controllerPackage|controller package| |controllers| |defaultController|default controller| |default_controller| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |packageName|python package name (convention: snake_case).| |openapi_server| |packageVersion|python package version.| |1.0.0| diff --git a/docs/generators/python-flask.md b/docs/generators/python-flask.md index 8a230e5fbad1..7176801fd518 100644 --- a/docs/generators/python-flask.md +++ b/docs/generators/python-flask.md @@ -9,6 +9,9 @@ sidebar_label: python-flask |controllerPackage|controller package| |controllers| |defaultController|default controller| |default_controller| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |packageName|python package name (convention: snake_case).| |openapi_server| |packageVersion|python package version.| |1.0.0| diff --git a/docs/generators/ruby.md b/docs/generators/ruby.md index 72dc31253a7e..3c6947590aa2 100644 --- a/docs/generators/ruby.md +++ b/docs/generators/ruby.md @@ -17,6 +17,9 @@ sidebar_label: ruby |gemSummary|gem summary. | |A ruby wrapper for the REST APIs| |gemVersion|gem version.| |1.0.0| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|HTTP library template (sub-template) to use|
**faraday**
Faraday (https://github.com/lostisland/faraday) (Beta support)
**typhoeus**
Typhoeus >= 1.0.1 (https://github.com/typhoeus/typhoeus)
|typhoeus| |moduleName|top module name (convention: CamelCase, usually corresponding to gem name).| |OpenAPIClient| diff --git a/docs/generators/scala-akka-http-server.md b/docs/generators/scala-akka-http-server.md index ce885201ee98..52927c770d89 100644 --- a/docs/generators/scala-akka-http-server.md +++ b/docs/generators/scala-akka-http-server.md @@ -14,6 +14,9 @@ sidebar_label: scala-akka-http-server |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |groupId|groupId in generated pom.xml| |org.openapitools| |invokerPackage|root package for generated code| |org.openapitools.server| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| diff --git a/docs/generators/scala-akka.md b/docs/generators/scala-akka.md index 0faa17e202b7..4602c0c26d49 100644 --- a/docs/generators/scala-akka.md +++ b/docs/generators/scala-akka.md @@ -9,6 +9,9 @@ sidebar_label: scala-akka |apiPackage|package for generated api classes| |null| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |mainPackage|Top-level package name, which defines 'apiPackage', 'modelPackage', 'invokerPackage'| |org.openapitools.client| |modelPackage|package for generated models| |null| diff --git a/docs/generators/scala-gatling.md b/docs/generators/scala-gatling.md index 3a957c1cb097..c560ed6ea23e 100644 --- a/docs/generators/scala-gatling.md +++ b/docs/generators/scala-gatling.md @@ -9,6 +9,9 @@ sidebar_label: scala-gatling |apiPackage|package for generated api classes| |null| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| diff --git a/docs/generators/scala-httpclient-deprecated.md b/docs/generators/scala-httpclient-deprecated.md index 0a4015fbac0a..4e240dae2c6f 100644 --- a/docs/generators/scala-httpclient-deprecated.md +++ b/docs/generators/scala-httpclient-deprecated.md @@ -9,6 +9,9 @@ sidebar_label: scala-httpclient-deprecated |apiPackage|package for generated api classes| |null| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| diff --git a/docs/generators/scala-lagom-server.md b/docs/generators/scala-lagom-server.md index cef8bf855c0d..35cef23ee310 100644 --- a/docs/generators/scala-lagom-server.md +++ b/docs/generators/scala-lagom-server.md @@ -9,6 +9,9 @@ sidebar_label: scala-lagom-server |apiPackage|package for generated api classes| |null| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| diff --git a/docs/generators/scala-play-server.md b/docs/generators/scala-play-server.md index dea0eb49248a..3977d6e99e66 100644 --- a/docs/generators/scala-play-server.md +++ b/docs/generators/scala-play-server.md @@ -10,6 +10,9 @@ sidebar_label: scala-play-server |basePackage|Base package in which supporting classes are generated.| |org.openapitools| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |generateCustomExceptions|If set, generates custom exception types.| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| diff --git a/docs/generators/scala-sttp.md b/docs/generators/scala-sttp.md index 27a8b862b10d..5a1ad7eef67b 100644 --- a/docs/generators/scala-sttp.md +++ b/docs/generators/scala-sttp.md @@ -9,6 +9,9 @@ sidebar_label: scala-sttp |apiPackage|package for generated api classes| |null| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |mainPackage|Top-level package name, which defines 'apiPackage', 'modelPackage', 'invokerPackage'| |org.openapitools.client| |modelPackage|package for generated models| |null| diff --git a/docs/generators/scalatra.md b/docs/generators/scalatra.md index 39eb4dc8ca6c..ab5e0a793f34 100644 --- a/docs/generators/scalatra.md +++ b/docs/generators/scalatra.md @@ -9,6 +9,9 @@ sidebar_label: scalatra |apiPackage|package for generated api classes| |null| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| diff --git a/docs/generators/scalaz.md b/docs/generators/scalaz.md index f8279d1df61a..f219aedadf20 100644 --- a/docs/generators/scalaz.md +++ b/docs/generators/scalaz.md @@ -9,6 +9,9 @@ sidebar_label: scalaz |apiPackage|package for generated api classes| |null| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| diff --git a/docs/generators/spring.md b/docs/generators/spring.md index 6116bd3f430f..5594f656fad6 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -35,6 +35,9 @@ sidebar_label: spring |interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64. Use java8 default interface when a responseWrapper is used
**false**
Various third party libraries as needed
|true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template)|
**spring-boot**
Spring-boot Server application using the SpringFox integration.
**spring-mvc**
Spring-MVC Server application using the SpringFox integration.
**spring-cloud**
Spring-Cloud-Feign client with Spring-Boot auto-configured settings.
|spring-boot| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/swift4-deprecated.md b/docs/generators/swift4-deprecated.md index a4da5435f682..e8ee511c67ed 100644 --- a/docs/generators/swift4-deprecated.md +++ b/docs/generators/swift4-deprecated.md @@ -8,6 +8,9 @@ sidebar_label: swift4-deprecated |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| |nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.(default: false)| |null| diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md index 9b172cdf785a..b319585d34e9 100644 --- a/docs/generators/swift5.md +++ b/docs/generators/swift5.md @@ -9,6 +9,9 @@ sidebar_label: swift5 |apiNamePrefix|Prefix that will be appended to all API names ('tags'). Default: empty string. e.g. Pet => Pet.| |null| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| |library|Library template (sub-template) to use|
**urlsession**
[DEFAULT] HTTP client: URLSession
**alamofire**
HTTP client: Alamofire
|urlsession| diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index 9fbecda07076..4555b7eaa283 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -11,6 +11,9 @@ sidebar_label: typescript-angular |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |fileNaming|Naming convention for the output files: 'camelCase', 'kebab-case'.| |camelCase| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelFileSuffix|The suffix of the file of the generated model (model<suffix>.ts).| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original| diff --git a/docs/generators/typescript-angularjs.md b/docs/generators/typescript-angularjs.md index 08a4bdad894d..884f71bc529c 100644 --- a/docs/generators/typescript-angularjs.md +++ b/docs/generators/typescript-angularjs.md @@ -9,6 +9,9 @@ sidebar_label: typescript-angularjs |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original| |nullSafeAdditionalProps|Set to make additional properties types declare that their indexer may return undefined| |false| diff --git a/docs/generators/typescript-aurelia.md b/docs/generators/typescript-aurelia.md index 55cc57522bb0..472ea75eee8a 100644 --- a/docs/generators/typescript-aurelia.md +++ b/docs/generators/typescript-aurelia.md @@ -9,6 +9,9 @@ sidebar_label: typescript-aurelia |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index 896b46d3eb69..4ab127067ebb 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -9,6 +9,9 @@ sidebar_label: typescript-axios |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md index 5fe6e8987087..8d887cdb72a6 100644 --- a/docs/generators/typescript-fetch.md +++ b/docs/generators/typescript-fetch.md @@ -9,6 +9,9 @@ sidebar_label: typescript-fetch |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/typescript-inversify.md b/docs/generators/typescript-inversify.md index a979fd102cb8..cfc543d905ec 100644 --- a/docs/generators/typescript-inversify.md +++ b/docs/generators/typescript-inversify.md @@ -9,6 +9,9 @@ sidebar_label: typescript-inversify |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/typescript-jquery.md b/docs/generators/typescript-jquery.md index 5616ceb58625..709789df599c 100644 --- a/docs/generators/typescript-jquery.md +++ b/docs/generators/typescript-jquery.md @@ -10,6 +10,9 @@ sidebar_label: typescript-jquery |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |jqueryAlreadyImported|When using this in legacy app using mix of typescript and javascript, this will only declare jquery and not import it| |false| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/typescript-node.md b/docs/generators/typescript-node.md index 4462d0e37982..2a1e72c3856f 100644 --- a/docs/generators/typescript-node.md +++ b/docs/generators/typescript-node.md @@ -9,6 +9,9 @@ sidebar_label: typescript-node |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/typescript-redux-query.md b/docs/generators/typescript-redux-query.md index 15900a22a7d1..e8bd1a3a6483 100644 --- a/docs/generators/typescript-redux-query.md +++ b/docs/generators/typescript-redux-query.md @@ -9,6 +9,9 @@ sidebar_label: typescript-redux-query |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/typescript-rxjs.md b/docs/generators/typescript-rxjs.md index e080a0761bdc..a5e1c349aafc 100644 --- a/docs/generators/typescript-rxjs.md +++ b/docs/generators/typescript-rxjs.md @@ -9,6 +9,9 @@ sidebar_label: typescript-rxjs |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| +|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. +If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. +This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| From ddbb667407e02e40064492b0947d8d6e68cec673 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 14:05:41 -0700 Subject: [PATCH 059/105] set legacyAdditionalPropertiesBehavior to true by default, except python --- .../main/java/org/openapitools/codegen/DefaultCodegen.java | 4 ++-- .../codegen/languages/PythonClientExperimentalCodegen.java | 1 + .../codegen/options/BashClientOptionsProvider.java | 2 +- .../codegen/options/DartClientOptionsProvider.java | 2 +- .../codegen/options/DartDioClientOptionsProvider.java | 2 +- .../codegen/options/ElixirClientOptionsProvider.java | 2 +- .../codegen/options/GoGinServerOptionsProvider.java | 2 +- .../openapitools/codegen/options/GoServerOptionsProvider.java | 2 +- .../codegen/options/HaskellServantOptionsProvider.java | 2 +- .../codegen/options/PhpClientOptionsProvider.java | 2 +- .../codegen/options/PhpLumenServerOptionsProvider.java | 2 +- .../codegen/options/PhpSilexServerOptionsProvider.java | 2 +- .../codegen/options/PhpSlim4ServerOptionsProvider.java | 2 +- .../codegen/options/PhpSlimServerOptionsProvider.java | 2 +- .../codegen/options/RubyClientOptionsProvider.java | 2 +- .../codegen/options/ScalaAkkaClientOptionsProvider.java | 2 +- .../codegen/options/ScalaHttpClientOptionsProvider.java | 2 +- .../openapitools/codegen/options/Swift4OptionsProvider.java | 2 +- .../openapitools/codegen/options/Swift5OptionsProvider.java | 2 +- .../options/TypeScriptAngularClientOptionsProvider.java | 2 +- .../options/TypeScriptAngularJsClientOptionsProvider.java | 2 +- .../options/TypeScriptAureliaClientOptionsProvider.java | 2 +- .../codegen/options/TypeScriptFetchClientOptionsProvider.java | 2 +- .../codegen/options/TypeScriptNodeClientOptionsProvider.java | 2 +- 24 files changed, 25 insertions(+), 24 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 3cbe22bdfc98..9338581cbeca 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 @@ -241,7 +241,7 @@ apiTemplateFiles are for API outputs only (controllers/handlers). // Support legacy logic for evaluating 'additionalProperties' keyword. // See CodegenConstants.java for more details. - protected boolean legacyAdditionalPropertiesBehavior = false; + protected boolean legacyAdditionalPropertiesBehavior = true; // make openapi available to all methods protected OpenAPI openAPI; @@ -1508,7 +1508,7 @@ public DefaultCodegen() { "it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed."); legacyAdditionalPropertiesBehaviorOpt.setEnum(legacyAdditionalPropertiesBehaviorOpts); cliOptions.add(legacyAdditionalPropertiesBehaviorOpt); - this.setLegacyAdditionalPropertiesBehavior(false); + this.setLegacyAdditionalPropertiesBehavior(true); // initialize special character mapping initalizeSpecialCharacterMapping(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java index 41017200a946..ad4ed8f4a91b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java @@ -56,6 +56,7 @@ public PythonClientExperimentalCodegen() { super(); supportsAdditionalPropertiesWithComposedSchema = true; + this.setLegacyAdditionalPropertiesBehavior(false); modifyFeatureSet(features -> features .includeDocumentationFeatures(DocumentationFeature.Readme) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/BashClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/BashClientOptionsProvider.java index 901bfaf70463..04863c639237 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/BashClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/BashClientOptionsProvider.java @@ -71,7 +71,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartClientOptionsProvider.java index 368e1d5022e3..16106c903909 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartClientOptionsProvider.java @@ -63,7 +63,7 @@ public Map createOptions() { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(DartClientCodegen.SUPPORT_DART2, "false") .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java index dc5f8cd783d0..3696cebeda9c 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java @@ -68,7 +68,7 @@ public Map createOptions() { .put(DartDioClientCodegen.DATE_LIBRARY, DATE_LIBRARY) .put(DartDioClientCodegen.NULLABLE_FIELDS, NULLABLE_FIELDS) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ElixirClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ElixirClientOptionsProvider.java index 95f186b27f2c..a999090b4457 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ElixirClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ElixirClientOptionsProvider.java @@ -44,7 +44,7 @@ public Map createOptions() { .put(CodegenConstants.PACKAGE_NAME, "yay_pets") .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoGinServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoGinServerOptionsProvider.java index df39bc9b02c9..08e610fa45dc 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoGinServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoGinServerOptionsProvider.java @@ -39,7 +39,7 @@ public Map createOptions() { .put(CodegenConstants.ENSURE_UNIQUE_PARAMS, ENSURE_UNIQUE_PARAMS_VALUE) .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoServerOptionsProvider.java index d56996c4d438..2c0694262597 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoServerOptionsProvider.java @@ -40,7 +40,7 @@ public Map createOptions() { .put(CodegenConstants.ENSURE_UNIQUE_PARAMS, ENSURE_UNIQUE_PARAMS_VALUE) .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/HaskellServantOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/HaskellServantOptionsProvider.java index 8a7459228b76..861bf597b13d 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/HaskellServantOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/HaskellServantOptionsProvider.java @@ -49,7 +49,7 @@ public Map createOptions() { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(HaskellServantCodegen.PROP_SERVE_STATIC, HaskellServantCodegen.PROP_SERVE_STATIC_DEFAULT.toString()) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpClientOptionsProvider.java index 0c61168604f4..d57f9e183595 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpClientOptionsProvider.java @@ -59,7 +59,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpLumenServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpLumenServerOptionsProvider.java index 0bfe24f2fe38..741eaae68007 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpLumenServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpLumenServerOptionsProvider.java @@ -58,7 +58,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSilexServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSilexServerOptionsProvider.java index 3d68f10321ac..46d76b432063 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSilexServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSilexServerOptionsProvider.java @@ -43,7 +43,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlim4ServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlim4ServerOptionsProvider.java index f4bbb41abc5a..c6bcd39d93e0 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlim4ServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlim4ServerOptionsProvider.java @@ -61,7 +61,7 @@ public Map createOptions() { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(PhpSlim4ServerCodegen.PSR7_IMPLEMENTATION, PSR7_IMPLEMENTATION_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java index fe41ab8ef96d..1787636b68d3 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java @@ -58,7 +58,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/RubyClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/RubyClientOptionsProvider.java index db3cc18e6a84..f697a9979b3e 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/RubyClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/RubyClientOptionsProvider.java @@ -67,7 +67,7 @@ public Map createOptions() { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LIBRARY, LIBRARY) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaAkkaClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaAkkaClientOptionsProvider.java index 689ef6eebef1..7aa11d3c6abd 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaAkkaClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaAkkaClientOptionsProvider.java @@ -56,7 +56,7 @@ public Map createOptions() { .put(CodegenConstants.MODEL_PROPERTY_NAMING, MODEL_PROPERTY_NAMING) .put("dateLibrary", DATE_LIBRARY) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaHttpClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaHttpClientOptionsProvider.java index 92efba318ed6..a6dd4d31e5ea 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaHttpClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaHttpClientOptionsProvider.java @@ -53,7 +53,7 @@ public Map createOptions() { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put("dateLibrary", DATE_LIBRARY) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift4OptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift4OptionsProvider.java index 7f545974f200..43f9f2ca2d0a 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift4OptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift4OptionsProvider.java @@ -82,7 +82,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java index 826affdaba6d..7fc4c343ebc0 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java @@ -83,7 +83,7 @@ public Map createOptions() { .put(CodegenConstants.API_NAME_PREFIX, "") .put(CodegenConstants.LIBRARY, LIBRARY_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java index d7ccf464f80a..67cb7a16f190 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java @@ -82,7 +82,7 @@ public Map createOptions() { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(TypeScriptAngularClientCodegen.FILE_NAMING, FILE_NAMING_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java index c87ef629bc54..1bba3c1d2eab 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java @@ -54,7 +54,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java index 2d39d635a104..5ac421260cfa 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java @@ -60,7 +60,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java index 97baf5fea7a9..1907ebb3fdcb 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java @@ -67,7 +67,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java index c74f404df38e..fd212b8da67c 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java @@ -64,7 +64,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "false") + .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") .build(); } From f12663a61616db4287e2151c47cec4148e274769 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 14:30:16 -0700 Subject: [PATCH 060/105] create separate yaml file to avoid having lots of changes in the pr --- .../codegen/DefaultCodegenTest.java | 2 +- ...and-additional-properties-for-testing.yaml | 2009 +++++++++++++++++ ...ith-fake-endpoints-models-for-testing.yaml | 6 - .../go-petstore/api/openapi.yaml | 8 +- .../docs/AdditionalPropertiesClass.md | 52 - .../model_additional_properties_class.go | 72 - .../petstore/java/feign/api/openapi.yaml | 8 +- .../model/AdditionalPropertiesClass.java | 64 +- .../petstore/java/feign10x/api/openapi.yaml | 8 +- .../model/AdditionalPropertiesClass.java | 64 +- .../java/google-api-client/api/openapi.yaml | 8 +- .../docs/AdditionalPropertiesClass.md | 2 - .../model/AdditionalPropertiesClass.java | 64 +- .../petstore/java/jersey1/api/openapi.yaml | 8 +- .../jersey1/docs/AdditionalPropertiesClass.md | 2 - .../model/AdditionalPropertiesClass.java | 64 +- .../java/jersey2-java6/api/openapi.yaml | 8 +- .../docs/AdditionalPropertiesClass.md | 2 - .../model/AdditionalPropertiesClass.java | 60 +- .../java/jersey2-java7/api/openapi.yaml | 8 +- .../docs/AdditionalPropertiesClass.md | 2 - .../model/AdditionalPropertiesClass.java | 64 +- .../java/jersey2-java8/api/openapi.yaml | 8 +- .../docs/AdditionalPropertiesClass.md | 2 - .../model/AdditionalPropertiesClass.java | 64 +- .../petstore/java/native/api/openapi.yaml | 8 +- .../native/docs/AdditionalPropertiesClass.md | 2 - .../model/AdditionalPropertiesClass.java | 64 +- .../api/openapi.yaml | 8 +- .../docs/AdditionalPropertiesClass.md | 2 - .../model/AdditionalPropertiesClass.java | 64 +- .../java/okhttp-gson/api/openapi.yaml | 8 +- .../docs/AdditionalPropertiesClass.md | 2 - .../model/AdditionalPropertiesClass.java | 60 +- .../rest-assured-jackson/api/openapi.yaml | 8 +- .../docs/AdditionalPropertiesClass.md | 2 - .../model/AdditionalPropertiesClass.java | 64 +- .../model/AdditionalPropertiesClassTest.java | 16 - .../java/rest-assured/api/openapi.yaml | 8 +- .../docs/AdditionalPropertiesClass.md | 2 - .../model/AdditionalPropertiesClass.java | 60 +- .../petstore/java/resteasy/api/openapi.yaml | 8 +- .../docs/AdditionalPropertiesClass.md | 2 - .../model/AdditionalPropertiesClass.java | 64 +- .../resttemplate-withXml/api/openapi.yaml | 8 +- .../docs/AdditionalPropertiesClass.md | 2 - .../model/AdditionalPropertiesClass.java | 68 +- .../java/resttemplate/api/openapi.yaml | 8 +- .../docs/AdditionalPropertiesClass.md | 2 - .../model/AdditionalPropertiesClass.java | 64 +- .../petstore/java/retrofit/api/openapi.yaml | 8 +- .../model/AdditionalPropertiesClass.java | 60 +- .../java/retrofit2-play24/api/openapi.yaml | 8 +- .../docs/AdditionalPropertiesClass.md | 2 - .../model/AdditionalPropertiesClass.java | 64 +- .../java/retrofit2-play25/api/openapi.yaml | 8 +- .../docs/AdditionalPropertiesClass.md | 2 - .../model/AdditionalPropertiesClass.java | 64 +- .../java/retrofit2-play26/api/openapi.yaml | 8 +- .../docs/AdditionalPropertiesClass.md | 2 - .../model/AdditionalPropertiesClass.java | 64 +- .../petstore/java/retrofit2/api/openapi.yaml | 8 +- .../docs/AdditionalPropertiesClass.md | 2 - .../model/AdditionalPropertiesClass.java | 60 +- .../java/retrofit2rx/api/openapi.yaml | 8 +- .../docs/AdditionalPropertiesClass.md | 2 - .../model/AdditionalPropertiesClass.java | 60 +- .../java/retrofit2rx2/api/openapi.yaml | 8 +- .../docs/AdditionalPropertiesClass.md | 2 - .../model/AdditionalPropertiesClass.java | 60 +- .../petstore/java/vertx/api/openapi.yaml | 8 +- .../vertx/docs/AdditionalPropertiesClass.md | 2 - .../model/AdditionalPropertiesClass.java | 64 +- .../petstore/java/webclient/api/openapi.yaml | 8 +- .../docs/AdditionalPropertiesClass.md | 2 - .../model/AdditionalPropertiesClass.java | 64 +- .../go-petstore/api/openapi.yaml | 2 +- 77 files changed, 2060 insertions(+), 1853 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-and-additional-properties-for-testing.yaml diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index 11d11a4e1455..b76e6eaf9573 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -240,7 +240,7 @@ public void testOriginalOpenApiDocumentVersion() { @Test public void testAdditionalPropertiesV2Spec() { - OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml"); + OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/2_0/petstore-with-fake-endpoints-models-and-additional-properties-for-testing.yaml"); DefaultCodegen codegen = new DefaultCodegen(); codegen.setLegacyAdditionalPropertiesBehavior(true); codegen.setOpenAPI(openAPI); diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-and-additional-properties-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-and-additional-properties-for-testing.yaml new file mode 100644 index 000000000000..7f990bf0fa7d --- /dev/null +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-and-additional-properties-for-testing.yaml @@ -0,0 +1,2009 @@ +swagger: '2.0' +info: + description: "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\" + version: 1.0.0 + title: OpenAPI Petstore + license: + name: Apache-2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0.html' +host: petstore.swagger.io:80 +basePath: /v2 +tags: + - name: pet + description: Everything about your Pets + - name: store + description: Access to Petstore orders + - name: user + description: Operations about user +schemes: + - http +paths: + /pet: + post: + tags: + - pet + summary: Add a new pet to the store + description: '' + operationId: addPet + consumes: + - application/json + - application/xml + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: Pet object that needs to be added to the store + required: true + schema: + $ref: '#/definitions/Pet' + responses: + '200': + description: successful operation + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + put: + tags: + - pet + summary: Update an existing pet + description: '' + operationId: updatePet + consumes: + - application/json + - application/xml + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: Pet object that needs to be added to the store + required: true + schema: + $ref: '#/definitions/Pet' + responses: + '200': + description: successful operation + '400': + description: Invalid ID supplied + '404': + description: Pet not found + '405': + description: Validation exception + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + /pet/findByStatus: + get: + tags: + - pet + summary: Finds Pets by status + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + produces: + - application/xml + - application/json + parameters: + - name: status + in: query + description: Status values that need to be considered for filter + required: true + type: array + items: + type: string + enum: + - available + - pending + - sold + default: available + collectionFormat: csv + responses: + '200': + description: successful operation + schema: + type: array + items: + $ref: '#/definitions/Pet' + '400': + description: Invalid status value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + /pet/findByTags: + get: + tags: + - pet + summary: Finds Pets by tags + description: 'Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.' + operationId: findPetsByTags + produces: + - application/xml + - application/json + parameters: + - name: tags + in: query + description: Tags to filter by + required: true + type: array + items: + type: string + collectionFormat: csv + responses: + '200': + description: successful operation + schema: + type: array + items: + $ref: '#/definitions/Pet' + '400': + description: Invalid tag value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + deprecated: true + '/pet/{petId}': + get: + tags: + - pet + summary: Find pet by ID + description: Returns a single pet + operationId: getPetById + produces: + - application/xml + - application/json + parameters: + - name: petId + in: path + description: ID of pet to return + required: true + type: integer + format: int64 + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/Pet' + '400': + description: Invalid ID supplied + '404': + description: Pet not found + security: + - api_key: [] + post: + tags: + - pet + summary: Updates a pet in the store with form data + description: '' + operationId: updatePetWithForm + consumes: + - application/x-www-form-urlencoded + produces: + - application/xml + - application/json + parameters: + - name: petId + in: path + description: ID of pet that needs to be updated + required: true + type: integer + format: int64 + - name: name + in: formData + description: Updated name of the pet + required: false + type: string + - name: status + in: formData + description: Updated status of the pet + required: false + type: string + responses: + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + delete: + tags: + - pet + summary: Deletes a pet + description: '' + operationId: deletePet + produces: + - application/xml + - application/json + parameters: + - name: api_key + in: header + required: false + type: string + - name: petId + in: path + description: Pet id to delete + required: true + type: integer + format: int64 + responses: + '200': + description: successful operation + '400': + description: Invalid pet value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + '/pet/{petId}/uploadImage': + post: + tags: + - pet + summary: uploads an image + description: '' + operationId: uploadFile + consumes: + - multipart/form-data + produces: + - application/json + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + type: integer + format: int64 + - name: additionalMetadata + in: formData + description: Additional data to pass to server + required: false + type: string + - name: file + in: formData + description: file to upload + required: false + type: file + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/ApiResponse' + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + /store/inventory: + get: + tags: + - store + summary: Returns pet inventories by status + description: Returns a map of status codes to quantities + operationId: getInventory + produces: + - application/json + parameters: [] + responses: + '200': + description: successful operation + schema: + type: object + additionalProperties: + type: integer + format: int32 + security: + - api_key: [] + /store/order: + post: + tags: + - store + summary: Place an order for a pet + description: '' + operationId: placeOrder + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: order placed for purchasing the pet + required: true + schema: + $ref: '#/definitions/Order' + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/Order' + '400': + description: Invalid Order + '/store/order/{order_id}': + get: + tags: + - store + summary: Find purchase order by ID + description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions' + operationId: getOrderById + produces: + - application/xml + - application/json + parameters: + - name: order_id + in: path + description: ID of pet that needs to be fetched + required: true + type: integer + maximum: 5 + minimum: 1 + format: int64 + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/Order' + '400': + description: Invalid ID supplied + '404': + description: Order not found + delete: + tags: + - store + summary: Delete purchase order by ID + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: deleteOrder + produces: + - application/xml + - application/json + parameters: + - name: order_id + in: path + description: ID of the order that needs to be deleted + required: true + type: string + responses: + '400': + description: Invalid ID supplied + '404': + description: Order not found + /user: + post: + tags: + - user + summary: Create user + description: This can only be done by the logged in user. + operationId: createUser + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: Created user object + required: true + schema: + $ref: '#/definitions/User' + responses: + default: + description: successful operation + /user/createWithArray: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithArrayInput + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: List of user object + required: true + schema: + type: array + items: + $ref: '#/definitions/User' + responses: + default: + description: successful operation + /user/createWithList: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithListInput + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: List of user object + required: true + schema: + type: array + items: + $ref: '#/definitions/User' + responses: + default: + description: successful operation + /user/login: + get: + tags: + - user + summary: Logs user into the system + description: '' + operationId: loginUser + produces: + - application/xml + - application/json + parameters: + - name: username + in: query + description: The user name for login + required: true + type: string + - name: password + in: query + description: The password for login in clear text + required: true + type: string + responses: + '200': + description: successful operation + schema: + type: string + headers: + X-Rate-Limit: + type: integer + format: int32 + description: calls per hour allowed by the user + X-Expires-After: + type: string + format: date-time + description: date in UTC when token expires + '400': + description: Invalid username/password supplied + /user/logout: + get: + tags: + - user + summary: Logs out current logged in user session + description: '' + operationId: logoutUser + produces: + - application/xml + - application/json + parameters: [] + responses: + default: + description: successful operation + '/user/{username}': + get: + tags: + - user + summary: Get user by user name + description: '' + operationId: getUserByName + produces: + - application/xml + - application/json + parameters: + - name: username + in: path + description: 'The name that needs to be fetched. Use user1 for testing.' + required: true + type: string + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/User' + '400': + description: Invalid username supplied + '404': + description: User not found + put: + tags: + - user + summary: Updated user + description: This can only be done by the logged in user. + operationId: updateUser + produces: + - application/xml + - application/json + parameters: + - name: username + in: path + description: name that need to be deleted + required: true + type: string + - in: body + name: body + description: Updated user object + required: true + schema: + $ref: '#/definitions/User' + responses: + '400': + description: Invalid user supplied + '404': + description: User not found + delete: + tags: + - user + summary: Delete user + description: This can only be done by the logged in user. + operationId: deleteUser + produces: + - application/xml + - application/json + parameters: + - name: username + in: path + description: The name that needs to be deleted + required: true + type: string + responses: + '400': + description: Invalid username supplied + '404': + description: User not found + + /fake_classname_test: + patch: + tags: + - "fake_classname_tags 123#$%^" + summary: To test class name in snake case + description: To test class name in snake case + operationId: testClassname + consumes: + - application/json + produces: + - application/json + parameters: + - in: body + name: body + description: client model + required: true + schema: + $ref: '#/definitions/Client' + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/Client' + security: + - api_key_query: [] + /fake: + patch: + tags: + - fake + summary: To test "client" model + description: To test "client" model + operationId: testClientModel + consumes: + - application/json + produces: + - application/json + parameters: + - in: body + name: body + description: client model + required: true + schema: + $ref: '#/definitions/Client' + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/Client' + get: + tags: + - fake + summary: To test enum parameters + description: To test enum parameters + operationId: testEnumParameters + consumes: + - "application/x-www-form-urlencoded" + parameters: + - name: enum_form_string_array + type: array + items: + type: string + default: '$' + enum: + - '>' + - '$' + in: formData + description: Form parameter enum test (string array) + - name: enum_form_string + type: string + default: '-efg' + enum: + - _abc + - '-efg' + - (xyz) + in: formData + description: Form parameter enum test (string) + - name: enum_header_string_array + type: array + items: + type: string + default: '$' + enum: + - '>' + - '$' + in: header + description: Header parameter enum test (string array) + - name: enum_header_string + type: string + default: '-efg' + enum: + - _abc + - '-efg' + - (xyz) + in: header + description: Header parameter enum test (string) + - name: enum_query_string_array + type: array + items: + type: string + default: '$' + enum: + - '>' + - '$' + in: query + description: Query parameter enum test (string array) + - name: enum_query_string + type: string + default: '-efg' + enum: + - _abc + - '-efg' + - (xyz) + in: query + description: Query parameter enum test (string) + - name: enum_query_integer + type: integer + format: int32 + enum: + - 1 + - -2 + in: query + description: Query parameter enum test (double) + - name: enum_query_double + type: number + format: double + enum: + - 1.1 + - -1.2 + in: query + description: Query parameter enum test (double) + responses: + '400': + description: Invalid request + '404': + description: Not found + post: + tags: + - fake + summary: "Fake endpoint for testing various parameters\n + 假端點\n + 偽のエンドポイント\n + 가짜 엔드 포인트" + description: "Fake endpoint for testing various parameters\n + 假端點\n + 偽のエンドポイント\n + 가짜 엔드 포인트" + operationId: testEndpointParameters + consumes: + - application/x-www-form-urlencoded + parameters: + - name: integer + type: integer + maximum: 100 + minimum: 10 + in: formData + description: None + - name: int32 + type: integer + format: int32 + maximum: 200 + minimum: 20 + in: formData + description: None + - name: int64 + type: integer + format: int64 + in: formData + description: None + - name: number + type: number + maximum: 543.2 + minimum: 32.1 + in: formData + description: None + required: true + - name: float + type: number + format: float + maximum: 987.6 + in: formData + description: None + - name: double + type: number + in: formData + format: double + maximum: 123.4 + minimum: 67.8 + required: true + description: None + - name: string + type: string + pattern: /[a-z]/i + in: formData + description: None + - name: pattern_without_delimiter + type: string + pattern: "^[A-Z].*" + in: formData + description: None + required: true + - name: byte + type: string + format: byte + in: formData + description: None + required: true + - name: binary + type: string + format: binary + in: formData + description: None + - name: date + type: string + format: date + in: formData + description: None + - name: dateTime + type: string + format: date-time + in: formData + description: None + - name: password + type: string + format: password + maxLength: 64 + minLength: 10 + in: formData + description: None + - name: callback + type: string + in: formData + description: None + responses: + '400': + description: Invalid username supplied + '404': + description: User not found + security: + - http_basic_test: [] + delete: + tags: + - fake + summary: Fake endpoint to test group parameters (optional) + description: Fake endpoint to test group parameters (optional) + operationId: testGroupParameters + x-group-parameters: true + parameters: + - name: required_string_group + type: integer + in: query + description: Required String in group parameters + required: true + - name: required_boolean_group + type: boolean + in: header + description: Required Boolean in group parameters + required: true + - name: required_int64_group + type: integer + format: int64 + in: query + description: Required Integer in group parameters + required: true + - name: string_group + type: integer + in: query + description: String in group parameters + - name: boolean_group + type: boolean + in: header + description: Boolean in group parameters + - name: int64_group + type: integer + format: int64 + in: query + description: Integer in group parameters + responses: + '400': + description: Someting wrong + /fake/outer/number: + post: + tags: + - fake + description: Test serialization of outer number types + operationId: fakeOuterNumberSerialize + parameters: + - name: body + in: body + description: Input number as post body + schema: + $ref: '#/definitions/OuterNumber' + responses: + '200': + description: Output number + schema: + $ref: '#/definitions/OuterNumber' + /fake/outer/string: + post: + tags: + - fake + description: Test serialization of outer string types + operationId: fakeOuterStringSerialize + parameters: + - name: body + in: body + description: Input string as post body + schema: + $ref: '#/definitions/OuterString' + responses: + '200': + description: Output string + schema: + $ref: '#/definitions/OuterString' + /fake/outer/boolean: + post: + tags: + - fake + description: Test serialization of outer boolean types + operationId: fakeOuterBooleanSerialize + parameters: + - name: body + in: body + description: Input boolean as post body + schema: + $ref: '#/definitions/OuterBoolean' + responses: + '200': + description: Output boolean + schema: + $ref: '#/definitions/OuterBoolean' + /fake/outer/composite: + post: + tags: + - fake + description: Test serialization of object with outer number type + operationId: fakeOuterCompositeSerialize + parameters: + - name: body + in: body + description: Input composite as post body + schema: + $ref: '#/definitions/OuterComposite' + responses: + '200': + description: Output composite + schema: + $ref: '#/definitions/OuterComposite' + /fake/jsonFormData: + get: + tags: + - fake + summary: test json serialization of form data + description: '' + operationId: testJsonFormData + consumes: + - application/x-www-form-urlencoded + parameters: + - name: param + in: formData + description: field1 + required: true + type: string + - name: param2 + in: formData + description: field2 + required: true + type: string + responses: + '200': + description: successful operation + /fake/inline-additionalProperties: + post: + tags: + - fake + summary: test inline additionalProperties + description: '' + operationId: testInlineAdditionalProperties + consumes: + - application/json + parameters: + - name: param + in: body + description: request body + required: true + schema: + type: object + additionalProperties: + type: string + responses: + '200': + description: successful operation + /fake/body-with-query-params: + put: + tags: + - fake + operationId: testBodyWithQueryParams + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/User' + - name: query + in: query + required: true + type: string + consumes: + - application/json + responses: + '200': + description: Success + /fake/create_xml_item: + post: + tags: + - fake + operationId: createXmlItem + summary: creates an XmlItem + description: this route creates an XmlItem + consumes: + - 'application/xml' + - 'application/xml; charset=utf-8' + - 'application/xml; charset=utf-16' + - 'text/xml' + - 'text/xml; charset=utf-8' + - 'text/xml; charset=utf-16' + produces: + - 'application/xml' + - 'application/xml; charset=utf-8' + - 'application/xml; charset=utf-16' + - 'text/xml' + - 'text/xml; charset=utf-8' + - 'text/xml; charset=utf-16' + parameters: + - in: body + name: XmlItem + description: XmlItem Body + required: true + schema: + $ref: '#/definitions/XmlItem' + responses: + 200: + description: successful operation + /another-fake/dummy: + patch: + tags: + - "$another-fake?" + summary: To test special tags + description: To test special tags and operation ID starting with number + operationId: 123_test_@#$%_special_tags + consumes: + - application/json + produces: + - application/json + parameters: + - in: body + name: body + description: client model + required: true + schema: + $ref: '#/definitions/Client' + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/Client' + /fake/body-with-file-schema: + put: + tags: + - fake + description: 'For this test, the body for this request much reference a schema named `File`.' + operationId: testBodyWithFileSchema + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/FileSchemaTestClass' + consumes: + - application/json + responses: + '200': + description: Success + /fake/test-query-paramters: + put: + tags: + - fake + description: 'To test the collection format in query parameters' + operationId: testQueryParameterCollectionFormat + parameters: + - name: pipe + in: query + required: true + type: array + items: + type: string + collectionFormat: pipe + - name: ioutil + in: query + required: true + type: array + items: + type: string + collectionFormat: tsv + - name: http + in: query + required: true + type: array + items: + type: string + collectionFormat: ssv + - name: url + in: query + required: true + type: array + items: + type: string + collectionFormat: csv + - name: context + in: query + required: true + type: array + items: + type: string + collectionFormat: multi + consumes: + - application/json + responses: + '200': + description: Success + '/fake/{petId}/uploadImageWithRequiredFile': + post: + tags: + - pet + summary: uploads an image (required) + description: '' + operationId: uploadFileWithRequiredFile + consumes: + - multipart/form-data + produces: + - application/json + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + type: integer + format: int64 + - name: additionalMetadata + in: formData + description: Additional data to pass to server + required: false + type: string + - name: requiredFile + in: formData + description: file to upload + required: true + type: file + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/ApiResponse' + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' +securityDefinitions: + petstore_auth: + type: oauth2 + authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog' + flow: implicit + scopes: + 'write:pets': modify pets in your account + 'read:pets': read your pets + api_key: + type: apiKey + name: api_key + in: header + api_key_query: + type: apiKey + name: api_key_query + in: query + http_basic_test: + type: basic +definitions: + Order: + type: object + properties: + id: + type: integer + format: int64 + petId: + type: integer + format: int64 + quantity: + type: integer + format: int32 + shipDate: + type: string + format: date-time + status: + type: string + description: Order Status + enum: + - placed + - approved + - delivered + complete: + type: boolean + default: false + xml: + name: Order + Category: + type: object + required: + - name + properties: + id: + type: integer + format: int64 + name: + type: string + default: default-name + xml: + name: Category + User: + type: object + properties: + id: + type: integer + format: int64 + x-is-unique: true + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + type: integer + format: int32 + description: User Status + xml: + name: User + Tag: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: Tag + Pet: + type: object + required: + - name + - photoUrls + properties: + id: + type: integer + format: int64 + x-is-unique: true + category: + $ref: '#/definitions/Category' + name: + type: string + example: doggie + photoUrls: + type: array + xml: + name: photoUrl + wrapped: true + items: + type: string + tags: + type: array + xml: + name: tag + wrapped: true + items: + $ref: '#/definitions/Tag' + status: + type: string + description: pet status in the store + enum: + - available + - pending + - sold + xml: + name: Pet + ApiResponse: + type: object + properties: + code: + type: integer + format: int32 + type: + type: string + message: + type: string + '$special[model.name]': + properties: + '$special[property.name]': + type: integer + format: int64 + xml: + name: '$special[model.name]' + Return: + description: Model for testing reserved words + properties: + return: + type: integer + format: int32 + xml: + name: Return + Name: + description: Model for testing model name same as property name + required: + - name + properties: + name: + type: integer + format: int32 + snake_case: + readOnly: true + type: integer + format: int32 + property: + type: string + 123Number: + type: integer + readOnly: true + xml: + name: Name + 200_response: + description: Model for testing model name starting with number + properties: + name: + type: integer + format: int32 + class: + type: string + xml: + name: Name + ClassModel: + description: Model for testing model with "_class" property + properties: + _class: + type: string + Dog: + allOf: + - $ref: '#/definitions/Animal' + - type: object + properties: + breed: + type: string + Cat: + allOf: + - $ref: '#/definitions/Animal' + - type: object + properties: + declawed: + type: boolean + BigCat: + allOf: + - $ref: '#/definitions/Cat' + - type: object + properties: + kind: + type: string + enum: [lions, tigers, leopards, jaguars] + Animal: + type: object + discriminator: className + required: + - className + properties: + className: + type: string + color: + type: string + default: 'red' + AnimalFarm: + type: array + items: + $ref: '#/definitions/Animal' + format_test: + type: object + required: + - number + - byte + - date + - password + properties: + integer: + type: integer + maximum: 100 + minimum: 10 + int32: + type: integer + format: int32 + maximum: 200 + minimum: 20 + int64: + type: integer + format: int64 + number: + maximum: 543.2 + minimum: 32.1 + type: number + float: + type: number + format: float + maximum: 987.6 + minimum: 54.3 + double: + type: number + format: double + maximum: 123.4 + minimum: 67.8 + string: + type: string + pattern: /[a-z]/i + byte: + type: string + format: byte + binary: + type: string + format: binary + date: + type: string + format: date + dateTime: + type: string + format: date-time + uuid: + type: string + format: uuid + example: 72f98069-206d-4f12-9f12-3d1e525a8e84 + password: + type: string + format: password + maxLength: 64 + minLength: 10 + BigDecimal: + type: string + format: number + EnumClass: + type: string + default: '-efg' + enum: + - _abc + - '-efg' + - (xyz) + Enum_Test: + type: object + required: + - enum_string_required + properties: + enum_string: + type: string + enum: + - UPPER + - lower + - '' + enum_string_required: + type: string + enum: + - UPPER + - lower + - '' + enum_integer: + type: integer + format: int32 + enum: + - 1 + - -1 + enum_number: + type: number + format: double + enum: + - 1.1 + - -1.2 + outerEnum: + $ref: '#/definitions/OuterEnum' + AdditionalPropertiesClass: + type: object + properties: + map_string: + type: object + additionalProperties: + type: string + map_number: + type: object + additionalProperties: + type: number + map_integer: + type: object + additionalProperties: + type: integer + map_boolean: + type: object + additionalProperties: + type: boolean + map_array_integer: + type: object + additionalProperties: + type: array + items: + type: integer + map_array_anytype: + type: object + additionalProperties: + type: array + items: + type: object + map_map_string: + type: object + additionalProperties: + type: object + additionalProperties: + type: string + map_map_anytype: + type: object + additionalProperties: + type: object + additionalProperties: + type: object + map_with_additional_properties: + type: object + additionalProperties: true + map_without_additional_properties: + type: object + additionalProperties: false + anytype_1: + type: object + anytype_2: {} + anytype_3: + type: object + properties: {} + AdditionalPropertiesString: + type: object + properties: + name: + type: string + additionalProperties: + type: string + AdditionalPropertiesInteger: + type: object + properties: + name: + type: string + additionalProperties: + type: integer + AdditionalPropertiesNumber: + type: object + properties: + name: + type: string + additionalProperties: + type: number + AdditionalPropertiesBoolean: + type: object + properties: + name: + type: string + additionalProperties: + type: boolean + AdditionalPropertiesArray: + type: object + properties: + name: + type: string + additionalProperties: + type: array + items: + type: object + AdditionalPropertiesObject: + type: object + properties: + name: + type: string + additionalProperties: + type: object + additionalProperties: + type: object + AdditionalPropertiesAnyType: + type: object + properties: + name: + type: string + additionalProperties: + type: object + MixedPropertiesAndAdditionalPropertiesClass: + type: object + properties: + uuid: + type: string + format: uuid + dateTime: + type: string + format: date-time + map: + type: object + additionalProperties: + $ref: '#/definitions/Animal' + List: + type: object + properties: + 123-list: + type: string + Client: + type: object + properties: + client: + type: string + ReadOnlyFirst: + type: object + properties: + bar: + type: string + readOnly: true + baz: + type: string + hasOnlyReadOnly: + type: object + properties: + bar: + type: string + readOnly: true + foo: + type: string + readOnly: true + Capitalization: + type: object + properties: + smallCamel: + type: string + CapitalCamel: + type: string + small_Snake: + type: string + Capital_Snake: + type: string + SCA_ETH_Flow_Points: + type: string + ATT_NAME: + description: > + Name of the pet + type: string + MapTest: + type: object + properties: + map_map_of_string: + type: object + additionalProperties: + type: object + additionalProperties: + type: string + # comment out the following (map of map of enum) as many language not yet support this + #map_map_of_enum: + # type: object + # additionalProperties: + # type: object + # additionalProperties: + # type: string + # enum: + # - UPPER + # - lower + map_of_enum_string: + type: object + additionalProperties: + type: string + enum: + - UPPER + - lower + direct_map: + type: object + additionalProperties: + type: boolean + indirect_map: + $ref: "#/definitions/StringBooleanMap" + ArrayTest: + type: object + properties: + array_of_string: + type: array + items: + type: string + array_array_of_integer: + type: array + items: + type: array + items: + type: integer + format: int64 + array_array_of_model: + type: array + items: + type: array + items: + $ref: '#/definitions/ReadOnlyFirst' + # commented out the below test case for array of enum for the time being + # as not all language can handle it + #array_of_enum: + # type: array + # items: + # type: string + # enum: + # - UPPER + # - lower + NumberOnly: + type: object + properties: + JustNumber: + type: number + ArrayOfNumberOnly: + type: object + properties: + ArrayNumber: + type: array + items: + type: number + ArrayOfArrayOfNumberOnly: + type: object + properties: + ArrayArrayNumber: + type: array + items: + type: array + items: + type: number + EnumArrays: + type: object + properties: + just_symbol: + type: string + enum: + - ">=" + - "$" + array_enum: + type: array + items: + type: string + enum: + - fish + - crab + # comment out the following as 2d array of enum is not supported at the moment + #array_array_enum: + # type: array + # items: + # type: array + # items: + # type: string + # enum: + # - Cat + # - Dog + OuterEnum: + type: string + enum: + - "placed" + - "approved" + - "delivered" + OuterComposite: + type: object + properties: + my_number: + $ref: '#/definitions/OuterNumber' + my_string: + $ref: '#/definitions/OuterString' + my_boolean: + $ref: '#/definitions/OuterBoolean' + OuterNumber: + type: number + OuterString: + type: string + OuterBoolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + StringBooleanMap: + additionalProperties: + type: boolean + FileSchemaTestClass: + type: object + properties: + file: + $ref: "#/definitions/File" + files: + type: array + items: + $ref: "#/definitions/File" + File: + type: object + description: 'Must be named `File` for test.' + properties: + sourceURI: + description: 'Test capitalization' + type: string + TypeHolderDefault: + type: object + required: + - string_item + - number_item + - integer_item + - bool_item + - array_item + properties: + string_item: + type: string + default: what + number_item: + type: number + default: 1.234 + integer_item: + type: integer + default: -2 + bool_item: + type: boolean + default: true + array_item: + type: array + items: + type: integer + default: + - 0 + - 1 + - 2 + - 3 + TypeHolderExample: + type: object + required: + - string_item + - number_item + - float_item + - integer_item + - bool_item + - array_item + properties: + string_item: + type: string + example: what + number_item: + type: number + example: 1.234 + float_item: + type: number + example: 1.234 + format: float + integer_item: + type: integer + example: -2 + bool_item: + type: boolean + example: true + array_item: + type: array + items: + type: integer + example: + - 0 + - 1 + - 2 + - 3 + XmlItem: + type: object + xml: + namespace: http://a.com/schema + prefix: pre + properties: + attribute_string: + type: string + example: string + xml: + attribute: true + attribute_number: + type: number + example: 1.234 + xml: + attribute: true + attribute_integer: + type: integer + example: -2 + xml: + attribute: true + attribute_boolean: + type: boolean + example: true + xml: + attribute: true + wrapped_array: + type: array + xml: + wrapped: true + items: + type: integer + name_string: + type: string + example: string + xml: + name: xml_name_string + name_number: + type: number + example: 1.234 + xml: + name: xml_name_number + name_integer: + type: integer + example: -2 + xml: + name: xml_name_integer + name_boolean: + type: boolean + example: true + xml: + name: xml_name_boolean + name_array: + type: array + items: + type: integer + xml: + name: xml_name_array_item + name_wrapped_array: + type: array + xml: + wrapped: true + name: xml_name_wrapped_array + items: + type: integer + xml: + name: xml_name_wrapped_array_item + prefix_string: + type: string + example: string + xml: + prefix: ab + prefix_number: + type: number + example: 1.234 + xml: + prefix: cd + prefix_integer: + type: integer + example: -2 + xml: + prefix: ef + prefix_boolean: + type: boolean + example: true + xml: + prefix: gh + prefix_array: + type: array + items: + type: integer + xml: + prefix: ij + prefix_wrapped_array: + type: array + xml: + wrapped: true + prefix: kl + items: + type: integer + xml: + prefix: mn + namespace_string: + type: string + example: string + xml: + namespace: http://a.com/schema + namespace_number: + type: number + example: 1.234 + xml: + namespace: http://b.com/schema + namespace_integer: + type: integer + example: -2 + xml: + namespace: http://c.com/schema + namespace_boolean: + type: boolean + example: true + xml: + namespace: http://d.com/schema + namespace_array: + type: array + items: + type: integer + xml: + namespace: http://e.com/schema + namespace_wrapped_array: + type: array + xml: + wrapped: true + namespace: http://f.com/schema + items: + type: integer + xml: + namespace: http://g.com/schema + prefix_ns_string: + type: string + example: string + xml: + namespace: http://a.com/schema + prefix: a + prefix_ns_number: + type: number + example: 1.234 + xml: + namespace: http://b.com/schema + prefix: b + prefix_ns_integer: + type: integer + example: -2 + xml: + namespace: http://c.com/schema + prefix: c + prefix_ns_boolean: + type: boolean + example: true + xml: + namespace: http://d.com/schema + prefix: d + prefix_ns_array: + type: array + items: + type: integer + xml: + namespace: http://e.com/schema + prefix: e + prefix_ns_wrapped_array: + type: array + xml: + wrapped: true + namespace: http://f.com/schema + prefix: f + items: + type: integer + xml: + namespace: http://g.com/schema + prefix: g diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml index 7f990bf0fa7d..e21b8fb7d259 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml @@ -1493,12 +1493,6 @@ definitions: type: object additionalProperties: type: object - map_with_additional_properties: - type: object - additionalProperties: true - map_without_additional_properties: - type: object - additionalProperties: false anytype_1: type: object anytype_2: {} diff --git a/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml b/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml index 636f81711d57..97a5ebe3fd01 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml +++ b/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml @@ -1586,12 +1586,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2126,4 +2120,4 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md index 1691c3308908..a035ff98c8f6 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md @@ -12,8 +12,6 @@ Name | Type | Description | Notes **MapArrayAnytype** | Pointer to [**map[string][]map[string]interface{}**](array.md) | | [optional] **MapMapString** | Pointer to [**map[string]map[string]string**](map.md) | | [optional] **MapMapAnytype** | Pointer to [**map[string]map[string]map[string]interface{}**](map.md) | | [optional] -**MapWithAdditionalProperties** | Pointer to **map[string]interface{}** | | [optional] -**MapWithoutAdditionalProperties** | Pointer to **map[string]interface{}** | | [optional] **Anytype1** | Pointer to **map[string]interface{}** | | [optional] **Anytype2** | Pointer to **map[string]interface{}** | | [optional] **Anytype3** | Pointer to **map[string]interface{}** | | [optional] @@ -237,56 +235,6 @@ SetMapMapAnytype sets MapMapAnytype field to given value. HasMapMapAnytype returns a boolean if a field has been set. -### GetMapWithAdditionalProperties - -`func (o *AdditionalPropertiesClass) GetMapWithAdditionalProperties() map[string]interface{}` - -GetMapWithAdditionalProperties returns the MapWithAdditionalProperties field if non-nil, zero value otherwise. - -### GetMapWithAdditionalPropertiesOk - -`func (o *AdditionalPropertiesClass) GetMapWithAdditionalPropertiesOk() (*map[string]interface{}, bool)` - -GetMapWithAdditionalPropertiesOk returns a tuple with the MapWithAdditionalProperties field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMapWithAdditionalProperties - -`func (o *AdditionalPropertiesClass) SetMapWithAdditionalProperties(v map[string]interface{})` - -SetMapWithAdditionalProperties sets MapWithAdditionalProperties field to given value. - -### HasMapWithAdditionalProperties - -`func (o *AdditionalPropertiesClass) HasMapWithAdditionalProperties() bool` - -HasMapWithAdditionalProperties returns a boolean if a field has been set. - -### GetMapWithoutAdditionalProperties - -`func (o *AdditionalPropertiesClass) GetMapWithoutAdditionalProperties() map[string]interface{}` - -GetMapWithoutAdditionalProperties returns the MapWithoutAdditionalProperties field if non-nil, zero value otherwise. - -### GetMapWithoutAdditionalPropertiesOk - -`func (o *AdditionalPropertiesClass) GetMapWithoutAdditionalPropertiesOk() (*map[string]interface{}, bool)` - -GetMapWithoutAdditionalPropertiesOk returns a tuple with the MapWithoutAdditionalProperties field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMapWithoutAdditionalProperties - -`func (o *AdditionalPropertiesClass) SetMapWithoutAdditionalProperties(v map[string]interface{})` - -SetMapWithoutAdditionalProperties sets MapWithoutAdditionalProperties field to given value. - -### HasMapWithoutAdditionalProperties - -`func (o *AdditionalPropertiesClass) HasMapWithoutAdditionalProperties() bool` - -HasMapWithoutAdditionalProperties returns a boolean if a field has been set. - ### GetAnytype1 `func (o *AdditionalPropertiesClass) GetAnytype1() map[string]interface{}` diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go index cc9d1e8167b1..046e91b90752 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go @@ -23,8 +23,6 @@ type AdditionalPropertiesClass struct { MapArrayAnytype *map[string][]map[string]interface{} `json:"map_array_anytype,omitempty"` MapMapString *map[string]map[string]string `json:"map_map_string,omitempty"` MapMapAnytype *map[string]map[string]map[string]interface{} `json:"map_map_anytype,omitempty"` - MapWithAdditionalProperties *map[string]interface{} `json:"map_with_additional_properties,omitempty"` - MapWithoutAdditionalProperties *map[string]interface{} `json:"map_without_additional_properties,omitempty"` Anytype1 *map[string]interface{} `json:"anytype_1,omitempty"` Anytype2 *map[string]interface{} `json:"anytype_2,omitempty"` Anytype3 *map[string]interface{} `json:"anytype_3,omitempty"` @@ -303,70 +301,6 @@ func (o *AdditionalPropertiesClass) SetMapMapAnytype(v map[string]map[string]map o.MapMapAnytype = &v } -// GetMapWithAdditionalProperties returns the MapWithAdditionalProperties field value if set, zero value otherwise. -func (o *AdditionalPropertiesClass) GetMapWithAdditionalProperties() map[string]interface{} { - if o == nil || o.MapWithAdditionalProperties == nil { - var ret map[string]interface{} - return ret - } - return *o.MapWithAdditionalProperties -} - -// GetMapWithAdditionalPropertiesOk returns a tuple with the MapWithAdditionalProperties field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetMapWithAdditionalPropertiesOk() (*map[string]interface{}, bool) { - if o == nil || o.MapWithAdditionalProperties == nil { - return nil, false - } - return o.MapWithAdditionalProperties, true -} - -// HasMapWithAdditionalProperties returns a boolean if a field has been set. -func (o *AdditionalPropertiesClass) HasMapWithAdditionalProperties() bool { - if o != nil && o.MapWithAdditionalProperties != nil { - return true - } - - return false -} - -// SetMapWithAdditionalProperties gets a reference to the given map[string]interface{} and assigns it to the MapWithAdditionalProperties field. -func (o *AdditionalPropertiesClass) SetMapWithAdditionalProperties(v map[string]interface{}) { - o.MapWithAdditionalProperties = &v -} - -// GetMapWithoutAdditionalProperties returns the MapWithoutAdditionalProperties field value if set, zero value otherwise. -func (o *AdditionalPropertiesClass) GetMapWithoutAdditionalProperties() map[string]interface{} { - if o == nil || o.MapWithoutAdditionalProperties == nil { - var ret map[string]interface{} - return ret - } - return *o.MapWithoutAdditionalProperties -} - -// GetMapWithoutAdditionalPropertiesOk returns a tuple with the MapWithoutAdditionalProperties field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetMapWithoutAdditionalPropertiesOk() (*map[string]interface{}, bool) { - if o == nil || o.MapWithoutAdditionalProperties == nil { - return nil, false - } - return o.MapWithoutAdditionalProperties, true -} - -// HasMapWithoutAdditionalProperties returns a boolean if a field has been set. -func (o *AdditionalPropertiesClass) HasMapWithoutAdditionalProperties() bool { - if o != nil && o.MapWithoutAdditionalProperties != nil { - return true - } - - return false -} - -// SetMapWithoutAdditionalProperties gets a reference to the given map[string]interface{} and assigns it to the MapWithoutAdditionalProperties field. -func (o *AdditionalPropertiesClass) SetMapWithoutAdditionalProperties(v map[string]interface{}) { - o.MapWithoutAdditionalProperties = &v -} - // GetAnytype1 returns the Anytype1 field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetAnytype1() map[string]interface{} { if o == nil || o.Anytype1 == nil { @@ -489,12 +423,6 @@ func (o AdditionalPropertiesClass) MarshalJSON() ([]byte, error) { if o.MapMapAnytype != nil { toSerialize["map_map_anytype"] = o.MapMapAnytype } - if o.MapWithAdditionalProperties != nil { - toSerialize["map_with_additional_properties"] = o.MapWithAdditionalProperties - } - if o.MapWithoutAdditionalProperties != nil { - toSerialize["map_without_additional_properties"] = o.MapWithoutAdditionalProperties - } if o.Anytype1 != nil { toSerialize["anytype_1"] = o.Anytype1 } diff --git a/samples/client/petstore/java/feign/api/openapi.yaml b/samples/client/petstore/java/feign/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/feign/api/openapi.yaml +++ b/samples/client/petstore/java/feign/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 019d1418dfb4..e35f2cca9ab1 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -39,8 +39,6 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -72,12 +70,6 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; - public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - private Object mapWithAdditionalProperties; - - public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - private Object mapWithoutAdditionalProperties; - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -352,56 +344,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -494,8 +436,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -503,7 +443,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -519,8 +459,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/feign10x/api/openapi.yaml b/samples/client/petstore/java/feign10x/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/feign10x/api/openapi.yaml +++ b/samples/client/petstore/java/feign10x/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 694d92080510..781d4686e981 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -39,8 +39,6 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -71,12 +69,6 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; - public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - private Object mapWithAdditionalProperties; - - public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - private Object mapWithoutAdditionalProperties; - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -351,56 +343,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -493,8 +435,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -502,7 +442,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -518,8 +458,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/google-api-client/api/openapi.yaml b/samples/client/petstore/java/google-api-client/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/google-api-client/api/openapi.yaml +++ b/samples/client/petstore/java/google-api-client/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesClass.md index ae396ec513ca..ffab911c1be8 100644 --- a/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/google-api-client/docs/AdditionalPropertiesClass.md @@ -14,8 +14,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 694d92080510..781d4686e981 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -39,8 +39,6 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -71,12 +69,6 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; - public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - private Object mapWithAdditionalProperties; - - public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - private Object mapWithoutAdditionalProperties; - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -351,56 +343,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -493,8 +435,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -502,7 +442,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -518,8 +458,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/jersey1/api/openapi.yaml b/samples/client/petstore/java/jersey1/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/jersey1/api/openapi.yaml +++ b/samples/client/petstore/java/jersey1/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesClass.md index ae396ec513ca..ffab911c1be8 100644 --- a/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/jersey1/docs/AdditionalPropertiesClass.md @@ -14,8 +14,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 694d92080510..781d4686e981 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -39,8 +39,6 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -71,12 +69,6 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; - public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - private Object mapWithAdditionalProperties; - - public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - private Object mapWithoutAdditionalProperties; - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -351,56 +343,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -493,8 +435,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -502,7 +442,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -518,8 +458,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/jersey2-java6/api/openapi.yaml b/samples/client/petstore/java/jersey2-java6/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/jersey2-java6/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java6/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/jersey2-java6/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/jersey2-java6/docs/AdditionalPropertiesClass.md index ae396ec513ca..ffab911c1be8 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/jersey2-java6/docs/AdditionalPropertiesClass.md @@ -14,8 +14,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index e18e379ebb30..58772627a0df 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -64,14 +64,6 @@ public class AdditionalPropertiesClass { @SerializedName(SERIALIZED_NAME_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; - public static final String SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - @SerializedName(SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES) - private Object mapWithAdditionalProperties; - - public static final String SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - @SerializedName(SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - private Object mapWithoutAdditionalProperties; - public static final String SERIALIZED_NAME_ANYTYPE1 = "anytype_1"; @SerializedName(SERIALIZED_NAME_ANYTYPE1) private Object anytype1; @@ -333,52 +325,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -465,8 +411,6 @@ public boolean equals(java.lang.Object o) { ObjectUtils.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && ObjectUtils.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && ObjectUtils.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - ObjectUtils.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - ObjectUtils.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && ObjectUtils.equals(this.anytype1, additionalPropertiesClass.anytype1) && ObjectUtils.equals(this.anytype2, additionalPropertiesClass.anytype2) && ObjectUtils.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -474,7 +418,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return ObjectUtils.hashCodeMulti(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return ObjectUtils.hashCodeMulti(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -490,8 +434,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/jersey2-java7/api/openapi.yaml b/samples/client/petstore/java/jersey2-java7/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/jersey2-java7/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java7/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/jersey2-java7/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/jersey2-java7/docs/AdditionalPropertiesClass.md index ae396ec513ca..ffab911c1be8 100644 --- a/samples/client/petstore/java/jersey2-java7/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/jersey2-java7/docs/AdditionalPropertiesClass.md @@ -14,8 +14,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/jersey2-java7/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-java7/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 694d92080510..781d4686e981 100644 --- a/samples/client/petstore/java/jersey2-java7/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey2-java7/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -39,8 +39,6 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -71,12 +69,6 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; - public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - private Object mapWithAdditionalProperties; - - public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - private Object mapWithoutAdditionalProperties; - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -351,56 +343,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -493,8 +435,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -502,7 +442,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -518,8 +458,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesClass.md index ae396ec513ca..ffab911c1be8 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/jersey2-java8/docs/AdditionalPropertiesClass.md @@ -14,8 +14,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 0ced388db4e4..fa85ab77596a 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -39,8 +39,6 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -71,12 +69,6 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; - public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - private Object mapWithAdditionalProperties; - - public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - private Object mapWithoutAdditionalProperties; - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -351,56 +343,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -493,8 +435,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -502,7 +442,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -518,8 +458,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/native/api/openapi.yaml b/samples/client/petstore/java/native/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/native/api/openapi.yaml +++ b/samples/client/petstore/java/native/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/native/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/native/docs/AdditionalPropertiesClass.md index ae396ec513ca..ffab911c1be8 100644 --- a/samples/client/petstore/java/native/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/native/docs/AdditionalPropertiesClass.md @@ -14,8 +14,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 0ced388db4e4..fa85ab77596a 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -39,8 +39,6 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -71,12 +69,6 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; - public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - private Object mapWithAdditionalProperties; - - public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - private Object mapWithoutAdditionalProperties; - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -351,56 +343,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -493,8 +435,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -502,7 +442,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -518,8 +458,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesClass.md index fdc052d56b55..70d8b5839fac 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AdditionalPropertiesClass.md @@ -14,8 +14,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index d3d7bc379703..4d1400b1d913 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -67,14 +67,6 @@ public class AdditionalPropertiesClass implements Parcelable { @SerializedName(SERIALIZED_NAME_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; - public static final String SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - @SerializedName(SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES) - private Object mapWithAdditionalProperties; - - public static final String SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - @SerializedName(SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - private Object mapWithoutAdditionalProperties; - public static final String SERIALIZED_NAME_ANYTYPE1 = "anytype_1"; @SerializedName(SERIALIZED_NAME_ANYTYPE1) private Object anytype1; @@ -338,52 +330,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -470,8 +416,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -479,7 +423,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -495,8 +439,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); @@ -525,8 +467,6 @@ public void writeToParcel(Parcel out, int flags) { out.writeValue(mapArrayAnytype); out.writeValue(mapMapString); out.writeValue(mapMapAnytype); - out.writeValue(mapWithAdditionalProperties); - out.writeValue(mapWithoutAdditionalProperties); out.writeValue(anytype1); out.writeValue(anytype2); out.writeValue(anytype3); @@ -541,8 +481,6 @@ public void writeToParcel(Parcel out, int flags) { mapArrayAnytype = (Map>)in.readValue(List.class.getClassLoader()); mapMapString = (Map>)in.readValue(Map.class.getClassLoader()); mapMapAnytype = (Map>)in.readValue(Map.class.getClassLoader()); - mapWithAdditionalProperties = (Object)in.readValue(null); - mapWithoutAdditionalProperties = (Object)in.readValue(null); anytype1 = (Object)in.readValue(null); anytype2 = (Object)in.readValue(null); anytype3 = (Object)in.readValue(null); diff --git a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/okhttp-gson/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/okhttp-gson/docs/AdditionalPropertiesClass.md index ae396ec513ca..ffab911c1be8 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/okhttp-gson/docs/AdditionalPropertiesClass.md @@ -14,8 +14,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 383a75e58c78..a067b01ec979 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -65,14 +65,6 @@ public class AdditionalPropertiesClass { @SerializedName(SERIALIZED_NAME_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; - public static final String SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - @SerializedName(SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES) - private Object mapWithAdditionalProperties; - - public static final String SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - @SerializedName(SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - private Object mapWithoutAdditionalProperties; - public static final String SERIALIZED_NAME_ANYTYPE1 = "anytype_1"; @SerializedName(SERIALIZED_NAME_ANYTYPE1) private Object anytype1; @@ -334,52 +326,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -466,8 +412,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -475,7 +419,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -491,8 +435,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesClass.md index ae396ec513ca..ffab911c1be8 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/AdditionalPropertiesClass.md @@ -14,8 +14,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 8fa80fa45318..803715a970f3 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -42,8 +42,6 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -74,12 +72,6 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; - public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - private Object mapWithAdditionalProperties; - - public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - private Object mapWithoutAdditionalProperties; - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -359,56 +351,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -501,8 +443,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -510,7 +450,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -526,8 +466,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index 38091db3bd34..2e3844ba9756 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -106,22 +106,6 @@ public void mapMapAnytypeTest() { // TODO: test mapMapAnytype } - /** - * Test the property 'mapWithAdditionalProperties' - */ - @Test - public void mapWithAdditionalPropertiesTest() { - // TODO: test mapWithAdditionalProperties - } - - /** - * Test the property 'mapWithoutAdditionalProperties' - */ - @Test - public void mapWithoutAdditionalPropertiesTest() { - // TODO: test mapWithoutAdditionalProperties - } - /** * Test the property 'anytype1' */ diff --git a/samples/client/petstore/java/rest-assured/api/openapi.yaml b/samples/client/petstore/java/rest-assured/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/rest-assured/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesClass.md index ae396ec513ca..ffab911c1be8 100644 --- a/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/rest-assured/docs/AdditionalPropertiesClass.md @@ -14,8 +14,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 7864d47805fc..a72f9a9889e8 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -68,14 +68,6 @@ public class AdditionalPropertiesClass { @SerializedName(SERIALIZED_NAME_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; - public static final String SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - @SerializedName(SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES) - private Object mapWithAdditionalProperties; - - public static final String SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - @SerializedName(SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - private Object mapWithoutAdditionalProperties; - public static final String SERIALIZED_NAME_ANYTYPE1 = "anytype_1"; @SerializedName(SERIALIZED_NAME_ANYTYPE1) private Object anytype1; @@ -342,52 +334,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -474,8 +420,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -483,7 +427,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -499,8 +443,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/resteasy/api/openapi.yaml b/samples/client/petstore/java/resteasy/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/resteasy/api/openapi.yaml +++ b/samples/client/petstore/java/resteasy/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesClass.md index ae396ec513ca..ffab911c1be8 100644 --- a/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesClass.md @@ -14,8 +14,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 694d92080510..781d4686e981 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -39,8 +39,6 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -71,12 +69,6 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; - public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - private Object mapWithAdditionalProperties; - - public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - private Object mapWithoutAdditionalProperties; - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -351,56 +343,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -493,8 +435,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -502,7 +442,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -518,8 +458,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesClass.md index ae396ec513ca..ffab911c1be8 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesClass.md @@ -14,8 +14,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index c816033dfd06..c8b96f0db2dd 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -41,8 +41,6 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -108,14 +106,6 @@ public class AdditionalPropertiesClass { @XmlElement(name = "inner") private Map> mapMapAnytype = null; - public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - @XmlElement(name = "map_with_additional_properties") - private Object mapWithAdditionalProperties; - - public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - @XmlElement(name = "map_without_additional_properties") - private Object mapWithoutAdditionalProperties; - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; @XmlElement(name = "anytype_1") private Object anytype1; @@ -393,58 +383,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "map_with_additional_properties") - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "map_without_additional_properties") - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -540,8 +478,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -549,7 +485,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -565,8 +501,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/resttemplate/api/openapi.yaml b/samples/client/petstore/java/resttemplate/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/resttemplate/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/resttemplate/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/resttemplate/docs/AdditionalPropertiesClass.md index ae396ec513ca..ffab911c1be8 100644 --- a/samples/client/petstore/java/resttemplate/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/resttemplate/docs/AdditionalPropertiesClass.md @@ -14,8 +14,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 694d92080510..781d4686e981 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -39,8 +39,6 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -71,12 +69,6 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; - public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - private Object mapWithAdditionalProperties; - - public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - private Object mapWithoutAdditionalProperties; - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -351,56 +343,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -493,8 +435,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -502,7 +442,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -518,8 +458,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/retrofit/api/openapi.yaml b/samples/client/petstore/java/retrofit/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/retrofit/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 383a75e58c78..a067b01ec979 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -65,14 +65,6 @@ public class AdditionalPropertiesClass { @SerializedName(SERIALIZED_NAME_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; - public static final String SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - @SerializedName(SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES) - private Object mapWithAdditionalProperties; - - public static final String SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - @SerializedName(SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - private Object mapWithoutAdditionalProperties; - public static final String SERIALIZED_NAME_ANYTYPE1 = "anytype_1"; @SerializedName(SERIALIZED_NAME_ANYTYPE1) private Object anytype1; @@ -334,52 +326,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -466,8 +412,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -475,7 +419,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -491,8 +435,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/retrofit2-play24/api/openapi.yaml b/samples/client/petstore/java/retrofit2-play24/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/retrofit2-play24/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2-play24/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/retrofit2-play24/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2-play24/docs/AdditionalPropertiesClass.md index ae396ec513ca..ffab911c1be8 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/AdditionalPropertiesClass.md @@ -14,8 +14,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 55852c495430..294c05c7334c 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -41,8 +41,6 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -73,12 +71,6 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; - public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - private Object mapWithAdditionalProperties; - - public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - private Object mapWithoutAdditionalProperties; - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -358,56 +350,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -500,8 +442,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -509,7 +449,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -525,8 +465,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/retrofit2-play25/api/openapi.yaml b/samples/client/petstore/java/retrofit2-play25/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/retrofit2-play25/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2-play25/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/retrofit2-play25/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2-play25/docs/AdditionalPropertiesClass.md index ae396ec513ca..ffab911c1be8 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/AdditionalPropertiesClass.md @@ -14,8 +14,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 55852c495430..294c05c7334c 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -41,8 +41,6 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -73,12 +71,6 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; - public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - private Object mapWithAdditionalProperties; - - public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - private Object mapWithoutAdditionalProperties; - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -358,56 +350,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -500,8 +442,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -509,7 +449,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -525,8 +465,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml b/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/retrofit2-play26/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2-play26/docs/AdditionalPropertiesClass.md index ae396ec513ca..ffab911c1be8 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/AdditionalPropertiesClass.md @@ -14,8 +14,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 55852c495430..294c05c7334c 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -41,8 +41,6 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -73,12 +71,6 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; - public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - private Object mapWithAdditionalProperties; - - public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - private Object mapWithoutAdditionalProperties; - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -358,56 +350,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -500,8 +442,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -509,7 +449,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -525,8 +465,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/retrofit2/api/openapi.yaml b/samples/client/petstore/java/retrofit2/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/retrofit2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesClass.md index ae396ec513ca..ffab911c1be8 100644 --- a/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/retrofit2/docs/AdditionalPropertiesClass.md @@ -14,8 +14,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 383a75e58c78..a067b01ec979 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -65,14 +65,6 @@ public class AdditionalPropertiesClass { @SerializedName(SERIALIZED_NAME_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; - public static final String SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - @SerializedName(SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES) - private Object mapWithAdditionalProperties; - - public static final String SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - @SerializedName(SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - private Object mapWithoutAdditionalProperties; - public static final String SERIALIZED_NAME_ANYTYPE1 = "anytype_1"; @SerializedName(SERIALIZED_NAME_ANYTYPE1) private Object anytype1; @@ -334,52 +326,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -466,8 +412,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -475,7 +419,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -491,8 +435,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/retrofit2rx/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/retrofit2rx/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/retrofit2rx/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2rx/docs/AdditionalPropertiesClass.md index ae396ec513ca..ffab911c1be8 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/retrofit2rx/docs/AdditionalPropertiesClass.md @@ -14,8 +14,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 383a75e58c78..a067b01ec979 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -65,14 +65,6 @@ public class AdditionalPropertiesClass { @SerializedName(SERIALIZED_NAME_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; - public static final String SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - @SerializedName(SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES) - private Object mapWithAdditionalProperties; - - public static final String SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - @SerializedName(SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - private Object mapWithoutAdditionalProperties; - public static final String SERIALIZED_NAME_ANYTYPE1 = "anytype_1"; @SerializedName(SERIALIZED_NAME_ANYTYPE1) private Object anytype1; @@ -334,52 +326,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -466,8 +412,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -475,7 +419,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -491,8 +435,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesClass.md index ae396ec513ca..ffab911c1be8 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/AdditionalPropertiesClass.md @@ -14,8 +14,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 383a75e58c78..a067b01ec979 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -65,14 +65,6 @@ public class AdditionalPropertiesClass { @SerializedName(SERIALIZED_NAME_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; - public static final String SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - @SerializedName(SERIALIZED_NAME_MAP_WITH_ADDITIONAL_PROPERTIES) - private Object mapWithAdditionalProperties; - - public static final String SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - @SerializedName(SERIALIZED_NAME_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - private Object mapWithoutAdditionalProperties; - public static final String SERIALIZED_NAME_ANYTYPE1 = "anytype_1"; @SerializedName(SERIALIZED_NAME_ANYTYPE1) private Object anytype1; @@ -334,52 +326,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -466,8 +412,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -475,7 +419,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -491,8 +435,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/vertx/api/openapi.yaml b/samples/client/petstore/java/vertx/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/vertx/api/openapi.yaml +++ b/samples/client/petstore/java/vertx/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/vertx/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/vertx/docs/AdditionalPropertiesClass.md index ae396ec513ca..ffab911c1be8 100644 --- a/samples/client/petstore/java/vertx/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/vertx/docs/AdditionalPropertiesClass.md @@ -14,8 +14,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 0ced388db4e4..fa85ab77596a 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -39,8 +39,6 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -71,12 +69,6 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; - public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - private Object mapWithAdditionalProperties; - - public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - private Object mapWithoutAdditionalProperties; - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -351,56 +343,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -493,8 +435,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -502,7 +442,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -518,8 +458,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/client/petstore/java/webclient/api/openapi.yaml b/samples/client/petstore/java/webclient/api/openapi.yaml index aebe8a8917ac..f8877ba452eb 100644 --- a/samples/client/petstore/java/webclient/api/openapi.yaml +++ b/samples/client/petstore/java/webclient/api/openapi.yaml @@ -1647,12 +1647,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2187,5 +2181,5 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/java/webclient/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/webclient/docs/AdditionalPropertiesClass.md index ae396ec513ca..ffab911c1be8 100644 --- a/samples/client/petstore/java/webclient/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/webclient/docs/AdditionalPropertiesClass.md @@ -14,8 +14,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional] **mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 0ced388db4e4..fa85ab77596a 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -39,8 +39,6 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -71,12 +69,6 @@ public class AdditionalPropertiesClass { public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; private Map> mapMapAnytype = null; - public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - private Object mapWithAdditionalProperties; - - public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - private Object mapWithoutAdditionalProperties; - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; private Object anytype1; @@ -351,56 +343,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; @@ -493,8 +435,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -502,7 +442,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -518,8 +458,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml b/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml index dfbdf4d07dd9..386fa6e594db 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml @@ -2179,4 +2179,4 @@ components: scheme: signature type: http x-original-openapi-version: 3.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" From 88dd98fe22117a8787365e3eb5b156641f7dad18 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 14:38:16 -0700 Subject: [PATCH 061/105] create separate yaml file to avoid having lots of changes in the pr --- .../perl/docs/AdditionalPropertiesClass.md | 2 - .../Object/AdditionalPropertiesClass.pm | 18 ------ .../docs/Model/AdditionalPropertiesClass.md | 2 - .../lib/Model/AdditionalPropertiesClass.php | 60 ------------------- .../Model/AdditionalPropertiesClassTest.php | 14 ----- 5 files changed, 96 deletions(-) diff --git a/samples/client/petstore/perl/docs/AdditionalPropertiesClass.md b/samples/client/petstore/perl/docs/AdditionalPropertiesClass.md index 211621aa76d4..a878436c1a17 100644 --- a/samples/client/petstore/perl/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/perl/docs/AdditionalPropertiesClass.md @@ -16,8 +16,6 @@ Name | Type | Description | Notes **map_array_anytype** | **HASH[string,ARRAY[object]]** | | [optional] **map_map_string** | **HASH[string,HASH[string,string]]** | | [optional] **map_map_anytype** | **HASH[string,HASH[string,object]]** | | [optional] -**map_with_additional_properties** | **object** | | [optional] -**map_without_additional_properties** | **object** | | [optional] **anytype_1** | **object** | | [optional] **anytype_2** | **object** | | [optional] **anytype_3** | **object** | | [optional] diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm index 2f024e8fe0e8..f388c3a4d1d9 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm @@ -217,20 +217,6 @@ __PACKAGE__->method_documentation({ format => '', read_only => '', }, - 'map_with_additional_properties' => { - datatype => 'object', - base_name => 'map_with_additional_properties', - description => '', - format => '', - read_only => '', - }, - 'map_without_additional_properties' => { - datatype => 'object', - base_name => 'map_without_additional_properties', - description => '', - format => '', - read_only => '', - }, 'anytype_1' => { datatype => 'object', base_name => 'anytype_1', @@ -263,8 +249,6 @@ __PACKAGE__->openapi_types( { 'map_array_anytype' => 'HASH[string,ARRAY[object]]', 'map_map_string' => 'HASH[string,HASH[string,string]]', 'map_map_anytype' => 'HASH[string,HASH[string,object]]', - 'map_with_additional_properties' => 'object', - 'map_without_additional_properties' => 'object', 'anytype_1' => 'object', 'anytype_2' => 'object', 'anytype_3' => 'object' @@ -279,8 +263,6 @@ __PACKAGE__->attribute_map( { 'map_array_anytype' => 'map_array_anytype', 'map_map_string' => 'map_map_string', 'map_map_anytype' => 'map_map_anytype', - 'map_with_additional_properties' => 'map_with_additional_properties', - 'map_without_additional_properties' => 'map_without_additional_properties', 'anytype_1' => 'anytype_1', 'anytype_2' => 'anytype_2', 'anytype_3' => 'anytype_3' diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/AdditionalPropertiesClass.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/AdditionalPropertiesClass.md index 237015ce8417..fc9b2c66e81a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/AdditionalPropertiesClass.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/AdditionalPropertiesClass.md @@ -12,8 +12,6 @@ Name | Type | Description | Notes **map_array_anytype** | [**map[string,object[]]**](array.md) | | [optional] **map_map_string** | [**map[string,map[string,string]]**](map.md) | | [optional] **map_map_anytype** | [**map[string,map[string,object]]**](map.md) | | [optional] -**map_with_additional_properties** | **object** | | [optional] -**map_without_additional_properties** | **object** | | [optional] **anytype_1** | **object** | | [optional] **anytype_2** | **object** | | [optional] **anytype_3** | **object** | | [optional] diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php index d4d804091073..b063cb419863 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php @@ -65,8 +65,6 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess 'map_array_anytype' => 'map[string,object[]]', 'map_map_string' => 'map[string,map[string,string]]', 'map_map_anytype' => 'map[string,map[string,object]]', - 'map_with_additional_properties' => 'object', - 'map_without_additional_properties' => 'object', 'anytype_1' => 'object', 'anytype_2' => 'object', 'anytype_3' => 'object' @@ -86,8 +84,6 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess 'map_array_anytype' => null, 'map_map_string' => null, 'map_map_anytype' => null, - 'map_with_additional_properties' => null, - 'map_without_additional_properties' => null, 'anytype_1' => null, 'anytype_2' => null, 'anytype_3' => null @@ -128,8 +124,6 @@ public static function openAPIFormats() 'map_array_anytype' => 'map_array_anytype', 'map_map_string' => 'map_map_string', 'map_map_anytype' => 'map_map_anytype', - 'map_with_additional_properties' => 'map_with_additional_properties', - 'map_without_additional_properties' => 'map_without_additional_properties', 'anytype_1' => 'anytype_1', 'anytype_2' => 'anytype_2', 'anytype_3' => 'anytype_3' @@ -149,8 +143,6 @@ public static function openAPIFormats() 'map_array_anytype' => 'setMapArrayAnytype', 'map_map_string' => 'setMapMapString', 'map_map_anytype' => 'setMapMapAnytype', - 'map_with_additional_properties' => 'setMapWithAdditionalProperties', - 'map_without_additional_properties' => 'setMapWithoutAdditionalProperties', 'anytype_1' => 'setAnytype1', 'anytype_2' => 'setAnytype2', 'anytype_3' => 'setAnytype3' @@ -170,8 +162,6 @@ public static function openAPIFormats() 'map_array_anytype' => 'getMapArrayAnytype', 'map_map_string' => 'getMapMapString', 'map_map_anytype' => 'getMapMapAnytype', - 'map_with_additional_properties' => 'getMapWithAdditionalProperties', - 'map_without_additional_properties' => 'getMapWithoutAdditionalProperties', 'anytype_1' => 'getAnytype1', 'anytype_2' => 'getAnytype2', 'anytype_3' => 'getAnytype3' @@ -245,8 +235,6 @@ public function __construct(array $data = null) $this->container['map_array_anytype'] = isset($data['map_array_anytype']) ? $data['map_array_anytype'] : null; $this->container['map_map_string'] = isset($data['map_map_string']) ? $data['map_map_string'] : null; $this->container['map_map_anytype'] = isset($data['map_map_anytype']) ? $data['map_map_anytype'] : null; - $this->container['map_with_additional_properties'] = isset($data['map_with_additional_properties']) ? $data['map_with_additional_properties'] : null; - $this->container['map_without_additional_properties'] = isset($data['map_without_additional_properties']) ? $data['map_without_additional_properties'] : null; $this->container['anytype_1'] = isset($data['anytype_1']) ? $data['anytype_1'] : null; $this->container['anytype_2'] = isset($data['anytype_2']) ? $data['anytype_2'] : null; $this->container['anytype_3'] = isset($data['anytype_3']) ? $data['anytype_3'] : null; @@ -468,54 +456,6 @@ public function setMapMapAnytype($map_map_anytype) return $this; } - /** - * Gets map_with_additional_properties - * - * @return object|null - */ - public function getMapWithAdditionalProperties() - { - return $this->container['map_with_additional_properties']; - } - - /** - * Sets map_with_additional_properties - * - * @param object|null $map_with_additional_properties map_with_additional_properties - * - * @return $this - */ - public function setMapWithAdditionalProperties($map_with_additional_properties) - { - $this->container['map_with_additional_properties'] = $map_with_additional_properties; - - return $this; - } - - /** - * Gets map_without_additional_properties - * - * @return object|null - */ - public function getMapWithoutAdditionalProperties() - { - return $this->container['map_without_additional_properties']; - } - - /** - * Sets map_without_additional_properties - * - * @param object|null $map_without_additional_properties map_without_additional_properties - * - * @return $this - */ - public function setMapWithoutAdditionalProperties($map_without_additional_properties) - { - $this->container['map_without_additional_properties'] = $map_without_additional_properties; - - return $this; - } - /** * Gets anytype_1 * diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php index 5b922ddbabbc..d71078b0c218 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php @@ -134,20 +134,6 @@ public function testPropertyMapMapAnytype() { } - /** - * Test attribute "map_with_additional_properties" - */ - public function testPropertyMapWithAdditionalProperties() - { - } - - /** - * Test attribute "map_without_additional_properties" - */ - public function testPropertyMapWithoutAdditionalProperties() - { - } - /** * Test attribute "anytype_1" */ From 782bdf6ccbaf835d003ed30e12c97c25a4e250d8 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 15:02:42 -0700 Subject: [PATCH 062/105] create separate yaml file to avoid having lots of changes in the pr --- .../docs/AdditionalPropertiesClass.md | 2 -- .../Model/AdditionalPropertiesClass.cs | 34 +------------------ .../docs/AdditionalPropertiesClass.md | 2 -- .../Model/AdditionalPropertiesClass.cs | 34 +------------------ .../docs/AdditionalPropertiesClass.md | 2 -- .../Model/AdditionalPropertiesClass.cs | 34 +------------------ .../docs/AdditionalPropertiesClass.md | 2 -- .../Model/AdditionalPropertiesClass.cs | 34 +------------------ .../docs/AdditionalPropertiesClass.md | 2 -- .../Model/AdditionalPropertiesClass.cs | 34 +------------------ .../model/additional_properties_class.ex | 4 --- .../go/go-petstore-withXml/api/openapi.yaml | 8 +---- .../docs/AdditionalPropertiesClass.md | 2 -- .../model_additional_properties_class.go | 2 -- .../lib/OpenAPIPetstore/Model.hs | 8 ----- .../lib/OpenAPIPetstore/ModelLens.hs | 10 ------ .../petstore/haskell-http-client/openapi.yaml | 8 +---- .../haskell-http-client/tests/Instances.hs | 2 -- .../petstore/go-api-server/api/openapi.yaml | 2 ++ .../go-gin-api-server/api/openapi.yaml | 2 ++ 20 files changed, 11 insertions(+), 217 deletions(-) diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesClass.md index 4b2311590cc6..12f3292db0bf 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesClass.md @@ -13,8 +13,6 @@ Name | Type | Description | Notes **MapArrayAnytype** | **Dictionary<string, List<Object>>** | | [optional] **MapMapString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] **MapMapAnytype** | **Dictionary<string, Dictionary<string, Object>>** | | [optional] -**MapWithAdditionalProperties** | **Object** | | [optional] -**MapWithoutAdditionalProperties** | **Object** | | [optional] **Anytype1** | **Object** | | [optional] **Anytype2** | **Object** | | [optional] **Anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 7f971ad070a3..8a4e6b78b30f 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -41,12 +41,10 @@ public partial class AdditionalPropertiesClass : IEquatablemapArrayAnytype. /// mapMapString. /// mapMapAnytype. - /// mapWithAdditionalProperties. - /// mapWithoutAdditionalProperties. /// anytype1. /// anytype2. /// anytype3. - public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object mapWithAdditionalProperties = default(Object), Object mapWithoutAdditionalProperties = default(Object), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) + public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) { this.MapString = mapString; this.MapNumber = mapNumber; @@ -56,8 +54,6 @@ public partial class AdditionalPropertiesClass : IEquatable> MapMapAnytype { get; set; } - /// - /// Gets or Sets MapWithAdditionalProperties - /// - [DataMember(Name="map_with_additional_properties", EmitDefaultValue=false)] - public Object MapWithAdditionalProperties { get; set; } - - /// - /// Gets or Sets MapWithoutAdditionalProperties - /// - [DataMember(Name="map_without_additional_properties", EmitDefaultValue=false)] - public Object MapWithoutAdditionalProperties { get; set; } - /// /// Gets or Sets Anytype1 /// @@ -157,8 +141,6 @@ public override string ToString() sb.Append(" MapArrayAnytype: ").Append(MapArrayAnytype).Append("\n"); sb.Append(" MapMapString: ").Append(MapMapString).Append("\n"); sb.Append(" MapMapAnytype: ").Append(MapMapAnytype).Append("\n"); - sb.Append(" MapWithAdditionalProperties: ").Append(MapWithAdditionalProperties).Append("\n"); - sb.Append(" MapWithoutAdditionalProperties: ").Append(MapWithoutAdditionalProperties).Append("\n"); sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); sb.Append(" Anytype2: ").Append(Anytype2).Append("\n"); sb.Append(" Anytype3: ").Append(Anytype3).Append("\n"); @@ -244,16 +226,6 @@ public bool Equals(AdditionalPropertiesClass input) input.MapMapAnytype != null && this.MapMapAnytype.SequenceEqual(input.MapMapAnytype) ) && - ( - this.MapWithAdditionalProperties == input.MapWithAdditionalProperties || - (this.MapWithAdditionalProperties != null && - this.MapWithAdditionalProperties.Equals(input.MapWithAdditionalProperties)) - ) && - ( - this.MapWithoutAdditionalProperties == input.MapWithoutAdditionalProperties || - (this.MapWithoutAdditionalProperties != null && - this.MapWithoutAdditionalProperties.Equals(input.MapWithoutAdditionalProperties)) - ) && ( this.Anytype1 == input.Anytype1 || (this.Anytype1 != null && @@ -296,10 +268,6 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.MapMapString.GetHashCode(); if (this.MapMapAnytype != null) hashCode = hashCode * 59 + this.MapMapAnytype.GetHashCode(); - if (this.MapWithAdditionalProperties != null) - hashCode = hashCode * 59 + this.MapWithAdditionalProperties.GetHashCode(); - if (this.MapWithoutAdditionalProperties != null) - hashCode = hashCode * 59 + this.MapWithoutAdditionalProperties.GetHashCode(); if (this.Anytype1 != null) hashCode = hashCode * 59 + this.Anytype1.GetHashCode(); if (this.Anytype2 != null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesClass.md index 4b2311590cc6..12f3292db0bf 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesClass.md @@ -13,8 +13,6 @@ Name | Type | Description | Notes **MapArrayAnytype** | **Dictionary<string, List<Object>>** | | [optional] **MapMapString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] **MapMapAnytype** | **Dictionary<string, Dictionary<string, Object>>** | | [optional] -**MapWithAdditionalProperties** | **Object** | | [optional] -**MapWithoutAdditionalProperties** | **Object** | | [optional] **Anytype1** | **Object** | | [optional] **Anytype2** | **Object** | | [optional] **Anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index c9efb170ac48..d56cf173ddf2 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -41,12 +41,10 @@ public partial class AdditionalPropertiesClass : IEquatablemapArrayAnytype. /// mapMapString. /// mapMapAnytype. - /// mapWithAdditionalProperties. - /// mapWithoutAdditionalProperties. /// anytype1. /// anytype2. /// anytype3. - public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object mapWithAdditionalProperties = default(Object), Object mapWithoutAdditionalProperties = default(Object), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) + public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) { this.MapString = mapString; this.MapNumber = mapNumber; @@ -56,8 +54,6 @@ public partial class AdditionalPropertiesClass : IEquatable> MapMapAnytype { get; set; } - /// - /// Gets or Sets MapWithAdditionalProperties - /// - [DataMember(Name="map_with_additional_properties", EmitDefaultValue=false)] - public Object MapWithAdditionalProperties { get; set; } - - /// - /// Gets or Sets MapWithoutAdditionalProperties - /// - [DataMember(Name="map_without_additional_properties", EmitDefaultValue=false)] - public Object MapWithoutAdditionalProperties { get; set; } - /// /// Gets or Sets Anytype1 /// @@ -157,8 +141,6 @@ public override string ToString() sb.Append(" MapArrayAnytype: ").Append(MapArrayAnytype).Append("\n"); sb.Append(" MapMapString: ").Append(MapMapString).Append("\n"); sb.Append(" MapMapAnytype: ").Append(MapMapAnytype).Append("\n"); - sb.Append(" MapWithAdditionalProperties: ").Append(MapWithAdditionalProperties).Append("\n"); - sb.Append(" MapWithoutAdditionalProperties: ").Append(MapWithoutAdditionalProperties).Append("\n"); sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); sb.Append(" Anytype2: ").Append(Anytype2).Append("\n"); sb.Append(" Anytype3: ").Append(Anytype3).Append("\n"); @@ -244,16 +226,6 @@ public bool Equals(AdditionalPropertiesClass input) input.MapMapAnytype != null && this.MapMapAnytype.SequenceEqual(input.MapMapAnytype) ) && - ( - this.MapWithAdditionalProperties == input.MapWithAdditionalProperties || - (this.MapWithAdditionalProperties != null && - this.MapWithAdditionalProperties.Equals(input.MapWithAdditionalProperties)) - ) && - ( - this.MapWithoutAdditionalProperties == input.MapWithoutAdditionalProperties || - (this.MapWithoutAdditionalProperties != null && - this.MapWithoutAdditionalProperties.Equals(input.MapWithoutAdditionalProperties)) - ) && ( this.Anytype1 == input.Anytype1 || (this.Anytype1 != null && @@ -296,10 +268,6 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.MapMapString.GetHashCode(); if (this.MapMapAnytype != null) hashCode = hashCode * 59 + this.MapMapAnytype.GetHashCode(); - if (this.MapWithAdditionalProperties != null) - hashCode = hashCode * 59 + this.MapWithAdditionalProperties.GetHashCode(); - if (this.MapWithoutAdditionalProperties != null) - hashCode = hashCode * 59 + this.MapWithoutAdditionalProperties.GetHashCode(); if (this.Anytype1 != null) hashCode = hashCode * 59 + this.Anytype1.GetHashCode(); if (this.Anytype2 != null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesClass.md index 4b2311590cc6..12f3292db0bf 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesClass.md @@ -13,8 +13,6 @@ Name | Type | Description | Notes **MapArrayAnytype** | **Dictionary<string, List<Object>>** | | [optional] **MapMapString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] **MapMapAnytype** | **Dictionary<string, Dictionary<string, Object>>** | | [optional] -**MapWithAdditionalProperties** | **Object** | | [optional] -**MapWithoutAdditionalProperties** | **Object** | | [optional] **Anytype1** | **Object** | | [optional] **Anytype2** | **Object** | | [optional] **Anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 7f971ad070a3..8a4e6b78b30f 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -41,12 +41,10 @@ public partial class AdditionalPropertiesClass : IEquatablemapArrayAnytype. /// mapMapString. /// mapMapAnytype. - /// mapWithAdditionalProperties. - /// mapWithoutAdditionalProperties. /// anytype1. /// anytype2. /// anytype3. - public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object mapWithAdditionalProperties = default(Object), Object mapWithoutAdditionalProperties = default(Object), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) + public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) { this.MapString = mapString; this.MapNumber = mapNumber; @@ -56,8 +54,6 @@ public partial class AdditionalPropertiesClass : IEquatable> MapMapAnytype { get; set; } - /// - /// Gets or Sets MapWithAdditionalProperties - /// - [DataMember(Name="map_with_additional_properties", EmitDefaultValue=false)] - public Object MapWithAdditionalProperties { get; set; } - - /// - /// Gets or Sets MapWithoutAdditionalProperties - /// - [DataMember(Name="map_without_additional_properties", EmitDefaultValue=false)] - public Object MapWithoutAdditionalProperties { get; set; } - /// /// Gets or Sets Anytype1 /// @@ -157,8 +141,6 @@ public override string ToString() sb.Append(" MapArrayAnytype: ").Append(MapArrayAnytype).Append("\n"); sb.Append(" MapMapString: ").Append(MapMapString).Append("\n"); sb.Append(" MapMapAnytype: ").Append(MapMapAnytype).Append("\n"); - sb.Append(" MapWithAdditionalProperties: ").Append(MapWithAdditionalProperties).Append("\n"); - sb.Append(" MapWithoutAdditionalProperties: ").Append(MapWithoutAdditionalProperties).Append("\n"); sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); sb.Append(" Anytype2: ").Append(Anytype2).Append("\n"); sb.Append(" Anytype3: ").Append(Anytype3).Append("\n"); @@ -244,16 +226,6 @@ public bool Equals(AdditionalPropertiesClass input) input.MapMapAnytype != null && this.MapMapAnytype.SequenceEqual(input.MapMapAnytype) ) && - ( - this.MapWithAdditionalProperties == input.MapWithAdditionalProperties || - (this.MapWithAdditionalProperties != null && - this.MapWithAdditionalProperties.Equals(input.MapWithAdditionalProperties)) - ) && - ( - this.MapWithoutAdditionalProperties == input.MapWithoutAdditionalProperties || - (this.MapWithoutAdditionalProperties != null && - this.MapWithoutAdditionalProperties.Equals(input.MapWithoutAdditionalProperties)) - ) && ( this.Anytype1 == input.Anytype1 || (this.Anytype1 != null && @@ -296,10 +268,6 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.MapMapString.GetHashCode(); if (this.MapMapAnytype != null) hashCode = hashCode * 59 + this.MapMapAnytype.GetHashCode(); - if (this.MapWithAdditionalProperties != null) - hashCode = hashCode * 59 + this.MapWithAdditionalProperties.GetHashCode(); - if (this.MapWithoutAdditionalProperties != null) - hashCode = hashCode * 59 + this.MapWithoutAdditionalProperties.GetHashCode(); if (this.Anytype1 != null) hashCode = hashCode * 59 + this.Anytype1.GetHashCode(); if (this.Anytype2 != null) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesClass.md index 4b2311590cc6..12f3292db0bf 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesClass.md @@ -13,8 +13,6 @@ Name | Type | Description | Notes **MapArrayAnytype** | **Dictionary<string, List<Object>>** | | [optional] **MapMapString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] **MapMapAnytype** | **Dictionary<string, Dictionary<string, Object>>** | | [optional] -**MapWithAdditionalProperties** | **Object** | | [optional] -**MapWithoutAdditionalProperties** | **Object** | | [optional] **Anytype1** | **Object** | | [optional] **Anytype2** | **Object** | | [optional] **Anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index ccd3f80fda9b..f56db9cd1655 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -39,12 +39,10 @@ public partial class AdditionalPropertiesClass : IEquatablemapArrayAnytype. /// mapMapString. /// mapMapAnytype. - /// mapWithAdditionalProperties. - /// mapWithoutAdditionalProperties. /// anytype1. /// anytype2. /// anytype3. - public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object mapWithAdditionalProperties = default(Object), Object mapWithoutAdditionalProperties = default(Object), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) + public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) { this.MapString = mapString; this.MapNumber = mapNumber; @@ -54,8 +52,6 @@ public partial class AdditionalPropertiesClass : IEquatable> MapMapAnytype { get; set; } - /// - /// Gets or Sets MapWithAdditionalProperties - /// - [DataMember(Name="map_with_additional_properties", EmitDefaultValue=false)] - public Object MapWithAdditionalProperties { get; set; } - - /// - /// Gets or Sets MapWithoutAdditionalProperties - /// - [DataMember(Name="map_without_additional_properties", EmitDefaultValue=false)] - public Object MapWithoutAdditionalProperties { get; set; } - /// /// Gets or Sets Anytype1 /// @@ -155,8 +139,6 @@ public override string ToString() sb.Append(" MapArrayAnytype: ").Append(MapArrayAnytype).Append("\n"); sb.Append(" MapMapString: ").Append(MapMapString).Append("\n"); sb.Append(" MapMapAnytype: ").Append(MapMapAnytype).Append("\n"); - sb.Append(" MapWithAdditionalProperties: ").Append(MapWithAdditionalProperties).Append("\n"); - sb.Append(" MapWithoutAdditionalProperties: ").Append(MapWithoutAdditionalProperties).Append("\n"); sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); sb.Append(" Anytype2: ").Append(Anytype2).Append("\n"); sb.Append(" Anytype3: ").Append(Anytype3).Append("\n"); @@ -242,16 +224,6 @@ public bool Equals(AdditionalPropertiesClass input) input.MapMapAnytype != null && this.MapMapAnytype.SequenceEqual(input.MapMapAnytype) ) && - ( - this.MapWithAdditionalProperties == input.MapWithAdditionalProperties || - (this.MapWithAdditionalProperties != null && - this.MapWithAdditionalProperties.Equals(input.MapWithAdditionalProperties)) - ) && - ( - this.MapWithoutAdditionalProperties == input.MapWithoutAdditionalProperties || - (this.MapWithoutAdditionalProperties != null && - this.MapWithoutAdditionalProperties.Equals(input.MapWithoutAdditionalProperties)) - ) && ( this.Anytype1 == input.Anytype1 || (this.Anytype1 != null && @@ -294,10 +266,6 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.MapMapString.GetHashCode(); if (this.MapMapAnytype != null) hashCode = hashCode * 59 + this.MapMapAnytype.GetHashCode(); - if (this.MapWithAdditionalProperties != null) - hashCode = hashCode * 59 + this.MapWithAdditionalProperties.GetHashCode(); - if (this.MapWithoutAdditionalProperties != null) - hashCode = hashCode * 59 + this.MapWithoutAdditionalProperties.GetHashCode(); if (this.Anytype1 != null) hashCode = hashCode * 59 + this.Anytype1.GetHashCode(); if (this.Anytype2 != null) diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesClass.md index 4b2311590cc6..12f3292db0bf 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesClass.md @@ -13,8 +13,6 @@ Name | Type | Description | Notes **MapArrayAnytype** | **Dictionary<string, List<Object>>** | | [optional] **MapMapString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] **MapMapAnytype** | **Dictionary<string, Dictionary<string, Object>>** | | [optional] -**MapWithAdditionalProperties** | **Object** | | [optional] -**MapWithoutAdditionalProperties** | **Object** | | [optional] **Anytype1** | **Object** | | [optional] **Anytype2** | **Object** | | [optional] **Anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 7b53578ded36..53e2fbc1d03b 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -44,12 +44,10 @@ public partial class AdditionalPropertiesClass : IEquatablemapArrayAnytype. /// mapMapString. /// mapMapAnytype. - /// mapWithAdditionalProperties. - /// mapWithoutAdditionalProperties. /// anytype1. /// anytype2. /// anytype3. - public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object mapWithAdditionalProperties = default(Object), Object mapWithoutAdditionalProperties = default(Object), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) + public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) { this.MapString = mapString; this.MapNumber = mapNumber; @@ -59,8 +57,6 @@ public partial class AdditionalPropertiesClass : IEquatable> MapMapAnytype { get; set; } - /// - /// Gets or Sets MapWithAdditionalProperties - /// - [DataMember(Name="map_with_additional_properties", EmitDefaultValue=true)] - public Object MapWithAdditionalProperties { get; set; } - - /// - /// Gets or Sets MapWithoutAdditionalProperties - /// - [DataMember(Name="map_without_additional_properties", EmitDefaultValue=true)] - public Object MapWithoutAdditionalProperties { get; set; } - /// /// Gets or Sets Anytype1 /// @@ -160,8 +144,6 @@ public override string ToString() sb.Append(" MapArrayAnytype: ").Append(MapArrayAnytype).Append("\n"); sb.Append(" MapMapString: ").Append(MapMapString).Append("\n"); sb.Append(" MapMapAnytype: ").Append(MapMapAnytype).Append("\n"); - sb.Append(" MapWithAdditionalProperties: ").Append(MapWithAdditionalProperties).Append("\n"); - sb.Append(" MapWithoutAdditionalProperties: ").Append(MapWithoutAdditionalProperties).Append("\n"); sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); sb.Append(" Anytype2: ").Append(Anytype2).Append("\n"); sb.Append(" Anytype3: ").Append(Anytype3).Append("\n"); @@ -247,16 +229,6 @@ public bool Equals(AdditionalPropertiesClass input) input.MapMapAnytype != null && this.MapMapAnytype.SequenceEqual(input.MapMapAnytype) ) && - ( - this.MapWithAdditionalProperties == input.MapWithAdditionalProperties || - (this.MapWithAdditionalProperties != null && - this.MapWithAdditionalProperties.Equals(input.MapWithAdditionalProperties)) - ) && - ( - this.MapWithoutAdditionalProperties == input.MapWithoutAdditionalProperties || - (this.MapWithoutAdditionalProperties != null && - this.MapWithoutAdditionalProperties.Equals(input.MapWithoutAdditionalProperties)) - ) && ( this.Anytype1 == input.Anytype1 || (this.Anytype1 != null && @@ -299,10 +271,6 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.MapMapString.GetHashCode(); if (this.MapMapAnytype != null) hashCode = hashCode * 59 + this.MapMapAnytype.GetHashCode(); - if (this.MapWithAdditionalProperties != null) - hashCode = hashCode * 59 + this.MapWithAdditionalProperties.GetHashCode(); - if (this.MapWithoutAdditionalProperties != null) - hashCode = hashCode * 59 + this.MapWithoutAdditionalProperties.GetHashCode(); if (this.Anytype1 != null) hashCode = hashCode * 59 + this.Anytype1.GetHashCode(); if (this.Anytype2 != null) diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/additional_properties_class.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/additional_properties_class.ex index 200a6c4be306..08d6d28d82db 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/additional_properties_class.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/additional_properties_class.ex @@ -17,8 +17,6 @@ defmodule OpenapiPetstore.Model.AdditionalPropertiesClass do :"map_array_anytype", :"map_map_string", :"map_map_anytype", - :"map_with_additional_properties", - :"map_without_additional_properties", :"anytype_1", :"anytype_2", :"anytype_3" @@ -33,8 +31,6 @@ defmodule OpenapiPetstore.Model.AdditionalPropertiesClass do :"map_array_anytype" => %{optional(String.t) => [Map]} | nil, :"map_map_string" => %{optional(String.t) => %{optional(String.t) => String.t}} | nil, :"map_map_anytype" => %{optional(String.t) => %{optional(String.t) => Map}} | nil, - :"map_with_additional_properties" => Map | nil, - :"map_without_additional_properties" => Map | nil, :"anytype_1" => Map | nil, :"anytype_2" => Map | nil, :"anytype_3" => Map | nil diff --git a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml index 636f81711d57..97a5ebe3fd01 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml @@ -1586,12 +1586,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2126,4 +2120,4 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md index 54a41452ee88..0dd3f328f41d 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md @@ -12,8 +12,6 @@ Name | Type | Description | Notes **MapArrayAnytype** | [**map[string][]map[string]interface{}**](array.md) | | [optional] **MapMapString** | [**map[string]map[string]string**](map.md) | | [optional] **MapMapAnytype** | [**map[string]map[string]map[string]interface{}**](map.md) | | [optional] -**MapWithAdditionalProperties** | **map[string]interface{}** | | [optional] -**MapWithoutAdditionalProperties** | **map[string]interface{}** | | [optional] **Anytype1** | **map[string]interface{}** | | [optional] **Anytype2** | **map[string]interface{}** | | [optional] **Anytype3** | **map[string]interface{}** | | [optional] diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go index 9636d9f1b2e0..35aafa9f6029 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go @@ -19,8 +19,6 @@ type AdditionalPropertiesClass struct { MapArrayAnytype map[string][]map[string]interface{} `json:"map_array_anytype,omitempty" xml:"map_array_anytype"` MapMapString map[string]map[string]string `json:"map_map_string,omitempty" xml:"map_map_string"` MapMapAnytype map[string]map[string]map[string]interface{} `json:"map_map_anytype,omitempty" xml:"map_map_anytype"` - MapWithAdditionalProperties map[string]interface{} `json:"map_with_additional_properties,omitempty" xml:"map_with_additional_properties"` - MapWithoutAdditionalProperties map[string]interface{} `json:"map_without_additional_properties,omitempty" xml:"map_without_additional_properties"` Anytype1 map[string]interface{} `json:"anytype_1,omitempty" xml:"anytype_1"` Anytype2 map[string]interface{} `json:"anytype_2,omitempty" xml:"anytype_2"` Anytype3 map[string]interface{} `json:"anytype_3,omitempty" xml:"anytype_3"` 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 d67cc9387403..1331ed4b237d 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs @@ -323,8 +323,6 @@ data AdditionalPropertiesClass = AdditionalPropertiesClass , additionalPropertiesClassMapArrayAnytype :: !(Maybe (Map.Map String [A.Value])) -- ^ "map_array_anytype" , additionalPropertiesClassMapMapString :: !(Maybe (Map.Map String (Map.Map String Text))) -- ^ "map_map_string" , additionalPropertiesClassMapMapAnytype :: !(Maybe (Map.Map String (Map.Map String A.Value))) -- ^ "map_map_anytype" - , additionalPropertiesClassMapWithAdditionalProperties :: !(Maybe A.Value) -- ^ "map_with_additional_properties" - , additionalPropertiesClassMapWithoutAdditionalProperties :: !(Maybe A.Value) -- ^ "map_without_additional_properties" , additionalPropertiesClassAnytype1 :: !(Maybe A.Value) -- ^ "anytype_1" , additionalPropertiesClassAnytype2 :: !(Maybe A.Value) -- ^ "anytype_2" , additionalPropertiesClassAnytype3 :: !(Maybe A.Value) -- ^ "anytype_3" @@ -342,8 +340,6 @@ instance A.FromJSON AdditionalPropertiesClass where <*> (o .:? "map_array_anytype") <*> (o .:? "map_map_string") <*> (o .:? "map_map_anytype") - <*> (o .:? "map_with_additional_properties") - <*> (o .:? "map_without_additional_properties") <*> (o .:? "anytype_1") <*> (o .:? "anytype_2") <*> (o .:? "anytype_3") @@ -360,8 +356,6 @@ instance A.ToJSON AdditionalPropertiesClass where , "map_array_anytype" .= additionalPropertiesClassMapArrayAnytype , "map_map_string" .= additionalPropertiesClassMapMapString , "map_map_anytype" .= additionalPropertiesClassMapMapAnytype - , "map_with_additional_properties" .= additionalPropertiesClassMapWithAdditionalProperties - , "map_without_additional_properties" .= additionalPropertiesClassMapWithoutAdditionalProperties , "anytype_1" .= additionalPropertiesClassAnytype1 , "anytype_2" .= additionalPropertiesClassAnytype2 , "anytype_3" .= additionalPropertiesClassAnytype3 @@ -381,8 +375,6 @@ mkAdditionalPropertiesClass = , additionalPropertiesClassMapArrayAnytype = Nothing , additionalPropertiesClassMapMapString = Nothing , additionalPropertiesClassMapMapAnytype = Nothing - , additionalPropertiesClassMapWithAdditionalProperties = Nothing - , additionalPropertiesClassMapWithoutAdditionalProperties = Nothing , additionalPropertiesClassAnytype1 = Nothing , additionalPropertiesClassAnytype2 = Nothing , additionalPropertiesClassAnytype3 = Nothing 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 0cf20648375a..32c3b2159809 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs @@ -105,16 +105,6 @@ additionalPropertiesClassMapMapAnytypeL :: Lens_' AdditionalPropertiesClass (May additionalPropertiesClassMapMapAnytypeL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapMapAnytype -> AdditionalPropertiesClass { additionalPropertiesClassMapMapAnytype, ..} ) <$> f additionalPropertiesClassMapMapAnytype {-# INLINE additionalPropertiesClassMapMapAnytypeL #-} --- | 'additionalPropertiesClassMapWithAdditionalProperties' Lens -additionalPropertiesClassMapWithAdditionalPropertiesL :: Lens_' AdditionalPropertiesClass (Maybe A.Value) -additionalPropertiesClassMapWithAdditionalPropertiesL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapWithAdditionalProperties -> AdditionalPropertiesClass { additionalPropertiesClassMapWithAdditionalProperties, ..} ) <$> f additionalPropertiesClassMapWithAdditionalProperties -{-# INLINE additionalPropertiesClassMapWithAdditionalPropertiesL #-} - --- | 'additionalPropertiesClassMapWithoutAdditionalProperties' Lens -additionalPropertiesClassMapWithoutAdditionalPropertiesL :: Lens_' AdditionalPropertiesClass (Maybe A.Value) -additionalPropertiesClassMapWithoutAdditionalPropertiesL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapWithoutAdditionalProperties -> AdditionalPropertiesClass { additionalPropertiesClassMapWithoutAdditionalProperties, ..} ) <$> f additionalPropertiesClassMapWithoutAdditionalProperties -{-# INLINE additionalPropertiesClassMapWithoutAdditionalPropertiesL #-} - -- | 'additionalPropertiesClassAnytype1' Lens additionalPropertiesClassAnytype1L :: Lens_' AdditionalPropertiesClass (Maybe A.Value) additionalPropertiesClassAnytype1L f AdditionalPropertiesClass{..} = (\additionalPropertiesClassAnytype1 -> AdditionalPropertiesClass { additionalPropertiesClassAnytype1, ..} ) <$> f additionalPropertiesClassAnytype1 diff --git a/samples/client/petstore/haskell-http-client/openapi.yaml b/samples/client/petstore/haskell-http-client/openapi.yaml index 636f81711d57..97a5ebe3fd01 100644 --- a/samples/client/petstore/haskell-http-client/openapi.yaml +++ b/samples/client/petstore/haskell-http-client/openapi.yaml @@ -1586,12 +1586,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2126,4 +2120,4 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/client/petstore/haskell-http-client/tests/Instances.hs b/samples/client/petstore/haskell-http-client/tests/Instances.hs index 33e2143e22c1..bb674c55b3a4 100644 --- a/samples/client/petstore/haskell-http-client/tests/Instances.hs +++ b/samples/client/petstore/haskell-http-client/tests/Instances.hs @@ -142,8 +142,6 @@ genAdditionalPropertiesClass n = <*> arbitraryReducedMaybe n -- additionalPropertiesClassMapArrayAnytype :: Maybe (Map.Map String [A.Value]) <*> arbitraryReducedMaybe n -- additionalPropertiesClassMapMapString :: Maybe (Map.Map String (Map.Map String Text)) <*> arbitraryReducedMaybe n -- additionalPropertiesClassMapMapAnytype :: Maybe (Map.Map String (Map.Map String A.Value)) - <*> arbitraryReducedMaybeValue n -- additionalPropertiesClassMapWithAdditionalProperties :: Maybe A.Value - <*> arbitraryReducedMaybeValue n -- additionalPropertiesClassMapWithoutAdditionalProperties :: Maybe A.Value <*> arbitraryReducedMaybeValue n -- additionalPropertiesClassAnytype1 :: Maybe A.Value <*> arbitraryReducedMaybeValue n -- additionalPropertiesClassAnytype2 :: Maybe A.Value <*> arbitraryReducedMaybeValue n -- additionalPropertiesClassAnytype3 :: Maybe A.Value diff --git a/samples/server/petstore/go-api-server/api/openapi.yaml b/samples/server/petstore/go-api-server/api/openapi.yaml index 0c61c2099572..13732e479c9f 100644 --- a/samples/server/petstore/go-api-server/api/openapi.yaml +++ b/samples/server/petstore/go-api-server/api/openapi.yaml @@ -760,3 +760,5 @@ components: in: header name: api_key type: apiKey +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/server/petstore/go-gin-api-server/api/openapi.yaml b/samples/server/petstore/go-gin-api-server/api/openapi.yaml index 0c61c2099572..13732e479c9f 100644 --- a/samples/server/petstore/go-gin-api-server/api/openapi.yaml +++ b/samples/server/petstore/go-gin-api-server/api/openapi.yaml @@ -760,3 +760,5 @@ components: in: header name: api_key type: apiKey +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "true" From 58d38c25cc839ee94526a3bc4b4047bf2b0951b0 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 15:04:44 -0700 Subject: [PATCH 063/105] create separate yaml file to avoid having lots of changes in the pr --- .../public/openapi.json | 2 +- .../public/openapi.json | 2 +- .../public/openapi.json | 2 +- .../apimodels/AdditionalPropertiesClass.java | 46 +------------------ .../public/openapi.json | 10 +--- .../public/openapi.json | 2 +- .../public/openapi.json | 2 +- .../public/openapi.json | 2 +- .../public/openapi.json | 2 +- .../java-play-framework/public/openapi.json | 2 +- 10 files changed, 10 insertions(+), 62 deletions(-) diff --git a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json index dde6ecc444fb..32b480d464d9 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json +++ b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json @@ -1039,5 +1039,5 @@ } }, "x-original-openapi-version" : "2.0.0", - "x-is-legacy-additional-properties-behavior" : "false" + "x-is-legacy-additional-properties-behavior" : "true" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-async/public/openapi.json b/samples/server/petstore/java-play-framework-async/public/openapi.json index dde6ecc444fb..32b480d464d9 100644 --- a/samples/server/petstore/java-play-framework-async/public/openapi.json +++ b/samples/server/petstore/java-play-framework-async/public/openapi.json @@ -1039,5 +1039,5 @@ } }, "x-original-openapi-version" : "2.0.0", - "x-is-legacy-additional-properties-behavior" : "false" + "x-is-legacy-additional-properties-behavior" : "true" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json index dde6ecc444fb..32b480d464d9 100644 --- a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json +++ b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json @@ -1039,5 +1039,5 @@ } }, "x-original-openapi-version" : "2.0.0", - "x-is-legacy-additional-properties-behavior" : "false" + "x-is-legacy-additional-properties-behavior" : "true" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesClass.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesClass.java index 3e48a58493de..5fbc69ab84f0 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesClass.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesClass.java @@ -39,12 +39,6 @@ public class AdditionalPropertiesClass { @JsonProperty("map_map_anytype") private Map> mapMapAnytype = null; - @JsonProperty("map_with_additional_properties") - private Object mapWithAdditionalProperties; - - @JsonProperty("map_without_additional_properties") - private Object mapWithoutAdditionalProperties; - @JsonProperty("anytype_1") private Object anytype1; @@ -259,40 +253,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -362,8 +322,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(anytype1, additionalPropertiesClass.anytype1) && Objects.equals(anytype2, additionalPropertiesClass.anytype2) && Objects.equals(anytype3, additionalPropertiesClass.anytype3); @@ -371,7 +329,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @SuppressWarnings("StringBufferReplaceableByString") @@ -388,8 +346,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json index 39480011bc4c..334631c11d64 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json @@ -2133,14 +2133,6 @@ }, "type" : "object" }, - "map_with_additional_properties" : { - "properties" : { }, - "type" : "object" - }, - "map_without_additional_properties" : { - "properties" : { }, - "type" : "object" - }, "anytype_1" : { "properties" : { }, "type" : "object" @@ -2883,5 +2875,5 @@ } }, "x-original-openapi-version" : "2.0.0", - "x-is-legacy-additional-properties-behavior" : "false" + "x-is-legacy-additional-properties-behavior" : "true" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json index dde6ecc444fb..32b480d464d9 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json @@ -1039,5 +1039,5 @@ } }, "x-original-openapi-version" : "2.0.0", - "x-is-legacy-additional-properties-behavior" : "false" + "x-is-legacy-additional-properties-behavior" : "true" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json index dde6ecc444fb..32b480d464d9 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json @@ -1039,5 +1039,5 @@ } }, "x-original-openapi-version" : "2.0.0", - "x-is-legacy-additional-properties-behavior" : "false" + "x-is-legacy-additional-properties-behavior" : "true" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json index dde6ecc444fb..32b480d464d9 100644 --- a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json @@ -1039,5 +1039,5 @@ } }, "x-original-openapi-version" : "2.0.0", - "x-is-legacy-additional-properties-behavior" : "false" + "x-is-legacy-additional-properties-behavior" : "true" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json b/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json index dde6ecc444fb..32b480d464d9 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json @@ -1039,5 +1039,5 @@ } }, "x-original-openapi-version" : "2.0.0", - "x-is-legacy-additional-properties-behavior" : "false" + "x-is-legacy-additional-properties-behavior" : "true" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/public/openapi.json b/samples/server/petstore/java-play-framework/public/openapi.json index dde6ecc444fb..32b480d464d9 100644 --- a/samples/server/petstore/java-play-framework/public/openapi.json +++ b/samples/server/petstore/java-play-framework/public/openapi.json @@ -1039,5 +1039,5 @@ } }, "x-original-openapi-version" : "2.0.0", - "x-is-legacy-additional-properties-behavior" : "false" + "x-is-legacy-additional-properties-behavior" : "true" } \ No newline at end of file From 4be1ef93ab1ac26f722500b210ddd34a4395db8a Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 15:07:24 -0700 Subject: [PATCH 064/105] create separate yaml file to avoid having lots of changes in the pr --- .../docs/AdditionalPropertiesClass.md | 4 - .../models/additional_properties_class.rb | 20 +- .../ruby/docs/AdditionalPropertiesClass.md | 4 - .../models/additional_properties_class.rb | 20 +- .../additional_properties_class_spec.rb | 12 - .../ruby-on-rails/.openapi-generator/VERSION | 2 +- .../ruby-on-rails/db/migrate/0_init_tables.rb | 14 - .../ruby-sinatra/.openapi-generator/VERSION | 2 +- .../server/petstore/ruby-sinatra/openapi.yaml | 258 ++++++++---------- 9 files changed, 111 insertions(+), 225 deletions(-) diff --git a/samples/client/petstore/ruby-faraday/docs/AdditionalPropertiesClass.md b/samples/client/petstore/ruby-faraday/docs/AdditionalPropertiesClass.md index 915bfabaa8e5..353033010b29 100644 --- a/samples/client/petstore/ruby-faraday/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/ruby-faraday/docs/AdditionalPropertiesClass.md @@ -12,8 +12,6 @@ Name | Type | Description | Notes **map_array_anytype** | **Hash<String, Array<Object>>** | | [optional] **map_map_string** | **Hash<String, Hash<String, String>>** | | [optional] **map_map_anytype** | **Hash<String, Hash<String, Object>>** | | [optional] -**map_with_additional_properties** | **Object** | | [optional] -**map_without_additional_properties** | **Object** | | [optional] **anytype_1** | **Object** | | [optional] **anytype_2** | **Object** | | [optional] **anytype_3** | **Object** | | [optional] @@ -31,8 +29,6 @@ instance = Petstore::AdditionalPropertiesClass.new(map_string: null, map_array_anytype: null, map_map_string: null, map_map_anytype: null, - map_with_additional_properties: null, - map_without_additional_properties: null, anytype_1: null, anytype_2: null, anytype_3: null) diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb index 1495d8523ac3..ff8841189f78 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb @@ -30,10 +30,6 @@ class AdditionalPropertiesClass attr_accessor :map_map_anytype - attr_accessor :map_with_additional_properties - - attr_accessor :map_without_additional_properties - attr_accessor :anytype_1 attr_accessor :anytype_2 @@ -51,8 +47,6 @@ def self.attribute_map :'map_array_anytype' => :'map_array_anytype', :'map_map_string' => :'map_map_string', :'map_map_anytype' => :'map_map_anytype', - :'map_with_additional_properties' => :'map_with_additional_properties', - :'map_without_additional_properties' => :'map_without_additional_properties', :'anytype_1' => :'anytype_1', :'anytype_2' => :'anytype_2', :'anytype_3' => :'anytype_3' @@ -70,8 +64,6 @@ def self.openapi_types :'map_array_anytype' => :'Hash>', :'map_map_string' => :'Hash>', :'map_map_anytype' => :'Hash>', - :'map_with_additional_properties' => :'Object', - :'map_without_additional_properties' => :'Object', :'anytype_1' => :'Object', :'anytype_2' => :'Object', :'anytype_3' => :'Object' @@ -147,14 +139,6 @@ def initialize(attributes = {}) end end - if attributes.key?(:'map_with_additional_properties') - self.map_with_additional_properties = attributes[:'map_with_additional_properties'] - end - - if attributes.key?(:'map_without_additional_properties') - self.map_without_additional_properties = attributes[:'map_without_additional_properties'] - end - if attributes.key?(:'anytype_1') self.anytype_1 = attributes[:'anytype_1'] end @@ -194,8 +178,6 @@ def ==(o) map_array_anytype == o.map_array_anytype && map_map_string == o.map_map_string && map_map_anytype == o.map_map_anytype && - map_with_additional_properties == o.map_with_additional_properties && - map_without_additional_properties == o.map_without_additional_properties && anytype_1 == o.anytype_1 && anytype_2 == o.anytype_2 && anytype_3 == o.anytype_3 @@ -210,7 +192,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [map_string, map_number, map_integer, map_boolean, map_array_integer, map_array_anytype, map_map_string, map_map_anytype, map_with_additional_properties, map_without_additional_properties, anytype_1, anytype_2, anytype_3].hash + [map_string, map_number, map_integer, map_boolean, map_array_integer, map_array_anytype, map_map_string, map_map_anytype, anytype_1, anytype_2, anytype_3].hash end # Builds the object from hash diff --git a/samples/client/petstore/ruby/docs/AdditionalPropertiesClass.md b/samples/client/petstore/ruby/docs/AdditionalPropertiesClass.md index 915bfabaa8e5..353033010b29 100644 --- a/samples/client/petstore/ruby/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/ruby/docs/AdditionalPropertiesClass.md @@ -12,8 +12,6 @@ Name | Type | Description | Notes **map_array_anytype** | **Hash<String, Array<Object>>** | | [optional] **map_map_string** | **Hash<String, Hash<String, String>>** | | [optional] **map_map_anytype** | **Hash<String, Hash<String, Object>>** | | [optional] -**map_with_additional_properties** | **Object** | | [optional] -**map_without_additional_properties** | **Object** | | [optional] **anytype_1** | **Object** | | [optional] **anytype_2** | **Object** | | [optional] **anytype_3** | **Object** | | [optional] @@ -31,8 +29,6 @@ instance = Petstore::AdditionalPropertiesClass.new(map_string: null, map_array_anytype: null, map_map_string: null, map_map_anytype: null, - map_with_additional_properties: null, - map_without_additional_properties: null, anytype_1: null, anytype_2: null, anytype_3: null) diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb index 1495d8523ac3..ff8841189f78 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb @@ -30,10 +30,6 @@ class AdditionalPropertiesClass attr_accessor :map_map_anytype - attr_accessor :map_with_additional_properties - - attr_accessor :map_without_additional_properties - attr_accessor :anytype_1 attr_accessor :anytype_2 @@ -51,8 +47,6 @@ def self.attribute_map :'map_array_anytype' => :'map_array_anytype', :'map_map_string' => :'map_map_string', :'map_map_anytype' => :'map_map_anytype', - :'map_with_additional_properties' => :'map_with_additional_properties', - :'map_without_additional_properties' => :'map_without_additional_properties', :'anytype_1' => :'anytype_1', :'anytype_2' => :'anytype_2', :'anytype_3' => :'anytype_3' @@ -70,8 +64,6 @@ def self.openapi_types :'map_array_anytype' => :'Hash>', :'map_map_string' => :'Hash>', :'map_map_anytype' => :'Hash>', - :'map_with_additional_properties' => :'Object', - :'map_without_additional_properties' => :'Object', :'anytype_1' => :'Object', :'anytype_2' => :'Object', :'anytype_3' => :'Object' @@ -147,14 +139,6 @@ def initialize(attributes = {}) end end - if attributes.key?(:'map_with_additional_properties') - self.map_with_additional_properties = attributes[:'map_with_additional_properties'] - end - - if attributes.key?(:'map_without_additional_properties') - self.map_without_additional_properties = attributes[:'map_without_additional_properties'] - end - if attributes.key?(:'anytype_1') self.anytype_1 = attributes[:'anytype_1'] end @@ -194,8 +178,6 @@ def ==(o) map_array_anytype == o.map_array_anytype && map_map_string == o.map_map_string && map_map_anytype == o.map_map_anytype && - map_with_additional_properties == o.map_with_additional_properties && - map_without_additional_properties == o.map_without_additional_properties && anytype_1 == o.anytype_1 && anytype_2 == o.anytype_2 && anytype_3 == o.anytype_3 @@ -210,7 +192,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [map_string, map_number, map_integer, map_boolean, map_array_integer, map_array_anytype, map_map_string, map_map_anytype, map_with_additional_properties, map_without_additional_properties, anytype_1, anytype_2, anytype_3].hash + [map_string, map_number, map_integer, map_boolean, map_array_integer, map_array_anytype, map_map_string, map_map_anytype, anytype_1, anytype_2, anytype_3].hash end # Builds the object from hash diff --git a/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb b/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb index ff252ca8af4a..ee65b12fcc11 100644 --- a/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb +++ b/samples/client/petstore/ruby/spec/models/additional_properties_class_spec.rb @@ -80,18 +80,6 @@ end end - describe 'test attribute "map_with_additional_properties"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "map_without_additional_properties"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - describe 'test attribute "anytype_1"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/samples/server/petstore/ruby-on-rails/.openapi-generator/VERSION b/samples/server/petstore/ruby-on-rails/.openapi-generator/VERSION index d168f1d8bdaa..d99e7162d01f 100644 --- a/samples/server/petstore/ruby-on-rails/.openapi-generator/VERSION +++ b/samples/server/petstore/ruby-on-rails/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/ruby-on-rails/db/migrate/0_init_tables.rb b/samples/server/petstore/ruby-on-rails/db/migrate/0_init_tables.rb index fbf324f2d198..27e270c494e2 100644 --- a/samples/server/petstore/ruby-on-rails/db/migrate/0_init_tables.rb +++ b/samples/server/petstore/ruby-on-rails/db/migrate/0_init_tables.rb @@ -25,20 +25,6 @@ def change t.timestamps end - create_table "inline_object".pluralize.to_sym, id: false do |t| - t.string :name - t.string :status - - t.timestamps - end - - create_table "inline_object_1".pluralize.to_sym, id: false do |t| - t.string :additional_metadata - t.File :file - - t.timestamps - end - create_table "order".pluralize.to_sym, id: false do |t| t.integer :id t.integer :pet_id diff --git a/samples/server/petstore/ruby-sinatra/.openapi-generator/VERSION b/samples/server/petstore/ruby-sinatra/.openapi-generator/VERSION index d168f1d8bdaa..d99e7162d01f 100644 --- a/samples/server/petstore/ruby-sinatra/.openapi-generator/VERSION +++ b/samples/server/petstore/ruby-sinatra/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.1-SNAPSHOT \ No newline at end of file +5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/ruby-sinatra/openapi.yaml b/samples/server/petstore/ruby-sinatra/openapi.yaml index 2a48cecf82bb..13732e479c9f 100644 --- a/samples/server/petstore/ruby-sinatra/openapi.yaml +++ b/samples/server/petstore/ruby-sinatra/openapi.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.0 +openapi: 3.0.1 info: description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. @@ -7,9 +7,6 @@ info: url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 -externalDocs: - description: Find out more about Swagger - url: http://swagger.io servers: - url: http://petstore.swagger.io/v2 tags: @@ -24,9 +21,18 @@ paths: post: operationId: addPet requestBody: - $ref: '#/components/requestBodies/Pet' + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true responses: - 405: + "405": + content: {} description: Invalid input security: - petstore_auth: @@ -35,16 +41,28 @@ paths: summary: Add a new pet to the store tags: - pet + x-codegen-request-body-name: body put: operationId: updatePet requestBody: - $ref: '#/components/requestBodies/Pet' + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true responses: - 400: + "400": + content: {} description: Invalid ID supplied - 404: + "404": + content: {} description: Pet not found - 405: + "405": + content: {} description: Validation exception security: - petstore_auth: @@ -53,6 +71,7 @@ paths: summary: Update an existing pet tags: - pet + x-codegen-request-body-name: body /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -74,7 +93,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -87,10 +106,12 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": + content: {} description: Invalid status value security: - petstore_auth: + - write:pets - read:pets summary: Finds Pets by status tags: @@ -113,7 +134,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -126,10 +147,12 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": + content: {} description: Invalid tag value security: - petstore_auth: + - write:pets - read:pets summary: Finds Pets by tags tags: @@ -138,24 +161,20 @@ paths: delete: operationId: deletePet parameters: - - explode: false - in: header + - in: header name: api_key - required: false schema: type: string - style: simple - description: Pet id to delete - explode: false in: path name: petId required: true schema: format: int64 type: integer - style: simple responses: - 400: + "400": + content: {} description: Invalid pet value security: - petstore_auth: @@ -169,16 +188,14 @@ paths: operationId: getPetById parameters: - description: ID of pet to return - explode: false in: path name: petId required: true schema: format: int64 type: integer - style: simple responses: - 200: + "200": content: application/xml: schema: @@ -187,9 +204,11 @@ paths: schema: $ref: '#/components/schemas/Pet' description: successful operation - 400: + "400": + content: {} description: Invalid ID supplied - 404: + "404": + content: {} description: Pet not found security: - api_key: [] @@ -200,16 +219,13 @@ paths: operationId: updatePetWithForm parameters: - description: ID of pet that needs to be updated - explode: false in: path name: petId required: true schema: format: int64 type: integer - style: simple requestBody: - $ref: '#/components/requestBodies/inline_object' content: application/x-www-form-urlencoded: schema: @@ -220,9 +236,9 @@ paths: status: description: Updated status of the pet type: string - type: object responses: - 405: + "405": + content: {} description: Invalid input security: - petstore_auth: @@ -236,16 +252,13 @@ paths: operationId: uploadFile parameters: - description: ID of pet to update - explode: false in: path name: petId required: true schema: format: int64 type: integer - style: simple requestBody: - $ref: '#/components/requestBodies/inline_object_1' content: multipart/form-data: schema: @@ -257,9 +270,8 @@ paths: description: file to upload format: binary type: string - type: object responses: - 200: + "200": content: application/json: schema: @@ -277,7 +289,7 @@ paths: description: Returns a map of status codes to quantities operationId: getInventory responses: - 200: + "200": content: application/json: schema: @@ -296,13 +308,13 @@ paths: operationId: placeOrder requestBody: content: - application/json: + '*/*': schema: $ref: '#/components/schemas/Order' description: order placed for purchasing the pet required: true responses: - 200: + "200": content: application/xml: schema: @@ -311,11 +323,13 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": + content: {} description: Invalid Order summary: Place an order for a pet tags: - store + x-codegen-request-body-name: body /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -323,17 +337,17 @@ paths: operationId: deleteOrder parameters: - description: ID of the order that needs to be deleted - explode: false in: path name: orderId required: true schema: type: string - style: simple responses: - 400: + "400": + content: {} description: Invalid ID supplied - 404: + "404": + content: {} description: Order not found summary: Delete purchase order by ID tags: @@ -344,7 +358,6 @@ paths: operationId: getOrderById parameters: - description: ID of pet that needs to be fetched - explode: false in: path name: orderId required: true @@ -353,9 +366,8 @@ paths: maximum: 5 minimum: 1 type: integer - style: simple responses: - 200: + "200": content: application/xml: schema: @@ -364,9 +376,11 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": + content: {} description: Invalid ID supplied - 404: + "404": + content: {} description: Order not found summary: Find purchase order by ID tags: @@ -377,68 +391,77 @@ paths: operationId: createUser requestBody: content: - application/json: + '*/*': schema: $ref: '#/components/schemas/User' description: Created user object required: true responses: default: + content: {} description: successful operation - security: - - auth_cookie: [] summary: Create user tags: - user + x-codegen-request-body-name: body /user/createWithArray: post: operationId: createUsersWithArrayInput requestBody: - $ref: '#/components/requestBodies/UserArray' + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true responses: default: + content: {} description: successful operation - security: - - auth_cookie: [] summary: Creates list of users with given input array tags: - user + x-codegen-request-body-name: body /user/createWithList: post: operationId: createUsersWithListInput requestBody: - $ref: '#/components/requestBodies/UserArray' + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true responses: default: + content: {} description: successful operation - security: - - auth_cookie: [] summary: Creates list of users with given input array tags: - user + x-codegen-request-body-name: body /user/login: get: operationId: loginUser parameters: - description: The user name for login - explode: true in: query name: username required: true schema: - pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$ type: string - style: form - description: The password for login in clear text - explode: true in: query name: password required: true schema: type: string - style: form responses: - 200: + "200": content: application/xml: schema: @@ -448,29 +471,18 @@ paths: type: string description: successful operation headers: - Set-Cookie: - description: Cookie authentication key for use with the `auth_cookie` - apiKey authentication. - explode: false - schema: - example: AUTH_KEY=abcde12345; Path=/; HttpOnly - type: string - style: simple X-Rate-Limit: description: calls per hour allowed by the user - explode: false schema: format: int32 type: integer - style: simple X-Expires-After: description: date in UTC when toekn expires - explode: false schema: format: date-time type: string - style: simple - 400: + "400": + content: {} description: Invalid username/password supplied summary: Logs user into the system tags: @@ -480,9 +492,8 @@ paths: operationId: logoutUser responses: default: + content: {} description: successful operation - security: - - auth_cookie: [] summary: Logs out current logged in user session tags: - user @@ -492,20 +503,18 @@ paths: operationId: deleteUser parameters: - description: The name that needs to be deleted - explode: false in: path name: username required: true schema: type: string - style: simple responses: - 400: + "400": + content: {} description: Invalid username supplied - 404: + "404": + content: {} description: User not found - security: - - auth_cookie: [] summary: Delete user tags: - user @@ -513,15 +522,13 @@ paths: operationId: getUserByName parameters: - description: The name that needs to be fetched. Use user1 for testing. - explode: false in: path name: username required: true schema: type: string - style: simple responses: - 200: + "200": content: application/xml: schema: @@ -530,9 +537,11 @@ paths: schema: $ref: '#/components/schemas/User' description: successful operation - 400: + "400": + content: {} description: Invalid username supplied - 404: + "404": + content: {} description: User not found summary: Get user by user name tags: @@ -542,61 +551,30 @@ paths: operationId: updateUser parameters: - description: name that need to be deleted - explode: false in: path name: username required: true schema: type: string - style: simple requestBody: content: - application/json: + '*/*': schema: $ref: '#/components/schemas/User' description: Updated user object required: true responses: - 400: + "400": + content: {} description: Invalid user supplied - 404: + "404": + content: {} description: User not found - security: - - auth_cookie: [] summary: Updated user tags: - user + x-codegen-request-body-name: body components: - requestBodies: - UserArray: - content: - application/json: - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true - Pet: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true - inline_object: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/inline_object' - inline_object_1: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/inline_object_1' schemas: Order: description: An order for a pets from the pet store @@ -644,7 +622,6 @@ components: format: int64 type: integer name: - pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$ type: string title: Pet category type: object @@ -770,25 +747,6 @@ components: type: string title: An uploaded response type: object - inline_object: - properties: - name: - description: Updated name of the pet - type: string - status: - description: Updated status of the pet - type: string - type: object - inline_object_1: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - file: - description: file to upload - format: binary - type: string - type: object securitySchemes: petstore_auth: flows: @@ -802,7 +760,5 @@ components: in: header name: api_key type: apiKey - auth_cookie: - in: cookie - name: AUTH_KEY - type: apiKey +x-original-openapi-version: 2.0.0 +x-is-legacy-additional-properties-behavior: "true" From 9fd0685dc0ec5c2d1c138bf6eec08c9ae450813a Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 15:10:23 -0700 Subject: [PATCH 065/105] create separate yaml file to avoid having lots of changes in the pr --- .../petstore/go/go-petstore/api/openapi.yaml | 2 + .../go-api-server/.openapi-generator/VERSION | 2 +- .../petstore/go-api-server/api/openapi.yaml | 141 +++++++++++------- .../petstore/go-api-server/go/api_fake.go | 26 ++++ .../petstore/go-api-server/go/model_cat.go | 4 - .../petstore/go-api-server/go/model_dog.go | 4 - .../.openapi-generator/VERSION | 2 +- .../go-gin-api-server/api/openapi.yaml | 141 +++++++++++------- .../petstore/go-gin-api-server/go/api_fake.go | 5 + .../go-gin-api-server/go/model_cat.go | 4 - .../go-gin-api-server/go/model_dog.go | 4 - .../petstore/go-gin-api-server/go/routers.go | 7 + 12 files changed, 218 insertions(+), 124 deletions(-) diff --git a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml index af7148414b93..952fa7afadfc 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml @@ -2090,3 +2090,5 @@ components: http_signature_test: scheme: signature type: http +x-original-openapi-version: 3.0.0 +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/openapi3/server/petstore/go-api-server/.openapi-generator/VERSION b/samples/openapi3/server/petstore/go-api-server/.openapi-generator/VERSION index 58592f031f65..d99e7162d01f 100644 --- a/samples/openapi3/server/petstore/go-api-server/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/go-api-server/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml b/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml index 06a1bb8d4693..952fa7afadfc 100644 --- a/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml +++ b/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml @@ -54,7 +54,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Pet' responses: - 405: + "405": description: Invalid input security: - petstore_auth: @@ -68,11 +68,11 @@ paths: requestBody: $ref: '#/components/requestBodies/Pet' responses: - 400: + "400": description: Invalid ID supplied - 404: + "404": description: Pet not found - 405: + "405": description: Validation exception security: - petstore_auth: @@ -105,7 +105,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -118,7 +118,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": description: Invalid status value security: - petstore_auth: @@ -145,7 +145,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -158,7 +158,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": description: Invalid tag value security: - petstore_auth: @@ -188,7 +188,7 @@ paths: type: integer style: simple responses: - 400: + "400": description: Invalid pet value security: - petstore_auth: @@ -211,7 +211,7 @@ paths: type: integer style: simple responses: - 200: + "200": content: application/xml: schema: @@ -220,9 +220,9 @@ paths: schema: $ref: '#/components/schemas/Pet' description: successful operation - 400: + "400": description: Invalid ID supplied - 404: + "404": description: Pet not found security: - api_key: [] @@ -255,7 +255,7 @@ paths: type: string type: object responses: - 405: + "405": description: Invalid input security: - petstore_auth: @@ -292,7 +292,7 @@ paths: type: string type: object responses: - 200: + "200": content: application/json: schema: @@ -310,7 +310,7 @@ paths: description: Returns a map of status codes to quantities operationId: getInventory responses: - 200: + "200": content: application/json: schema: @@ -335,7 +335,7 @@ paths: description: order placed for purchasing the pet required: true responses: - 200: + "200": content: application/xml: schema: @@ -344,7 +344,7 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": description: Invalid Order summary: Place an order for a pet tags: @@ -364,9 +364,9 @@ paths: type: string style: simple responses: - 400: + "400": description: Invalid ID supplied - 404: + "404": description: Order not found summary: Delete purchase order by ID tags: @@ -388,7 +388,7 @@ paths: type: integer style: simple responses: - 200: + "200": content: application/xml: schema: @@ -397,9 +397,9 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": description: Invalid ID supplied - 404: + "404": description: Order not found summary: Find purchase order by ID tags: @@ -464,7 +464,7 @@ paths: type: string style: form responses: - 200: + "200": content: application/xml: schema: @@ -488,7 +488,7 @@ paths: format: date-time type: string style: simple - 400: + "400": description: Invalid username/password supplied summary: Logs user into the system tags: @@ -516,9 +516,9 @@ paths: type: string style: simple responses: - 400: + "400": description: Invalid username supplied - 404: + "404": description: User not found summary: Delete user tags: @@ -535,7 +535,7 @@ paths: type: string style: simple responses: - 200: + "200": content: application/xml: schema: @@ -544,9 +544,9 @@ paths: schema: $ref: '#/components/schemas/User' description: successful operation - 400: + "400": description: Invalid username supplied - 404: + "404": description: User not found summary: Get user by user name tags: @@ -571,9 +571,9 @@ paths: description: Updated user object required: true responses: - 400: + "400": description: Invalid user supplied - 404: + "404": description: User not found summary: Updated user tags: @@ -585,7 +585,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Client' responses: - 200: + "200": content: application/json: schema: @@ -652,7 +652,7 @@ paths: type: integer style: form responses: - 400: + "400": description: Someting wrong security: - bearer_test: [] @@ -767,9 +767,9 @@ paths: type: string type: object responses: - 400: + "400": description: Invalid request - 404: + "404": description: Not found summary: To test enum parameters tags: @@ -780,7 +780,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Client' responses: - 200: + "200": content: application/json: schema: @@ -873,9 +873,9 @@ paths: - pattern_without_delimiter type: object responses: - 400: + "400": description: Invalid username supplied - 404: + "404": description: User not found security: - http_basic_test: [] @@ -897,7 +897,7 @@ paths: $ref: '#/components/schemas/OuterNumber' description: Input number as post body responses: - 200: + "200": content: '*/*': schema: @@ -916,7 +916,7 @@ paths: $ref: '#/components/schemas/OuterString' description: Input string as post body responses: - 200: + "200": content: '*/*': schema: @@ -935,7 +935,7 @@ paths: $ref: '#/components/schemas/OuterBoolean' description: Input boolean as post body responses: - 200: + "200": content: '*/*': schema: @@ -954,7 +954,7 @@ paths: $ref: '#/components/schemas/OuterComposite' description: Input composite as post body responses: - 200: + "200": content: '*/*': schema: @@ -982,7 +982,7 @@ paths: - param2 type: object responses: - 200: + "200": description: successful operation summary: test json serialization of form data tags: @@ -1000,7 +1000,7 @@ paths: description: request body required: true responses: - 200: + "200": description: successful operation summary: test inline additionalProperties tags: @@ -1023,7 +1023,7 @@ paths: $ref: '#/components/schemas/User' required: true responses: - 200: + "200": description: Success tags: - fake @@ -1034,7 +1034,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Client' responses: - 200: + "200": content: application/json: schema: @@ -1055,7 +1055,7 @@ paths: $ref: '#/components/schemas/FileSchemaTestClass' required: true responses: - 200: + "200": description: Success tags: - fake @@ -1110,7 +1110,7 @@ paths: type: array style: form responses: - 200: + "200": description: Success tags: - fake @@ -1144,7 +1144,7 @@ paths: - requiredFile type: object responses: - 200: + "200": content: application/json: schema: @@ -1160,7 +1160,7 @@ paths: /fake/health: get: responses: - 200: + "200": content: application/json: schema: @@ -1169,6 +1169,36 @@ paths: summary: Health check endpoint tags: - fake + /fake/http-signature-test: + get: + operationId: fake-http-signature-test + parameters: + - description: query parameter + explode: true + in: query + name: query_1 + required: false + schema: + type: string + style: form + - description: header parameter + explode: false + in: header + name: header_1 + required: false + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + description: The instance started successfully + security: + - http_signature_test: [] + summary: test http signature authentication + tags: + - fake components: requestBodies: UserArray: @@ -1423,14 +1453,14 @@ components: type: integer property: type: string - 123Number: + "123Number": readOnly: true type: integer required: - name xml: name: Name - 200_response: + "200_response": description: Model for testing model name starting with number properties: name: @@ -1608,7 +1638,7 @@ components: type: object List: properties: - 123-list: + "123-list": type: string type: object Client: @@ -2057,3 +2087,8 @@ components: bearerFormat: JWT scheme: bearer type: http + http_signature_test: + scheme: signature + type: http +x-original-openapi-version: 3.0.0 +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_fake.go b/samples/openapi3/server/petstore/go-api-server/go/api_fake.go index 94b55953254c..fb3c3346a365 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/api_fake.go +++ b/samples/openapi3/server/petstore/go-api-server/go/api_fake.go @@ -36,6 +36,12 @@ func (c *FakeApiController) Routes() Routes { "/v2/fake/health", c.FakeHealthGet, }, + { + "FakeHttpSignatureTest", + strings.ToUpper("Get"), + "/v2/fake/http-signature-test", + c.FakeHttpSignatureTest, + }, { "FakeOuterBooleanSerialize", strings.ToUpper("Post"), @@ -128,6 +134,26 @@ func (c *FakeApiController) FakeHealthGet(w http.ResponseWriter, r *http.Request EncodeJSONResponse(result, nil, w) } +// FakeHttpSignatureTest - test http signature authentication +func (c *FakeApiController) FakeHttpSignatureTest(w http.ResponseWriter, r *http.Request) { + query := r.URL.Query() + pet := &Pet{} + if err := json.NewDecoder(r.Body).Decode(&pet); err != nil { + w.WriteHeader(500) + return + } + + query1 := query.Get("query1") + header1 := r.Header.Get("header1") + result, err := c.service.FakeHttpSignatureTest(*pet, query1, header1) + if err != nil { + w.WriteHeader(500) + return + } + + EncodeJSONResponse(result, nil, w) +} + // FakeOuterBooleanSerialize - func (c *FakeApiController) FakeOuterBooleanSerialize(w http.ResponseWriter, r *http.Request) { body := &bool{} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_cat.go b/samples/openapi3/server/petstore/go-api-server/go/model_cat.go index 78261ede6121..a221fb052d21 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/model_cat.go +++ b/samples/openapi3/server/petstore/go-api-server/go/model_cat.go @@ -11,9 +11,5 @@ package petstoreserver type Cat struct { - ClassName string `json:"className"` - - Color string `json:"color,omitempty"` - Declawed bool `json:"declawed,omitempty"` } diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_dog.go b/samples/openapi3/server/petstore/go-api-server/go/model_dog.go index 04b2a9ba9aae..71fbac70d500 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/model_dog.go +++ b/samples/openapi3/server/petstore/go-api-server/go/model_dog.go @@ -11,9 +11,5 @@ package petstoreserver type Dog struct { - ClassName string `json:"className"` - - Color string `json:"color,omitempty"` - Breed string `json:"breed,omitempty"` } diff --git a/samples/openapi3/server/petstore/go-gin-api-server/.openapi-generator/VERSION b/samples/openapi3/server/petstore/go-gin-api-server/.openapi-generator/VERSION index 58592f031f65..d99e7162d01f 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/go-gin-api-server/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml b/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml index 06a1bb8d4693..952fa7afadfc 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml +++ b/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml @@ -54,7 +54,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Pet' responses: - 405: + "405": description: Invalid input security: - petstore_auth: @@ -68,11 +68,11 @@ paths: requestBody: $ref: '#/components/requestBodies/Pet' responses: - 400: + "400": description: Invalid ID supplied - 404: + "404": description: Pet not found - 405: + "405": description: Validation exception security: - petstore_auth: @@ -105,7 +105,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -118,7 +118,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": description: Invalid status value security: - petstore_auth: @@ -145,7 +145,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -158,7 +158,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": description: Invalid tag value security: - petstore_auth: @@ -188,7 +188,7 @@ paths: type: integer style: simple responses: - 400: + "400": description: Invalid pet value security: - petstore_auth: @@ -211,7 +211,7 @@ paths: type: integer style: simple responses: - 200: + "200": content: application/xml: schema: @@ -220,9 +220,9 @@ paths: schema: $ref: '#/components/schemas/Pet' description: successful operation - 400: + "400": description: Invalid ID supplied - 404: + "404": description: Pet not found security: - api_key: [] @@ -255,7 +255,7 @@ paths: type: string type: object responses: - 405: + "405": description: Invalid input security: - petstore_auth: @@ -292,7 +292,7 @@ paths: type: string type: object responses: - 200: + "200": content: application/json: schema: @@ -310,7 +310,7 @@ paths: description: Returns a map of status codes to quantities operationId: getInventory responses: - 200: + "200": content: application/json: schema: @@ -335,7 +335,7 @@ paths: description: order placed for purchasing the pet required: true responses: - 200: + "200": content: application/xml: schema: @@ -344,7 +344,7 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": description: Invalid Order summary: Place an order for a pet tags: @@ -364,9 +364,9 @@ paths: type: string style: simple responses: - 400: + "400": description: Invalid ID supplied - 404: + "404": description: Order not found summary: Delete purchase order by ID tags: @@ -388,7 +388,7 @@ paths: type: integer style: simple responses: - 200: + "200": content: application/xml: schema: @@ -397,9 +397,9 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": description: Invalid ID supplied - 404: + "404": description: Order not found summary: Find purchase order by ID tags: @@ -464,7 +464,7 @@ paths: type: string style: form responses: - 200: + "200": content: application/xml: schema: @@ -488,7 +488,7 @@ paths: format: date-time type: string style: simple - 400: + "400": description: Invalid username/password supplied summary: Logs user into the system tags: @@ -516,9 +516,9 @@ paths: type: string style: simple responses: - 400: + "400": description: Invalid username supplied - 404: + "404": description: User not found summary: Delete user tags: @@ -535,7 +535,7 @@ paths: type: string style: simple responses: - 200: + "200": content: application/xml: schema: @@ -544,9 +544,9 @@ paths: schema: $ref: '#/components/schemas/User' description: successful operation - 400: + "400": description: Invalid username supplied - 404: + "404": description: User not found summary: Get user by user name tags: @@ -571,9 +571,9 @@ paths: description: Updated user object required: true responses: - 400: + "400": description: Invalid user supplied - 404: + "404": description: User not found summary: Updated user tags: @@ -585,7 +585,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Client' responses: - 200: + "200": content: application/json: schema: @@ -652,7 +652,7 @@ paths: type: integer style: form responses: - 400: + "400": description: Someting wrong security: - bearer_test: [] @@ -767,9 +767,9 @@ paths: type: string type: object responses: - 400: + "400": description: Invalid request - 404: + "404": description: Not found summary: To test enum parameters tags: @@ -780,7 +780,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Client' responses: - 200: + "200": content: application/json: schema: @@ -873,9 +873,9 @@ paths: - pattern_without_delimiter type: object responses: - 400: + "400": description: Invalid username supplied - 404: + "404": description: User not found security: - http_basic_test: [] @@ -897,7 +897,7 @@ paths: $ref: '#/components/schemas/OuterNumber' description: Input number as post body responses: - 200: + "200": content: '*/*': schema: @@ -916,7 +916,7 @@ paths: $ref: '#/components/schemas/OuterString' description: Input string as post body responses: - 200: + "200": content: '*/*': schema: @@ -935,7 +935,7 @@ paths: $ref: '#/components/schemas/OuterBoolean' description: Input boolean as post body responses: - 200: + "200": content: '*/*': schema: @@ -954,7 +954,7 @@ paths: $ref: '#/components/schemas/OuterComposite' description: Input composite as post body responses: - 200: + "200": content: '*/*': schema: @@ -982,7 +982,7 @@ paths: - param2 type: object responses: - 200: + "200": description: successful operation summary: test json serialization of form data tags: @@ -1000,7 +1000,7 @@ paths: description: request body required: true responses: - 200: + "200": description: successful operation summary: test inline additionalProperties tags: @@ -1023,7 +1023,7 @@ paths: $ref: '#/components/schemas/User' required: true responses: - 200: + "200": description: Success tags: - fake @@ -1034,7 +1034,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Client' responses: - 200: + "200": content: application/json: schema: @@ -1055,7 +1055,7 @@ paths: $ref: '#/components/schemas/FileSchemaTestClass' required: true responses: - 200: + "200": description: Success tags: - fake @@ -1110,7 +1110,7 @@ paths: type: array style: form responses: - 200: + "200": description: Success tags: - fake @@ -1144,7 +1144,7 @@ paths: - requiredFile type: object responses: - 200: + "200": content: application/json: schema: @@ -1160,7 +1160,7 @@ paths: /fake/health: get: responses: - 200: + "200": content: application/json: schema: @@ -1169,6 +1169,36 @@ paths: summary: Health check endpoint tags: - fake + /fake/http-signature-test: + get: + operationId: fake-http-signature-test + parameters: + - description: query parameter + explode: true + in: query + name: query_1 + required: false + schema: + type: string + style: form + - description: header parameter + explode: false + in: header + name: header_1 + required: false + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + description: The instance started successfully + security: + - http_signature_test: [] + summary: test http signature authentication + tags: + - fake components: requestBodies: UserArray: @@ -1423,14 +1453,14 @@ components: type: integer property: type: string - 123Number: + "123Number": readOnly: true type: integer required: - name xml: name: Name - 200_response: + "200_response": description: Model for testing model name starting with number properties: name: @@ -1608,7 +1638,7 @@ components: type: object List: properties: - 123-list: + "123-list": type: string type: object Client: @@ -2057,3 +2087,8 @@ components: bearerFormat: JWT scheme: bearer type: http + http_signature_test: + scheme: signature + type: http +x-original-openapi-version: 3.0.0 +x-is-legacy-additional-properties-behavior: "true" diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/api_fake.go b/samples/openapi3/server/petstore/go-gin-api-server/go/api_fake.go index 17107d021c5c..05b4a1a6c15a 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/api_fake.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/api_fake.go @@ -20,6 +20,11 @@ func FakeHealthGet(c *gin.Context) { c.JSON(http.StatusOK, gin.H{}) } +// FakeHttpSignatureTest - test http signature authentication +func FakeHttpSignatureTest(c *gin.Context) { + c.JSON(http.StatusOK, gin.H{}) +} + // FakeOuterBooleanSerialize - func FakeOuterBooleanSerialize(c *gin.Context) { c.JSON(http.StatusOK, gin.H{}) diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_cat.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_cat.go index 78261ede6121..a221fb052d21 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_cat.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/model_cat.go @@ -11,9 +11,5 @@ package petstoreserver type Cat struct { - ClassName string `json:"className"` - - Color string `json:"color,omitempty"` - Declawed bool `json:"declawed,omitempty"` } diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_dog.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_dog.go index 04b2a9ba9aae..71fbac70d500 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_dog.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/model_dog.go @@ -11,9 +11,5 @@ package petstoreserver type Dog struct { - ClassName string `json:"className"` - - Color string `json:"color,omitempty"` - Breed string `json:"breed,omitempty"` } diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/routers.go b/samples/openapi3/server/petstore/go-gin-api-server/go/routers.go index 4d05d282f980..c45b80df3632 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/routers.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/routers.go @@ -83,6 +83,13 @@ var routes = Routes{ FakeHealthGet, }, + { + "FakeHttpSignatureTest", + http.MethodGet, + "/v2/fake/http-signature-test", + FakeHttpSignatureTest, + }, + { "FakeOuterBooleanSerialize", http.MethodPost, From ac278121f25798eb7a6976e488c3a9c3ff04804f Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 19:05:39 -0700 Subject: [PATCH 066/105] Change name of CLI option --- .../codegen/CodegenConstants.java | 21 ++++---- .../openapitools/codegen/DefaultCodegen.java | 49 ++++++++++--------- .../PythonClientExperimentalCodegen.java | 2 +- .../codegen/utils/ModelUtils.java | 42 ++++++++-------- .../codegen/DefaultCodegenTest.java | 6 +-- .../options/BashClientOptionsProvider.java | 2 +- .../options/DartClientOptionsProvider.java | 2 +- .../options/DartDioClientOptionsProvider.java | 2 +- .../options/ElixirClientOptionsProvider.java | 2 +- .../options/GoGinServerOptionsProvider.java | 2 +- .../options/GoServerOptionsProvider.java | 2 +- .../HaskellServantOptionsProvider.java | 2 +- .../options/PhpClientOptionsProvider.java | 2 +- .../PhpLumenServerOptionsProvider.java | 2 +- .../PhpSilexServerOptionsProvider.java | 2 +- .../PhpSlim4ServerOptionsProvider.java | 2 +- .../options/PhpSlimServerOptionsProvider.java | 2 +- .../options/RubyClientOptionsProvider.java | 2 +- .../ScalaAkkaClientOptionsProvider.java | 2 +- .../ScalaHttpClientOptionsProvider.java | 2 +- .../options/Swift4OptionsProvider.java | 2 +- .../options/Swift5OptionsProvider.java | 2 +- ...ypeScriptAngularClientOptionsProvider.java | 2 +- ...eScriptAngularJsClientOptionsProvider.java | 2 +- ...ypeScriptAureliaClientOptionsProvider.java | 2 +- .../TypeScriptFetchClientOptionsProvider.java | 2 +- .../TypeScriptNodeClientOptionsProvider.java | 2 +- 27 files changed, 83 insertions(+), 81 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java index db6c931339d1..fded4a057660 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java @@ -359,17 +359,16 @@ public static enum ENUM_PROPERTY_NAMING_TYPE {camelCase, PascalCase, snake_case, public static final String USE_SINGLE_REQUEST_PARAMETER = "useSingleRequestParameter"; public static final String USE_SINGLE_REQUEST_PARAMETER_DESC = "Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter."; - // The reason this parameter exists is because there is a dependency - // on swagger-api/swagger-parser issue https://github.com/swagger-api/swagger-parser/issues/1369. - // When that issue is resolved, this parameter should be removed. - public static final String LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR = "legacyAdditionalPropertiesBehavior"; - public static final String LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR_DESC = - "If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. " + - "This is the default value.\n" + - - "If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. " + - "When the 'additionalProperties' keyword is not present in a schema, " + - "it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.\n" + + public static final String DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT = "disallowAdditionalPropertiesIfNotPresent"; + public static final String DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT_DESC = + "Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document\n" + + + "If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. " + + + "If true: when the 'additionalProperties' keyword is not present in a schema, " + + "the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. " + + "Note: this mode is not compliant with the JSON schema specification. " + + "This is the original openapi-generator behavior." + "This setting is currently ignored for OAS 2.0 documents: " + " 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. " + 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 9338581cbeca..72ddd5d5b926 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 @@ -239,9 +239,9 @@ apiTemplateFiles are for API outputs only (controllers/handlers). // Support legacy logic for evaluating discriminators protected boolean legacyDiscriminatorBehavior = true; - // Support legacy logic for evaluating 'additionalProperties' keyword. + // Specify what to do if the 'additionalProperties' keyword is not present in a schema. // See CodegenConstants.java for more details. - protected boolean legacyAdditionalPropertiesBehavior = true; + protected boolean disallowAdditionalPropertiesIfNotPresent = true; // make openapi available to all methods protected OpenAPI openAPI; @@ -339,9 +339,9 @@ public void processOpts() { this.setLegacyDiscriminatorBehavior(Boolean.valueOf(additionalProperties .get(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR).toString())); } - if (additionalProperties.containsKey(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR)) { - this.setLegacyAdditionalPropertiesBehavior(Boolean.valueOf(additionalProperties - .get(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR).toString())); + if (additionalProperties.containsKey(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT)) { + this.setDisallowAdditionalPropertiesIfNotPresent(Boolean.valueOf(additionalProperties + .get(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT).toString())); } } @@ -724,9 +724,9 @@ public String toEnumVarName(String value, String datatype) { public void setOpenAPI(OpenAPI openAPI) { this.openAPI = openAPI; // Set vendor extension such that helper functions can lookup the value - // of this CLI option. The code below can be removed when issues #1369 and #1371 - // have been resolved at https://github.com/swagger-api/swagger-parser. - this.openAPI.addExtension("x-is-legacy-additional-properties-behavior", Boolean.toString(getLegacyAdditionalPropertiesBehavior())); + // of this CLI option. + this.openAPI.addExtension(ModelUtils.EXTENSION_DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, + Boolean.toString(getDisallowAdditionalPropertiesIfNotPresent())); } // override with any special post-processing @@ -1163,12 +1163,12 @@ public void setLegacyDiscriminatorBehavior(boolean val) { this.legacyDiscriminatorBehavior = val; } - public Boolean getLegacyAdditionalPropertiesBehavior() { - return legacyAdditionalPropertiesBehavior; + public Boolean getDisallowAdditionalPropertiesIfNotPresent() { + return disallowAdditionalPropertiesIfNotPresent; } - public void setLegacyAdditionalPropertiesBehavior(boolean val) { - this.legacyAdditionalPropertiesBehavior = val; + public void setDisallowAdditionalPropertiesIfNotPresent(boolean val) { + this.disallowAdditionalPropertiesIfNotPresent = val; } public Boolean getAllowUnicodeIdentifiers() { @@ -1496,19 +1496,20 @@ public DefaultCodegen() { cliOptions.add(legacyDiscriminatorBehaviorOpt); // option to change how we process + set the data in the 'additionalProperties' keyword. - CliOption legacyAdditionalPropertiesBehaviorOpt = CliOption.newBoolean( - CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, - CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR_DESC).defaultValue(Boolean.TRUE.toString()); - Map legacyAdditionalPropertiesBehaviorOpts = new HashMap<>(); - legacyAdditionalPropertiesBehaviorOpts.put("false", + CliOption disallowAdditionalPropertiesIfNotPresentOpt = CliOption.newBoolean( + CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, + CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT_DESC).defaultValue(Boolean.TRUE.toString()); + Map disallowAdditionalPropertiesIfNotPresentOpts = new HashMap<>(); + disallowAdditionalPropertiesIfNotPresentOpts.put("false", "The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications."); - legacyAdditionalPropertiesBehaviorOpts.put("true", - "Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. " + - "When the 'additionalProperties' keyword is not present in a schema, " + - "it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed."); - legacyAdditionalPropertiesBehaviorOpt.setEnum(legacyAdditionalPropertiesBehaviorOpts); - cliOptions.add(legacyAdditionalPropertiesBehaviorOpt); - this.setLegacyAdditionalPropertiesBehavior(true); + disallowAdditionalPropertiesIfNotPresentOpts.put("true", + "when the 'additionalProperties' keyword is not present in a schema, " + + "the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. " + + "Note: this mode is not compliant with the JSON schema specification. " + + "This is the original openapi-generator behavior."); + disallowAdditionalPropertiesIfNotPresentOpt.setEnum(disallowAdditionalPropertiesIfNotPresentOpts); + cliOptions.add(disallowAdditionalPropertiesIfNotPresentOpt); + this.setDisallowAdditionalPropertiesIfNotPresent(true); // initialize special character mapping initalizeSpecialCharacterMapping(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java index ad4ed8f4a91b..d7850b609962 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java @@ -56,7 +56,7 @@ public PythonClientExperimentalCodegen() { super(); supportsAdditionalPropertiesWithComposedSchema = true; - this.setLegacyAdditionalPropertiesBehavior(false); + this.setDisallowAdditionalPropertiesIfNotPresent(false); modifyFeatureSet(features -> features .includeDocumentationFeatures(DocumentationFeature.Readme) 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 3d3e30754d31..986bd9689d54 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 @@ -59,7 +59,8 @@ public class ModelUtils { private static final String generateAliasAsModelKey = "generateAliasAsModel"; - private static final String openapiVersionExtension = "x-original-openapi-version"; + public static final String EXTENSION_OPENAPI_DOC_VERSION = "x-original-openapi-version"; + public static final String EXTENSION_DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT = "x-disallow-additional-properties-if-not-present"; private static ObjectMapper JSON_MAPPER, YAML_MAPPER; @@ -1080,30 +1081,31 @@ public static Schema getAdditionalProperties(OpenAPI openAPI, Schema schema) { return (Schema) addProps; } if (addProps == null) { - // Because of the https://github.com/swagger-api/swagger-parser/issues/1369 issue, - // there is a problem processing the 'additionalProperties' keyword. - // * When OAS 2.0 documents are parsed, the 'additionalProperties' keyword is ignored - // if the value is boolean. That means codegen is unable to determine whether - // additional properties are allowed or not. - // * When OAS 3.0 documents are parsed, the 'additionalProperties' keyword is properly - // parsed. + // When reaching this code path, this should indicate the 'additionalProperties' keyword is + // not present in the OAS schema. This is true for OAS 3.0 documents. + // However, the parsing logic is broken for OAS 2.0 documents because of the + // https://github.com/swagger-api/swagger-parser/issues/1369 issue. + // When OAS 2.0 documents are parsed, the swagger-v2-converter ignores the 'additionalProperties' + // keyword if the value is boolean. That means codegen is unable to determine whether + // additional properties are allowed or not. // // The original behavior was to assume additionalProperties had been set to false. Map extensions = openAPI.getExtensions(); - if (extensions != null && extensions.containsKey("x-is-legacy-additional-properties-behavior")) { - boolean isLegacyAdditionalPropertiesBehavior = - Boolean.parseBoolean((String)extensions.get("x-is-legacy-additional-properties-behavior")); - if (isLegacyAdditionalPropertiesBehavior) { - // Legacy, non-compliant mode. If the 'additionalProperties' keyword is not present in a OAS schema, + if (extensions != null && extensions.containsKey(EXTENSION_DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT)) { + boolean disallowAdditionalPropertiesIfNotPresent = + Boolean.parseBoolean((String)extensions.get(EXTENSION_DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT)); + if (disallowAdditionalPropertiesIfNotPresent) { + // If the 'additionalProperties' keyword is not present in a OAS schema, // interpret as if the 'additionalProperties' keyword had been set to false. + // This is NOT compliant with the JSON schema specification. It is the original + // 'openapi-generator' behavior. return null; } } - // The 'x-is-legacy-additional-properties-behavior' extension has been set to true, + // The ${EXTENSION_DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT} extension has been set to true, // but for now that only works with OAS 3.0 documents. - // The new behavior does not work with OAS 2.0 documents because of the - // https://github.com/swagger-api/swagger-parser/issues/1369 issue. - if (extensions == null || !extensions.containsKey(openapiVersionExtension)) { + // The new behavior does not work with OAS 2.0 documents. + if (extensions == null || !extensions.containsKey(EXTENSION_OPENAPI_DOC_VERSION)) { // Fallback to the legacy behavior. return null; } @@ -1111,7 +1113,7 @@ public static Schema getAdditionalProperties(OpenAPI openAPI, Schema schema) { // Note openAPI.getOpenapi() is always set to 3.x even when the document // is converted from a OAS/Swagger 2.0 document. // https://github.com/swagger-api/swagger-parser/pull/1374 - SemVer version = new SemVer((String)extensions.get(openapiVersionExtension)); + SemVer version = new SemVer((String)extensions.get(EXTENSION_OPENAPI_DOC_VERSION)); if (version.major != 3) { return null; } @@ -1526,7 +1528,7 @@ public static SemVer getOpenApiVersion(OpenAPI openAPI, String location, List auths) { SemVer version = getOpenApiVersion(openapi, location, auths); - openapi.addExtension(openapiVersionExtension, version.toString()); + openapi.addExtension(EXTENSION_OPENAPI_DOC_VERSION, version.toString()); } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index b76e6eaf9573..3ea926263fc0 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -242,8 +242,8 @@ public void testOriginalOpenApiDocumentVersion() { public void testAdditionalPropertiesV2Spec() { OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/2_0/petstore-with-fake-endpoints-models-and-additional-properties-for-testing.yaml"); DefaultCodegen codegen = new DefaultCodegen(); - codegen.setLegacyAdditionalPropertiesBehavior(true); codegen.setOpenAPI(openAPI); + codegen.setDisallowAdditionalPropertiesIfNotPresent(true); Schema schema = openAPI.getComponents().getSchemas().get("AdditionalPropertiesClass"); Assert.assertEquals(schema.getAdditionalProperties(), null); @@ -293,7 +293,7 @@ public void testAdditionalPropertiesV2Spec() { public void testAdditionalPropertiesV3Spec() { OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml"); DefaultCodegen codegen = new DefaultCodegen(); - codegen.setLegacyAdditionalPropertiesBehavior(false); + codegen.setDisallowAdditionalPropertiesIfNotPresent(false); codegen.setOpenAPI(openAPI); Schema schema = openAPI.getComponents().getSchemas().get("AdditionalPropertiesClass"); @@ -342,7 +342,7 @@ public void testAdditionalPropertiesV3Spec() { public void testAdditionalPropertiesV3SpecLegacy() { OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml"); DefaultCodegen codegen = new DefaultCodegen(); - codegen.setLegacyAdditionalPropertiesBehavior(true); + codegen.setDisallowAdditionalPropertiesIfNotPresent(true); codegen.setOpenAPI(openAPI); Schema schema = openAPI.getComponents().getSchemas().get("AdditionalPropertiesClass"); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/BashClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/BashClientOptionsProvider.java index 04863c639237..2a4564db2b90 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/BashClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/BashClientOptionsProvider.java @@ -71,7 +71,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartClientOptionsProvider.java index 16106c903909..ef59bc8c8124 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartClientOptionsProvider.java @@ -63,7 +63,7 @@ public Map createOptions() { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(DartClientCodegen.SUPPORT_DART2, "false") .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java index 3696cebeda9c..6b63cbee5f8a 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java @@ -68,7 +68,7 @@ public Map createOptions() { .put(DartDioClientCodegen.DATE_LIBRARY, DATE_LIBRARY) .put(DartDioClientCodegen.NULLABLE_FIELDS, NULLABLE_FIELDS) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ElixirClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ElixirClientOptionsProvider.java index a999090b4457..bd39161584fd 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ElixirClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ElixirClientOptionsProvider.java @@ -44,7 +44,7 @@ public Map createOptions() { .put(CodegenConstants.PACKAGE_NAME, "yay_pets") .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoGinServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoGinServerOptionsProvider.java index 08e610fa45dc..910f9441c18f 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoGinServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoGinServerOptionsProvider.java @@ -39,7 +39,7 @@ public Map createOptions() { .put(CodegenConstants.ENSURE_UNIQUE_PARAMS, ENSURE_UNIQUE_PARAMS_VALUE) .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoServerOptionsProvider.java index 2c0694262597..e445afd3fc2e 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoServerOptionsProvider.java @@ -40,7 +40,7 @@ public Map createOptions() { .put(CodegenConstants.ENSURE_UNIQUE_PARAMS, ENSURE_UNIQUE_PARAMS_VALUE) .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/HaskellServantOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/HaskellServantOptionsProvider.java index 861bf597b13d..728b44ef38fe 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/HaskellServantOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/HaskellServantOptionsProvider.java @@ -49,7 +49,7 @@ public Map createOptions() { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(HaskellServantCodegen.PROP_SERVE_STATIC, HaskellServantCodegen.PROP_SERVE_STATIC_DEFAULT.toString()) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpClientOptionsProvider.java index d57f9e183595..b2a987d924ea 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpClientOptionsProvider.java @@ -59,7 +59,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpLumenServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpLumenServerOptionsProvider.java index 741eaae68007..25d34b16d80a 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpLumenServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpLumenServerOptionsProvider.java @@ -58,7 +58,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSilexServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSilexServerOptionsProvider.java index 46d76b432063..b6c55c7a27b2 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSilexServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSilexServerOptionsProvider.java @@ -43,7 +43,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlim4ServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlim4ServerOptionsProvider.java index c6bcd39d93e0..3295ed951011 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlim4ServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlim4ServerOptionsProvider.java @@ -61,7 +61,7 @@ public Map createOptions() { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(PhpSlim4ServerCodegen.PSR7_IMPLEMENTATION, PSR7_IMPLEMENTATION_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java index 1787636b68d3..4a40588c0ebb 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java @@ -58,7 +58,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/RubyClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/RubyClientOptionsProvider.java index f697a9979b3e..9d5c63f9d2da 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/RubyClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/RubyClientOptionsProvider.java @@ -67,7 +67,7 @@ public Map createOptions() { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LIBRARY, LIBRARY) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaAkkaClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaAkkaClientOptionsProvider.java index 7aa11d3c6abd..62909fb5b3f2 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaAkkaClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaAkkaClientOptionsProvider.java @@ -56,7 +56,7 @@ public Map createOptions() { .put(CodegenConstants.MODEL_PROPERTY_NAMING, MODEL_PROPERTY_NAMING) .put("dateLibrary", DATE_LIBRARY) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaHttpClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaHttpClientOptionsProvider.java index a6dd4d31e5ea..ac3c7f713c55 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaHttpClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaHttpClientOptionsProvider.java @@ -53,7 +53,7 @@ public Map createOptions() { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put("dateLibrary", DATE_LIBRARY) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift4OptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift4OptionsProvider.java index 43f9f2ca2d0a..038c40121d62 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift4OptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift4OptionsProvider.java @@ -82,7 +82,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java index 7fc4c343ebc0..e432b326d1c1 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java @@ -83,7 +83,7 @@ public Map createOptions() { .put(CodegenConstants.API_NAME_PREFIX, "") .put(CodegenConstants.LIBRARY, LIBRARY_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java index 67cb7a16f190..7553e379e4f2 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java @@ -82,7 +82,7 @@ public Map createOptions() { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(TypeScriptAngularClientCodegen.FILE_NAMING, FILE_NAMING_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java index 1bba3c1d2eab..2c56e0c1268d 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java @@ -54,7 +54,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java index 5ac421260cfa..cae9790d8dad 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java @@ -60,7 +60,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java index 1907ebb3fdcb..1671fc5293c8 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java @@ -67,7 +67,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java index fd212b8da67c..0600f14838cc 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java @@ -64,7 +64,7 @@ public Map createOptions() { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") - .put(CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } From d9518f1e814db5f72d7d764f198d99ae8ea69ef5 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 19:09:08 -0700 Subject: [PATCH 067/105] Generate doc --- docs/generators/ada-server.md | 5 ++--- docs/generators/ada.md | 5 ++--- docs/generators/android.md | 5 ++--- docs/generators/apache2.md | 5 ++--- docs/generators/apex.md | 5 ++--- docs/generators/asciidoc.md | 5 ++--- docs/generators/avro-schema.md | 5 ++--- docs/generators/bash.md | 5 ++--- docs/generators/c.md | 5 ++--- docs/generators/clojure.md | 5 ++--- docs/generators/cpp-qt5-client.md | 5 ++--- docs/generators/cpp-qt5-qhttpengine-server.md | 5 ++--- docs/generators/cpp-tizen.md | 5 ++--- docs/generators/cwiki.md | 5 ++--- docs/generators/dart-dio.md | 5 ++--- docs/generators/dart-jaguar.md | 5 ++--- docs/generators/dart.md | 5 ++--- docs/generators/dynamic-html.md | 5 ++--- docs/generators/elixir.md | 5 ++--- docs/generators/fsharp-functions.md | 5 ++--- docs/generators/groovy.md | 5 ++--- docs/generators/haskell-http-client.md | 5 ++--- docs/generators/haskell.md | 5 ++--- docs/generators/html.md | 5 ++--- docs/generators/html2.md | 5 ++--- docs/generators/java-inflector.md | 5 ++--- docs/generators/java-msf4j.md | 5 ++--- docs/generators/java-pkmst.md | 5 ++--- docs/generators/java-play-framework.md | 5 ++--- docs/generators/java-undertow-server.md | 5 ++--- docs/generators/java-vertx-web.md | 5 ++--- docs/generators/java-vertx.md | 5 ++--- docs/generators/java.md | 5 ++--- docs/generators/javascript-apollo.md | 5 ++--- docs/generators/javascript-closure-angular.md | 5 ++--- docs/generators/javascript-flowtyped.md | 5 ++--- docs/generators/javascript.md | 5 ++--- docs/generators/jaxrs-cxf-cdi.md | 5 ++--- docs/generators/jaxrs-cxf-client.md | 5 ++--- docs/generators/jaxrs-cxf-extended.md | 5 ++--- docs/generators/jaxrs-cxf.md | 5 ++--- docs/generators/jaxrs-jersey.md | 5 ++--- docs/generators/jaxrs-resteasy-eap.md | 5 ++--- docs/generators/jaxrs-resteasy.md | 5 ++--- docs/generators/jaxrs-spec.md | 5 ++--- docs/generators/jmeter.md | 5 ++--- docs/generators/k6.md | 5 ++--- docs/generators/markdown.md | 5 ++--- docs/generators/nim.md | 5 ++--- docs/generators/nodejs-express-server.md | 5 ++--- docs/generators/nodejs-server-deprecated.md | 5 ++--- docs/generators/ocaml.md | 5 ++--- docs/generators/openapi-yaml.md | 5 ++--- docs/generators/openapi.md | 5 ++--- docs/generators/php-laravel.md | 5 ++--- docs/generators/php-lumen.md | 5 ++--- docs/generators/php-silex-deprecated.md | 5 ++--- docs/generators/php-slim-deprecated.md | 5 ++--- docs/generators/php-slim4.md | 5 ++--- docs/generators/php-symfony.md | 5 ++--- docs/generators/php-ze-ph.md | 5 ++--- docs/generators/php.md | 5 ++--- docs/generators/plantuml.md | 5 ++--- docs/generators/python-aiohttp.md | 5 ++--- docs/generators/python-blueplanet.md | 5 ++--- docs/generators/python-flask.md | 5 ++--- docs/generators/ruby.md | 5 ++--- docs/generators/scala-akka-http-server.md | 5 ++--- docs/generators/scala-akka.md | 5 ++--- docs/generators/scala-gatling.md | 5 ++--- docs/generators/scala-httpclient-deprecated.md | 5 ++--- docs/generators/scala-lagom-server.md | 5 ++--- docs/generators/scala-play-server.md | 5 ++--- docs/generators/scala-sttp.md | 5 ++--- docs/generators/scalatra.md | 5 ++--- docs/generators/scalaz.md | 5 ++--- docs/generators/spring.md | 5 ++--- docs/generators/swift4-deprecated.md | 5 ++--- docs/generators/swift5.md | 5 ++--- docs/generators/typescript-angular.md | 5 ++--- docs/generators/typescript-angularjs.md | 5 ++--- docs/generators/typescript-aurelia.md | 5 ++--- docs/generators/typescript-axios.md | 5 ++--- docs/generators/typescript-fetch.md | 5 ++--- docs/generators/typescript-inversify.md | 5 ++--- docs/generators/typescript-jquery.md | 5 ++--- docs/generators/typescript-node.md | 5 ++--- docs/generators/typescript-redux-query.md | 5 ++--- docs/generators/typescript-rxjs.md | 5 ++--- 89 files changed, 178 insertions(+), 267 deletions(-) diff --git a/docs/generators/ada-server.md b/docs/generators/ada-server.md index c6b9fb5f4bc2..66d41103a776 100644 --- a/docs/generators/ada-server.md +++ b/docs/generators/ada-server.md @@ -6,10 +6,9 @@ sidebar_label: ada-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |projectName|GNAT project name| |defaultProject| diff --git a/docs/generators/ada.md b/docs/generators/ada.md index bc016e48361d..971e3267b2fb 100644 --- a/docs/generators/ada.md +++ b/docs/generators/ada.md @@ -6,10 +6,9 @@ sidebar_label: ada | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |projectName|GNAT project name| |defaultProject| diff --git a/docs/generators/android.md b/docs/generators/android.md index e12c6b012172..1d5b7fb158f7 100644 --- a/docs/generators/android.md +++ b/docs/generators/android.md @@ -12,12 +12,11 @@ sidebar_label: android |apiPackage|package for generated api classes| |null| |artifactId|artifactId for use in the generated build.gradle and pom.xml| |null| |artifactVersion|artifact version for use in the generated build.gradle and pom.xml| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |groupId|groupId for use in the generated build.gradle and pom.xml| |null| |invokerPackage|root package for generated code| |null| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template) to use|
**volley**
HTTP client: Volley 1.0.19 (default)
**httpclient**
HTTP client: Apache HttpClient 4.3.6. JSON processing: Gson 2.3.1. IMPORTANT: Android client using HttpClient is not actively maintained and will be depecreated in the next major release.
|null| |modelPackage|package for generated models| |null| diff --git a/docs/generators/apache2.md b/docs/generators/apache2.md index 7a5585fb7aa6..3568754b3164 100644 --- a/docs/generators/apache2.md +++ b/docs/generators/apache2.md @@ -6,10 +6,9 @@ sidebar_label: apache2 | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/apex.md b/docs/generators/apex.md index ebcf3c22cfd7..45d0d2a51231 100644 --- a/docs/generators/apex.md +++ b/docs/generators/apex.md @@ -9,10 +9,9 @@ sidebar_label: apex |apiVersion|The Metadata API version number to use for components in this package.| |null| |buildMethod|The build method for this package.| |null| |classPrefix|Prefix for generated classes. Set this to avoid overwriting existing classes in your org.| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |namedCredential|The named credential name for the HTTP callouts| |null| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/asciidoc.md b/docs/generators/asciidoc.md index 814bc0d401f9..ac2d3cca0b67 100644 --- a/docs/generators/asciidoc.md +++ b/docs/generators/asciidoc.md @@ -10,15 +10,14 @@ sidebar_label: asciidoc |appName|short name of the application| |null| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |groupId|groupId in generated pom.xml| |null| |headerAttributes|generation of asciidoc header meta data attributes (set to false to suppress, default: true)| |true| |infoEmail|an email address to contact for inquiries about the application| |null| |infoUrl|a URL where users can get more information about the application| |null| |invokerPackage|root package for generated code| |null| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseInfo|a short description of the license| |null| |licenseUrl|a URL pointing to the full license| |null| diff --git a/docs/generators/avro-schema.md b/docs/generators/avro-schema.md index 0705b3a9940b..ba46bc6dc93f 100644 --- a/docs/generators/avro-schema.md +++ b/docs/generators/avro-schema.md @@ -6,10 +6,9 @@ sidebar_label: avro-schema | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |packageName|package for generated classes (where supported)| |null| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/bash.md b/docs/generators/bash.md index b8c03a992d37..ef7a409c2a7a 100644 --- a/docs/generators/bash.md +++ b/docs/generators/bash.md @@ -9,13 +9,12 @@ sidebar_label: bash |apiKeyAuthEnvironmentVariable|Name of environment variable where API key can be defined (e.g. PETSTORE_APIKEY='kjhasdGASDa5asdASD')| |false| |basicAuthEnvironmentVariable|Name of environment variable where username and password can be defined (e.g. PETSTORE_CREDS='username:password')| |null| |curlOptions|Default cURL options| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |generateBashCompletion|Whether to generate the Bash completion script| |false| |generateZshCompletion|Whether to generate the Zsh completion script| |false| |hostEnvironmentVariable|Name of environment variable where host can be defined (e.g. PETSTORE_HOST='http://api.openapitools.org:8080')| |null| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |processMarkdown|Convert all Markdown Markup into terminal formatting| |false| diff --git a/docs/generators/c.md b/docs/generators/c.md index 0f6d97ec2046..8d467ca2fd0b 100644 --- a/docs/generators/c.md +++ b/docs/generators/c.md @@ -6,11 +6,10 @@ sidebar_label: c | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/clojure.md b/docs/generators/clojure.md index b6d76ced8726..2c5039e4587e 100644 --- a/docs/generators/clojure.md +++ b/docs/generators/clojure.md @@ -7,10 +7,9 @@ sidebar_label: clojure | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |baseNamespace|the base/top namespace (Default: generated from projectName)| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |projectDescription|description of the project (Default: using info.description or "Client library of <projectName>")| |null| diff --git a/docs/generators/cpp-qt5-client.md b/docs/generators/cpp-qt5-client.md index dd69dc5103fc..bfda02a1d166 100644 --- a/docs/generators/cpp-qt5-client.md +++ b/docs/generators/cpp-qt5-client.md @@ -8,10 +8,9 @@ sidebar_label: cpp-qt5-client |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |contentCompression|Enable Compressed Content Encoding for requests and responses| |false| |cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelNamePrefix|Prefix that will be prepended to all model names.| |OAI| |optionalProjectFile|Generate client.pri.| |true| diff --git a/docs/generators/cpp-qt5-qhttpengine-server.md b/docs/generators/cpp-qt5-qhttpengine-server.md index 3ea9cbee65e4..bbb1852e2312 100644 --- a/docs/generators/cpp-qt5-qhttpengine-server.md +++ b/docs/generators/cpp-qt5-qhttpengine-server.md @@ -8,10 +8,9 @@ sidebar_label: cpp-qt5-qhttpengine-server |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |contentCompression|Enable Compressed Content Encoding for requests and responses| |false| |cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelNamePrefix|Prefix that will be prepended to all model names.| |OAI| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/cpp-tizen.md b/docs/generators/cpp-tizen.md index 556952ea68e6..5bc03d3fbab1 100644 --- a/docs/generators/cpp-tizen.md +++ b/docs/generators/cpp-tizen.md @@ -6,10 +6,9 @@ sidebar_label: cpp-tizen | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |reservedWordPrefix|Prefix to prepend to reserved words in order to avoid conflicts| |r_| diff --git a/docs/generators/cwiki.md b/docs/generators/cwiki.md index bff265cbbcc0..c0bb03f3930a 100644 --- a/docs/generators/cwiki.md +++ b/docs/generators/cwiki.md @@ -10,14 +10,13 @@ sidebar_label: cwiki |appName|short name of the application| |null| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |groupId|groupId in generated pom.xml| |null| |infoEmail|an email address to contact for inquiries about the application| |null| |infoUrl|a URL where users can get more information about the application| |null| |invokerPackage|root package for generated code| |null| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseInfo|a short description of the license| |null| |licenseUrl|a URL pointing to the full license| |null| diff --git a/docs/generators/dart-dio.md b/docs/generators/dart-dio.md index 11ae81bd03ca..e1c1e26c7f16 100644 --- a/docs/generators/dart-dio.md +++ b/docs/generators/dart-dio.md @@ -8,10 +8,9 @@ sidebar_label: dart-dio |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |browserClient|Is the client browser based (for Dart 1.x only)| |null| |dateLibrary|Option. Date library to use|
**core**
Dart core library (DateTime)
**timemachine**
Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.
|core| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |nullableFields|Is the null fields should be in the JSON payload| |null| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/dart-jaguar.md b/docs/generators/dart-jaguar.md index ba951a1a77d9..5659caf86688 100644 --- a/docs/generators/dart-jaguar.md +++ b/docs/generators/dart-jaguar.md @@ -7,10 +7,9 @@ sidebar_label: dart-jaguar | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |browserClient|Is the client browser based (for Dart 1.x only)| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |nullableFields|Is the null fields should be in the JSON payload| |null| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/dart.md b/docs/generators/dart.md index 36ce04b65c30..c4ee6f36b2e9 100644 --- a/docs/generators/dart.md +++ b/docs/generators/dart.md @@ -7,10 +7,9 @@ sidebar_label: dart | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |browserClient|Is the client browser based (for Dart 1.x only)| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |pubAuthor|Author name in generated pubspec| |null| diff --git a/docs/generators/dynamic-html.md b/docs/generators/dynamic-html.md index 904d67186835..50ad9583c320 100644 --- a/docs/generators/dynamic-html.md +++ b/docs/generators/dynamic-html.md @@ -8,12 +8,11 @@ sidebar_label: dynamic-html |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |groupId|groupId in generated pom.xml| |null| |invokerPackage|root package for generated code| |null| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/elixir.md b/docs/generators/elixir.md index 627d9debcf85..de82283e850a 100644 --- a/docs/generators/elixir.md +++ b/docs/generators/elixir.md @@ -6,11 +6,10 @@ sidebar_label: elixir | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay.Pets| |null| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseHeader|The license header to prepend to the top of all source files.| |null| |packageName|Elixir package name (convention: lowercase).| |null| diff --git a/docs/generators/fsharp-functions.md b/docs/generators/fsharp-functions.md index 314ffaa55414..ec2f54a8cd72 100644 --- a/docs/generators/fsharp-functions.md +++ b/docs/generators/fsharp-functions.md @@ -6,10 +6,9 @@ sidebar_label: fsharp-functions | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |NoLicense| |licenseUrl|The URL of the license| |http://localhost| diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index c6f3b79860fc..57a8c43179fa 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -18,6 +18,8 @@ sidebar_label: groovy |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| @@ -25,9 +27,6 @@ sidebar_label: groovy |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/haskell-http-client.md b/docs/generators/haskell-http-client.md index c023a6823d81..883ffd35f0e5 100644 --- a/docs/generators/haskell-http-client.md +++ b/docs/generators/haskell-http-client.md @@ -17,6 +17,8 @@ sidebar_label: haskell-http-client |dateFormat|format string used to parse/render a date| |%Y-%m-%d| |dateTimeFormat|format string used to parse/render a datetime| |null| |dateTimeParseFormat|overrides the format string used to parse a datetime| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |generateEnums|Generate specific datatypes for OpenAPI enums| |true| |generateFormUrlEncodedInstances|Generate FromForm/ToForm instances for models that are used by operations that produce or consume application/x-www-form-urlencoded| |true| @@ -24,9 +26,6 @@ sidebar_label: haskell-http-client |generateModelConstructors|Generate smart constructors (only supply required fields) for models| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |inlineMimeTypes|Inline (hardcode) the content-type and accept parameters on operations, when there is only 1 option| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelDeriving|Additional classes to include in the deriving() clause of Models| |null| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/haskell.md b/docs/generators/haskell.md index 1c0046c2c6ab..bea5cef5a623 100644 --- a/docs/generators/haskell.md +++ b/docs/generators/haskell.md @@ -7,10 +7,9 @@ sidebar_label: haskell | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/html.md b/docs/generators/html.md index ea8e8ae0dcb3..7d03a4b1591a 100644 --- a/docs/generators/html.md +++ b/docs/generators/html.md @@ -10,14 +10,13 @@ sidebar_label: html |appName|short name of the application| |null| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |groupId|groupId in generated pom.xml| |null| |infoEmail|an email address to contact for inquiries about the application| |null| |infoUrl|a URL where users can get more information about the application| |null| |invokerPackage|root package for generated code| |null| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseInfo|a short description of the license| |null| |licenseUrl|a URL pointing to the full license| |null| diff --git a/docs/generators/html2.md b/docs/generators/html2.md index 08f3d27526ae..1b3b2d572a94 100644 --- a/docs/generators/html2.md +++ b/docs/generators/html2.md @@ -10,14 +10,13 @@ sidebar_label: html2 |appName|short name of the application| |null| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |groupId|groupId in generated pom.xml| |null| |infoEmail|an email address to contact for inquiries about the application| |null| |infoUrl|a URL where users can get more information about the application| |null| |invokerPackage|root package for generated code| |null| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseInfo|a short description of the license| |null| |licenseUrl|a URL pointing to the full license| |null| diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index 3531aa17cde1..3a2e7c2f0919 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -20,6 +20,8 @@ sidebar_label: java-inflector |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| @@ -27,9 +29,6 @@ sidebar_label: java-inflector |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |invokerPackage|root package for generated code| |org.openapitools.controllers| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index 4eae70a3f838..04497d2f1b78 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -20,6 +20,8 @@ sidebar_label: java-msf4j |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| @@ -28,9 +30,6 @@ sidebar_label: java-msf4j |implFolder|folder for generated implementation code| |src/main/java| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template)|
**jersey1**
Jersey core 1.x
**jersey2**
Jersey core 2.x
|jersey2| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index aafda3a1ff99..d0fb575d325e 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -21,6 +21,8 @@ sidebar_label: java-pkmst |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |eurekaUri|Eureka URI| |null| @@ -29,9 +31,6 @@ sidebar_label: java-pkmst |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |invokerPackage|root package for generated code| |com.prokarma.pkmst.controller| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index 9717875c6f45..4a232777b653 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -23,6 +23,8 @@ sidebar_label: java-play-framework |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| @@ -31,9 +33,6 @@ sidebar_label: java-play-framework |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index 8ef69f09438d..1a28cc05e32b 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -20,6 +20,8 @@ sidebar_label: java-undertow-server |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| @@ -27,9 +29,6 @@ sidebar_label: java-undertow-server |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |invokerPackage|root package for generated code| |org.openapitools.handler| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md index 7f191c70225a..3dcf9bbe923e 100644 --- a/docs/generators/java-vertx-web.md +++ b/docs/generators/java-vertx-web.md @@ -20,6 +20,8 @@ sidebar_label: java-vertx-web |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| @@ -27,9 +29,6 @@ sidebar_label: java-vertx-web |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |invokerPackage|root package for generated code| |org.openapitools.vertxweb.server| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index 503ad3402369..3407e13eb9cf 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -20,6 +20,8 @@ sidebar_label: java-vertx |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| @@ -27,9 +29,6 @@ sidebar_label: java-vertx |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |invokerPackage|root package for generated code| |org.openapitools| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/java.md b/docs/generators/java.md index d62d14394daa..3ed4738d851c 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -22,6 +22,8 @@ sidebar_label: java |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |feignVersion|Version of OpenFeign: '10.x' (default), '9.x' (deprecated)| |false| @@ -30,9 +32,6 @@ sidebar_label: java |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |invokerPackage|root package for generated code| |org.openapitools.client| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template) to use|
**jersey1**
HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead.
**jersey2**
HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x
**feign**
HTTP client: OpenFeign 9.x (deprecated) or 10.x (default). JSON processing: Jackson 2.9.x.
**okhttp-gson**
[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
**retrofit**
HTTP client: OkHttp 2.x. JSON processing: Gson 2.x (Retrofit 1.9.0). IMPORTANT NOTE: retrofit1.x is no longer actively maintained so please upgrade to 'retrofit2' instead.
**retrofit2**
HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)
**resttemplate**
HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x
**webclient**
HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
**resteasy**
HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x
**vertx**
HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x
**google-api-client**
HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x
**rest-assured**
HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8
**native**
HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+
**microprofile**
HTTP client: Microprofile client X.x. JSON processing: Jackson 2.9.x
|okhttp-gson| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/javascript-apollo.md b/docs/generators/javascript-apollo.md index 86074ce7da8b..83a11b96146b 100644 --- a/docs/generators/javascript-apollo.md +++ b/docs/generators/javascript-apollo.md @@ -7,13 +7,12 @@ sidebar_label: javascript-apollo | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |emitJSDoc|generate JSDoc comments| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |invokerPackage|root package for generated code| |null| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|name of the license the project uses (Default: using info.license.name)| |null| |modelPackage|package for generated models| |null| diff --git a/docs/generators/javascript-closure-angular.md b/docs/generators/javascript-closure-angular.md index b4c622a62ca4..10eae6c46539 100644 --- a/docs/generators/javascript-closure-angular.md +++ b/docs/generators/javascript-closure-angular.md @@ -6,11 +6,10 @@ sidebar_label: javascript-closure-angular | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/javascript-flowtyped.md b/docs/generators/javascript-flowtyped.md index 993f6188b69a..50392d647cbf 100644 --- a/docs/generators/javascript-flowtyped.md +++ b/docs/generators/javascript-flowtyped.md @@ -6,12 +6,11 @@ sidebar_label: javascript-flowtyped | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/javascript.md b/docs/generators/javascript.md index 07ea5e6abab1..302446484cbe 100644 --- a/docs/generators/javascript.md +++ b/docs/generators/javascript.md @@ -7,14 +7,13 @@ sidebar_label: javascript | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |emitJSDoc|generate JSDoc comments| |true| |emitModelMethods|generate getters and setters for model properties| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |invokerPackage|root package for generated code| |null| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|name of the license the project uses (Default: using info.license.name)| |null| |modelPackage|package for generated models| |null| diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index 772302214821..a57f84684b78 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -20,6 +20,8 @@ sidebar_label: jaxrs-cxf-cdi |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| @@ -31,9 +33,6 @@ sidebar_label: jaxrs-cxf-cdi |interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template)|
**<default>**
JAXRS spec only, to be deployed in an app server (TomEE, JBoss, WLS, ...)
**quarkus**
Server using Quarkus
**thorntail**
Server using Thorntail
**openliberty**
Server using Open Liberty
**helidon**
Server using Helidon
|<default>| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index fc9e828b4c1f..02ab5b75e3f6 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -20,6 +20,8 @@ sidebar_label: jaxrs-cxf-client |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| @@ -27,9 +29,6 @@ sidebar_label: jaxrs-cxf-client |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index 5297b836979b..9308414c7f07 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -21,6 +21,8 @@ sidebar_label: jaxrs-cxf-extended |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| @@ -34,9 +36,6 @@ sidebar_label: jaxrs-cxf-extended |implFolder|folder for generated implementation code| |src/main/java| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index bab820493652..2c09af412cf4 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -21,6 +21,8 @@ sidebar_label: jaxrs-cxf |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| @@ -33,9 +35,6 @@ sidebar_label: jaxrs-cxf |implFolder|folder for generated implementation code| |src/main/java| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index 3886f2c5005a..196fdce0b36c 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -20,6 +20,8 @@ sidebar_label: jaxrs-jersey |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| @@ -28,9 +30,6 @@ sidebar_label: jaxrs-jersey |implFolder|folder for generated implementation code| |src/main/java| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template)|
**jersey1**
Jersey core 1.x
**jersey2**
Jersey core 2.x
|jersey2| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index acb98c4d496f..121af777cbbb 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -20,6 +20,8 @@ sidebar_label: jaxrs-resteasy-eap |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| @@ -29,9 +31,6 @@ sidebar_label: jaxrs-resteasy-eap |implFolder|folder for generated implementation code| |src/main/java| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index 4fab9c31c06c..c13dfd783cae 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -20,6 +20,8 @@ sidebar_label: jaxrs-resteasy |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| @@ -29,9 +31,6 @@ sidebar_label: jaxrs-resteasy |implFolder|folder for generated implementation code| |src/main/java| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index 37fad5b3419e..661807272d68 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -20,6 +20,8 @@ sidebar_label: jaxrs-spec |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| @@ -31,9 +33,6 @@ sidebar_label: jaxrs-spec |interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template)|
**<default>**
JAXRS spec only, to be deployed in an app server (TomEE, JBoss, WLS, ...)
**quarkus**
Server using Quarkus
**thorntail**
Server using Thorntail
**openliberty**
Server using Open Liberty
**helidon**
Server using Helidon
|<default>| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/jmeter.md b/docs/generators/jmeter.md index 4f9bbde97d03..7436946c5303 100644 --- a/docs/generators/jmeter.md +++ b/docs/generators/jmeter.md @@ -6,10 +6,9 @@ sidebar_label: jmeter | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/k6.md b/docs/generators/k6.md index f95db7ddcd1e..eb69751e2c87 100644 --- a/docs/generators/k6.md +++ b/docs/generators/k6.md @@ -6,10 +6,9 @@ sidebar_label: k6 | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/markdown.md b/docs/generators/markdown.md index 6a2ea8092129..31cf13cdaf5f 100644 --- a/docs/generators/markdown.md +++ b/docs/generators/markdown.md @@ -6,10 +6,9 @@ sidebar_label: markdown | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/nim.md b/docs/generators/nim.md index ce12410444c8..0a0c52718731 100644 --- a/docs/generators/nim.md +++ b/docs/generators/nim.md @@ -6,10 +6,9 @@ sidebar_label: nim | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/nodejs-express-server.md b/docs/generators/nodejs-express-server.md index c7fcd09b4e08..59f061460065 100644 --- a/docs/generators/nodejs-express-server.md +++ b/docs/generators/nodejs-express-server.md @@ -6,10 +6,9 @@ sidebar_label: nodejs-express-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |serverPort|TCP port to listen on.| |null| diff --git a/docs/generators/nodejs-server-deprecated.md b/docs/generators/nodejs-server-deprecated.md index 22fea94fb8f4..98cb15a765b2 100644 --- a/docs/generators/nodejs-server-deprecated.md +++ b/docs/generators/nodejs-server-deprecated.md @@ -6,12 +6,11 @@ sidebar_label: nodejs-server-deprecated | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |exportedName|When the generated code will be deployed to Google Cloud Functions, this option can be used to update the name of the exported function. By default, it refers to the basePath. This does not affect normal standalone nodejs server code.| |null| |googleCloudFunctions|When specified, it will generate the code which runs within Google Cloud Functions instead of standalone Node.JS server. See https://cloud.google.com/functions/docs/quickstart for the details of how to deploy the generated code.| |false| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |serverPort|TCP port to listen on.| |null| diff --git a/docs/generators/ocaml.md b/docs/generators/ocaml.md index c6a462b0234e..d78989c95316 100644 --- a/docs/generators/ocaml.md +++ b/docs/generators/ocaml.md @@ -6,10 +6,9 @@ sidebar_label: ocaml | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/openapi-yaml.md b/docs/generators/openapi-yaml.md index ffed6c525f53..315146f1e4ce 100644 --- a/docs/generators/openapi-yaml.md +++ b/docs/generators/openapi-yaml.md @@ -6,10 +6,9 @@ sidebar_label: openapi-yaml | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |outputFile|Output filename| |openapi/openapi.yaml| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/openapi.md b/docs/generators/openapi.md index b832185c0d42..961e1cc5c212 100644 --- a/docs/generators/openapi.md +++ b/docs/generators/openapi.md @@ -6,10 +6,9 @@ sidebar_label: openapi | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/php-laravel.md b/docs/generators/php-laravel.md index a88e08abec2f..ff0f84ca971b 100644 --- a/docs/generators/php-laravel.md +++ b/docs/generators/php-laravel.md @@ -8,11 +8,10 @@ sidebar_label: php-laravel |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |packageName|The main package name for classes. e.g. GeneratedPetstore| |null| diff --git a/docs/generators/php-lumen.md b/docs/generators/php-lumen.md index 89b4d57f79ae..cb6ba9ab1d7f 100644 --- a/docs/generators/php-lumen.md +++ b/docs/generators/php-lumen.md @@ -8,11 +8,10 @@ sidebar_label: php-lumen |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |packageName|The main package name for classes. e.g. GeneratedPetstore| |null| diff --git a/docs/generators/php-silex-deprecated.md b/docs/generators/php-silex-deprecated.md index b1550056cfef..459e51116870 100644 --- a/docs/generators/php-silex-deprecated.md +++ b/docs/generators/php-silex-deprecated.md @@ -6,10 +6,9 @@ sidebar_label: php-silex-deprecated | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/php-slim-deprecated.md b/docs/generators/php-slim-deprecated.md index fa494ab05a19..834d7d17e87d 100644 --- a/docs/generators/php-slim-deprecated.md +++ b/docs/generators/php-slim-deprecated.md @@ -8,11 +8,10 @@ sidebar_label: php-slim-deprecated |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |packageName|The main package name for classes. e.g. GeneratedPetstore| |null| diff --git a/docs/generators/php-slim4.md b/docs/generators/php-slim4.md index 03c119d6383c..4bb03dc60e23 100644 --- a/docs/generators/php-slim4.md +++ b/docs/generators/php-slim4.md @@ -8,11 +8,10 @@ sidebar_label: php-slim4 |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |packageName|The main package name for classes. e.g. GeneratedPetstore| |null| diff --git a/docs/generators/php-symfony.md b/docs/generators/php-symfony.md index 606ae0319e87..dd0faa802561 100644 --- a/docs/generators/php-symfony.md +++ b/docs/generators/php-symfony.md @@ -12,12 +12,11 @@ sidebar_label: php-symfony |bundleName|The name of the Symfony bundle. The template uses {{bundleName}}| |null| |composerProjectName|The project name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. petstore-client| |null| |composerVendorName|The vendor name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. yaypets| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |packageName|The main package name for classes. e.g. GeneratedPetstore| |null| diff --git a/docs/generators/php-ze-ph.md b/docs/generators/php-ze-ph.md index 24643714ec6d..2bd1e7f43df6 100644 --- a/docs/generators/php-ze-ph.md +++ b/docs/generators/php-ze-ph.md @@ -8,11 +8,10 @@ sidebar_label: php-ze-ph |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |packageName|The main package name for classes. e.g. GeneratedPetstore| |null| diff --git a/docs/generators/php.md b/docs/generators/php.md index f65f48fc83cf..6d84ee3fbf48 100644 --- a/docs/generators/php.md +++ b/docs/generators/php.md @@ -8,12 +8,11 @@ sidebar_label: php |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |packageName|The main package name for classes. e.g. GeneratedPetstore| |null| diff --git a/docs/generators/plantuml.md b/docs/generators/plantuml.md index 125b735465c7..00d8357ec4a6 100644 --- a/docs/generators/plantuml.md +++ b/docs/generators/plantuml.md @@ -6,10 +6,9 @@ sidebar_label: plantuml | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| diff --git a/docs/generators/python-aiohttp.md b/docs/generators/python-aiohttp.md index 466973fce5ed..a2eb340a0050 100644 --- a/docs/generators/python-aiohttp.md +++ b/docs/generators/python-aiohttp.md @@ -8,10 +8,9 @@ sidebar_label: python-aiohttp |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |controllerPackage|controller package| |controllers| |defaultController|default controller| |default_controller| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |packageName|python package name (convention: snake_case).| |openapi_server| |packageVersion|python package version.| |1.0.0| diff --git a/docs/generators/python-blueplanet.md b/docs/generators/python-blueplanet.md index c7453a01d758..fee549d0a322 100644 --- a/docs/generators/python-blueplanet.md +++ b/docs/generators/python-blueplanet.md @@ -8,10 +8,9 @@ sidebar_label: python-blueplanet |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |controllerPackage|controller package| |controllers| |defaultController|default controller| |default_controller| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |packageName|python package name (convention: snake_case).| |openapi_server| |packageVersion|python package version.| |1.0.0| diff --git a/docs/generators/python-flask.md b/docs/generators/python-flask.md index 7176801fd518..2d8bcf08ed45 100644 --- a/docs/generators/python-flask.md +++ b/docs/generators/python-flask.md @@ -8,10 +8,9 @@ sidebar_label: python-flask |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |controllerPackage|controller package| |controllers| |defaultController|default controller| |default_controller| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |packageName|python package name (convention: snake_case).| |openapi_server| |packageVersion|python package version.| |1.0.0| diff --git a/docs/generators/ruby.md b/docs/generators/ruby.md index 3c6947590aa2..a4808ee1af3d 100644 --- a/docs/generators/ruby.md +++ b/docs/generators/ruby.md @@ -6,6 +6,8 @@ sidebar_label: ruby | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |gemAuthor|gem author (only one is supported).| |null| |gemAuthorEmail|gem author email (only one is supported).| |null| @@ -17,9 +19,6 @@ sidebar_label: ruby |gemSummary|gem summary. | |A ruby wrapper for the REST APIs| |gemVersion|gem version.| |1.0.0| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|HTTP library template (sub-template) to use|
**faraday**
Faraday (https://github.com/lostisland/faraday) (Beta support)
**typhoeus**
Typhoeus >= 1.0.1 (https://github.com/typhoeus/typhoeus)
|typhoeus| |moduleName|top module name (convention: CamelCase, usually corresponding to gem name).| |OpenAPIClient| diff --git a/docs/generators/scala-akka-http-server.md b/docs/generators/scala-akka-http-server.md index 52927c770d89..96e31f09055d 100644 --- a/docs/generators/scala-akka-http-server.md +++ b/docs/generators/scala-akka-http-server.md @@ -11,12 +11,11 @@ sidebar_label: scala-akka-http-server |artifactId|artifactId| |openapi-scala-akka-http-server| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |groupId|groupId in generated pom.xml| |org.openapitools| |invokerPackage|root package for generated code| |org.openapitools.server| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| diff --git a/docs/generators/scala-akka.md b/docs/generators/scala-akka.md index 4602c0c26d49..2bad9c82b6ae 100644 --- a/docs/generators/scala-akka.md +++ b/docs/generators/scala-akka.md @@ -8,10 +8,9 @@ sidebar_label: scala-akka |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |mainPackage|Top-level package name, which defines 'apiPackage', 'modelPackage', 'invokerPackage'| |org.openapitools.client| |modelPackage|package for generated models| |null| diff --git a/docs/generators/scala-gatling.md b/docs/generators/scala-gatling.md index c560ed6ea23e..b59c37ee1221 100644 --- a/docs/generators/scala-gatling.md +++ b/docs/generators/scala-gatling.md @@ -8,10 +8,9 @@ sidebar_label: scala-gatling |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| diff --git a/docs/generators/scala-httpclient-deprecated.md b/docs/generators/scala-httpclient-deprecated.md index 4e240dae2c6f..e0d631f86453 100644 --- a/docs/generators/scala-httpclient-deprecated.md +++ b/docs/generators/scala-httpclient-deprecated.md @@ -8,10 +8,9 @@ sidebar_label: scala-httpclient-deprecated |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| diff --git a/docs/generators/scala-lagom-server.md b/docs/generators/scala-lagom-server.md index 35cef23ee310..2ed7519b6651 100644 --- a/docs/generators/scala-lagom-server.md +++ b/docs/generators/scala-lagom-server.md @@ -8,10 +8,9 @@ sidebar_label: scala-lagom-server |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| diff --git a/docs/generators/scala-play-server.md b/docs/generators/scala-play-server.md index 3977d6e99e66..d46eb3a9fbea 100644 --- a/docs/generators/scala-play-server.md +++ b/docs/generators/scala-play-server.md @@ -8,11 +8,10 @@ sidebar_label: scala-play-server |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |basePackage|Base package in which supporting classes are generated.| |org.openapitools| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |generateCustomExceptions|If set, generates custom exception types.| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| diff --git a/docs/generators/scala-sttp.md b/docs/generators/scala-sttp.md index 5a1ad7eef67b..05cbbe99deae 100644 --- a/docs/generators/scala-sttp.md +++ b/docs/generators/scala-sttp.md @@ -8,10 +8,9 @@ sidebar_label: scala-sttp |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |mainPackage|Top-level package name, which defines 'apiPackage', 'modelPackage', 'invokerPackage'| |org.openapitools.client| |modelPackage|package for generated models| |null| diff --git a/docs/generators/scalatra.md b/docs/generators/scalatra.md index ab5e0a793f34..f9edf8f38759 100644 --- a/docs/generators/scalatra.md +++ b/docs/generators/scalatra.md @@ -8,10 +8,9 @@ sidebar_label: scalatra |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| diff --git a/docs/generators/scalaz.md b/docs/generators/scalaz.md index f219aedadf20..1d62a3e5ff01 100644 --- a/docs/generators/scalaz.md +++ b/docs/generators/scalaz.md @@ -8,10 +8,9 @@ sidebar_label: scalaz |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| diff --git a/docs/generators/spring.md b/docs/generators/spring.md index 5594f656fad6..e73e96717c21 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -25,6 +25,8 @@ sidebar_label: spring |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| @@ -35,9 +37,6 @@ sidebar_label: spring |interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| |invokerPackage|root package for generated code| |org.openapitools.api| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64. Use java8 default interface when a responseWrapper is used
**false**
Various third party libraries as needed
|true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template)|
**spring-boot**
Spring-boot Server application using the SpringFox integration.
**spring-mvc**
Spring-MVC Server application using the SpringFox integration.
**spring-cloud**
Spring-Cloud-Feign client with Spring-Boot auto-configured settings.
|spring-boot| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/swift4-deprecated.md b/docs/generators/swift4-deprecated.md index e8ee511c67ed..2ad3deb81c77 100644 --- a/docs/generators/swift4-deprecated.md +++ b/docs/generators/swift4-deprecated.md @@ -6,11 +6,10 @@ sidebar_label: swift4-deprecated | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| |nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.(default: false)| |null| diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md index b319585d34e9..53e8733dec25 100644 --- a/docs/generators/swift5.md +++ b/docs/generators/swift5.md @@ -7,11 +7,10 @@ sidebar_label: swift5 | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiNamePrefix|Prefix that will be appended to all API names ('tags'). Default: empty string. e.g. Pet => Pet.| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| |library|Library template (sub-template) to use|
**urlsession**
[DEFAULT] HTTP client: URLSession
**alamofire**
HTTP client: Alamofire
|urlsession| diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index 4555b7eaa283..d963b13cba99 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -7,13 +7,12 @@ sidebar_label: typescript-angular | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiModulePrefix|The prefix of the generated ApiModule.| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |fileNaming|Naming convention for the output files: 'camelCase', 'kebab-case'.| |camelCase| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelFileSuffix|The suffix of the file of the generated model (model<suffix>.ts).| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original| diff --git a/docs/generators/typescript-angularjs.md b/docs/generators/typescript-angularjs.md index 884f71bc529c..bd9f87fdb25d 100644 --- a/docs/generators/typescript-angularjs.md +++ b/docs/generators/typescript-angularjs.md @@ -6,12 +6,11 @@ sidebar_label: typescript-angularjs | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original| |nullSafeAdditionalProps|Set to make additional properties types declare that their indexer may return undefined| |false| diff --git a/docs/generators/typescript-aurelia.md b/docs/generators/typescript-aurelia.md index 472ea75eee8a..3e39180156b7 100644 --- a/docs/generators/typescript-aurelia.md +++ b/docs/generators/typescript-aurelia.md @@ -6,12 +6,11 @@ sidebar_label: typescript-aurelia | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index 4ab127067ebb..b2ab58b6adcb 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -6,12 +6,11 @@ sidebar_label: typescript-axios | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md index 8d887cdb72a6..037b7d01ca69 100644 --- a/docs/generators/typescript-fetch.md +++ b/docs/generators/typescript-fetch.md @@ -6,12 +6,11 @@ sidebar_label: typescript-fetch | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/typescript-inversify.md b/docs/generators/typescript-inversify.md index cfc543d905ec..3788b8a67d55 100644 --- a/docs/generators/typescript-inversify.md +++ b/docs/generators/typescript-inversify.md @@ -6,12 +6,11 @@ sidebar_label: typescript-inversify | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/typescript-jquery.md b/docs/generators/typescript-jquery.md index 709789df599c..16460679ccd8 100644 --- a/docs/generators/typescript-jquery.md +++ b/docs/generators/typescript-jquery.md @@ -6,13 +6,12 @@ sidebar_label: typescript-jquery | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |jqueryAlreadyImported|When using this in legacy app using mix of typescript and javascript, this will only declare jquery and not import it| |false| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/typescript-node.md b/docs/generators/typescript-node.md index 2a1e72c3856f..af0f5286f1b5 100644 --- a/docs/generators/typescript-node.md +++ b/docs/generators/typescript-node.md @@ -6,12 +6,11 @@ sidebar_label: typescript-node | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/typescript-redux-query.md b/docs/generators/typescript-redux-query.md index e8bd1a3a6483..8f35944f8b75 100644 --- a/docs/generators/typescript-redux-query.md +++ b/docs/generators/typescript-redux-query.md @@ -6,12 +6,11 @@ sidebar_label: typescript-redux-query | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| diff --git a/docs/generators/typescript-rxjs.md b/docs/generators/typescript-rxjs.md index a5e1c349aafc..41d58058a862 100644 --- a/docs/generators/typescript-rxjs.md +++ b/docs/generators/typescript-rxjs.md @@ -6,12 +6,11 @@ sidebar_label: typescript-rxjs | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| -|legacyAdditionalPropertiesBehavior|If false, the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. This is the default value. -If true, codegen uses a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed. -This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Use a legacy, non-compliant interpretation of the 'additionalProperties' keyword. When the 'additionalProperties' keyword is not present in a schema, it is interpreted as if additionalProperties had been set to false, i.e. no additional properties are allowed.
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| From 79e5ecf7edb7fa4eaf430577e5ef906e4a06c8b9 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 19:16:55 -0700 Subject: [PATCH 068/105] Add TODO statement --- .../org/openapitools/codegen/config/CodegenConfigurator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java index 3456b2fc41e0..38c1b56107b7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java @@ -463,7 +463,7 @@ public Context toContext() { // TODO: Move custom validations to a separate type as part of a "Workflow" Set validationMessages = new HashSet<>(result.getMessages()); OpenAPI specification = result.getOpenAPI(); - // The line below could be removed when at least one of the issue below has been resolved. + // TODO: The line below could be removed when at least one of the issue below has been resolved. // https://github.com/swagger-api/swagger-parser/issues/1369 // https://github.com/swagger-api/swagger-parser/pull/1374 ModelUtils.addOpenApiVersionExtension(specification, inputSpec, authorizationValues); From 34740a1553e0dd3f9d10a0764641dff87bd0916c Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 19:30:37 -0700 Subject: [PATCH 069/105] add code comments --- .../languages/PythonClientExperimentalCodegen.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java index d7850b609962..470849ce5710 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java @@ -50,12 +50,20 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { private static final Logger LOGGER = LoggerFactory.getLogger(PythonClientExperimentalCodegen.class); + // A private vendor extension to track the list of imports that are needed when + // schemas are referenced under the 'additionalProperties' keyword. private static final String referencedModelNamesExtension = "x-python-referenced-model-names"; public PythonClientExperimentalCodegen() { super(); + // Composed schemas can have the 'additionalProperties' keyword, as specified in JSON schema. + // In principle, this should be enabled by default for all code generators. However due to limitations + // in other code generators, support needs to be enabled on a case-by-case basis. supportsAdditionalPropertiesWithComposedSchema = true; + + // When the 'additionalProperties' keyword is not present in a OAS schema, allow + // undeclared properties. This is compliant with the JSON schema specification. this.setDisallowAdditionalPropertiesIfNotPresent(false); modifyFeatureSet(features -> features @@ -378,7 +386,8 @@ public Map postProcessAllModels(Map objs) { for (Map mo : models) { CodegenModel cm = (CodegenModel) mo.get("model"); - // Make sure the models listed in 'additionalPropertiesType' are included in imports. + // Models that are referenced in the 'additionalPropertiesType' keyword + // must be added to the imports. List refModelNames = (List) cm.vendorExtensions.get(referencedModelNamesExtension); if (refModelNames != null) { for (String refModelName : refModelNames) { From 598b0e489c516bd775a2585a9dc89a2ce0137ebc Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 20:21:22 -0700 Subject: [PATCH 070/105] run samples scripts --- .../petstore/go-experimental/go-petstore/api/openapi.yaml | 2 +- .../petstore/go/go-petstore-withXml/api/openapi.yaml | 2 +- samples/client/petstore/go/go-petstore/api/openapi.yaml | 8 +------- .../go/go-petstore/docs/AdditionalPropertiesClass.md | 2 -- .../go/go-petstore/model_additional_properties_class.go | 2 -- .../petstore/go-experimental/go-petstore/api/openapi.yaml | 2 +- 6 files changed, 4 insertions(+), 14 deletions(-) diff --git a/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml b/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml index 97a5ebe3fd01..6de5c131c2ef 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml +++ b/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml @@ -2120,4 +2120,4 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml index 97a5ebe3fd01..6de5c131c2ef 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml @@ -2120,4 +2120,4 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/go/go-petstore/api/openapi.yaml b/samples/client/petstore/go/go-petstore/api/openapi.yaml index 636f81711d57..6de5c131c2ef 100644 --- a/samples/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore/api/openapi.yaml @@ -1586,12 +1586,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2126,4 +2120,4 @@ components: scheme: basic type: http x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md index 54a41452ee88..0dd3f328f41d 100644 --- a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md @@ -12,8 +12,6 @@ Name | Type | Description | Notes **MapArrayAnytype** | [**map[string][]map[string]interface{}**](array.md) | | [optional] **MapMapString** | [**map[string]map[string]string**](map.md) | | [optional] **MapMapAnytype** | [**map[string]map[string]map[string]interface{}**](map.md) | | [optional] -**MapWithAdditionalProperties** | **map[string]interface{}** | | [optional] -**MapWithoutAdditionalProperties** | **map[string]interface{}** | | [optional] **Anytype1** | **map[string]interface{}** | | [optional] **Anytype2** | **map[string]interface{}** | | [optional] **Anytype3** | **map[string]interface{}** | | [optional] diff --git a/samples/client/petstore/go/go-petstore/model_additional_properties_class.go b/samples/client/petstore/go/go-petstore/model_additional_properties_class.go index 71be988998b6..00ca7fb44061 100644 --- a/samples/client/petstore/go/go-petstore/model_additional_properties_class.go +++ b/samples/client/petstore/go/go-petstore/model_additional_properties_class.go @@ -18,8 +18,6 @@ type AdditionalPropertiesClass struct { MapArrayAnytype map[string][]map[string]interface{} `json:"map_array_anytype,omitempty"` MapMapString map[string]map[string]string `json:"map_map_string,omitempty"` MapMapAnytype map[string]map[string]map[string]interface{} `json:"map_map_anytype,omitempty"` - MapWithAdditionalProperties map[string]interface{} `json:"map_with_additional_properties,omitempty"` - MapWithoutAdditionalProperties map[string]interface{} `json:"map_without_additional_properties,omitempty"` Anytype1 map[string]interface{} `json:"anytype_1,omitempty"` Anytype2 map[string]interface{} `json:"anytype_2,omitempty"` Anytype3 map[string]interface{} `json:"anytype_3,omitempty"` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml b/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml index 386fa6e594db..a81f77cfde4f 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml @@ -2179,4 +2179,4 @@ components: scheme: signature type: http x-original-openapi-version: 3.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-disallow-additional-properties-if-not-present: "true" From 8d93337187059bf06ae66984aec7f47112b60957 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 20:43:07 -0700 Subject: [PATCH 071/105] run sample scripts --- .../codegen/utils/ModelUtils.java | 5 +- .../go-petstore/api/openapi.yaml | 2 +- .../go/go-petstore-withXml/api/openapi.yaml | 2 +- .../petstore/go/go-petstore/api/openapi.yaml | 2 +- .../petstore/haskell-http-client/openapi.yaml | 4 +- .../petstore/java/feign/api/openapi.yaml | 4 +- .../petstore/java/feign10x/api/openapi.yaml | 4 +- .../java/google-api-client/api/openapi.yaml | 4 +- .../petstore/java/jersey1/api/openapi.yaml | 4 +- .../java/jersey2-java6/api/openapi.yaml | 4 +- .../java/jersey2-java7/api/openapi.yaml | 4 +- .../java/jersey2-java8/api/openapi.yaml | 4 +- .../petstore/java/native/api/openapi.yaml | 4 +- .../api/openapi.yaml | 4 +- .../java/okhttp-gson/api/openapi.yaml | 4 +- .../rest-assured-jackson/api/openapi.yaml | 4 +- .../java/rest-assured/api/openapi.yaml | 4 +- .../petstore/java/resteasy/api/openapi.yaml | 4 +- .../resttemplate-withXml/api/openapi.yaml | 4 +- .../java/resttemplate/api/openapi.yaml | 4 +- .../petstore/java/retrofit/api/openapi.yaml | 4 +- .../java/retrofit2-play24/api/openapi.yaml | 4 +- .../java/retrofit2-play25/api/openapi.yaml | 4 +- .../java/retrofit2-play26/api/openapi.yaml | 4 +- .../petstore/java/retrofit2/api/openapi.yaml | 4 +- .../java/retrofit2rx/api/openapi.yaml | 4 +- .../java/retrofit2rx2/api/openapi.yaml | 4 +- .../petstore/java/vertx/api/openapi.yaml | 4 +- .../petstore/java/webclient/api/openapi.yaml | 4 +- .../go-petstore/api/openapi.yaml | 2 +- .../petstore/go/go-petstore/api/openapi.yaml | 4 +- .../petstore/go-api-server/api/openapi.yaml | 4 +- .../go-gin-api-server/api/openapi.yaml | 4 +- .../petstore/go-api-server/api/openapi.yaml | 4 +- .../go-gin-api-server/api/openapi.yaml | 4 +- .../public/openapi.json | 4 +- .../public/openapi.json | 4 +- .../public/openapi.json | 4 +- .../public/openapi.json | 4 +- .../public/openapi.json | 4 +- .../public/openapi.json | 4 +- .../public/openapi.json | 4 +- .../public/openapi.json | 4 +- .../java-play-framework/public/openapi.json | 4 +- .../model/AdditionalPropertiesClass.java | 44 +--- .../src/main/openapi/openapi.yaml | 10 +- .../model/AdditionalPropertiesClass.java | 44 +--- .../jaxrs-spec/src/main/openapi/openapi.yaml | 10 +- .../server/petstore/ruby-sinatra/openapi.yaml | 4 +- .../output/multipart-v3/api/openapi.yaml | 4 +- .../output/no-example-v3/api/openapi.yaml | 4 +- .../output/openapi-v3/api/openapi.yaml | 4 +- .../output/openapi-v3/src/models.rs | 220 ------------------ .../output/ops-v3/api/openapi.yaml | 4 +- .../api/openapi.yaml | 4 +- .../output/rust-server-test/api/openapi.yaml | 4 +- .../model/AdditionalPropertiesClass.java | 52 +---- .../model/AdditionalPropertiesClass.java | 52 +---- .../model/AdditionalPropertiesClass.java | 52 +---- .../src/main/resources/openapi.yaml | 10 +- 60 files changed, 111 insertions(+), 580 deletions(-) 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 986bd9689d54..d66947dc1073 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 @@ -59,7 +59,10 @@ public class ModelUtils { private static final String generateAliasAsModelKey = "generateAliasAsModel"; - public static final String EXTENSION_OPENAPI_DOC_VERSION = "x-original-openapi-version"; + // A vendor extension to track the value of the 'swagger' field in a 2.0 doc, if applicable. + public static final String EXTENSION_OPENAPI_DOC_VERSION = "x-original-swagger-version"; + + // A vendor extension to track the value of the 'disallowAdditionalPropertiesIfNotPresent' CLI public static final String EXTENSION_DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT = "x-disallow-additional-properties-if-not-present"; private static ObjectMapper JSON_MAPPER, YAML_MAPPER; diff --git a/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml b/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml index 6de5c131c2ef..7940eaa52eac 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml +++ b/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml @@ -2119,5 +2119,5 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 +x-original-swagger-version: 2.0.0 x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml index 6de5c131c2ef..7940eaa52eac 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml @@ -2119,5 +2119,5 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 +x-original-swagger-version: 2.0.0 x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/go/go-petstore/api/openapi.yaml b/samples/client/petstore/go/go-petstore/api/openapi.yaml index 6de5c131c2ef..7940eaa52eac 100644 --- a/samples/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore/api/openapi.yaml @@ -2119,5 +2119,5 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 +x-original-swagger-version: 2.0.0 x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/haskell-http-client/openapi.yaml b/samples/client/petstore/haskell-http-client/openapi.yaml index 97a5ebe3fd01..7940eaa52eac 100644 --- a/samples/client/petstore/haskell-http-client/openapi.yaml +++ b/samples/client/petstore/haskell-http-client/openapi.yaml @@ -2119,5 +2119,5 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/feign/api/openapi.yaml b/samples/client/petstore/java/feign/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/feign/api/openapi.yaml +++ b/samples/client/petstore/java/feign/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/feign10x/api/openapi.yaml b/samples/client/petstore/java/feign10x/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/feign10x/api/openapi.yaml +++ b/samples/client/petstore/java/feign10x/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/google-api-client/api/openapi.yaml b/samples/client/petstore/java/google-api-client/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/google-api-client/api/openapi.yaml +++ b/samples/client/petstore/java/google-api-client/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/jersey1/api/openapi.yaml b/samples/client/petstore/java/jersey1/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/jersey1/api/openapi.yaml +++ b/samples/client/petstore/java/jersey1/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/jersey2-java6/api/openapi.yaml b/samples/client/petstore/java/jersey2-java6/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/jersey2-java6/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java6/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/jersey2-java7/api/openapi.yaml b/samples/client/petstore/java/jersey2-java7/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/jersey2-java7/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java7/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/native/api/openapi.yaml b/samples/client/petstore/java/native/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/native/api/openapi.yaml +++ b/samples/client/petstore/java/native/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/rest-assured/api/openapi.yaml b/samples/client/petstore/java/rest-assured/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/rest-assured/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/resteasy/api/openapi.yaml b/samples/client/petstore/java/resteasy/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/resteasy/api/openapi.yaml +++ b/samples/client/petstore/java/resteasy/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/resttemplate/api/openapi.yaml b/samples/client/petstore/java/resttemplate/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/resttemplate/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/retrofit/api/openapi.yaml b/samples/client/petstore/java/retrofit/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/retrofit/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/retrofit2-play24/api/openapi.yaml b/samples/client/petstore/java/retrofit2-play24/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/retrofit2-play24/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2-play24/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/retrofit2-play25/api/openapi.yaml b/samples/client/petstore/java/retrofit2-play25/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/retrofit2-play25/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2-play25/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml b/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/retrofit2/api/openapi.yaml b/samples/client/petstore/java/retrofit2/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/retrofit2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/retrofit2rx/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/retrofit2rx/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/vertx/api/openapi.yaml b/samples/client/petstore/java/vertx/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/vertx/api/openapi.yaml +++ b/samples/client/petstore/java/vertx/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/webclient/api/openapi.yaml b/samples/client/petstore/java/webclient/api/openapi.yaml index f8877ba452eb..d86a7b959f95 100644 --- a/samples/client/petstore/java/webclient/api/openapi.yaml +++ b/samples/client/petstore/java/webclient/api/openapi.yaml @@ -2180,6 +2180,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml b/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml index a81f77cfde4f..cb59ab84d679 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml @@ -2178,5 +2178,5 @@ components: http_signature_test: scheme: signature type: http -x-original-openapi-version: 3.0.0 +x-original-swagger-version: 3.0.0 x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml index 952fa7afadfc..11635de3f459 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml @@ -2090,5 +2090,5 @@ components: http_signature_test: scheme: signature type: http -x-original-openapi-version: 3.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 3.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml b/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml index 952fa7afadfc..11635de3f459 100644 --- a/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml +++ b/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml @@ -2090,5 +2090,5 @@ components: http_signature_test: scheme: signature type: http -x-original-openapi-version: 3.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 3.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml b/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml index 952fa7afadfc..11635de3f459 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml +++ b/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml @@ -2090,5 +2090,5 @@ components: http_signature_test: scheme: signature type: http -x-original-openapi-version: 3.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 3.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/go-api-server/api/openapi.yaml b/samples/server/petstore/go-api-server/api/openapi.yaml index 13732e479c9f..42549d93a8ea 100644 --- a/samples/server/petstore/go-api-server/api/openapi.yaml +++ b/samples/server/petstore/go-api-server/api/openapi.yaml @@ -760,5 +760,5 @@ components: in: header name: api_key type: apiKey -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/go-gin-api-server/api/openapi.yaml b/samples/server/petstore/go-gin-api-server/api/openapi.yaml index 13732e479c9f..42549d93a8ea 100644 --- a/samples/server/petstore/go-gin-api-server/api/openapi.yaml +++ b/samples/server/petstore/go-gin-api-server/api/openapi.yaml @@ -760,5 +760,5 @@ components: in: header name: api_key type: apiKey -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json index 32b480d464d9..d67ec8330bdf 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json +++ b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json @@ -1038,6 +1038,6 @@ } } }, - "x-original-openapi-version" : "2.0.0", - "x-is-legacy-additional-properties-behavior" : "true" + "x-original-swagger-version" : "2.0.0", + "x-disallow-additional-properties-if-not-present" : "true" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-async/public/openapi.json b/samples/server/petstore/java-play-framework-async/public/openapi.json index 32b480d464d9..d67ec8330bdf 100644 --- a/samples/server/petstore/java-play-framework-async/public/openapi.json +++ b/samples/server/petstore/java-play-framework-async/public/openapi.json @@ -1038,6 +1038,6 @@ } } }, - "x-original-openapi-version" : "2.0.0", - "x-is-legacy-additional-properties-behavior" : "true" + "x-original-swagger-version" : "2.0.0", + "x-disallow-additional-properties-if-not-present" : "true" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json index 32b480d464d9..d67ec8330bdf 100644 --- a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json +++ b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json @@ -1038,6 +1038,6 @@ } } }, - "x-original-openapi-version" : "2.0.0", - "x-is-legacy-additional-properties-behavior" : "true" + "x-original-swagger-version" : "2.0.0", + "x-disallow-additional-properties-if-not-present" : "true" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json index 334631c11d64..8780b4d48287 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json @@ -2874,6 +2874,6 @@ } } }, - "x-original-openapi-version" : "2.0.0", - "x-is-legacy-additional-properties-behavior" : "true" + "x-original-swagger-version" : "2.0.0", + "x-disallow-additional-properties-if-not-present" : "true" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json index 32b480d464d9..d67ec8330bdf 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json @@ -1038,6 +1038,6 @@ } } }, - "x-original-openapi-version" : "2.0.0", - "x-is-legacy-additional-properties-behavior" : "true" + "x-original-swagger-version" : "2.0.0", + "x-disallow-additional-properties-if-not-present" : "true" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json index 32b480d464d9..d67ec8330bdf 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json @@ -1038,6 +1038,6 @@ } } }, - "x-original-openapi-version" : "2.0.0", - "x-is-legacy-additional-properties-behavior" : "true" + "x-original-swagger-version" : "2.0.0", + "x-disallow-additional-properties-if-not-present" : "true" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json index 32b480d464d9..d67ec8330bdf 100644 --- a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json @@ -1038,6 +1038,6 @@ } } }, - "x-original-openapi-version" : "2.0.0", - "x-is-legacy-additional-properties-behavior" : "true" + "x-original-swagger-version" : "2.0.0", + "x-disallow-additional-properties-if-not-present" : "true" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json b/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json index 32b480d464d9..d67ec8330bdf 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json @@ -1038,6 +1038,6 @@ } } }, - "x-original-openapi-version" : "2.0.0", - "x-is-legacy-additional-properties-behavior" : "true" + "x-original-swagger-version" : "2.0.0", + "x-disallow-additional-properties-if-not-present" : "true" } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/public/openapi.json b/samples/server/petstore/java-play-framework/public/openapi.json index 32b480d464d9..d67ec8330bdf 100644 --- a/samples/server/petstore/java-play-framework/public/openapi.json +++ b/samples/server/petstore/java-play-framework/public/openapi.json @@ -1038,6 +1038,6 @@ } } }, - "x-original-openapi-version" : "2.0.0", - "x-is-legacy-additional-properties-behavior" : "true" + "x-original-swagger-version" : "2.0.0", + "x-disallow-additional-properties-if-not-present" : "true" } \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index 651625c5921e..f2332eb2a607 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -28,8 +28,6 @@ public class AdditionalPropertiesClass implements Serializable { private @Valid Map> mapArrayAnytype = new HashMap>(); private @Valid Map> mapMapString = new HashMap>(); private @Valid Map> mapMapAnytype = new HashMap>(); - private @Valid Object mapWithAdditionalProperties; - private @Valid Object mapWithoutAdditionalProperties; private @Valid Object anytype1; private @Valid Object anytype2; private @Valid Object anytype3; @@ -180,42 +178,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; }/** **/ - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - - - - @ApiModelProperty(value = "") - @JsonProperty("map_with_additional_properties") - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - }/** - **/ - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - - - - @ApiModelProperty(value = "") - @JsonProperty("map_without_additional_properties") - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - }/** - **/ public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -287,8 +249,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -296,7 +256,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @Override @@ -312,8 +272,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml index 333eb07e0c2d..a73c4ac72f9a 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml @@ -1721,12 +1721,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2260,5 +2254,5 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index 651625c5921e..f2332eb2a607 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -28,8 +28,6 @@ public class AdditionalPropertiesClass implements Serializable { private @Valid Map> mapArrayAnytype = new HashMap>(); private @Valid Map> mapMapString = new HashMap>(); private @Valid Map> mapMapAnytype = new HashMap>(); - private @Valid Object mapWithAdditionalProperties; - private @Valid Object mapWithoutAdditionalProperties; private @Valid Object anytype1; private @Valid Object anytype2; private @Valid Object anytype3; @@ -180,42 +178,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; }/** **/ - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - - - - @ApiModelProperty(value = "") - @JsonProperty("map_with_additional_properties") - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - }/** - **/ - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - - - - @ApiModelProperty(value = "") - @JsonProperty("map_without_additional_properties") - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - }/** - **/ public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -287,8 +249,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -296,7 +256,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @Override @@ -312,8 +272,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml index 333eb07e0c2d..a73c4ac72f9a 100644 --- a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml @@ -1721,12 +1721,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2260,5 +2254,5 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/ruby-sinatra/openapi.yaml b/samples/server/petstore/ruby-sinatra/openapi.yaml index 13732e479c9f..42549d93a8ea 100644 --- a/samples/server/petstore/ruby-sinatra/openapi.yaml +++ b/samples/server/petstore/ruby-sinatra/openapi.yaml @@ -760,5 +760,5 @@ components: in: header name: api_key type: apiKey -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "true" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/rust-server/output/multipart-v3/api/openapi.yaml b/samples/server/petstore/rust-server/output/multipart-v3/api/openapi.yaml index b73bb2f1cfa9..a49378d98920 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/multipart-v3/api/openapi.yaml @@ -132,6 +132,6 @@ components: type: array required: - field_a -x-original-openapi-version: 3.0.1 -x-is-legacy-additional-properties-behavior: "false" +x-original-swagger-version: 3.0.1 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/rust-server/output/no-example-v3/api/openapi.yaml b/samples/server/petstore/rust-server/output/no-example-v3/api/openapi.yaml index 25ca643466b9..fe08c5f056c9 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/no-example-v3/api/openapi.yaml @@ -38,6 +38,6 @@ components: required: - property type: object -x-original-openapi-version: 3.0.1 -x-is-legacy-additional-properties-behavior: "false" +x-original-swagger-version: 3.0.1 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/rust-server/output/openapi-v3/api/openapi.yaml b/samples/server/petstore/rust-server/output/openapi-v3/api/openapi.yaml index 8e0342c51f26..2bae29ad9ee1 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/openapi-v3/api/openapi.yaml @@ -591,6 +591,6 @@ components: test.write: Allowed to change state. tokenUrl: http://example.org type: oauth2 -x-original-openapi-version: 3.0.1 -x-is-legacy-additional-properties-behavior: "false" +x-original-swagger-version: 3.0.1 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/rust-server/output/openapi-v3/src/models.rs b/samples/server/petstore/rust-server/output/openapi-v3/src/models.rs index 6c37adcb734b..884dab3b875b 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/src/models.rs +++ b/samples/server/petstore/rust-server/output/openapi-v3/src/models.rs @@ -195,26 +195,6 @@ impl std::ops::DerefMut for AnotherXmlInner { } } -/// Converts the AnotherXmlInner value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl ::std::string::ToString for AnotherXmlInner { - fn to_string(&self) -> String { - // Skipping additionalProperties in query parameter serialization - "".to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a AnotherXmlInner value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl ::std::str::FromStr for AnotherXmlInner { - type Err = &'static str; - - fn from_str(s: &str) -> std::result::Result { - std::result::Result::Err("Parsing additionalProperties for AnotherXmlInner is not supported") - } -} impl AnotherXmlInner { /// Helper function to allow us to convert this model to an XML string. @@ -598,26 +578,6 @@ impl std::ops::DerefMut for Err { } } -/// Converts the Err value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl ::std::string::ToString for Err { - fn to_string(&self) -> String { - // Skipping additionalProperties in query parameter serialization - "".to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a Err value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl ::std::str::FromStr for Err { - type Err = &'static str; - - fn from_str(s: &str) -> std::result::Result { - std::result::Result::Err("Parsing additionalProperties for Err is not supported") - } -} impl Err { /// Helper function to allow us to convert this model to an XML string. @@ -670,26 +630,6 @@ impl std::ops::DerefMut for Error { } } -/// Converts the Error value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl ::std::string::ToString for Error { - fn to_string(&self) -> String { - // Skipping additionalProperties in query parameter serialization - "".to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a Error value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl ::std::str::FromStr for Error { - type Err = &'static str; - - fn from_str(s: &str) -> std::result::Result { - std::result::Result::Err("Parsing additionalProperties for Error is not supported") - } -} impl Error { /// Helper function to allow us to convert this model to an XML string. @@ -855,26 +795,6 @@ impl std::ops::DerefMut for MyId { } } -/// Converts the MyId value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl ::std::string::ToString for MyId { - fn to_string(&self) -> String { - // Skipping additionalProperties in query parameter serialization - "".to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a MyId value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl ::std::str::FromStr for MyId { - type Err = &'static str; - - fn from_str(s: &str) -> std::result::Result { - std::result::Result::Err("Parsing additionalProperties for MyId is not supported") - } -} impl MyId { /// Helper function to allow us to convert this model to an XML string. @@ -1796,26 +1716,6 @@ impl std::ops::DerefMut for Ok { } } -/// Converts the Ok value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl ::std::string::ToString for Ok { - fn to_string(&self) -> String { - // Skipping additionalProperties in query parameter serialization - "".to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a Ok value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl ::std::str::FromStr for Ok { - type Err = &'static str; - - fn from_str(s: &str) -> std::result::Result { - std::result::Result::Err("Parsing additionalProperties for Ok is not supported") - } -} impl Ok { /// Helper function to allow us to convert this model to an XML string. @@ -1856,26 +1756,6 @@ impl std::ops::DerefMut for OptionalObjectHeader { } } -/// Converts the OptionalObjectHeader value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl ::std::string::ToString for OptionalObjectHeader { - fn to_string(&self) -> String { - // Skipping additionalProperties in query parameter serialization - "".to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a OptionalObjectHeader value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl ::std::str::FromStr for OptionalObjectHeader { - type Err = &'static str; - - fn from_str(s: &str) -> std::result::Result { - std::result::Result::Err("Parsing additionalProperties for OptionalObjectHeader is not supported") - } -} impl OptionalObjectHeader { /// Helper function to allow us to convert this model to an XML string. @@ -1916,26 +1796,6 @@ impl std::ops::DerefMut for RequiredObjectHeader { } } -/// Converts the RequiredObjectHeader value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl ::std::string::ToString for RequiredObjectHeader { - fn to_string(&self) -> String { - // Skipping additionalProperties in query parameter serialization - "".to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a RequiredObjectHeader value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl ::std::str::FromStr for RequiredObjectHeader { - type Err = &'static str; - - fn from_str(s: &str) -> std::result::Result { - std::result::Result::Err("Parsing additionalProperties for RequiredObjectHeader is not supported") - } -} impl RequiredObjectHeader { /// Helper function to allow us to convert this model to an XML string. @@ -1988,26 +1848,6 @@ impl std::ops::DerefMut for Result { } } -/// Converts the Result value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl ::std::string::ToString for Result { - fn to_string(&self) -> String { - // Skipping additionalProperties in query parameter serialization - "".to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a Result value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl ::std::str::FromStr for Result { - type Err = &'static str; - - fn from_str(s: &str) -> std::result::Result { - std::result::Result::Err("Parsing additionalProperties for Result is not supported") - } -} impl Result { /// Helper function to allow us to convert this model to an XML string. @@ -2104,26 +1944,6 @@ impl std::ops::DerefMut for StringObject { } } -/// Converts the StringObject value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl ::std::string::ToString for StringObject { - fn to_string(&self) -> String { - // Skipping additionalProperties in query parameter serialization - "".to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a StringObject value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl ::std::str::FromStr for StringObject { - type Err = &'static str; - - fn from_str(s: &str) -> std::result::Result { - std::result::Result::Err("Parsing additionalProperties for StringObject is not supported") - } -} impl StringObject { /// Helper function to allow us to convert this model to an XML string. @@ -2165,26 +1985,6 @@ impl std::ops::DerefMut for UuidObject { } } -/// Converts the UuidObject value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl ::std::string::ToString for UuidObject { - fn to_string(&self) -> String { - // Skipping additionalProperties in query parameter serialization - "".to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a UuidObject value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl ::std::str::FromStr for UuidObject { - type Err = &'static str; - - fn from_str(s: &str) -> std::result::Result { - std::result::Result::Err("Parsing additionalProperties for UuidObject is not supported") - } -} impl UuidObject { /// Helper function to allow us to convert this model to an XML string. @@ -2385,26 +2185,6 @@ impl std::ops::DerefMut for XmlInner { } } -/// Converts the XmlInner value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl ::std::string::ToString for XmlInner { - fn to_string(&self) -> String { - // Skipping additionalProperties in query parameter serialization - "".to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a XmlInner value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl ::std::str::FromStr for XmlInner { - type Err = &'static str; - - fn from_str(s: &str) -> std::result::Result { - std::result::Result::Err("Parsing additionalProperties for XmlInner is not supported") - } -} impl XmlInner { /// Helper function to allow us to convert this model to an XML string. diff --git a/samples/server/petstore/rust-server/output/ops-v3/api/openapi.yaml b/samples/server/petstore/rust-server/output/ops-v3/api/openapi.yaml index 034234f656cb..13660eeb6d73 100644 --- a/samples/server/petstore/rust-server/output/ops-v3/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/ops-v3/api/openapi.yaml @@ -192,6 +192,6 @@ paths: description: OK components: schemas: {} -x-original-openapi-version: 3.0.1 -x-is-legacy-additional-properties-behavior: "false" +x-original-swagger-version: 3.0.1 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml index 2166608b4cec..7d1aabb7c0b6 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml @@ -1589,6 +1589,6 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml b/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml index bb43f7aab925..64e50c80787c 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml @@ -211,6 +211,6 @@ components: type: integer required: - required_thing -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 21f6f266a31a..16b3408f323b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -50,12 +50,6 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; - @JsonProperty("map_with_additional_properties") - private Object mapWithAdditionalProperties; - - @JsonProperty("map_without_additional_properties") - private Object mapWithoutAdditionalProperties; - @JsonProperty("anytype_1") private Object anytype1; @@ -294,46 +288,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - */ - @ApiModelProperty(value = "") - - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - */ - @ApiModelProperty(value = "") - - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -412,8 +366,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -421,7 +373,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @Override @@ -437,8 +389,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 164cd1500d6f..44e1e29d741e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -50,12 +50,6 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; - @JsonProperty("map_with_additional_properties") - private Object mapWithAdditionalProperties; - - @JsonProperty("map_without_additional_properties") - private Object mapWithoutAdditionalProperties; - @JsonProperty("anytype_1") private Object anytype1; @@ -294,46 +288,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - */ - @ApiModelProperty(value = "") - - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - */ - @ApiModelProperty(value = "") - - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -412,8 +366,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -421,7 +373,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @Override @@ -437,8 +389,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 164cd1500d6f..44e1e29d741e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -50,12 +50,6 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; - @JsonProperty("map_with_additional_properties") - private Object mapWithAdditionalProperties; - - @JsonProperty("map_without_additional_properties") - private Object mapWithoutAdditionalProperties; - @JsonProperty("anytype_1") private Object anytype1; @@ -294,46 +288,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - */ - @ApiModelProperty(value = "") - - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - */ - @ApiModelProperty(value = "") - - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -412,8 +366,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -421,7 +373,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @Override @@ -437,8 +389,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml index 333eb07e0c2d..a73c4ac72f9a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -1721,12 +1721,6 @@ components: type: object type: object type: object - map_with_additional_properties: - properties: {} - type: object - map_without_additional_properties: - properties: {} - type: object anytype_1: properties: {} type: object @@ -2260,5 +2254,5 @@ components: http_basic_test: scheme: basic type: http -x-original-openapi-version: 2.0.0 -x-is-legacy-additional-properties-behavior: "false" +x-original-swagger-version: 2.0.0 +x-disallow-additional-properties-if-not-present: "true" From 7195e03be7ca6351e14746b8352615f628b80fc2 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 20:45:56 -0700 Subject: [PATCH 072/105] run sample scripts --- .../docs/AdditionalPropertiesClass.md | 2 -- .../src/model/AdditionalPropertiesClass.js | 16 ---------------- 2 files changed, 18 deletions(-) diff --git a/samples/client/petstore/javascript-es6/docs/AdditionalPropertiesClass.md b/samples/client/petstore/javascript-es6/docs/AdditionalPropertiesClass.md index 1316a3c382e8..9f8a26bcc612 100644 --- a/samples/client/petstore/javascript-es6/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/javascript-es6/docs/AdditionalPropertiesClass.md @@ -12,8 +12,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | **{String: [Object]}** | | [optional] **mapMapString** | **{String: {String: String}}** | | [optional] **mapMapAnytype** | **{String: {String: Object}}** | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/javascript-es6/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript-es6/src/model/AdditionalPropertiesClass.js index 25530a2622e2..a6e1a88e3b40 100644 --- a/samples/client/petstore/javascript-es6/src/model/AdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript-es6/src/model/AdditionalPropertiesClass.js @@ -71,12 +71,6 @@ class AdditionalPropertiesClass { if (data.hasOwnProperty('map_map_anytype')) { obj['map_map_anytype'] = ApiClient.convertToType(data['map_map_anytype'], {'String': {'String': Object}}); } - if (data.hasOwnProperty('map_with_additional_properties')) { - obj['map_with_additional_properties'] = ApiClient.convertToType(data['map_with_additional_properties'], Object); - } - if (data.hasOwnProperty('map_without_additional_properties')) { - obj['map_without_additional_properties'] = ApiClient.convertToType(data['map_without_additional_properties'], Object); - } if (data.hasOwnProperty('anytype_1')) { obj['anytype_1'] = ApiClient.convertToType(data['anytype_1'], Object); } @@ -133,16 +127,6 @@ AdditionalPropertiesClass.prototype['map_map_string'] = undefined; */ AdditionalPropertiesClass.prototype['map_map_anytype'] = undefined; -/** - * @member {Object} map_with_additional_properties - */ -AdditionalPropertiesClass.prototype['map_with_additional_properties'] = undefined; - -/** - * @member {Object} map_without_additional_properties - */ -AdditionalPropertiesClass.prototype['map_without_additional_properties'] = undefined; - /** * @member {Object} anytype_1 */ From 9212c85a7642527ae4385bc78ec3d6b6a4601d64 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 20:47:56 -0700 Subject: [PATCH 073/105] run sample scripts --- .../docs/AdditionalPropertiesClass.md | 2 -- .../src/model/AdditionalPropertiesClass.js | 16 ---------------- .../docs/AdditionalPropertiesClass.md | 2 -- .../src/model/AdditionalPropertiesClass.js | 14 -------------- .../javascript/docs/AdditionalPropertiesClass.md | 2 -- .../src/model/AdditionalPropertiesClass.js | 14 -------------- 6 files changed, 50 deletions(-) diff --git a/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesClass.md b/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesClass.md index 1316a3c382e8..9f8a26bcc612 100644 --- a/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesClass.md @@ -12,8 +12,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | **{String: [Object]}** | | [optional] **mapMapString** | **{String: {String: String}}** | | [optional] **mapMapAnytype** | **{String: {String: Object}}** | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesClass.js index 25530a2622e2..a6e1a88e3b40 100644 --- a/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesClass.js @@ -71,12 +71,6 @@ class AdditionalPropertiesClass { if (data.hasOwnProperty('map_map_anytype')) { obj['map_map_anytype'] = ApiClient.convertToType(data['map_map_anytype'], {'String': {'String': Object}}); } - if (data.hasOwnProperty('map_with_additional_properties')) { - obj['map_with_additional_properties'] = ApiClient.convertToType(data['map_with_additional_properties'], Object); - } - if (data.hasOwnProperty('map_without_additional_properties')) { - obj['map_without_additional_properties'] = ApiClient.convertToType(data['map_without_additional_properties'], Object); - } if (data.hasOwnProperty('anytype_1')) { obj['anytype_1'] = ApiClient.convertToType(data['anytype_1'], Object); } @@ -133,16 +127,6 @@ AdditionalPropertiesClass.prototype['map_map_string'] = undefined; */ AdditionalPropertiesClass.prototype['map_map_anytype'] = undefined; -/** - * @member {Object} map_with_additional_properties - */ -AdditionalPropertiesClass.prototype['map_with_additional_properties'] = undefined; - -/** - * @member {Object} map_without_additional_properties - */ -AdditionalPropertiesClass.prototype['map_without_additional_properties'] = undefined; - /** * @member {Object} anytype_1 */ diff --git a/samples/client/petstore/javascript-promise/docs/AdditionalPropertiesClass.md b/samples/client/petstore/javascript-promise/docs/AdditionalPropertiesClass.md index 1316a3c382e8..9f8a26bcc612 100644 --- a/samples/client/petstore/javascript-promise/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/javascript-promise/docs/AdditionalPropertiesClass.md @@ -12,8 +12,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | **{String: [Object]}** | | [optional] **mapMapString** | **{String: {String: String}}** | | [optional] **mapMapAnytype** | **{String: {String: Object}}** | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js index 9dd5c539404e..2b19a95b4862 100644 --- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js @@ -82,12 +82,6 @@ if (data.hasOwnProperty('map_map_anytype')) { obj['map_map_anytype'] = ApiClient.convertToType(data['map_map_anytype'], {'String': {'String': Object}}); } - if (data.hasOwnProperty('map_with_additional_properties')) { - obj['map_with_additional_properties'] = ApiClient.convertToType(data['map_with_additional_properties'], Object); - } - if (data.hasOwnProperty('map_without_additional_properties')) { - obj['map_without_additional_properties'] = ApiClient.convertToType(data['map_without_additional_properties'], Object); - } if (data.hasOwnProperty('anytype_1')) { obj['anytype_1'] = ApiClient.convertToType(data['anytype_1'], Object); } @@ -133,14 +127,6 @@ * @member {Object.>} map_map_anytype */ exports.prototype['map_map_anytype'] = undefined; - /** - * @member {Object} map_with_additional_properties - */ - exports.prototype['map_with_additional_properties'] = undefined; - /** - * @member {Object} map_without_additional_properties - */ - exports.prototype['map_without_additional_properties'] = undefined; /** * @member {Object} anytype_1 */ diff --git a/samples/client/petstore/javascript/docs/AdditionalPropertiesClass.md b/samples/client/petstore/javascript/docs/AdditionalPropertiesClass.md index 1316a3c382e8..9f8a26bcc612 100644 --- a/samples/client/petstore/javascript/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/javascript/docs/AdditionalPropertiesClass.md @@ -12,8 +12,6 @@ Name | Type | Description | Notes **mapArrayAnytype** | **{String: [Object]}** | | [optional] **mapMapString** | **{String: {String: String}}** | | [optional] **mapMapAnytype** | **{String: {String: Object}}** | | [optional] -**mapWithAdditionalProperties** | **Object** | | [optional] -**mapWithoutAdditionalProperties** | **Object** | | [optional] **anytype1** | **Object** | | [optional] **anytype2** | **Object** | | [optional] **anytype3** | **Object** | | [optional] diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js index 9dd5c539404e..2b19a95b4862 100644 --- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js @@ -82,12 +82,6 @@ if (data.hasOwnProperty('map_map_anytype')) { obj['map_map_anytype'] = ApiClient.convertToType(data['map_map_anytype'], {'String': {'String': Object}}); } - if (data.hasOwnProperty('map_with_additional_properties')) { - obj['map_with_additional_properties'] = ApiClient.convertToType(data['map_with_additional_properties'], Object); - } - if (data.hasOwnProperty('map_without_additional_properties')) { - obj['map_without_additional_properties'] = ApiClient.convertToType(data['map_without_additional_properties'], Object); - } if (data.hasOwnProperty('anytype_1')) { obj['anytype_1'] = ApiClient.convertToType(data['anytype_1'], Object); } @@ -133,14 +127,6 @@ * @member {Object.>} map_map_anytype */ exports.prototype['map_map_anytype'] = undefined; - /** - * @member {Object} map_with_additional_properties - */ - exports.prototype['map_with_additional_properties'] = undefined; - /** - * @member {Object} map_without_additional_properties - */ - exports.prototype['map_without_additional_properties'] = undefined; /** * @member {Object} anytype_1 */ From cc80080e232460c1ee309dbf993101963725e6df Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 20:50:15 -0700 Subject: [PATCH 074/105] run sample scripts --- .../docs/AdditionalPropertiesClass.md | 2 - .../models/additional_properties_class.py | 54 +------------------ 2 files changed, 1 insertion(+), 55 deletions(-) diff --git a/samples/client/petstore/python-tornado/docs/AdditionalPropertiesClass.md b/samples/client/petstore/python-tornado/docs/AdditionalPropertiesClass.md index 7b56820212d0..eb3e0524de1a 100644 --- a/samples/client/petstore/python-tornado/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/python-tornado/docs/AdditionalPropertiesClass.md @@ -11,8 +11,6 @@ Name | Type | Description | Notes **map_array_anytype** | **dict(str, list[object])** | | [optional] **map_map_string** | **dict(str, dict(str, str))** | | [optional] **map_map_anytype** | **dict(str, dict(str, object))** | | [optional] -**map_with_additional_properties** | **object** | | [optional] -**map_without_additional_properties** | **object** | | [optional] **anytype_1** | **object** | | [optional] **anytype_2** | **object** | | [optional] **anytype_3** | **object** | | [optional] diff --git a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_class.py index b3e6326015b2..be4455c683bf 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_class.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/additional_properties_class.py @@ -41,8 +41,6 @@ class AdditionalPropertiesClass(object): 'map_array_anytype': 'dict(str, list[object])', 'map_map_string': 'dict(str, dict(str, str))', 'map_map_anytype': 'dict(str, dict(str, object))', - 'map_with_additional_properties': 'object', - 'map_without_additional_properties': 'object', 'anytype_1': 'object', 'anytype_2': 'object', 'anytype_3': 'object' @@ -57,14 +55,12 @@ class AdditionalPropertiesClass(object): 'map_array_anytype': 'map_array_anytype', 'map_map_string': 'map_map_string', 'map_map_anytype': 'map_map_anytype', - 'map_with_additional_properties': 'map_with_additional_properties', - 'map_without_additional_properties': 'map_without_additional_properties', 'anytype_1': 'anytype_1', 'anytype_2': 'anytype_2', 'anytype_3': 'anytype_3' } - def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, map_with_additional_properties=None, map_without_additional_properties=None, anytype_1=None, anytype_2=None, anytype_3=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, anytype_1=None, anytype_2=None, anytype_3=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -78,8 +74,6 @@ def __init__(self, map_string=None, map_number=None, map_integer=None, map_boole self._map_array_anytype = None self._map_map_string = None self._map_map_anytype = None - self._map_with_additional_properties = None - self._map_without_additional_properties = None self._anytype_1 = None self._anytype_2 = None self._anytype_3 = None @@ -101,10 +95,6 @@ def __init__(self, map_string=None, map_number=None, map_integer=None, map_boole self.map_map_string = map_map_string if map_map_anytype is not None: self.map_map_anytype = map_map_anytype - if map_with_additional_properties is not None: - self.map_with_additional_properties = map_with_additional_properties - if map_without_additional_properties is not None: - self.map_without_additional_properties = map_without_additional_properties if anytype_1 is not None: self.anytype_1 = anytype_1 if anytype_2 is not None: @@ -280,48 +270,6 @@ def map_map_anytype(self, map_map_anytype): self._map_map_anytype = map_map_anytype - @property - def map_with_additional_properties(self): - """Gets the map_with_additional_properties of this AdditionalPropertiesClass. # noqa: E501 - - - :return: The map_with_additional_properties of this AdditionalPropertiesClass. # noqa: E501 - :rtype: object - """ - return self._map_with_additional_properties - - @map_with_additional_properties.setter - def map_with_additional_properties(self, map_with_additional_properties): - """Sets the map_with_additional_properties of this AdditionalPropertiesClass. - - - :param map_with_additional_properties: The map_with_additional_properties of this AdditionalPropertiesClass. # noqa: E501 - :type: object - """ - - self._map_with_additional_properties = map_with_additional_properties - - @property - def map_without_additional_properties(self): - """Gets the map_without_additional_properties of this AdditionalPropertiesClass. # noqa: E501 - - - :return: The map_without_additional_properties of this AdditionalPropertiesClass. # noqa: E501 - :rtype: object - """ - return self._map_without_additional_properties - - @map_without_additional_properties.setter - def map_without_additional_properties(self, map_without_additional_properties): - """Sets the map_without_additional_properties of this AdditionalPropertiesClass. - - - :param map_without_additional_properties: The map_without_additional_properties of this AdditionalPropertiesClass. # noqa: E501 - :type: object - """ - - self._map_without_additional_properties = map_without_additional_properties - @property def anytype_1(self): """Gets the anytype_1 of this AdditionalPropertiesClass. # noqa: E501 From 3604c95c164bcb116061c0c28e85d9b0540e12e2 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 20:53:37 -0700 Subject: [PATCH 075/105] run sample scripts --- .../model/AdditionalPropertiesClass.java | 52 +------------------ 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 164cd1500d6f..44e1e29d741e 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -50,12 +50,6 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; - @JsonProperty("map_with_additional_properties") - private Object mapWithAdditionalProperties; - - @JsonProperty("map_without_additional_properties") - private Object mapWithoutAdditionalProperties; - @JsonProperty("anytype_1") private Object anytype1; @@ -294,46 +288,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - */ - @ApiModelProperty(value = "") - - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - */ - @ApiModelProperty(value = "") - - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -412,8 +366,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -421,7 +373,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @Override @@ -437,8 +389,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); From dee6dc4901ef3542d1c2c63a753fb6c5f46f3402 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 20:55:02 -0700 Subject: [PATCH 076/105] run sample scripts --- .../model/AdditionalPropertiesClass.java | 52 +------------------ 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java index a93408ddf180..bf1af7c2e709 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java @@ -50,12 +50,6 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; - @JsonProperty("map_with_additional_properties") - private Object mapWithAdditionalProperties; - - @JsonProperty("map_without_additional_properties") - private Object mapWithoutAdditionalProperties; - @JsonProperty("anytype_1") private Object anytype1; @@ -294,46 +288,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - */ - @ApiModelProperty(value = "") - - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - */ - @ApiModelProperty(value = "") - - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -412,8 +366,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -421,7 +373,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @Override @@ -437,8 +389,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); From 0b6797466de507cec4f10169c9911dc76016eb5b Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 20:57:14 -0700 Subject: [PATCH 077/105] run sample scripts --- .../model/AdditionalPropertiesClass.java | 52 +------------------ 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 164cd1500d6f..44e1e29d741e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -50,12 +50,6 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; - @JsonProperty("map_with_additional_properties") - private Object mapWithAdditionalProperties; - - @JsonProperty("map_without_additional_properties") - private Object mapWithoutAdditionalProperties; - @JsonProperty("anytype_1") private Object anytype1; @@ -294,46 +288,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - */ - @ApiModelProperty(value = "") - - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - */ - @ApiModelProperty(value = "") - - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -412,8 +366,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -421,7 +373,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @Override @@ -437,8 +389,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); From 22777e7e7cd274f05cf577376ecc8e6080838401 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 21:02:25 -0700 Subject: [PATCH 078/105] run sample scripts --- .../docs/AdditionalPropertiesClass.md | 2 - .../models/additional_properties_class.py | 54 +------------------ .../python/docs/AdditionalPropertiesClass.md | 2 - .../models/additional_properties_class.py | 54 +------------------ 4 files changed, 2 insertions(+), 110 deletions(-) diff --git a/samples/client/petstore/python-asyncio/docs/AdditionalPropertiesClass.md b/samples/client/petstore/python-asyncio/docs/AdditionalPropertiesClass.md index 7b56820212d0..eb3e0524de1a 100644 --- a/samples/client/petstore/python-asyncio/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/python-asyncio/docs/AdditionalPropertiesClass.md @@ -11,8 +11,6 @@ Name | Type | Description | Notes **map_array_anytype** | **dict(str, list[object])** | | [optional] **map_map_string** | **dict(str, dict(str, str))** | | [optional] **map_map_anytype** | **dict(str, dict(str, object))** | | [optional] -**map_with_additional_properties** | **object** | | [optional] -**map_without_additional_properties** | **object** | | [optional] **anytype_1** | **object** | | [optional] **anytype_2** | **object** | | [optional] **anytype_3** | **object** | | [optional] diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_class.py index b3e6326015b2..be4455c683bf 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_class.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/additional_properties_class.py @@ -41,8 +41,6 @@ class AdditionalPropertiesClass(object): 'map_array_anytype': 'dict(str, list[object])', 'map_map_string': 'dict(str, dict(str, str))', 'map_map_anytype': 'dict(str, dict(str, object))', - 'map_with_additional_properties': 'object', - 'map_without_additional_properties': 'object', 'anytype_1': 'object', 'anytype_2': 'object', 'anytype_3': 'object' @@ -57,14 +55,12 @@ class AdditionalPropertiesClass(object): 'map_array_anytype': 'map_array_anytype', 'map_map_string': 'map_map_string', 'map_map_anytype': 'map_map_anytype', - 'map_with_additional_properties': 'map_with_additional_properties', - 'map_without_additional_properties': 'map_without_additional_properties', 'anytype_1': 'anytype_1', 'anytype_2': 'anytype_2', 'anytype_3': 'anytype_3' } - def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, map_with_additional_properties=None, map_without_additional_properties=None, anytype_1=None, anytype_2=None, anytype_3=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, anytype_1=None, anytype_2=None, anytype_3=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -78,8 +74,6 @@ def __init__(self, map_string=None, map_number=None, map_integer=None, map_boole self._map_array_anytype = None self._map_map_string = None self._map_map_anytype = None - self._map_with_additional_properties = None - self._map_without_additional_properties = None self._anytype_1 = None self._anytype_2 = None self._anytype_3 = None @@ -101,10 +95,6 @@ def __init__(self, map_string=None, map_number=None, map_integer=None, map_boole self.map_map_string = map_map_string if map_map_anytype is not None: self.map_map_anytype = map_map_anytype - if map_with_additional_properties is not None: - self.map_with_additional_properties = map_with_additional_properties - if map_without_additional_properties is not None: - self.map_without_additional_properties = map_without_additional_properties if anytype_1 is not None: self.anytype_1 = anytype_1 if anytype_2 is not None: @@ -280,48 +270,6 @@ def map_map_anytype(self, map_map_anytype): self._map_map_anytype = map_map_anytype - @property - def map_with_additional_properties(self): - """Gets the map_with_additional_properties of this AdditionalPropertiesClass. # noqa: E501 - - - :return: The map_with_additional_properties of this AdditionalPropertiesClass. # noqa: E501 - :rtype: object - """ - return self._map_with_additional_properties - - @map_with_additional_properties.setter - def map_with_additional_properties(self, map_with_additional_properties): - """Sets the map_with_additional_properties of this AdditionalPropertiesClass. - - - :param map_with_additional_properties: The map_with_additional_properties of this AdditionalPropertiesClass. # noqa: E501 - :type: object - """ - - self._map_with_additional_properties = map_with_additional_properties - - @property - def map_without_additional_properties(self): - """Gets the map_without_additional_properties of this AdditionalPropertiesClass. # noqa: E501 - - - :return: The map_without_additional_properties of this AdditionalPropertiesClass. # noqa: E501 - :rtype: object - """ - return self._map_without_additional_properties - - @map_without_additional_properties.setter - def map_without_additional_properties(self, map_without_additional_properties): - """Sets the map_without_additional_properties of this AdditionalPropertiesClass. - - - :param map_without_additional_properties: The map_without_additional_properties of this AdditionalPropertiesClass. # noqa: E501 - :type: object - """ - - self._map_without_additional_properties = map_without_additional_properties - @property def anytype_1(self): """Gets the anytype_1 of this AdditionalPropertiesClass. # noqa: E501 diff --git a/samples/client/petstore/python/docs/AdditionalPropertiesClass.md b/samples/client/petstore/python/docs/AdditionalPropertiesClass.md index 7b56820212d0..eb3e0524de1a 100644 --- a/samples/client/petstore/python/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/python/docs/AdditionalPropertiesClass.md @@ -11,8 +11,6 @@ Name | Type | Description | Notes **map_array_anytype** | **dict(str, list[object])** | | [optional] **map_map_string** | **dict(str, dict(str, str))** | | [optional] **map_map_anytype** | **dict(str, dict(str, object))** | | [optional] -**map_with_additional_properties** | **object** | | [optional] -**map_without_additional_properties** | **object** | | [optional] **anytype_1** | **object** | | [optional] **anytype_2** | **object** | | [optional] **anytype_3** | **object** | | [optional] diff --git a/samples/client/petstore/python/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python/petstore_api/models/additional_properties_class.py index b3e6326015b2..be4455c683bf 100644 --- a/samples/client/petstore/python/petstore_api/models/additional_properties_class.py +++ b/samples/client/petstore/python/petstore_api/models/additional_properties_class.py @@ -41,8 +41,6 @@ class AdditionalPropertiesClass(object): 'map_array_anytype': 'dict(str, list[object])', 'map_map_string': 'dict(str, dict(str, str))', 'map_map_anytype': 'dict(str, dict(str, object))', - 'map_with_additional_properties': 'object', - 'map_without_additional_properties': 'object', 'anytype_1': 'object', 'anytype_2': 'object', 'anytype_3': 'object' @@ -57,14 +55,12 @@ class AdditionalPropertiesClass(object): 'map_array_anytype': 'map_array_anytype', 'map_map_string': 'map_map_string', 'map_map_anytype': 'map_map_anytype', - 'map_with_additional_properties': 'map_with_additional_properties', - 'map_without_additional_properties': 'map_without_additional_properties', 'anytype_1': 'anytype_1', 'anytype_2': 'anytype_2', 'anytype_3': 'anytype_3' } - def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, map_with_additional_properties=None, map_without_additional_properties=None, anytype_1=None, anytype_2=None, anytype_3=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, anytype_1=None, anytype_2=None, anytype_3=None, local_vars_configuration=None): # noqa: E501 """AdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -78,8 +74,6 @@ def __init__(self, map_string=None, map_number=None, map_integer=None, map_boole self._map_array_anytype = None self._map_map_string = None self._map_map_anytype = None - self._map_with_additional_properties = None - self._map_without_additional_properties = None self._anytype_1 = None self._anytype_2 = None self._anytype_3 = None @@ -101,10 +95,6 @@ def __init__(self, map_string=None, map_number=None, map_integer=None, map_boole self.map_map_string = map_map_string if map_map_anytype is not None: self.map_map_anytype = map_map_anytype - if map_with_additional_properties is not None: - self.map_with_additional_properties = map_with_additional_properties - if map_without_additional_properties is not None: - self.map_without_additional_properties = map_without_additional_properties if anytype_1 is not None: self.anytype_1 = anytype_1 if anytype_2 is not None: @@ -280,48 +270,6 @@ def map_map_anytype(self, map_map_anytype): self._map_map_anytype = map_map_anytype - @property - def map_with_additional_properties(self): - """Gets the map_with_additional_properties of this AdditionalPropertiesClass. # noqa: E501 - - - :return: The map_with_additional_properties of this AdditionalPropertiesClass. # noqa: E501 - :rtype: object - """ - return self._map_with_additional_properties - - @map_with_additional_properties.setter - def map_with_additional_properties(self, map_with_additional_properties): - """Sets the map_with_additional_properties of this AdditionalPropertiesClass. - - - :param map_with_additional_properties: The map_with_additional_properties of this AdditionalPropertiesClass. # noqa: E501 - :type: object - """ - - self._map_with_additional_properties = map_with_additional_properties - - @property - def map_without_additional_properties(self): - """Gets the map_without_additional_properties of this AdditionalPropertiesClass. # noqa: E501 - - - :return: The map_without_additional_properties of this AdditionalPropertiesClass. # noqa: E501 - :rtype: object - """ - return self._map_without_additional_properties - - @map_without_additional_properties.setter - def map_without_additional_properties(self, map_without_additional_properties): - """Sets the map_without_additional_properties of this AdditionalPropertiesClass. - - - :param map_without_additional_properties: The map_without_additional_properties of this AdditionalPropertiesClass. # noqa: E501 - :type: object - """ - - self._map_without_additional_properties = map_without_additional_properties - @property def anytype_1(self): """Gets the anytype_1 of this AdditionalPropertiesClass. # noqa: E501 From a389e185b834933cccc880f061bee33ca2369d17 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 21:03:31 -0700 Subject: [PATCH 079/105] run sample scripts --- .../model/AdditionalPropertiesClass.java | 52 +------------------ 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 164cd1500d6f..44e1e29d741e 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -50,12 +50,6 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; - @JsonProperty("map_with_additional_properties") - private Object mapWithAdditionalProperties; - - @JsonProperty("map_without_additional_properties") - private Object mapWithoutAdditionalProperties; - @JsonProperty("anytype_1") private Object anytype1; @@ -294,46 +288,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - */ - @ApiModelProperty(value = "") - - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - */ - @ApiModelProperty(value = "") - - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -412,8 +366,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -421,7 +373,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @Override @@ -437,8 +389,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); From 5f428a4b5829f7ba7a41475083b7d55bef28304d Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 21:04:57 -0700 Subject: [PATCH 080/105] run sample scripts --- .../model/AdditionalPropertiesClass.java | 52 +------------------ .../model/AdditionalPropertiesClass.java | 52 +------------------ .../model/AdditionalPropertiesClass.java | 52 +------------------ 3 files changed, 3 insertions(+), 153 deletions(-) diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 164cd1500d6f..44e1e29d741e 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -50,12 +50,6 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; - @JsonProperty("map_with_additional_properties") - private Object mapWithAdditionalProperties; - - @JsonProperty("map_without_additional_properties") - private Object mapWithoutAdditionalProperties; - @JsonProperty("anytype_1") private Object anytype1; @@ -294,46 +288,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - */ - @ApiModelProperty(value = "") - - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - */ - @ApiModelProperty(value = "") - - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -412,8 +366,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -421,7 +373,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @Override @@ -437,8 +389,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 164cd1500d6f..44e1e29d741e 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -50,12 +50,6 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; - @JsonProperty("map_with_additional_properties") - private Object mapWithAdditionalProperties; - - @JsonProperty("map_without_additional_properties") - private Object mapWithoutAdditionalProperties; - @JsonProperty("anytype_1") private Object anytype1; @@ -294,46 +288,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - */ - @ApiModelProperty(value = "") - - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - */ - @ApiModelProperty(value = "") - - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -412,8 +366,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -421,7 +373,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @Override @@ -437,8 +389,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 21f6f266a31a..16b3408f323b 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -50,12 +50,6 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; - @JsonProperty("map_with_additional_properties") - private Object mapWithAdditionalProperties; - - @JsonProperty("map_without_additional_properties") - private Object mapWithoutAdditionalProperties; - @JsonProperty("anytype_1") private Object anytype1; @@ -294,46 +288,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - */ - @ApiModelProperty(value = "") - - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - */ - @ApiModelProperty(value = "") - - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -412,8 +366,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -421,7 +373,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @Override @@ -437,8 +389,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); From 9b82711fe6630f1e36c3ecc7af9e150c97826862 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 21:06:53 -0700 Subject: [PATCH 081/105] run sample scripts --- .../model/AdditionalPropertiesClass.java | 52 +------------------ 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 21f6f266a31a..16b3408f323b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -50,12 +50,6 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; - @JsonProperty("map_with_additional_properties") - private Object mapWithAdditionalProperties; - - @JsonProperty("map_without_additional_properties") - private Object mapWithoutAdditionalProperties; - @JsonProperty("anytype_1") private Object anytype1; @@ -294,46 +288,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - */ - @ApiModelProperty(value = "") - - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - */ - @ApiModelProperty(value = "") - - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -412,8 +366,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -421,7 +373,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @Override @@ -437,8 +389,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); From 0b19b7f4b60787fabea995206bf3f2bde3e5e9d2 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 22:11:45 -0700 Subject: [PATCH 082/105] refactor cli option for additional properties --- .../openapitools/codegen/DefaultCodegen.java | 7 +-- .../codegen/config/CodegenConfigurator.java | 2 +- .../codegen/utils/ModelUtils.java | 55 +++++++++---------- .../org/openapitools/codegen/TestUtils.java | 8 +-- 4 files changed, 34 insertions(+), 38 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 72ddd5d5b926..fd3558f01ef8 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 @@ -723,10 +723,9 @@ public String toEnumVarName(String value, String datatype) { @Override public void setOpenAPI(OpenAPI openAPI) { this.openAPI = openAPI; - // Set vendor extension such that helper functions can lookup the value - // of this CLI option. - this.openAPI.addExtension(ModelUtils.EXTENSION_DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, - Boolean.toString(getDisallowAdditionalPropertiesIfNotPresent())); + // Set global settings such that helper functions in ModelUtils can lookup the value + // of the CLI option. + ModelUtils.setDisallowAdditionalPropertiesIfNotPresent(getDisallowAdditionalPropertiesIfNotPresent()); } // override with any special post-processing diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java index 38c1b56107b7..df0d00f44e77 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java @@ -466,7 +466,7 @@ public Context toContext() { // TODO: The line below could be removed when at least one of the issue below has been resolved. // https://github.com/swagger-api/swagger-parser/issues/1369 // https://github.com/swagger-api/swagger-parser/pull/1374 - ModelUtils.addOpenApiVersionExtension(specification, inputSpec, authorizationValues); + //ModelUtils.getOpenApiVersion(specification, inputSpec, authorizationValues); // NOTE: We will only expose errors+warnings if there are already errors in the spec. if (validationMessages.size() > 0) { 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 d66947dc1073..0e365d535406 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 @@ -60,10 +60,10 @@ public class ModelUtils { private static final String generateAliasAsModelKey = "generateAliasAsModel"; // A vendor extension to track the value of the 'swagger' field in a 2.0 doc, if applicable. - public static final String EXTENSION_OPENAPI_DOC_VERSION = "x-original-swagger-version"; - + private static final String openapiDocVersion = "x-original-swagger-version"; + // A vendor extension to track the value of the 'disallowAdditionalPropertiesIfNotPresent' CLI - public static final String EXTENSION_DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT = "x-disallow-additional-properties-if-not-present"; + private static final String disallowAdditionalPropertiesIfNotPresent = "x-disallow-additional-properties-if-not-present"; private static ObjectMapper JSON_MAPPER, YAML_MAPPER; @@ -72,6 +72,14 @@ public class ModelUtils { YAML_MAPPER = ObjectMapperFactory.createYaml(); } + public static void setDisallowAdditionalPropertiesIfNotPresent(boolean value) { + GlobalSettings.setProperty(disallowAdditionalPropertiesIfNotPresent, Boolean.toString(value)); + } + + public static boolean isDisallowAdditionalPropertiesIfNotPresent() { + return Boolean.parseBoolean(GlobalSettings.getProperty(disallowAdditionalPropertiesIfNotPresent, "true")); + } + public static void setGenerateAliasAsModel(boolean value) { GlobalSettings.setProperty(generateAliasAsModelKey, Boolean.toString(value)); } @@ -1093,19 +1101,15 @@ public static Schema getAdditionalProperties(OpenAPI openAPI, Schema schema) { // additional properties are allowed or not. // // The original behavior was to assume additionalProperties had been set to false. - Map extensions = openAPI.getExtensions(); - if (extensions != null && extensions.containsKey(EXTENSION_DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT)) { - boolean disallowAdditionalPropertiesIfNotPresent = - Boolean.parseBoolean((String)extensions.get(EXTENSION_DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT)); - if (disallowAdditionalPropertiesIfNotPresent) { - // If the 'additionalProperties' keyword is not present in a OAS schema, - // interpret as if the 'additionalProperties' keyword had been set to false. - // This is NOT compliant with the JSON schema specification. It is the original - // 'openapi-generator' behavior. - return null; - } + if (isDisallowAdditionalPropertiesIfNotPresent()) { + // If the 'additionalProperties' keyword is not present in a OAS schema, + // interpret as if the 'additionalProperties' keyword had been set to false. + // This is NOT compliant with the JSON schema specification. It is the original + // 'openapi-generator' behavior. + return null; } - // The ${EXTENSION_DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT} extension has been set to true, + /* + // The disallowAdditionalPropertiesIfNotPresent CLI option has been set to true, // but for now that only works with OAS 3.0 documents. // The new behavior does not work with OAS 2.0 documents. if (extensions == null || !extensions.containsKey(EXTENSION_OPENAPI_DOC_VERSION)) { @@ -1120,6 +1124,7 @@ public static Schema getAdditionalProperties(OpenAPI openAPI, Schema schema) { if (version.major != 3) { return null; } + */ } if (addProps == null || (addProps instanceof Boolean && (Boolean) addProps)) { // Return ObjectSchema to specify any object (map) value is allowed. @@ -1499,7 +1504,9 @@ public static JsonNode readWithInfo(String location, List au } /** - * Return the version of the OAS document as specified in the source document. + * Parse the OAS document at the specified location, get the swagger or openapi version + * as specified in the source document, and return the version. + * * For OAS 2.0 documents, return the value of the 'swagger' attribute. * For OAS 3.x documents, return the value of the 'openapi' attribute. * @@ -1526,19 +1533,9 @@ public static SemVer getOpenApiVersion(OpenAPI openAPI, String location, List auths) { - SemVer version = getOpenApiVersion(openapi, location, auths); - openapi.addExtension(EXTENSION_OPENAPI_DOC_VERSION, version.toString()); + return new SemVer(version); } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java index 714558172d53..dc5ec9965a23 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java @@ -54,17 +54,17 @@ public static OpenAPI parseFlattenSpec(String specFilePath) { */ public static OpenAPI parseSpec(String specFilePath) { OpenAPI openAPI = new OpenAPIParser().readLocation(specFilePath, null, new ParseOptions()).getOpenAPI(); - // The extension below is to track the original swagger version. + // Invoke helper function to get the original swagger version. // See https://github.com/swagger-api/swagger-parser/pull/1374 // Also see https://github.com/swagger-api/swagger-parser/issues/1369. - ModelUtils.addOpenApiVersionExtension(openAPI, specFilePath, null); + ModelUtils.getOpenApiVersion(openAPI, specFilePath, null); return openAPI; } public static OpenAPI parseContent(String jsonOrYaml) { OpenAPI openAPI = new OpenAPIParser().readContents(jsonOrYaml, null, null).getOpenAPI(); - // The extension below is to track the original swagger version. - ModelUtils.addOpenApiVersionExtension(openAPI, jsonOrYaml, null); + // Invoke helper function to get the original swagger version. + ModelUtils.getOpenApiVersion(openAPI, jsonOrYaml, null); return openAPI; } From 006900a4f850df380fa507241020c1a66c6ebe7d Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 22:35:08 -0700 Subject: [PATCH 083/105] refactor cli option for additional properties --- .../petstore/go-experimental/go-petstore/api/openapi.yaml | 2 -- .../client/petstore/go/go-petstore-withXml/api/openapi.yaml | 2 -- samples/client/petstore/go/go-petstore/api/openapi.yaml | 2 -- samples/client/petstore/haskell-http-client/openapi.yaml | 2 -- samples/client/petstore/java/feign/api/openapi.yaml | 2 -- samples/client/petstore/java/feign10x/api/openapi.yaml | 2 -- .../client/petstore/java/google-api-client/api/openapi.yaml | 2 -- samples/client/petstore/java/jersey1/api/openapi.yaml | 2 -- samples/client/petstore/java/jersey2-java6/api/openapi.yaml | 2 -- samples/client/petstore/java/jersey2-java7/api/openapi.yaml | 2 -- samples/client/petstore/java/jersey2-java8/api/openapi.yaml | 2 -- samples/client/petstore/java/native/api/openapi.yaml | 2 -- .../java/okhttp-gson-parcelableModel/api/openapi.yaml | 2 -- samples/client/petstore/java/okhttp-gson/api/openapi.yaml | 2 -- .../petstore/java/rest-assured-jackson/api/openapi.yaml | 2 -- samples/client/petstore/java/rest-assured/api/openapi.yaml | 2 -- samples/client/petstore/java/resteasy/api/openapi.yaml | 2 -- .../petstore/java/resttemplate-withXml/api/openapi.yaml | 2 -- samples/client/petstore/java/resttemplate/api/openapi.yaml | 2 -- samples/client/petstore/java/retrofit/api/openapi.yaml | 2 -- .../client/petstore/java/retrofit2-play24/api/openapi.yaml | 2 -- .../client/petstore/java/retrofit2-play25/api/openapi.yaml | 2 -- .../client/petstore/java/retrofit2-play26/api/openapi.yaml | 2 -- samples/client/petstore/java/retrofit2/api/openapi.yaml | 2 -- samples/client/petstore/java/retrofit2rx/api/openapi.yaml | 2 -- samples/client/petstore/java/retrofit2rx2/api/openapi.yaml | 2 -- samples/client/petstore/java/vertx/api/openapi.yaml | 2 -- samples/client/petstore/java/webclient/api/openapi.yaml | 2 -- .../petstore/go-experimental/go-petstore/api/openapi.yaml | 2 -- .../openapi3/client/petstore/go/go-petstore/api/openapi.yaml | 2 -- .../openapi3/server/petstore/go-api-server/api/openapi.yaml | 2 -- .../server/petstore/go-gin-api-server/api/openapi.yaml | 2 -- samples/server/petstore/go-api-server/api/openapi.yaml | 2 -- samples/server/petstore/go-gin-api-server/api/openapi.yaml | 2 -- .../public/openapi.json | 4 +--- .../petstore/java-play-framework-async/public/openapi.json | 4 +--- .../java-play-framework-controller-only/public/openapi.json | 4 +--- .../java-play-framework-fake-endpoints/public/openapi.json | 4 +--- .../public/openapi.json | 4 +--- .../public/openapi.json | 4 +--- .../java-play-framework-no-interface/public/openapi.json | 4 +--- .../java-play-framework-no-wrap-calls/public/openapi.json | 4 +--- .../server/petstore/java-play-framework/public/openapi.json | 4 +--- .../jaxrs-spec-interface/src/main/openapi/openapi.yaml | 2 -- .../server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml | 2 -- samples/server/petstore/ruby-sinatra/openapi.yaml | 2 -- .../petstore/rust-server/output/multipart-v3/api/openapi.yaml | 2 -- .../rust-server/output/no-example-v3/api/openapi.yaml | 2 -- .../petstore/rust-server/output/openapi-v3/api/openapi.yaml | 2 -- .../petstore/rust-server/output/ops-v3/api/openapi.yaml | 2 -- .../api/openapi.yaml | 2 -- .../rust-server/output/rust-server-test/api/openapi.yaml | 2 -- .../springboot-reactive/src/main/resources/openapi.yaml | 2 -- 53 files changed, 9 insertions(+), 115 deletions(-) diff --git a/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml b/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml index 7940eaa52eac..5313659ef237 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml +++ b/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml @@ -2119,5 +2119,3 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml index 7940eaa52eac..5313659ef237 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml @@ -2119,5 +2119,3 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/go/go-petstore/api/openapi.yaml b/samples/client/petstore/go/go-petstore/api/openapi.yaml index 7940eaa52eac..5313659ef237 100644 --- a/samples/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore/api/openapi.yaml @@ -2119,5 +2119,3 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/haskell-http-client/openapi.yaml b/samples/client/petstore/haskell-http-client/openapi.yaml index 7940eaa52eac..5313659ef237 100644 --- a/samples/client/petstore/haskell-http-client/openapi.yaml +++ b/samples/client/petstore/haskell-http-client/openapi.yaml @@ -2119,5 +2119,3 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/feign/api/openapi.yaml b/samples/client/petstore/java/feign/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/feign/api/openapi.yaml +++ b/samples/client/petstore/java/feign/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/feign10x/api/openapi.yaml b/samples/client/petstore/java/feign10x/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/feign10x/api/openapi.yaml +++ b/samples/client/petstore/java/feign10x/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/google-api-client/api/openapi.yaml b/samples/client/petstore/java/google-api-client/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/google-api-client/api/openapi.yaml +++ b/samples/client/petstore/java/google-api-client/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/jersey1/api/openapi.yaml b/samples/client/petstore/java/jersey1/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/jersey1/api/openapi.yaml +++ b/samples/client/petstore/java/jersey1/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/jersey2-java6/api/openapi.yaml b/samples/client/petstore/java/jersey2-java6/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/jersey2-java6/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java6/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/jersey2-java7/api/openapi.yaml b/samples/client/petstore/java/jersey2-java7/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/jersey2-java7/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java7/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/native/api/openapi.yaml b/samples/client/petstore/java/native/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/native/api/openapi.yaml +++ b/samples/client/petstore/java/native/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/rest-assured/api/openapi.yaml b/samples/client/petstore/java/rest-assured/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/rest-assured/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/resteasy/api/openapi.yaml b/samples/client/petstore/java/resteasy/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/resteasy/api/openapi.yaml +++ b/samples/client/petstore/java/resteasy/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/resttemplate/api/openapi.yaml b/samples/client/petstore/java/resttemplate/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/resttemplate/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/retrofit/api/openapi.yaml b/samples/client/petstore/java/retrofit/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/retrofit/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/retrofit2-play24/api/openapi.yaml b/samples/client/petstore/java/retrofit2-play24/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/retrofit2-play24/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2-play24/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/retrofit2-play25/api/openapi.yaml b/samples/client/petstore/java/retrofit2-play25/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/retrofit2-play25/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2-play25/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml b/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/retrofit2/api/openapi.yaml b/samples/client/petstore/java/retrofit2/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/retrofit2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/retrofit2rx/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/retrofit2rx/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/vertx/api/openapi.yaml b/samples/client/petstore/java/vertx/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/vertx/api/openapi.yaml +++ b/samples/client/petstore/java/vertx/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/client/petstore/java/webclient/api/openapi.yaml b/samples/client/petstore/java/webclient/api/openapi.yaml index d86a7b959f95..30aad25824c8 100644 --- a/samples/client/petstore/java/webclient/api/openapi.yaml +++ b/samples/client/petstore/java/webclient/api/openapi.yaml @@ -2180,6 +2180,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml b/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml index cb59ab84d679..5c1cc82811a7 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml @@ -2178,5 +2178,3 @@ components: http_signature_test: scheme: signature type: http -x-original-swagger-version: 3.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml index 11635de3f459..af7148414b93 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml @@ -2090,5 +2090,3 @@ components: http_signature_test: scheme: signature type: http -x-original-swagger-version: 3.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml b/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml index 11635de3f459..af7148414b93 100644 --- a/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml +++ b/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml @@ -2090,5 +2090,3 @@ components: http_signature_test: scheme: signature type: http -x-original-swagger-version: 3.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml b/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml index 11635de3f459..af7148414b93 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml +++ b/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml @@ -2090,5 +2090,3 @@ components: http_signature_test: scheme: signature type: http -x-original-swagger-version: 3.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/go-api-server/api/openapi.yaml b/samples/server/petstore/go-api-server/api/openapi.yaml index 42549d93a8ea..0c61c2099572 100644 --- a/samples/server/petstore/go-api-server/api/openapi.yaml +++ b/samples/server/petstore/go-api-server/api/openapi.yaml @@ -760,5 +760,3 @@ components: in: header name: api_key type: apiKey -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/go-gin-api-server/api/openapi.yaml b/samples/server/petstore/go-gin-api-server/api/openapi.yaml index 42549d93a8ea..0c61c2099572 100644 --- a/samples/server/petstore/go-gin-api-server/api/openapi.yaml +++ b/samples/server/petstore/go-gin-api-server/api/openapi.yaml @@ -760,5 +760,3 @@ components: in: header name: api_key type: apiKey -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json index d67ec8330bdf..1a863721712a 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json +++ b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json @@ -1037,7 +1037,5 @@ "type" : "apiKey" } } - }, - "x-original-swagger-version" : "2.0.0", - "x-disallow-additional-properties-if-not-present" : "true" + } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-async/public/openapi.json b/samples/server/petstore/java-play-framework-async/public/openapi.json index d67ec8330bdf..1a863721712a 100644 --- a/samples/server/petstore/java-play-framework-async/public/openapi.json +++ b/samples/server/petstore/java-play-framework-async/public/openapi.json @@ -1037,7 +1037,5 @@ "type" : "apiKey" } } - }, - "x-original-swagger-version" : "2.0.0", - "x-disallow-additional-properties-if-not-present" : "true" + } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json index d67ec8330bdf..1a863721712a 100644 --- a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json +++ b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json @@ -1037,7 +1037,5 @@ "type" : "apiKey" } } - }, - "x-original-swagger-version" : "2.0.0", - "x-disallow-additional-properties-if-not-present" : "true" + } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json index 8780b4d48287..edbfa20608bc 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json @@ -2873,7 +2873,5 @@ "type" : "http" } } - }, - "x-original-swagger-version" : "2.0.0", - "x-disallow-additional-properties-if-not-present" : "true" + } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json index d67ec8330bdf..1a863721712a 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json @@ -1037,7 +1037,5 @@ "type" : "apiKey" } } - }, - "x-original-swagger-version" : "2.0.0", - "x-disallow-additional-properties-if-not-present" : "true" + } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json index d67ec8330bdf..1a863721712a 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json @@ -1037,7 +1037,5 @@ "type" : "apiKey" } } - }, - "x-original-swagger-version" : "2.0.0", - "x-disallow-additional-properties-if-not-present" : "true" + } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json index d67ec8330bdf..1a863721712a 100644 --- a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json @@ -1037,7 +1037,5 @@ "type" : "apiKey" } } - }, - "x-original-swagger-version" : "2.0.0", - "x-disallow-additional-properties-if-not-present" : "true" + } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json b/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json index d67ec8330bdf..1a863721712a 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json @@ -1037,7 +1037,5 @@ "type" : "apiKey" } } - }, - "x-original-swagger-version" : "2.0.0", - "x-disallow-additional-properties-if-not-present" : "true" + } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/public/openapi.json b/samples/server/petstore/java-play-framework/public/openapi.json index d67ec8330bdf..1a863721712a 100644 --- a/samples/server/petstore/java-play-framework/public/openapi.json +++ b/samples/server/petstore/java-play-framework/public/openapi.json @@ -1037,7 +1037,5 @@ "type" : "apiKey" } } - }, - "x-original-swagger-version" : "2.0.0", - "x-disallow-additional-properties-if-not-present" : "true" + } } \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml index a73c4ac72f9a..f6f5c60294f7 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml @@ -2254,5 +2254,3 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml index a73c4ac72f9a..f6f5c60294f7 100644 --- a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml @@ -2254,5 +2254,3 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/ruby-sinatra/openapi.yaml b/samples/server/petstore/ruby-sinatra/openapi.yaml index 42549d93a8ea..0c61c2099572 100644 --- a/samples/server/petstore/ruby-sinatra/openapi.yaml +++ b/samples/server/petstore/ruby-sinatra/openapi.yaml @@ -760,5 +760,3 @@ components: in: header name: api_key type: apiKey -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/rust-server/output/multipart-v3/api/openapi.yaml b/samples/server/petstore/rust-server/output/multipart-v3/api/openapi.yaml index a49378d98920..cc003383b966 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/multipart-v3/api/openapi.yaml @@ -132,6 +132,4 @@ components: type: array required: - field_a -x-original-swagger-version: 3.0.1 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/rust-server/output/no-example-v3/api/openapi.yaml b/samples/server/petstore/rust-server/output/no-example-v3/api/openapi.yaml index fe08c5f056c9..0e9e1377ea91 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/no-example-v3/api/openapi.yaml @@ -38,6 +38,4 @@ components: required: - property type: object -x-original-swagger-version: 3.0.1 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/rust-server/output/openapi-v3/api/openapi.yaml b/samples/server/petstore/rust-server/output/openapi-v3/api/openapi.yaml index 2bae29ad9ee1..894bb1537ab6 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/openapi-v3/api/openapi.yaml @@ -591,6 +591,4 @@ components: test.write: Allowed to change state. tokenUrl: http://example.org type: oauth2 -x-original-swagger-version: 3.0.1 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/rust-server/output/ops-v3/api/openapi.yaml b/samples/server/petstore/rust-server/output/ops-v3/api/openapi.yaml index 13660eeb6d73..c0129798aa6d 100644 --- a/samples/server/petstore/rust-server/output/ops-v3/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/ops-v3/api/openapi.yaml @@ -192,6 +192,4 @@ paths: description: OK components: schemas: {} -x-original-swagger-version: 3.0.1 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml index 7d1aabb7c0b6..27f96b0bef1a 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml @@ -1589,6 +1589,4 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml b/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml index 64e50c80787c..276349f7a0e7 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml @@ -211,6 +211,4 @@ components: type: integer required: - required_thing -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" diff --git a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml index a73c4ac72f9a..f6f5c60294f7 100644 --- a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -2254,5 +2254,3 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: 2.0.0 -x-disallow-additional-properties-if-not-present: "true" From a63f6701432c58be78c100cc498821befdcfb259 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 22:38:23 -0700 Subject: [PATCH 084/105] run samples scripts --- .../ruby-on-rails/.openapi-generator/VERSION | 2 +- .../ruby-on-rails/db/migrate/0_init_tables.rb | 14 + .../ruby-sinatra/.openapi-generator/VERSION | 2 +- .../server/petstore/ruby-sinatra/openapi.yaml | 256 +++++++++++------- 4 files changed, 167 insertions(+), 107 deletions(-) diff --git a/samples/server/petstore/ruby-on-rails/.openapi-generator/VERSION b/samples/server/petstore/ruby-on-rails/.openapi-generator/VERSION index d99e7162d01f..d168f1d8bdaa 100644 --- a/samples/server/petstore/ruby-on-rails/.openapi-generator/VERSION +++ b/samples/server/petstore/ruby-on-rails/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0-SNAPSHOT \ No newline at end of file +4.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/ruby-on-rails/db/migrate/0_init_tables.rb b/samples/server/petstore/ruby-on-rails/db/migrate/0_init_tables.rb index 27e270c494e2..fbf324f2d198 100644 --- a/samples/server/petstore/ruby-on-rails/db/migrate/0_init_tables.rb +++ b/samples/server/petstore/ruby-on-rails/db/migrate/0_init_tables.rb @@ -25,6 +25,20 @@ def change t.timestamps end + create_table "inline_object".pluralize.to_sym, id: false do |t| + t.string :name + t.string :status + + t.timestamps + end + + create_table "inline_object_1".pluralize.to_sym, id: false do |t| + t.string :additional_metadata + t.File :file + + t.timestamps + end + create_table "order".pluralize.to_sym, id: false do |t| t.integer :id t.integer :pet_id diff --git a/samples/server/petstore/ruby-sinatra/.openapi-generator/VERSION b/samples/server/petstore/ruby-sinatra/.openapi-generator/VERSION index d99e7162d01f..d168f1d8bdaa 100644 --- a/samples/server/petstore/ruby-sinatra/.openapi-generator/VERSION +++ b/samples/server/petstore/ruby-sinatra/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0-SNAPSHOT \ No newline at end of file +4.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/ruby-sinatra/openapi.yaml b/samples/server/petstore/ruby-sinatra/openapi.yaml index 0c61c2099572..2a48cecf82bb 100644 --- a/samples/server/petstore/ruby-sinatra/openapi.yaml +++ b/samples/server/petstore/ruby-sinatra/openapi.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.1 +openapi: 3.0.0 info: description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. @@ -7,6 +7,9 @@ info: url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 +externalDocs: + description: Find out more about Swagger + url: http://swagger.io servers: - url: http://petstore.swagger.io/v2 tags: @@ -21,18 +24,9 @@ paths: post: operationId: addPet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: - "405": - content: {} + 405: description: Invalid input security: - petstore_auth: @@ -41,28 +35,16 @@ paths: summary: Add a new pet to the store tags: - pet - x-codegen-request-body-name: body put: operationId: updatePet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: - "400": - content: {} + 400: description: Invalid ID supplied - "404": - content: {} + 404: description: Pet not found - "405": - content: {} + 405: description: Validation exception security: - petstore_auth: @@ -71,7 +53,6 @@ paths: summary: Update an existing pet tags: - pet - x-codegen-request-body-name: body /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -93,7 +74,7 @@ paths: type: array style: form responses: - "200": + 200: content: application/xml: schema: @@ -106,12 +87,10 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - "400": - content: {} + 400: description: Invalid status value security: - petstore_auth: - - write:pets - read:pets summary: Finds Pets by status tags: @@ -134,7 +113,7 @@ paths: type: array style: form responses: - "200": + 200: content: application/xml: schema: @@ -147,12 +126,10 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - "400": - content: {} + 400: description: Invalid tag value security: - petstore_auth: - - write:pets - read:pets summary: Finds Pets by tags tags: @@ -161,20 +138,24 @@ paths: delete: operationId: deletePet parameters: - - in: header + - explode: false + in: header name: api_key + required: false schema: type: string + style: simple - description: Pet id to delete + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: - "400": - content: {} + 400: description: Invalid pet value security: - petstore_auth: @@ -188,14 +169,16 @@ paths: operationId: getPetById parameters: - description: ID of pet to return + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: - "200": + 200: content: application/xml: schema: @@ -204,11 +187,9 @@ paths: schema: $ref: '#/components/schemas/Pet' description: successful operation - "400": - content: {} + 400: description: Invalid ID supplied - "404": - content: {} + 404: description: Pet not found security: - api_key: [] @@ -219,13 +200,16 @@ paths: operationId: updatePetWithForm parameters: - description: ID of pet that needs to be updated + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: + $ref: '#/components/requestBodies/inline_object' content: application/x-www-form-urlencoded: schema: @@ -236,9 +220,9 @@ paths: status: description: Updated status of the pet type: string + type: object responses: - "405": - content: {} + 405: description: Invalid input security: - petstore_auth: @@ -252,13 +236,16 @@ paths: operationId: uploadFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: + $ref: '#/components/requestBodies/inline_object_1' content: multipart/form-data: schema: @@ -270,8 +257,9 @@ paths: description: file to upload format: binary type: string + type: object responses: - "200": + 200: content: application/json: schema: @@ -289,7 +277,7 @@ paths: description: Returns a map of status codes to quantities operationId: getInventory responses: - "200": + 200: content: application/json: schema: @@ -308,13 +296,13 @@ paths: operationId: placeOrder requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Order' description: order placed for purchasing the pet required: true responses: - "200": + 200: content: application/xml: schema: @@ -323,13 +311,11 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - "400": - content: {} + 400: description: Invalid Order summary: Place an order for a pet tags: - store - x-codegen-request-body-name: body /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -337,17 +323,17 @@ paths: operationId: deleteOrder parameters: - description: ID of the order that needs to be deleted + explode: false in: path name: orderId required: true schema: type: string + style: simple responses: - "400": - content: {} + 400: description: Invalid ID supplied - "404": - content: {} + 404: description: Order not found summary: Delete purchase order by ID tags: @@ -358,6 +344,7 @@ paths: operationId: getOrderById parameters: - description: ID of pet that needs to be fetched + explode: false in: path name: orderId required: true @@ -366,8 +353,9 @@ paths: maximum: 5 minimum: 1 type: integer + style: simple responses: - "200": + 200: content: application/xml: schema: @@ -376,11 +364,9 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - "400": - content: {} + 400: description: Invalid ID supplied - "404": - content: {} + 404: description: Order not found summary: Find purchase order by ID tags: @@ -391,77 +377,68 @@ paths: operationId: createUser requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Created user object required: true responses: default: - content: {} description: successful operation + security: + - auth_cookie: [] summary: Create user tags: - user - x-codegen-request-body-name: body /user/createWithArray: post: operationId: createUsersWithArrayInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation + security: + - auth_cookie: [] summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body /user/createWithList: post: operationId: createUsersWithListInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation + security: + - auth_cookie: [] summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body /user/login: get: operationId: loginUser parameters: - description: The user name for login + explode: true in: query name: username required: true schema: + pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$ type: string + style: form - description: The password for login in clear text + explode: true in: query name: password required: true schema: type: string + style: form responses: - "200": + 200: content: application/xml: schema: @@ -471,18 +448,29 @@ paths: type: string description: successful operation headers: + Set-Cookie: + description: Cookie authentication key for use with the `auth_cookie` + apiKey authentication. + explode: false + schema: + example: AUTH_KEY=abcde12345; Path=/; HttpOnly + type: string + style: simple X-Rate-Limit: description: calls per hour allowed by the user + explode: false schema: format: int32 type: integer + style: simple X-Expires-After: description: date in UTC when toekn expires + explode: false schema: format: date-time type: string - "400": - content: {} + style: simple + 400: description: Invalid username/password supplied summary: Logs user into the system tags: @@ -492,8 +480,9 @@ paths: operationId: logoutUser responses: default: - content: {} description: successful operation + security: + - auth_cookie: [] summary: Logs out current logged in user session tags: - user @@ -503,18 +492,20 @@ paths: operationId: deleteUser parameters: - description: The name that needs to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple responses: - "400": - content: {} + 400: description: Invalid username supplied - "404": - content: {} + 404: description: User not found + security: + - auth_cookie: [] summary: Delete user tags: - user @@ -522,13 +513,15 @@ paths: operationId: getUserByName parameters: - description: The name that needs to be fetched. Use user1 for testing. + explode: false in: path name: username required: true schema: type: string + style: simple responses: - "200": + 200: content: application/xml: schema: @@ -537,11 +530,9 @@ paths: schema: $ref: '#/components/schemas/User' description: successful operation - "400": - content: {} + 400: description: Invalid username supplied - "404": - content: {} + 404: description: User not found summary: Get user by user name tags: @@ -551,30 +542,61 @@ paths: operationId: updateUser parameters: - description: name that need to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Updated user object required: true responses: - "400": - content: {} + 400: description: Invalid user supplied - "404": - content: {} + 404: description: User not found + security: + - auth_cookie: [] summary: Updated user tags: - user - x-codegen-request-body-name: body components: + requestBodies: + UserArray: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + inline_object: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/inline_object' + inline_object_1: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/inline_object_1' schemas: Order: description: An order for a pets from the pet store @@ -622,6 +644,7 @@ components: format: int64 type: integer name: + pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$ type: string title: Pet category type: object @@ -747,6 +770,25 @@ components: type: string title: An uploaded response type: object + inline_object: + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + type: object + inline_object_1: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + type: object securitySchemes: petstore_auth: flows: @@ -760,3 +802,7 @@ components: in: header name: api_key type: apiKey + auth_cookie: + in: cookie + name: AUTH_KEY + type: apiKey From 38ecb91b638fdad96c676c7620ad589c307cb095 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 22:40:56 -0700 Subject: [PATCH 085/105] run sample scripts --- .../model/AdditionalPropertiesClass.java | 56 +------------------ .../model/AdditionalPropertiesClass.java | 56 +------------------ 2 files changed, 2 insertions(+), 110 deletions(-) diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index f0c285650141..239ebd876168 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -38,8 +38,6 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -78,14 +76,6 @@ public class AdditionalPropertiesClass { @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; - public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) - private Object mapWithAdditionalProperties; - - public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - private Object mapWithoutAdditionalProperties; - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; @JsonProperty(JSON_PROPERTY_ANYTYPE1) private Object anytype1; @@ -322,46 +312,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @JsonProperty("map_with_additional_properties") - @ApiModelProperty(value = "") - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @JsonProperty("map_without_additional_properties") - @ApiModelProperty(value = "") - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -440,8 +390,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -449,7 +397,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -466,8 +414,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index f0c285650141..239ebd876168 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -38,8 +38,6 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -78,14 +76,6 @@ public class AdditionalPropertiesClass { @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; - public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) - private Object mapWithAdditionalProperties; - - public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - private Object mapWithoutAdditionalProperties; - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; @JsonProperty(JSON_PROPERTY_ANYTYPE1) private Object anytype1; @@ -322,46 +312,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @JsonProperty("map_with_additional_properties") - @ApiModelProperty(value = "") - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @JsonProperty("map_without_additional_properties") - @ApiModelProperty(value = "") - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -440,8 +390,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -449,7 +397,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -466,8 +414,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); From 66d35c5c197b1918b14fabb25e1f316e23823724 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 22:43:09 -0700 Subject: [PATCH 086/105] run sample scripts --- .../model/AdditionalPropertiesClass.java | 56 +------------------ .../model/AdditionalPropertiesClass.java | 56 +------------------ 2 files changed, 2 insertions(+), 110 deletions(-) diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index f0c285650141..239ebd876168 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -38,8 +38,6 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -78,14 +76,6 @@ public class AdditionalPropertiesClass { @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; - public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) - private Object mapWithAdditionalProperties; - - public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - private Object mapWithoutAdditionalProperties; - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; @JsonProperty(JSON_PROPERTY_ANYTYPE1) private Object anytype1; @@ -322,46 +312,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @JsonProperty("map_with_additional_properties") - @ApiModelProperty(value = "") - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @JsonProperty("map_without_additional_properties") - @ApiModelProperty(value = "") - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -440,8 +390,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -449,7 +397,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -466,8 +414,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index f0c285650141..239ebd876168 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -38,8 +38,6 @@ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 @@ -78,14 +76,6 @@ public class AdditionalPropertiesClass { @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) private Map> mapMapAnytype = null; - public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) - private Object mapWithAdditionalProperties; - - public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - private Object mapWithoutAdditionalProperties; - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; @JsonProperty(JSON_PROPERTY_ANYTYPE1) private Object anytype1; @@ -322,46 +312,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @JsonProperty("map_with_additional_properties") - @ApiModelProperty(value = "") - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @JsonProperty("map_without_additional_properties") - @ApiModelProperty(value = "") - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -440,8 +390,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -449,7 +397,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -466,8 +414,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); From fe87ff0d573bb53ed1576aa250aba200f85d5aaa Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 22:44:46 -0700 Subject: [PATCH 087/105] run sample scripts --- .../model/AdditionalPropertiesClass.java | 44 --------------- .../model/AdditionalPropertiesClass.java | 56 +------------------ 2 files changed, 1 insertion(+), 99 deletions(-) diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index 52e44cfac413..8dd83cb66108 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -48,12 +48,6 @@ public class AdditionalPropertiesClass { @Valid private Map> mapMapAnytype = null; - @ApiModelProperty(value = "") - private Object mapWithAdditionalProperties; - - @ApiModelProperty(value = "") - private Object mapWithoutAdditionalProperties; - @ApiModelProperty(value = "") private Object anytype1; @@ -246,42 +240,6 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> mapMapAnytype = null; - public static final String JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES = "map_with_additional_properties"; - @JsonProperty(JSON_PROPERTY_MAP_WITH_ADDITIONAL_PROPERTIES) - private Object mapWithAdditionalProperties; - - public static final String JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES = "map_without_additional_properties"; - @JsonProperty(JSON_PROPERTY_MAP_WITHOUT_ADDITIONAL_PROPERTIES) - private Object mapWithoutAdditionalProperties; - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; @JsonProperty(JSON_PROPERTY_ANYTYPE1) private Object anytype1; @@ -323,46 +313,6 @@ public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @JsonProperty("map_with_additional_properties") - @ApiModelProperty(value = "") - - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @JsonProperty("map_without_additional_properties") - @ApiModelProperty(value = "") - - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - public AdditionalPropertiesClass anytype1(Object anytype1) { this.anytype1 = anytype1; return this; @@ -441,8 +391,6 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.mapWithAdditionalProperties, additionalPropertiesClass.mapWithAdditionalProperties) && - Objects.equals(this.mapWithoutAdditionalProperties, additionalPropertiesClass.mapWithoutAdditionalProperties) && Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); @@ -450,7 +398,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, mapWithAdditionalProperties, mapWithoutAdditionalProperties, anytype1, anytype2, anytype3); + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); } @@ -467,8 +415,6 @@ public String toString() { sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" mapWithAdditionalProperties: ").append(toIndentedString(mapWithAdditionalProperties)).append("\n"); - sb.append(" mapWithoutAdditionalProperties: ").append(toIndentedString(mapWithoutAdditionalProperties)).append("\n"); sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); From ed54ab81957afc1a46cd255863c975e562c186e4 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 22:46:52 -0700 Subject: [PATCH 088/105] run sample scripts --- .../go-api-server/.openapi-generator/VERSION | 2 +- .../petstore/go-api-server/api/openapi.yaml | 139 +++++++----------- .../petstore/go-api-server/go/api_fake.go | 26 ---- .../petstore/go-api-server/go/model_cat.go | 4 + .../petstore/go-api-server/go/model_dog.go | 4 + .../.openapi-generator/VERSION | 2 +- .../go-gin-api-server/api/openapi.yaml | 139 +++++++----------- .../petstore/go-gin-api-server/go/api_fake.go | 5 - .../go-gin-api-server/go/model_cat.go | 4 + .../go-gin-api-server/go/model_dog.go | 4 + .../petstore/go-gin-api-server/go/routers.go | 7 - 11 files changed, 124 insertions(+), 212 deletions(-) diff --git a/samples/openapi3/server/petstore/go-api-server/.openapi-generator/VERSION b/samples/openapi3/server/petstore/go-api-server/.openapi-generator/VERSION index d99e7162d01f..58592f031f65 100644 --- a/samples/openapi3/server/petstore/go-api-server/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/go-api-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml b/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml index af7148414b93..06a1bb8d4693 100644 --- a/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml +++ b/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml @@ -54,7 +54,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Pet' responses: - "405": + 405: description: Invalid input security: - petstore_auth: @@ -68,11 +68,11 @@ paths: requestBody: $ref: '#/components/requestBodies/Pet' responses: - "400": + 400: description: Invalid ID supplied - "404": + 404: description: Pet not found - "405": + 405: description: Validation exception security: - petstore_auth: @@ -105,7 +105,7 @@ paths: type: array style: form responses: - "200": + 200: content: application/xml: schema: @@ -118,7 +118,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - "400": + 400: description: Invalid status value security: - petstore_auth: @@ -145,7 +145,7 @@ paths: type: array style: form responses: - "200": + 200: content: application/xml: schema: @@ -158,7 +158,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - "400": + 400: description: Invalid tag value security: - petstore_auth: @@ -188,7 +188,7 @@ paths: type: integer style: simple responses: - "400": + 400: description: Invalid pet value security: - petstore_auth: @@ -211,7 +211,7 @@ paths: type: integer style: simple responses: - "200": + 200: content: application/xml: schema: @@ -220,9 +220,9 @@ paths: schema: $ref: '#/components/schemas/Pet' description: successful operation - "400": + 400: description: Invalid ID supplied - "404": + 404: description: Pet not found security: - api_key: [] @@ -255,7 +255,7 @@ paths: type: string type: object responses: - "405": + 405: description: Invalid input security: - petstore_auth: @@ -292,7 +292,7 @@ paths: type: string type: object responses: - "200": + 200: content: application/json: schema: @@ -310,7 +310,7 @@ paths: description: Returns a map of status codes to quantities operationId: getInventory responses: - "200": + 200: content: application/json: schema: @@ -335,7 +335,7 @@ paths: description: order placed for purchasing the pet required: true responses: - "200": + 200: content: application/xml: schema: @@ -344,7 +344,7 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - "400": + 400: description: Invalid Order summary: Place an order for a pet tags: @@ -364,9 +364,9 @@ paths: type: string style: simple responses: - "400": + 400: description: Invalid ID supplied - "404": + 404: description: Order not found summary: Delete purchase order by ID tags: @@ -388,7 +388,7 @@ paths: type: integer style: simple responses: - "200": + 200: content: application/xml: schema: @@ -397,9 +397,9 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - "400": + 400: description: Invalid ID supplied - "404": + 404: description: Order not found summary: Find purchase order by ID tags: @@ -464,7 +464,7 @@ paths: type: string style: form responses: - "200": + 200: content: application/xml: schema: @@ -488,7 +488,7 @@ paths: format: date-time type: string style: simple - "400": + 400: description: Invalid username/password supplied summary: Logs user into the system tags: @@ -516,9 +516,9 @@ paths: type: string style: simple responses: - "400": + 400: description: Invalid username supplied - "404": + 404: description: User not found summary: Delete user tags: @@ -535,7 +535,7 @@ paths: type: string style: simple responses: - "200": + 200: content: application/xml: schema: @@ -544,9 +544,9 @@ paths: schema: $ref: '#/components/schemas/User' description: successful operation - "400": + 400: description: Invalid username supplied - "404": + 404: description: User not found summary: Get user by user name tags: @@ -571,9 +571,9 @@ paths: description: Updated user object required: true responses: - "400": + 400: description: Invalid user supplied - "404": + 404: description: User not found summary: Updated user tags: @@ -585,7 +585,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Client' responses: - "200": + 200: content: application/json: schema: @@ -652,7 +652,7 @@ paths: type: integer style: form responses: - "400": + 400: description: Someting wrong security: - bearer_test: [] @@ -767,9 +767,9 @@ paths: type: string type: object responses: - "400": + 400: description: Invalid request - "404": + 404: description: Not found summary: To test enum parameters tags: @@ -780,7 +780,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Client' responses: - "200": + 200: content: application/json: schema: @@ -873,9 +873,9 @@ paths: - pattern_without_delimiter type: object responses: - "400": + 400: description: Invalid username supplied - "404": + 404: description: User not found security: - http_basic_test: [] @@ -897,7 +897,7 @@ paths: $ref: '#/components/schemas/OuterNumber' description: Input number as post body responses: - "200": + 200: content: '*/*': schema: @@ -916,7 +916,7 @@ paths: $ref: '#/components/schemas/OuterString' description: Input string as post body responses: - "200": + 200: content: '*/*': schema: @@ -935,7 +935,7 @@ paths: $ref: '#/components/schemas/OuterBoolean' description: Input boolean as post body responses: - "200": + 200: content: '*/*': schema: @@ -954,7 +954,7 @@ paths: $ref: '#/components/schemas/OuterComposite' description: Input composite as post body responses: - "200": + 200: content: '*/*': schema: @@ -982,7 +982,7 @@ paths: - param2 type: object responses: - "200": + 200: description: successful operation summary: test json serialization of form data tags: @@ -1000,7 +1000,7 @@ paths: description: request body required: true responses: - "200": + 200: description: successful operation summary: test inline additionalProperties tags: @@ -1023,7 +1023,7 @@ paths: $ref: '#/components/schemas/User' required: true responses: - "200": + 200: description: Success tags: - fake @@ -1034,7 +1034,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Client' responses: - "200": + 200: content: application/json: schema: @@ -1055,7 +1055,7 @@ paths: $ref: '#/components/schemas/FileSchemaTestClass' required: true responses: - "200": + 200: description: Success tags: - fake @@ -1110,7 +1110,7 @@ paths: type: array style: form responses: - "200": + 200: description: Success tags: - fake @@ -1144,7 +1144,7 @@ paths: - requiredFile type: object responses: - "200": + 200: content: application/json: schema: @@ -1160,7 +1160,7 @@ paths: /fake/health: get: responses: - "200": + 200: content: application/json: schema: @@ -1169,36 +1169,6 @@ paths: summary: Health check endpoint tags: - fake - /fake/http-signature-test: - get: - operationId: fake-http-signature-test - parameters: - - description: query parameter - explode: true - in: query - name: query_1 - required: false - schema: - type: string - style: form - - description: header parameter - explode: false - in: header - name: header_1 - required: false - schema: - type: string - style: simple - requestBody: - $ref: '#/components/requestBodies/Pet' - responses: - "200": - description: The instance started successfully - security: - - http_signature_test: [] - summary: test http signature authentication - tags: - - fake components: requestBodies: UserArray: @@ -1453,14 +1423,14 @@ components: type: integer property: type: string - "123Number": + 123Number: readOnly: true type: integer required: - name xml: name: Name - "200_response": + 200_response: description: Model for testing model name starting with number properties: name: @@ -1638,7 +1608,7 @@ components: type: object List: properties: - "123-list": + 123-list: type: string type: object Client: @@ -2087,6 +2057,3 @@ components: bearerFormat: JWT scheme: bearer type: http - http_signature_test: - scheme: signature - type: http diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_fake.go b/samples/openapi3/server/petstore/go-api-server/go/api_fake.go index fb3c3346a365..94b55953254c 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/api_fake.go +++ b/samples/openapi3/server/petstore/go-api-server/go/api_fake.go @@ -36,12 +36,6 @@ func (c *FakeApiController) Routes() Routes { "/v2/fake/health", c.FakeHealthGet, }, - { - "FakeHttpSignatureTest", - strings.ToUpper("Get"), - "/v2/fake/http-signature-test", - c.FakeHttpSignatureTest, - }, { "FakeOuterBooleanSerialize", strings.ToUpper("Post"), @@ -134,26 +128,6 @@ func (c *FakeApiController) FakeHealthGet(w http.ResponseWriter, r *http.Request EncodeJSONResponse(result, nil, w) } -// FakeHttpSignatureTest - test http signature authentication -func (c *FakeApiController) FakeHttpSignatureTest(w http.ResponseWriter, r *http.Request) { - query := r.URL.Query() - pet := &Pet{} - if err := json.NewDecoder(r.Body).Decode(&pet); err != nil { - w.WriteHeader(500) - return - } - - query1 := query.Get("query1") - header1 := r.Header.Get("header1") - result, err := c.service.FakeHttpSignatureTest(*pet, query1, header1) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - // FakeOuterBooleanSerialize - func (c *FakeApiController) FakeOuterBooleanSerialize(w http.ResponseWriter, r *http.Request) { body := &bool{} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_cat.go b/samples/openapi3/server/petstore/go-api-server/go/model_cat.go index a221fb052d21..78261ede6121 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/model_cat.go +++ b/samples/openapi3/server/petstore/go-api-server/go/model_cat.go @@ -11,5 +11,9 @@ package petstoreserver type Cat struct { + ClassName string `json:"className"` + + Color string `json:"color,omitempty"` + Declawed bool `json:"declawed,omitempty"` } diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_dog.go b/samples/openapi3/server/petstore/go-api-server/go/model_dog.go index 71fbac70d500..04b2a9ba9aae 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/model_dog.go +++ b/samples/openapi3/server/petstore/go-api-server/go/model_dog.go @@ -11,5 +11,9 @@ package petstoreserver type Dog struct { + ClassName string `json:"className"` + + Color string `json:"color,omitempty"` + Breed string `json:"breed,omitempty"` } diff --git a/samples/openapi3/server/petstore/go-gin-api-server/.openapi-generator/VERSION b/samples/openapi3/server/petstore/go-gin-api-server/.openapi-generator/VERSION index d99e7162d01f..58592f031f65 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/go-gin-api-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml b/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml index af7148414b93..06a1bb8d4693 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml +++ b/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml @@ -54,7 +54,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Pet' responses: - "405": + 405: description: Invalid input security: - petstore_auth: @@ -68,11 +68,11 @@ paths: requestBody: $ref: '#/components/requestBodies/Pet' responses: - "400": + 400: description: Invalid ID supplied - "404": + 404: description: Pet not found - "405": + 405: description: Validation exception security: - petstore_auth: @@ -105,7 +105,7 @@ paths: type: array style: form responses: - "200": + 200: content: application/xml: schema: @@ -118,7 +118,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - "400": + 400: description: Invalid status value security: - petstore_auth: @@ -145,7 +145,7 @@ paths: type: array style: form responses: - "200": + 200: content: application/xml: schema: @@ -158,7 +158,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - "400": + 400: description: Invalid tag value security: - petstore_auth: @@ -188,7 +188,7 @@ paths: type: integer style: simple responses: - "400": + 400: description: Invalid pet value security: - petstore_auth: @@ -211,7 +211,7 @@ paths: type: integer style: simple responses: - "200": + 200: content: application/xml: schema: @@ -220,9 +220,9 @@ paths: schema: $ref: '#/components/schemas/Pet' description: successful operation - "400": + 400: description: Invalid ID supplied - "404": + 404: description: Pet not found security: - api_key: [] @@ -255,7 +255,7 @@ paths: type: string type: object responses: - "405": + 405: description: Invalid input security: - petstore_auth: @@ -292,7 +292,7 @@ paths: type: string type: object responses: - "200": + 200: content: application/json: schema: @@ -310,7 +310,7 @@ paths: description: Returns a map of status codes to quantities operationId: getInventory responses: - "200": + 200: content: application/json: schema: @@ -335,7 +335,7 @@ paths: description: order placed for purchasing the pet required: true responses: - "200": + 200: content: application/xml: schema: @@ -344,7 +344,7 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - "400": + 400: description: Invalid Order summary: Place an order for a pet tags: @@ -364,9 +364,9 @@ paths: type: string style: simple responses: - "400": + 400: description: Invalid ID supplied - "404": + 404: description: Order not found summary: Delete purchase order by ID tags: @@ -388,7 +388,7 @@ paths: type: integer style: simple responses: - "200": + 200: content: application/xml: schema: @@ -397,9 +397,9 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - "400": + 400: description: Invalid ID supplied - "404": + 404: description: Order not found summary: Find purchase order by ID tags: @@ -464,7 +464,7 @@ paths: type: string style: form responses: - "200": + 200: content: application/xml: schema: @@ -488,7 +488,7 @@ paths: format: date-time type: string style: simple - "400": + 400: description: Invalid username/password supplied summary: Logs user into the system tags: @@ -516,9 +516,9 @@ paths: type: string style: simple responses: - "400": + 400: description: Invalid username supplied - "404": + 404: description: User not found summary: Delete user tags: @@ -535,7 +535,7 @@ paths: type: string style: simple responses: - "200": + 200: content: application/xml: schema: @@ -544,9 +544,9 @@ paths: schema: $ref: '#/components/schemas/User' description: successful operation - "400": + 400: description: Invalid username supplied - "404": + 404: description: User not found summary: Get user by user name tags: @@ -571,9 +571,9 @@ paths: description: Updated user object required: true responses: - "400": + 400: description: Invalid user supplied - "404": + 404: description: User not found summary: Updated user tags: @@ -585,7 +585,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Client' responses: - "200": + 200: content: application/json: schema: @@ -652,7 +652,7 @@ paths: type: integer style: form responses: - "400": + 400: description: Someting wrong security: - bearer_test: [] @@ -767,9 +767,9 @@ paths: type: string type: object responses: - "400": + 400: description: Invalid request - "404": + 404: description: Not found summary: To test enum parameters tags: @@ -780,7 +780,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Client' responses: - "200": + 200: content: application/json: schema: @@ -873,9 +873,9 @@ paths: - pattern_without_delimiter type: object responses: - "400": + 400: description: Invalid username supplied - "404": + 404: description: User not found security: - http_basic_test: [] @@ -897,7 +897,7 @@ paths: $ref: '#/components/schemas/OuterNumber' description: Input number as post body responses: - "200": + 200: content: '*/*': schema: @@ -916,7 +916,7 @@ paths: $ref: '#/components/schemas/OuterString' description: Input string as post body responses: - "200": + 200: content: '*/*': schema: @@ -935,7 +935,7 @@ paths: $ref: '#/components/schemas/OuterBoolean' description: Input boolean as post body responses: - "200": + 200: content: '*/*': schema: @@ -954,7 +954,7 @@ paths: $ref: '#/components/schemas/OuterComposite' description: Input composite as post body responses: - "200": + 200: content: '*/*': schema: @@ -982,7 +982,7 @@ paths: - param2 type: object responses: - "200": + 200: description: successful operation summary: test json serialization of form data tags: @@ -1000,7 +1000,7 @@ paths: description: request body required: true responses: - "200": + 200: description: successful operation summary: test inline additionalProperties tags: @@ -1023,7 +1023,7 @@ paths: $ref: '#/components/schemas/User' required: true responses: - "200": + 200: description: Success tags: - fake @@ -1034,7 +1034,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Client' responses: - "200": + 200: content: application/json: schema: @@ -1055,7 +1055,7 @@ paths: $ref: '#/components/schemas/FileSchemaTestClass' required: true responses: - "200": + 200: description: Success tags: - fake @@ -1110,7 +1110,7 @@ paths: type: array style: form responses: - "200": + 200: description: Success tags: - fake @@ -1144,7 +1144,7 @@ paths: - requiredFile type: object responses: - "200": + 200: content: application/json: schema: @@ -1160,7 +1160,7 @@ paths: /fake/health: get: responses: - "200": + 200: content: application/json: schema: @@ -1169,36 +1169,6 @@ paths: summary: Health check endpoint tags: - fake - /fake/http-signature-test: - get: - operationId: fake-http-signature-test - parameters: - - description: query parameter - explode: true - in: query - name: query_1 - required: false - schema: - type: string - style: form - - description: header parameter - explode: false - in: header - name: header_1 - required: false - schema: - type: string - style: simple - requestBody: - $ref: '#/components/requestBodies/Pet' - responses: - "200": - description: The instance started successfully - security: - - http_signature_test: [] - summary: test http signature authentication - tags: - - fake components: requestBodies: UserArray: @@ -1453,14 +1423,14 @@ components: type: integer property: type: string - "123Number": + 123Number: readOnly: true type: integer required: - name xml: name: Name - "200_response": + 200_response: description: Model for testing model name starting with number properties: name: @@ -1638,7 +1608,7 @@ components: type: object List: properties: - "123-list": + 123-list: type: string type: object Client: @@ -2087,6 +2057,3 @@ components: bearerFormat: JWT scheme: bearer type: http - http_signature_test: - scheme: signature - type: http diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/api_fake.go b/samples/openapi3/server/petstore/go-gin-api-server/go/api_fake.go index 05b4a1a6c15a..17107d021c5c 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/api_fake.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/api_fake.go @@ -20,11 +20,6 @@ func FakeHealthGet(c *gin.Context) { c.JSON(http.StatusOK, gin.H{}) } -// FakeHttpSignatureTest - test http signature authentication -func FakeHttpSignatureTest(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - // FakeOuterBooleanSerialize - func FakeOuterBooleanSerialize(c *gin.Context) { c.JSON(http.StatusOK, gin.H{}) diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_cat.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_cat.go index a221fb052d21..78261ede6121 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_cat.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/model_cat.go @@ -11,5 +11,9 @@ package petstoreserver type Cat struct { + ClassName string `json:"className"` + + Color string `json:"color,omitempty"` + Declawed bool `json:"declawed,omitempty"` } diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_dog.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_dog.go index 71fbac70d500..04b2a9ba9aae 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_dog.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/model_dog.go @@ -11,5 +11,9 @@ package petstoreserver type Dog struct { + ClassName string `json:"className"` + + Color string `json:"color,omitempty"` + Breed string `json:"breed,omitempty"` } diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/routers.go b/samples/openapi3/server/petstore/go-gin-api-server/go/routers.go index c45b80df3632..4d05d282f980 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/routers.go +++ b/samples/openapi3/server/petstore/go-gin-api-server/go/routers.go @@ -83,13 +83,6 @@ var routes = Routes{ FakeHealthGet, }, - { - "FakeHttpSignatureTest", - http.MethodGet, - "/v2/fake/http-signature-test", - FakeHttpSignatureTest, - }, - { "FakeOuterBooleanSerialize", http.MethodPost, From 65d1401dcb6f621e2f0a5e00a2b9be409eb681e7 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 22:53:35 -0700 Subject: [PATCH 089/105] Add yaml comments --- ...ke-endpoints-models-for-testing-with-http-signature.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index f4824e487713..bf27c585440c 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -1252,10 +1252,14 @@ components: description: User Status objectWithNoDeclaredProps: type: object + # Note: the 'additionalProperties' keyword is not specified, which is + # equivalent to allowing undeclared properties of any type. description: test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. objectWithNoDeclaredPropsNullable: type: object + # Note: the 'additionalProperties' keyword is not specified, which is + # equivalent to allowing undeclared properties of any type. description: test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. nullable: true @@ -1979,6 +1983,8 @@ components: - $ref: '#/components/schemas/ScaleneTriangle' discriminator: propertyName: triangleType + # Note: the 'additionalProperties' keyword is not specified, which is + # equivalent to allowing undeclared properties of any type. EquilateralTriangle: allOf: - $ref: '#/components/schemas/ShapeInterface' From 0ce0b6b6f85b47277a496201fb105b622bdbc9f6 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 22:59:48 -0700 Subject: [PATCH 090/105] small refactor --- .../codegen/utils/ModelUtils.java | 148 +++++++++--------- 1 file changed, 74 insertions(+), 74 deletions(-) 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 0e365d535406..54f49c43b8a7 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 @@ -689,6 +689,80 @@ public static boolean isModel(Schema schema) { return schema instanceof ComposedSchema; } + /** + * Check to see if the schema is a free form object. + * + * A free form object is an object (i.e. 'type: object' in a OAS document) that: + * 1) Does not define properties, and + * 2) Is not a composed schema (no anyOf, oneOf, allOf), and + * 3) additionalproperties is not defined, or additionalproperties: true, or additionalproperties: {}. + * + * Examples: + * + * components: + * schemas: + * arbitraryObject: + * type: object + * description: This is a free-form object. + * The value must be a map of strings to values. The value cannot be 'null'. + * It cannot be array, string, integer, number. + * arbitraryNullableObject: + * type: object + * description: This is a free-form object. + * The value must be a map of strings to values. The value can be 'null', + * It cannot be array, string, integer, number. + * nullable: true + * arbitraryTypeValue: + * description: This is NOT a free-form object. + * The value can be any type except the 'null' value. + * + * @param openAPI the object that encapsulates the OAS document. + * @param schema potentially containing a '$ref' + * @return true if it's a free-form object + */ + public static boolean isFreeFormObject(OpenAPI openAPI, Schema schema) { + if (schema == null) { + // TODO: Is this message necessary? A null schema is not a free-form object, so the result is correct. + once(LOGGER).error("Schema cannot be null in isFreeFormObject check"); + return false; + } + + // not free-form if allOf, anyOf, oneOf is not empty + if (schema instanceof ComposedSchema) { + ComposedSchema cs = (ComposedSchema) schema; + List interfaces = ModelUtils.getInterfaces(cs); + if (interfaces != null && !interfaces.isEmpty()) { + return false; + } + } + + // has at least one property + if ("object".equals(schema.getType())) { + // no properties + if ((schema.getProperties() == null || schema.getProperties().isEmpty())) { + Schema addlProps = getAdditionalProperties(openAPI, schema); + // additionalProperties not defined + if (addlProps == null) { + return true; + } else { + if (addlProps instanceof ObjectSchema) { + ObjectSchema objSchema = (ObjectSchema) addlProps; + // additionalProperties defined as {} + if (objSchema.getProperties() == null || objSchema.getProperties().isEmpty()) { + return true; + } + } else if (addlProps instanceof Schema) { + // additionalProperties defined as {} + if (addlProps.getType() == null && (addlProps.getProperties() == null || addlProps.getProperties().isEmpty())) { + return true; + } + } + } + } + } + return false; + } + /** * If a Schema contains a reference to another Schema with '$ref', returns the referenced Schema if it is found or the actual Schema in the other cases. * @@ -996,80 +1070,6 @@ public static Schema unaliasSchema(OpenAPI openAPI, return schema; } - /** - * Check to see if the schema is a free form object. - * - * A free form object is an object (i.e. 'type: object' in a OAS document) that: - * 1) Does not define properties, and - * 2) Is not a composed schema (no anyOf, oneOf, allOf), and - * 3) additionalproperties is not defined, or additionalproperties: true, or additionalproperties: {}. - * - * Examples: - * - * components: - * schemas: - * arbitraryObject: - * type: object - * description: This is a free-form object. - * The value must be a map of strings to values. The value cannot be 'null'. - * It cannot be array, string, integer, number. - * arbitraryNullableObject: - * type: object - * description: This is a free-form object. - * The value must be a map of strings to values. The value can be 'null', - * It cannot be array, string, integer, number. - * nullable: true - * arbitraryTypeValue: - * description: This is NOT a free-form object. - * The value can be any type except the 'null' value. - * - * @param openAPI the object that encapsulates the OAS document. - * @param schema potentially containing a '$ref' - * @return true if it's a free-form object - */ - public static boolean isFreeFormObject(OpenAPI openAPI, Schema schema) { - if (schema == null) { - // TODO: Is this message necessary? A null schema is not a free-form object, so the result is correct. - once(LOGGER).error("Schema cannot be null in isFreeFormObject check"); - return false; - } - - // not free-form if allOf, anyOf, oneOf is not empty - if (schema instanceof ComposedSchema) { - ComposedSchema cs = (ComposedSchema) schema; - List interfaces = ModelUtils.getInterfaces(cs); - if (interfaces != null && !interfaces.isEmpty()) { - return false; - } - } - - // has at least one property - if ("object".equals(schema.getType())) { - // no properties - if ((schema.getProperties() == null || schema.getProperties().isEmpty())) { - Schema addlProps = getAdditionalProperties(openAPI, schema); - // additionalProperties not defined - if (addlProps == null) { - return true; - } else { - if (addlProps instanceof ObjectSchema) { - ObjectSchema objSchema = (ObjectSchema) addlProps; - // additionalProperties defined as {} - if (objSchema.getProperties() == null || objSchema.getProperties().isEmpty()) { - return true; - } - } else if (addlProps instanceof Schema) { - // additionalProperties defined as {} - if (addlProps.getType() == null && (addlProps.getProperties() == null || addlProps.getProperties().isEmpty())) { - return true; - } - } - } - } - } - return false; - } - /** * Returns the additionalProperties Schema for the specified input schema. * From 92cb99bfa80e33c1000cd1ddbe56ec5ceabc4827 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 23:00:57 -0700 Subject: [PATCH 091/105] small refactor --- .../main/java/org/openapitools/codegen/utils/ModelUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 54f49c43b8a7..961ff1974b24 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 @@ -760,9 +760,10 @@ public static boolean isFreeFormObject(OpenAPI openAPI, Schema schema) { } } } + return false; } - + /** * If a Schema contains a reference to another Schema with '$ref', returns the referenced Schema if it is found or the actual Schema in the other cases. * From 765757f420b7baddec739f6edaa6eaa7bd382048 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 23:07:08 -0700 Subject: [PATCH 092/105] run sample scripts --- .../docs/AdditionalPropertiesClass.md | 6 +++--- .../docs/AdditionalPropertiesClass.md | 6 +++--- .../OpenAPIClientNetStandard/Org.OpenAPITools.sln | 10 +++++----- .../docs/AdditionalPropertiesClass.md | 6 +++--- .../src/Org.OpenAPITools/Org.OpenAPITools.csproj | 2 +- .../docs/AdditionalPropertiesClass.md | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesClass.md index 12f3292db0bf..d07f57619d5e 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesClass.md @@ -13,9 +13,9 @@ Name | Type | Description | Notes **MapArrayAnytype** | **Dictionary<string, List<Object>>** | | [optional] **MapMapString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] **MapMapAnytype** | **Dictionary<string, Dictionary<string, Object>>** | | [optional] -**Anytype1** | **Object** | | [optional] -**Anytype2** | **Object** | | [optional] -**Anytype3** | **Object** | | [optional] +**Anytype1** | [**Object**](.md) | | [optional] +**Anytype2** | [**Object**](.md) | | [optional] +**Anytype3** | [**Object**](.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesClass.md index 12f3292db0bf..d07f57619d5e 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesClass.md @@ -13,9 +13,9 @@ Name | Type | Description | Notes **MapArrayAnytype** | **Dictionary<string, List<Object>>** | | [optional] **MapMapString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] **MapMapAnytype** | **Dictionary<string, Dictionary<string, Object>>** | | [optional] -**Anytype1** | **Object** | | [optional] -**Anytype2** | **Object** | | [optional] -**Anytype3** | **Object** | | [optional] +**Anytype1** | [**Object**](.md) | | [optional] +**Anytype2** | [**Object**](.md) | | [optional] +**Anytype3** | [**Object**](.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/Org.OpenAPITools.sln b/samples/client/petstore/csharp/OpenAPIClientNetStandard/Org.OpenAPITools.sln index 8d85f5b71f0b..4f3b7e0fdef6 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/Org.OpenAPITools.sln +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/Org.OpenAPITools.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{321C8C3F-0156-40C1-AE42-D59761FB9B6C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{3AB1F259-1769-484B-9411-84505FCCBD55}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -10,10 +10,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Release|Any CPU.Build.0 = Release|Any CPU + {3AB1F259-1769-484B-9411-84505FCCBD55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3AB1F259-1769-484B-9411-84505FCCBD55}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3AB1F259-1769-484B-9411-84505FCCBD55}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3AB1F259-1769-484B-9411-84505FCCBD55}.Release|Any CPU.Build.0 = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesClass.md index 12f3292db0bf..d07f57619d5e 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesClass.md @@ -13,9 +13,9 @@ Name | Type | Description | Notes **MapArrayAnytype** | **Dictionary<string, List<Object>>** | | [optional] **MapMapString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] **MapMapAnytype** | **Dictionary<string, Dictionary<string, Object>>** | | [optional] -**Anytype1** | **Object** | | [optional] -**Anytype2** | **Object** | | [optional] -**Anytype3** | **Object** | | [optional] +**Anytype1** | [**Object**](.md) | | [optional] +**Anytype2** | [**Object**](.md) | | [optional] +**Anytype3** | [**Object**](.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 7c827a81c332..0b8a73d6143f 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -12,7 +12,7 @@ The version of the OpenAPI document: 1.0.0 14.0 Debug AnyCPU - {321C8C3F-0156-40C1-AE42-D59761FB9B6C} + {3AB1F259-1769-484B-9411-84505FCCBD55} Library Properties Org.OpenAPITools diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesClass.md index 12f3292db0bf..d07f57619d5e 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesClass.md @@ -13,9 +13,9 @@ Name | Type | Description | Notes **MapArrayAnytype** | **Dictionary<string, List<Object>>** | | [optional] **MapMapString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] **MapMapAnytype** | **Dictionary<string, Dictionary<string, Object>>** | | [optional] -**Anytype1** | **Object** | | [optional] -**Anytype2** | **Object** | | [optional] -**Anytype3** | **Object** | | [optional] +**Anytype1** | [**Object**](.md) | | [optional] +**Anytype2** | [**Object**](.md) | | [optional] +**Anytype3** | [**Object**](.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) From ec200306f9e3803ff525857d910b5563bbe8575c Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 23:09:54 -0700 Subject: [PATCH 093/105] run sample scripts --- ...odels-for-testing-with-http-signature.yaml | 21 ++-- .../go-petstore/api/openapi.yaml | 10 -- .../docs/AdditionalPropertiesClass.md | 78 ------------- .../model_additional_properties_class.go | 108 ------------------ 4 files changed, 11 insertions(+), 206 deletions(-) diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index cd67c5478f44..60b98d75c015 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -1527,16 +1527,17 @@ components: type: object additionalProperties: type: string - map_with_additional_properties: - type: object - additionalProperties: true - map_without_additional_properties: - type: object - additionalProperties: false - map_string: - type: object - additionalProperties: - type: string + # TODO: enable to validate additionalProperties + #map_with_additional_properties: + # type: object + # additionalProperties: true + #map_without_additional_properties: + # type: object + # additionalProperties: false + #map_string: + # type: object + # additionalProperties: + # type: string MixedPropertiesAndAdditionalPropertiesClass: type: object properties: diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml b/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml index 5c1cc82811a7..f7bec5630719 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml @@ -1621,16 +1621,6 @@ components: type: string type: object type: object - map_with_additional_properties: - additionalProperties: true - type: object - map_without_additional_properties: - additionalProperties: false - type: object - map_string: - additionalProperties: - type: string - type: object type: object MixedPropertiesAndAdditionalPropertiesClass: properties: diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md index d2b6ab0cca53..19719e709f8f 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md @@ -6,9 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **MapProperty** | Pointer to **map[string]string** | | [optional] **MapOfMapProperty** | Pointer to [**map[string]map[string]string**](map.md) | | [optional] -**MapWithAdditionalProperties** | Pointer to **map[string]map[string]interface{}** | | [optional] -**MapWithoutAdditionalProperties** | Pointer to **map[string]interface{}** | | [optional] -**MapString** | Pointer to **map[string]string** | | [optional] ## Methods @@ -79,81 +76,6 @@ SetMapOfMapProperty sets MapOfMapProperty field to given value. HasMapOfMapProperty returns a boolean if a field has been set. -### GetMapWithAdditionalProperties - -`func (o *AdditionalPropertiesClass) GetMapWithAdditionalProperties() map[string]map[string]interface{}` - -GetMapWithAdditionalProperties returns the MapWithAdditionalProperties field if non-nil, zero value otherwise. - -### GetMapWithAdditionalPropertiesOk - -`func (o *AdditionalPropertiesClass) GetMapWithAdditionalPropertiesOk() (*map[string]map[string]interface{}, bool)` - -GetMapWithAdditionalPropertiesOk returns a tuple with the MapWithAdditionalProperties field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMapWithAdditionalProperties - -`func (o *AdditionalPropertiesClass) SetMapWithAdditionalProperties(v map[string]map[string]interface{})` - -SetMapWithAdditionalProperties sets MapWithAdditionalProperties field to given value. - -### HasMapWithAdditionalProperties - -`func (o *AdditionalPropertiesClass) HasMapWithAdditionalProperties() bool` - -HasMapWithAdditionalProperties returns a boolean if a field has been set. - -### GetMapWithoutAdditionalProperties - -`func (o *AdditionalPropertiesClass) GetMapWithoutAdditionalProperties() map[string]interface{}` - -GetMapWithoutAdditionalProperties returns the MapWithoutAdditionalProperties field if non-nil, zero value otherwise. - -### GetMapWithoutAdditionalPropertiesOk - -`func (o *AdditionalPropertiesClass) GetMapWithoutAdditionalPropertiesOk() (*map[string]interface{}, bool)` - -GetMapWithoutAdditionalPropertiesOk returns a tuple with the MapWithoutAdditionalProperties field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMapWithoutAdditionalProperties - -`func (o *AdditionalPropertiesClass) SetMapWithoutAdditionalProperties(v map[string]interface{})` - -SetMapWithoutAdditionalProperties sets MapWithoutAdditionalProperties field to given value. - -### HasMapWithoutAdditionalProperties - -`func (o *AdditionalPropertiesClass) HasMapWithoutAdditionalProperties() bool` - -HasMapWithoutAdditionalProperties returns a boolean if a field has been set. - -### GetMapString - -`func (o *AdditionalPropertiesClass) GetMapString() map[string]string` - -GetMapString returns the MapString field if non-nil, zero value otherwise. - -### GetMapStringOk - -`func (o *AdditionalPropertiesClass) GetMapStringOk() (*map[string]string, bool)` - -GetMapStringOk returns a tuple with the MapString field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMapString - -`func (o *AdditionalPropertiesClass) SetMapString(v map[string]string)` - -SetMapString sets MapString field to given value. - -### HasMapString - -`func (o *AdditionalPropertiesClass) HasMapString() bool` - -HasMapString returns a boolean if a field has been set. - [[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/openapi3/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go index 48de99351d7e..941f00027dbb 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go @@ -17,9 +17,6 @@ import ( type AdditionalPropertiesClass struct { MapProperty *map[string]string `json:"map_property,omitempty"` MapOfMapProperty *map[string]map[string]string `json:"map_of_map_property,omitempty"` - MapWithAdditionalProperties *map[string]map[string]interface{} `json:"map_with_additional_properties,omitempty"` - MapWithoutAdditionalProperties *map[string]interface{} `json:"map_without_additional_properties,omitempty"` - MapString *map[string]string `json:"map_string,omitempty"` } // NewAdditionalPropertiesClass instantiates a new AdditionalPropertiesClass object @@ -103,102 +100,6 @@ func (o *AdditionalPropertiesClass) SetMapOfMapProperty(v map[string]map[string] o.MapOfMapProperty = &v } -// GetMapWithAdditionalProperties returns the MapWithAdditionalProperties field value if set, zero value otherwise. -func (o *AdditionalPropertiesClass) GetMapWithAdditionalProperties() map[string]map[string]interface{} { - if o == nil || o.MapWithAdditionalProperties == nil { - var ret map[string]map[string]interface{} - return ret - } - return *o.MapWithAdditionalProperties -} - -// GetMapWithAdditionalPropertiesOk returns a tuple with the MapWithAdditionalProperties field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetMapWithAdditionalPropertiesOk() (*map[string]map[string]interface{}, bool) { - if o == nil || o.MapWithAdditionalProperties == nil { - return nil, false - } - return o.MapWithAdditionalProperties, true -} - -// HasMapWithAdditionalProperties returns a boolean if a field has been set. -func (o *AdditionalPropertiesClass) HasMapWithAdditionalProperties() bool { - if o != nil && o.MapWithAdditionalProperties != nil { - return true - } - - return false -} - -// SetMapWithAdditionalProperties gets a reference to the given map[string]map[string]interface{} and assigns it to the MapWithAdditionalProperties field. -func (o *AdditionalPropertiesClass) SetMapWithAdditionalProperties(v map[string]map[string]interface{}) { - o.MapWithAdditionalProperties = &v -} - -// GetMapWithoutAdditionalProperties returns the MapWithoutAdditionalProperties field value if set, zero value otherwise. -func (o *AdditionalPropertiesClass) GetMapWithoutAdditionalProperties() map[string]interface{} { - if o == nil || o.MapWithoutAdditionalProperties == nil { - var ret map[string]interface{} - return ret - } - return *o.MapWithoutAdditionalProperties -} - -// GetMapWithoutAdditionalPropertiesOk returns a tuple with the MapWithoutAdditionalProperties field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetMapWithoutAdditionalPropertiesOk() (*map[string]interface{}, bool) { - if o == nil || o.MapWithoutAdditionalProperties == nil { - return nil, false - } - return o.MapWithoutAdditionalProperties, true -} - -// HasMapWithoutAdditionalProperties returns a boolean if a field has been set. -func (o *AdditionalPropertiesClass) HasMapWithoutAdditionalProperties() bool { - if o != nil && o.MapWithoutAdditionalProperties != nil { - return true - } - - return false -} - -// SetMapWithoutAdditionalProperties gets a reference to the given map[string]interface{} and assigns it to the MapWithoutAdditionalProperties field. -func (o *AdditionalPropertiesClass) SetMapWithoutAdditionalProperties(v map[string]interface{}) { - o.MapWithoutAdditionalProperties = &v -} - -// GetMapString returns the MapString field value if set, zero value otherwise. -func (o *AdditionalPropertiesClass) GetMapString() map[string]string { - if o == nil || o.MapString == nil { - var ret map[string]string - return ret - } - return *o.MapString -} - -// GetMapStringOk returns a tuple with the MapString field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetMapStringOk() (*map[string]string, bool) { - if o == nil || o.MapString == nil { - return nil, false - } - return o.MapString, true -} - -// HasMapString returns a boolean if a field has been set. -func (o *AdditionalPropertiesClass) HasMapString() bool { - if o != nil && o.MapString != nil { - return true - } - - return false -} - -// SetMapString gets a reference to the given map[string]string and assigns it to the MapString field. -func (o *AdditionalPropertiesClass) SetMapString(v map[string]string) { - o.MapString = &v -} - func (o AdditionalPropertiesClass) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.MapProperty != nil { @@ -207,15 +108,6 @@ func (o AdditionalPropertiesClass) MarshalJSON() ([]byte, error) { if o.MapOfMapProperty != nil { toSerialize["map_of_map_property"] = o.MapOfMapProperty } - if o.MapWithAdditionalProperties != nil { - toSerialize["map_with_additional_properties"] = o.MapWithAdditionalProperties - } - if o.MapWithoutAdditionalProperties != nil { - toSerialize["map_without_additional_properties"] = o.MapWithoutAdditionalProperties - } - if o.MapString != nil { - toSerialize["map_string"] = o.MapString - } return json.Marshal(toSerialize) } From d14898cadc8ae3b4ce64555288766284beadfc27 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Wed, 20 May 2020 23:31:05 -0700 Subject: [PATCH 094/105] fix unit tests --- .../codegen/DefaultCodegenTest.java | 2 +- ...odels-for-testing-with-http-signature.yaml | 11 ---------- ...odels-for-testing-with-http-signature.yaml | 10 ++++++++++ .../docs/AdditionalPropertiesAnyType.md | 2 +- .../docs/AdditionalPropertiesArray.md | 2 +- .../docs/AdditionalPropertiesClass.md | 10 +++++----- .../docs/AdditionalPropertiesObject.md | 2 +- .../petstore/python-experimental/docs/Cat.md | 1 + .../python-experimental/docs/Child.md | 1 + .../python-experimental/docs/ChildCat.md | 1 + .../python-experimental/docs/ChildDog.md | 1 + .../python-experimental/docs/ChildLizard.md | 1 + .../petstore/python-experimental/docs/Dog.md | 1 + .../python-experimental/docs/Parent.md | 1 + .../python-experimental/docs/ParentPet.md | 1 + .../models/additional_properties_any_type.py | 2 +- .../models/additional_properties_array.py | 2 +- .../models/additional_properties_class.py | 20 +++++++++---------- .../models/additional_properties_object.py | 2 +- .../petstore_api/models/cat.py | 2 +- .../petstore_api/models/child.py | 2 +- .../petstore_api/models/child_cat.py | 2 +- .../petstore_api/models/child_dog.py | 2 +- .../petstore_api/models/child_lizard.py | 2 +- .../petstore_api/models/dog.py | 2 +- .../petstore_api/models/parent.py | 2 +- .../petstore_api/models/parent_pet.py | 2 +- .../docs/AdditionalPropertiesClass.md | 3 +++ .../models/additional_properties_class.py | 9 +++++++++ 29 files changed, 60 insertions(+), 41 deletions(-) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index 3ea926263fc0..5dc9f537e91f 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -291,7 +291,7 @@ public void testAdditionalPropertiesV2Spec() { @Test public void testAdditionalPropertiesV3Spec() { - OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml"); + OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml"); DefaultCodegen codegen = new DefaultCodegen(); codegen.setDisallowAdditionalPropertiesIfNotPresent(false); codegen.setOpenAPI(openAPI); diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index 60b98d75c015..74598c6ce709 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -1527,17 +1527,6 @@ components: type: object additionalProperties: type: string - # TODO: enable to validate additionalProperties - #map_with_additional_properties: - # type: object - # additionalProperties: true - #map_without_additional_properties: - # type: object - # additionalProperties: false - #map_string: - # type: object - # additionalProperties: - # type: string MixedPropertiesAndAdditionalPropertiesClass: type: object properties: diff --git a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index bf27c585440c..187a6488f0ed 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -1549,6 +1549,16 @@ components: anytype_3: type: object properties: {} + map_with_additional_properties: + type: object + additionalProperties: true + map_without_additional_properties: + type: object + additionalProperties: false + map_string: + type: object + additionalProperties: + type: string MixedPropertiesAndAdditionalPropertiesClass: type: object properties: diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesAnyType.md index d27928ab7527..62eee911ea26 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesAnyType.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str** | any string name can be used but the value must be the correct type | [optional] +**any string name** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesArray.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesArray.md index 6eac3ace2eca..46be89a5b23e 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesArray.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] -**any string name** | **[bool, date, datetime, dict, float, int, list, str]** | any string name can be used but the value must be the correct type | [optional] +**any string name** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md index 4b232aa174af..cf00d9d4c816 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md @@ -8,12 +8,12 @@ Name | Type | Description | Notes **map_integer** | **{str: (int,)}** | | [optional] **map_boolean** | **{str: (bool,)}** | | [optional] **map_array_integer** | **{str: ([int],)}** | | [optional] -**map_array_anytype** | **{str: ([bool, date, datetime, dict, float, int, list, str],)}** | | [optional] +**map_array_anytype** | **{str: ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],)}** | | [optional] **map_map_string** | **{str: ({str: (str,)},)}** | | [optional] -**map_map_anytype** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)}** | | [optional] -**anytype_1** | **bool, date, datetime, dict, float, int, list, str** | | [optional] -**anytype_2** | **bool, date, datetime, dict, float, int, list, str** | | [optional] -**anytype_3** | **bool, date, datetime, dict, float, int, list, str** | | [optional] +**map_map_anytype** | **{str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)}** | | [optional] +**anytype_1** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**anytype_2** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**anytype_3** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesObject.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesObject.md index 36026fe72f82..15763836ddb1 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesObject.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] -**any string name** | **{str: (bool, date, datetime, dict, float, int, list, str,)}** | any string name can be used but the value must be the correct type | [optional] +**any string name** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/Cat.md b/samples/client/petstore/python-experimental/docs/Cat.md index 1d7b5b26d715..846a97c82a84 100644 --- a/samples/client/petstore/python-experimental/docs/Cat.md +++ b/samples/client/petstore/python-experimental/docs/Cat.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **class_name** | **str** | | **declawed** | **bool** | | [optional] **color** | **str** | | [optional] if omitted the server will use the default value of 'red' +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/Child.md b/samples/client/petstore/python-experimental/docs/Child.md index bc3c7f3922d3..4e43e94825b7 100644 --- a/samples/client/petstore/python-experimental/docs/Child.md +++ b/samples/client/petstore/python-experimental/docs/Child.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **radio_waves** | **bool** | | [optional] **tele_vision** | **bool** | | [optional] **inter_net** | **bool** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/ChildCat.md b/samples/client/petstore/python-experimental/docs/ChildCat.md index 8f5ea4b2ced0..bee23082474c 100644 --- a/samples/client/petstore/python-experimental/docs/ChildCat.md +++ b/samples/client/petstore/python-experimental/docs/ChildCat.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pet_type** | **str** | | **name** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/ChildDog.md b/samples/client/petstore/python-experimental/docs/ChildDog.md index 2680d987a452..631b0362886c 100644 --- a/samples/client/petstore/python-experimental/docs/ChildDog.md +++ b/samples/client/petstore/python-experimental/docs/ChildDog.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pet_type** | **str** | | **bark** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/ChildLizard.md b/samples/client/petstore/python-experimental/docs/ChildLizard.md index 97b8891a27e2..2e315eb2f21b 100644 --- a/samples/client/petstore/python-experimental/docs/ChildLizard.md +++ b/samples/client/petstore/python-experimental/docs/ChildLizard.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pet_type** | **str** | | **loves_rocks** | **bool** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/Dog.md b/samples/client/petstore/python-experimental/docs/Dog.md index ec98b99dcec5..4c0497d67698 100644 --- a/samples/client/petstore/python-experimental/docs/Dog.md +++ b/samples/client/petstore/python-experimental/docs/Dog.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **class_name** | **str** | | **breed** | **str** | | [optional] **color** | **str** | | [optional] if omitted the server will use the default value of 'red' +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/Parent.md b/samples/client/petstore/python-experimental/docs/Parent.md index 2437d3c81ac9..74beb2c531ce 100644 --- a/samples/client/petstore/python-experimental/docs/Parent.md +++ b/samples/client/petstore/python-experimental/docs/Parent.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **radio_waves** | **bool** | | [optional] **tele_vision** | **bool** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/ParentPet.md b/samples/client/petstore/python-experimental/docs/ParentPet.md index 12bfa5c7fe5c..78693cf8f0e6 100644 --- a/samples/client/petstore/python-experimental/docs/ParentPet.md +++ b/samples/client/petstore/python-experimental/docs/ParentPet.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pet_type** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py index bd6a44a0f9f4..7673f5eea8bf 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py @@ -64,7 +64,7 @@ class AdditionalPropertiesAnyType(ModelNormal): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str,) # noqa: E501 + additional_properties_type = ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},) # noqa: E501 _nullable = False diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py index cc4654bf99cb..8722f0be2829 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py @@ -64,7 +64,7 @@ class AdditionalPropertiesArray(ModelNormal): validations = { } - additional_properties_type = ([bool, date, datetime, dict, float, int, list, str],) # noqa: E501 + additional_properties_type = ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],) # noqa: E501 _nullable = False diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py index 14479b04c10c..0141ce53ffe0 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py @@ -84,12 +84,12 @@ def openapi_types(): 'map_integer': ({str: (int,)},), # noqa: E501 'map_boolean': ({str: (bool,)},), # noqa: E501 'map_array_integer': ({str: ([int],)},), # noqa: E501 - 'map_array_anytype': ({str: ([bool, date, datetime, dict, float, int, list, str],)},), # noqa: E501 + 'map_array_anytype': ({str: ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],)},), # noqa: E501 'map_map_string': ({str: ({str: (str,)},)},), # noqa: E501 - 'map_map_anytype': ({str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)},), # noqa: E501 - 'anytype_1': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 - 'anytype_2': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 - 'anytype_3': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 + 'map_map_anytype': ({str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)},), # noqa: E501 + 'anytype_1': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'anytype_2': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'anytype_3': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 } @cached_property @@ -159,12 +159,12 @@ def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _conf map_integer ({str: (int,)}): [optional] # noqa: E501 map_boolean ({str: (bool,)}): [optional] # noqa: E501 map_array_integer ({str: ([int],)}): [optional] # noqa: E501 - map_array_anytype ({str: ([bool, date, datetime, dict, float, int, list, str],)}): [optional] # noqa: E501 + map_array_anytype ({str: ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],)}): [optional] # noqa: E501 map_map_string ({str: ({str: (str,)},)}): [optional] # noqa: E501 - map_map_anytype ({str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)}): [optional] # noqa: E501 - anytype_1 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 - anytype_2 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 - anytype_3 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 + map_map_anytype ({str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)}): [optional] # noqa: E501 + anytype_1 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + anytype_2 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + anytype_3 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 """ self._data_store = {} diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py index 2a60e948cf71..61bd78230d0a 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py @@ -64,7 +64,7 @@ class AdditionalPropertiesObject(ModelNormal): validations = { } - additional_properties_type = ({str: (bool, date, datetime, dict, float, int, list, str,)},) # noqa: E501 + additional_properties_type = ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},) # noqa: E501 _nullable = False diff --git a/samples/client/petstore/python-experimental/petstore_api/models/cat.py b/samples/client/petstore/python-experimental/petstore_api/models/cat.py index 12c170e6883b..0e5c29b79ebb 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/cat.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/cat.py @@ -74,7 +74,7 @@ class Cat(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child.py b/samples/client/petstore/python-experimental/petstore_api/models/child.py index d06bcd743754..0a4edd639fd4 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child.py @@ -74,7 +74,7 @@ class Child(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py b/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py index ec9a0577bf43..a8d882fd9e77 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py @@ -74,7 +74,7 @@ class ChildCat(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py b/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py index c94e72607eaa..11279675ba69 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py @@ -74,7 +74,7 @@ class ChildDog(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py index de0626ed942c..45bf9d342b10 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py @@ -74,7 +74,7 @@ class ChildLizard(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False diff --git a/samples/client/petstore/python-experimental/petstore_api/models/dog.py b/samples/client/petstore/python-experimental/petstore_api/models/dog.py index 3ceb88c7ee23..b824e584180a 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/dog.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/dog.py @@ -74,7 +74,7 @@ class Dog(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False diff --git a/samples/client/petstore/python-experimental/petstore_api/models/parent.py b/samples/client/petstore/python-experimental/petstore_api/models/parent.py index 8a83c2cee86d..964559ceff14 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/parent.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/parent.py @@ -74,7 +74,7 @@ class Parent(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False diff --git a/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py b/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py index e44885186433..506a4fbb7bdd 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py @@ -84,7 +84,7 @@ class ParentPet(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False diff --git a/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md index 39f1b70930e3..e84cb566f5d1 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md @@ -8,6 +8,9 @@ Name | Type | Description | Notes **anytype_1** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] **anytype_2** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] **anytype_3** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**map_with_additional_properties** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**map_without_additional_properties** | **bool, date, datetime, dict, float, int, list, str** | | [optional] +**map_string** | **{str: (str,)}** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py index 3ddfdf1360fa..e5350f672dcf 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py @@ -84,6 +84,9 @@ def openapi_types(): 'anytype_1': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 'anytype_2': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'anytype_3': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'map_with_additional_properties': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'map_without_additional_properties': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 + 'map_string': ({str: (str,)},), # noqa: E501 } @cached_property @@ -96,6 +99,9 @@ def discriminator(): 'anytype_1': 'anytype_1', # noqa: E501 'anytype_2': 'anytype_2', # noqa: E501 'anytype_3': 'anytype_3', # noqa: E501 + 'map_with_additional_properties': 'map_with_additional_properties', # noqa: E501 + 'map_without_additional_properties': 'map_without_additional_properties', # noqa: E501 + 'map_string': 'map_string', # noqa: E501 } _composed_schemas = {} @@ -147,6 +153,9 @@ def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _conf anytype_1 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 anytype_2 (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 anytype_3 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + map_with_additional_properties ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + map_without_additional_properties (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 + map_string ({str: (str,)}): [optional] # noqa: E501 """ self._data_store = {} From 89117b9b54879154459c08fe790586cf6e03fbb8 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Thu, 21 May 2020 06:34:06 -0700 Subject: [PATCH 095/105] Set disallowAdditionalPropertiesIfNotPresent flag --- bin/python-experimental-petstore.sh | 2 +- .../docs/AdditionalPropertiesAnyType.md | 2 +- .../docs/AdditionalPropertiesArray.md | 2 +- .../docs/AdditionalPropertiesClass.md | 10 +++++----- .../docs/AdditionalPropertiesObject.md | 2 +- .../petstore/python-experimental/docs/Cat.md | 1 - .../python-experimental/docs/Child.md | 1 - .../python-experimental/docs/ChildCat.md | 1 - .../python-experimental/docs/ChildDog.md | 1 - .../python-experimental/docs/ChildLizard.md | 1 - .../petstore/python-experimental/docs/Dog.md | 1 - .../python-experimental/docs/Parent.md | 1 - .../python-experimental/docs/ParentPet.md | 1 - .../models/additional_properties_any_type.py | 2 +- .../models/additional_properties_array.py | 2 +- .../models/additional_properties_class.py | 20 +++++++++---------- .../models/additional_properties_object.py | 2 +- .../petstore_api/models/cat.py | 2 +- .../petstore_api/models/child.py | 2 +- .../petstore_api/models/child_cat.py | 2 +- .../petstore_api/models/child_dog.py | 2 +- .../petstore_api/models/child_lizard.py | 2 +- .../petstore_api/models/dog.py | 2 +- .../petstore_api/models/parent.py | 2 +- .../petstore_api/models/parent_pet.py | 2 +- 25 files changed, 30 insertions(+), 38 deletions(-) diff --git a/bin/python-experimental-petstore.sh b/bin/python-experimental-petstore.sh index 531cf295d64e..8a64ca988983 100755 --- a/bin/python-experimental-petstore.sh +++ b/bin/python-experimental-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml -g python-experimental -o samples/client/petstore/python-experimental --additional-properties packageName=petstore_api $@" +ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml -g python-experimental -o samples/client/petstore/python-experimental --additional-properties packageName=petstore_api --additional-properties disallowAdditionalPropertiesIfNotPresent=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesAnyType.md index 62eee911ea26..d27928ab7527 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesAnyType.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] -**any string name** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | any string name can be used but the value must be the correct type | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesArray.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesArray.md index 46be89a5b23e..6eac3ace2eca 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesArray.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] -**any string name** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]** | any string name can be used but the value must be the correct type | [optional] +**any string name** | **[bool, date, datetime, dict, float, int, list, str]** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md index cf00d9d4c816..4b232aa174af 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md @@ -8,12 +8,12 @@ Name | Type | Description | Notes **map_integer** | **{str: (int,)}** | | [optional] **map_boolean** | **{str: (bool,)}** | | [optional] **map_array_integer** | **{str: ([int],)}** | | [optional] -**map_array_anytype** | **{str: ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],)}** | | [optional] +**map_array_anytype** | **{str: ([bool, date, datetime, dict, float, int, list, str],)}** | | [optional] **map_map_string** | **{str: ({str: (str,)},)}** | | [optional] -**map_map_anytype** | **{str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)}** | | [optional] -**anytype_1** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] -**anytype_2** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] -**anytype_3** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**map_map_anytype** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)}** | | [optional] +**anytype_1** | **bool, date, datetime, dict, float, int, list, str** | | [optional] +**anytype_2** | **bool, date, datetime, dict, float, int, list, str** | | [optional] +**anytype_3** | **bool, date, datetime, dict, float, int, list, str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesObject.md b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesObject.md index 15763836ddb1..36026fe72f82 100644 --- a/samples/client/petstore/python-experimental/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/python-experimental/docs/AdditionalPropertiesObject.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] -**any string name** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}** | any string name can be used but the value must be the correct type | [optional] +**any string name** | **{str: (bool, date, datetime, dict, float, int, list, str,)}** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/Cat.md b/samples/client/petstore/python-experimental/docs/Cat.md index 846a97c82a84..1d7b5b26d715 100644 --- a/samples/client/petstore/python-experimental/docs/Cat.md +++ b/samples/client/petstore/python-experimental/docs/Cat.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes **class_name** | **str** | | **declawed** | **bool** | | [optional] **color** | **str** | | [optional] if omitted the server will use the default value of 'red' -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/Child.md b/samples/client/petstore/python-experimental/docs/Child.md index 4e43e94825b7..bc3c7f3922d3 100644 --- a/samples/client/petstore/python-experimental/docs/Child.md +++ b/samples/client/petstore/python-experimental/docs/Child.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes **radio_waves** | **bool** | | [optional] **tele_vision** | **bool** | | [optional] **inter_net** | **bool** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/ChildCat.md b/samples/client/petstore/python-experimental/docs/ChildCat.md index bee23082474c..8f5ea4b2ced0 100644 --- a/samples/client/petstore/python-experimental/docs/ChildCat.md +++ b/samples/client/petstore/python-experimental/docs/ChildCat.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pet_type** | **str** | | **name** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/ChildDog.md b/samples/client/petstore/python-experimental/docs/ChildDog.md index 631b0362886c..2680d987a452 100644 --- a/samples/client/petstore/python-experimental/docs/ChildDog.md +++ b/samples/client/petstore/python-experimental/docs/ChildDog.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pet_type** | **str** | | **bark** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/ChildLizard.md b/samples/client/petstore/python-experimental/docs/ChildLizard.md index 2e315eb2f21b..97b8891a27e2 100644 --- a/samples/client/petstore/python-experimental/docs/ChildLizard.md +++ b/samples/client/petstore/python-experimental/docs/ChildLizard.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pet_type** | **str** | | **loves_rocks** | **bool** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/Dog.md b/samples/client/petstore/python-experimental/docs/Dog.md index 4c0497d67698..ec98b99dcec5 100644 --- a/samples/client/petstore/python-experimental/docs/Dog.md +++ b/samples/client/petstore/python-experimental/docs/Dog.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes **class_name** | **str** | | **breed** | **str** | | [optional] **color** | **str** | | [optional] if omitted the server will use the default value of 'red' -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/Parent.md b/samples/client/petstore/python-experimental/docs/Parent.md index 74beb2c531ce..2437d3c81ac9 100644 --- a/samples/client/petstore/python-experimental/docs/Parent.md +++ b/samples/client/petstore/python-experimental/docs/Parent.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **radio_waves** | **bool** | | [optional] **tele_vision** | **bool** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/docs/ParentPet.md b/samples/client/petstore/python-experimental/docs/ParentPet.md index 78693cf8f0e6..12bfa5c7fe5c 100644 --- a/samples/client/petstore/python-experimental/docs/ParentPet.md +++ b/samples/client/petstore/python-experimental/docs/ParentPet.md @@ -4,7 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pet_type** | **str** | | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py index 7673f5eea8bf..bd6a44a0f9f4 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py @@ -64,7 +64,7 @@ class AdditionalPropertiesAnyType(ModelNormal): validations = { } - additional_properties_type = ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},) # noqa: E501 + additional_properties_type = (bool, date, datetime, dict, float, int, list, str,) # noqa: E501 _nullable = False diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py index 8722f0be2829..cc4654bf99cb 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py @@ -64,7 +64,7 @@ class AdditionalPropertiesArray(ModelNormal): validations = { } - additional_properties_type = ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],) # noqa: E501 + additional_properties_type = ([bool, date, datetime, dict, float, int, list, str],) # noqa: E501 _nullable = False diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py index 0141ce53ffe0..14479b04c10c 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py @@ -84,12 +84,12 @@ def openapi_types(): 'map_integer': ({str: (int,)},), # noqa: E501 'map_boolean': ({str: (bool,)},), # noqa: E501 'map_array_integer': ({str: ([int],)},), # noqa: E501 - 'map_array_anytype': ({str: ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],)},), # noqa: E501 + 'map_array_anytype': ({str: ([bool, date, datetime, dict, float, int, list, str],)},), # noqa: E501 'map_map_string': ({str: ({str: (str,)},)},), # noqa: E501 - 'map_map_anytype': ({str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)},), # noqa: E501 - 'anytype_1': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'anytype_2': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'anytype_3': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'map_map_anytype': ({str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)},), # noqa: E501 + 'anytype_1': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 + 'anytype_2': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 + 'anytype_3': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 } @cached_property @@ -159,12 +159,12 @@ def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _conf map_integer ({str: (int,)}): [optional] # noqa: E501 map_boolean ({str: (bool,)}): [optional] # noqa: E501 map_array_integer ({str: ([int],)}): [optional] # noqa: E501 - map_array_anytype ({str: ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],)}): [optional] # noqa: E501 + map_array_anytype ({str: ([bool, date, datetime, dict, float, int, list, str],)}): [optional] # noqa: E501 map_map_string ({str: ({str: (str,)},)}): [optional] # noqa: E501 - map_map_anytype ({str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)}): [optional] # noqa: E501 - anytype_1 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 - anytype_2 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 - anytype_3 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + map_map_anytype ({str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)}): [optional] # noqa: E501 + anytype_1 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 + anytype_2 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 + anytype_3 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 """ self._data_store = {} diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py index 61bd78230d0a..2a60e948cf71 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py @@ -64,7 +64,7 @@ class AdditionalPropertiesObject(ModelNormal): validations = { } - additional_properties_type = ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},) # noqa: E501 + additional_properties_type = ({str: (bool, date, datetime, dict, float, int, list, str,)},) # noqa: E501 _nullable = False diff --git a/samples/client/petstore/python-experimental/petstore_api/models/cat.py b/samples/client/petstore/python-experimental/petstore_api/models/cat.py index 0e5c29b79ebb..12c170e6883b 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/cat.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/cat.py @@ -74,7 +74,7 @@ class Cat(ModelComposed): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child.py b/samples/client/petstore/python-experimental/petstore_api/models/child.py index 0a4edd639fd4..d06bcd743754 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child.py @@ -74,7 +74,7 @@ class Child(ModelComposed): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py b/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py index a8d882fd9e77..ec9a0577bf43 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py @@ -74,7 +74,7 @@ class ChildCat(ModelComposed): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py b/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py index 11279675ba69..c94e72607eaa 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py @@ -74,7 +74,7 @@ class ChildDog(ModelComposed): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py index 45bf9d342b10..de0626ed942c 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py @@ -74,7 +74,7 @@ class ChildLizard(ModelComposed): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/samples/client/petstore/python-experimental/petstore_api/models/dog.py b/samples/client/petstore/python-experimental/petstore_api/models/dog.py index b824e584180a..3ceb88c7ee23 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/dog.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/dog.py @@ -74,7 +74,7 @@ class Dog(ModelComposed): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/samples/client/petstore/python-experimental/petstore_api/models/parent.py b/samples/client/petstore/python-experimental/petstore_api/models/parent.py index 964559ceff14..8a83c2cee86d 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/parent.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/parent.py @@ -74,7 +74,7 @@ class Parent(ModelComposed): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py b/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py index 506a4fbb7bdd..e44885186433 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py @@ -84,7 +84,7 @@ class ParentPet(ModelComposed): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False From 5206a30eaaec420ee4cc7ef8716e55f92fe80d37 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Fri, 22 May 2020 10:39:40 -0700 Subject: [PATCH 096/105] reduced size of test yaml file --- .../codegen/DefaultCodegenTest.java | 2 +- .../additional-properties-for-testing.yaml | 24 + ...and-additional-properties-for-testing.yaml | 2009 ----------------- 3 files changed, 25 insertions(+), 2010 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/2_0/additional-properties-for-testing.yaml delete mode 100644 modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-and-additional-properties-for-testing.yaml diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index 5dc9f537e91f..e9bfaaded951 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -240,7 +240,7 @@ public void testOriginalOpenApiDocumentVersion() { @Test public void testAdditionalPropertiesV2Spec() { - OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/2_0/petstore-with-fake-endpoints-models-and-additional-properties-for-testing.yaml"); + OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/2_0/additional-properties-for-testing.yaml"); DefaultCodegen codegen = new DefaultCodegen(); codegen.setOpenAPI(openAPI); codegen.setDisallowAdditionalPropertiesIfNotPresent(true); diff --git a/modules/openapi-generator/src/test/resources/2_0/additional-properties-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/additional-properties-for-testing.yaml new file mode 100644 index 000000000000..5cfa74c27c8f --- /dev/null +++ b/modules/openapi-generator/src/test/resources/2_0/additional-properties-for-testing.yaml @@ -0,0 +1,24 @@ +swagger: '2.0' +info: + description: "This spec is for testing additional properties" + version: 1.0.0 + title: OpenAPI Petstore + license: + name: Apache-2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0.html' +host: petstore.swagger.io:80 +basePath: /v2 +definitions: + AdditionalPropertiesClass: + type: object + properties: + map_string: + type: object + additionalProperties: + type: string + map_with_additional_properties: + type: object + additionalProperties: true + map_without_additional_properties: + type: object + additionalProperties: false diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-and-additional-properties-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-and-additional-properties-for-testing.yaml deleted file mode 100644 index 7f990bf0fa7d..000000000000 --- a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-and-additional-properties-for-testing.yaml +++ /dev/null @@ -1,2009 +0,0 @@ -swagger: '2.0' -info: - description: "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\" - version: 1.0.0 - title: OpenAPI Petstore - license: - name: Apache-2.0 - url: 'https://www.apache.org/licenses/LICENSE-2.0.html' -host: petstore.swagger.io:80 -basePath: /v2 -tags: - - name: pet - description: Everything about your Pets - - name: store - description: Access to Petstore orders - - name: user - description: Operations about user -schemes: - - http -paths: - /pet: - post: - tags: - - pet - summary: Add a new pet to the store - description: '' - operationId: addPet - consumes: - - application/json - - application/xml - produces: - - application/xml - - application/json - parameters: - - in: body - name: body - description: Pet object that needs to be added to the store - required: true - schema: - $ref: '#/definitions/Pet' - responses: - '200': - description: successful operation - '405': - description: Invalid input - security: - - petstore_auth: - - 'write:pets' - - 'read:pets' - put: - tags: - - pet - summary: Update an existing pet - description: '' - operationId: updatePet - consumes: - - application/json - - application/xml - produces: - - application/xml - - application/json - parameters: - - in: body - name: body - description: Pet object that needs to be added to the store - required: true - schema: - $ref: '#/definitions/Pet' - responses: - '200': - description: successful operation - '400': - description: Invalid ID supplied - '404': - description: Pet not found - '405': - description: Validation exception - security: - - petstore_auth: - - 'write:pets' - - 'read:pets' - /pet/findByStatus: - get: - tags: - - pet - summary: Finds Pets by status - description: Multiple status values can be provided with comma separated strings - operationId: findPetsByStatus - produces: - - application/xml - - application/json - parameters: - - name: status - in: query - description: Status values that need to be considered for filter - required: true - type: array - items: - type: string - enum: - - available - - pending - - sold - default: available - collectionFormat: csv - responses: - '200': - description: successful operation - schema: - type: array - items: - $ref: '#/definitions/Pet' - '400': - description: Invalid status value - security: - - petstore_auth: - - 'write:pets' - - 'read:pets' - /pet/findByTags: - get: - tags: - - pet - summary: Finds Pets by tags - description: 'Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.' - operationId: findPetsByTags - produces: - - application/xml - - application/json - parameters: - - name: tags - in: query - description: Tags to filter by - required: true - type: array - items: - type: string - collectionFormat: csv - responses: - '200': - description: successful operation - schema: - type: array - items: - $ref: '#/definitions/Pet' - '400': - description: Invalid tag value - security: - - petstore_auth: - - 'write:pets' - - 'read:pets' - deprecated: true - '/pet/{petId}': - get: - tags: - - pet - summary: Find pet by ID - description: Returns a single pet - operationId: getPetById - produces: - - application/xml - - application/json - parameters: - - name: petId - in: path - description: ID of pet to return - required: true - type: integer - format: int64 - responses: - '200': - description: successful operation - schema: - $ref: '#/definitions/Pet' - '400': - description: Invalid ID supplied - '404': - description: Pet not found - security: - - api_key: [] - post: - tags: - - pet - summary: Updates a pet in the store with form data - description: '' - operationId: updatePetWithForm - consumes: - - application/x-www-form-urlencoded - produces: - - application/xml - - application/json - parameters: - - name: petId - in: path - description: ID of pet that needs to be updated - required: true - type: integer - format: int64 - - name: name - in: formData - description: Updated name of the pet - required: false - type: string - - name: status - in: formData - description: Updated status of the pet - required: false - type: string - responses: - '405': - description: Invalid input - security: - - petstore_auth: - - 'write:pets' - - 'read:pets' - delete: - tags: - - pet - summary: Deletes a pet - description: '' - operationId: deletePet - produces: - - application/xml - - application/json - parameters: - - name: api_key - in: header - required: false - type: string - - name: petId - in: path - description: Pet id to delete - required: true - type: integer - format: int64 - responses: - '200': - description: successful operation - '400': - description: Invalid pet value - security: - - petstore_auth: - - 'write:pets' - - 'read:pets' - '/pet/{petId}/uploadImage': - post: - tags: - - pet - summary: uploads an image - description: '' - operationId: uploadFile - consumes: - - multipart/form-data - produces: - - application/json - parameters: - - name: petId - in: path - description: ID of pet to update - required: true - type: integer - format: int64 - - name: additionalMetadata - in: formData - description: Additional data to pass to server - required: false - type: string - - name: file - in: formData - description: file to upload - required: false - type: file - responses: - '200': - description: successful operation - schema: - $ref: '#/definitions/ApiResponse' - security: - - petstore_auth: - - 'write:pets' - - 'read:pets' - /store/inventory: - get: - tags: - - store - summary: Returns pet inventories by status - description: Returns a map of status codes to quantities - operationId: getInventory - produces: - - application/json - parameters: [] - responses: - '200': - description: successful operation - schema: - type: object - additionalProperties: - type: integer - format: int32 - security: - - api_key: [] - /store/order: - post: - tags: - - store - summary: Place an order for a pet - description: '' - operationId: placeOrder - produces: - - application/xml - - application/json - parameters: - - in: body - name: body - description: order placed for purchasing the pet - required: true - schema: - $ref: '#/definitions/Order' - responses: - '200': - description: successful operation - schema: - $ref: '#/definitions/Order' - '400': - description: Invalid Order - '/store/order/{order_id}': - get: - tags: - - store - summary: Find purchase order by ID - description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions' - operationId: getOrderById - produces: - - application/xml - - application/json - parameters: - - name: order_id - in: path - description: ID of pet that needs to be fetched - required: true - type: integer - maximum: 5 - minimum: 1 - format: int64 - responses: - '200': - description: successful operation - schema: - $ref: '#/definitions/Order' - '400': - description: Invalid ID supplied - '404': - description: Order not found - delete: - tags: - - store - summary: Delete purchase order by ID - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - operationId: deleteOrder - produces: - - application/xml - - application/json - parameters: - - name: order_id - in: path - description: ID of the order that needs to be deleted - required: true - type: string - responses: - '400': - description: Invalid ID supplied - '404': - description: Order not found - /user: - post: - tags: - - user - summary: Create user - description: This can only be done by the logged in user. - operationId: createUser - produces: - - application/xml - - application/json - parameters: - - in: body - name: body - description: Created user object - required: true - schema: - $ref: '#/definitions/User' - responses: - default: - description: successful operation - /user/createWithArray: - post: - tags: - - user - summary: Creates list of users with given input array - description: '' - operationId: createUsersWithArrayInput - produces: - - application/xml - - application/json - parameters: - - in: body - name: body - description: List of user object - required: true - schema: - type: array - items: - $ref: '#/definitions/User' - responses: - default: - description: successful operation - /user/createWithList: - post: - tags: - - user - summary: Creates list of users with given input array - description: '' - operationId: createUsersWithListInput - produces: - - application/xml - - application/json - parameters: - - in: body - name: body - description: List of user object - required: true - schema: - type: array - items: - $ref: '#/definitions/User' - responses: - default: - description: successful operation - /user/login: - get: - tags: - - user - summary: Logs user into the system - description: '' - operationId: loginUser - produces: - - application/xml - - application/json - parameters: - - name: username - in: query - description: The user name for login - required: true - type: string - - name: password - in: query - description: The password for login in clear text - required: true - type: string - responses: - '200': - description: successful operation - schema: - type: string - headers: - X-Rate-Limit: - type: integer - format: int32 - description: calls per hour allowed by the user - X-Expires-After: - type: string - format: date-time - description: date in UTC when token expires - '400': - description: Invalid username/password supplied - /user/logout: - get: - tags: - - user - summary: Logs out current logged in user session - description: '' - operationId: logoutUser - produces: - - application/xml - - application/json - parameters: [] - responses: - default: - description: successful operation - '/user/{username}': - get: - tags: - - user - summary: Get user by user name - description: '' - operationId: getUserByName - produces: - - application/xml - - application/json - parameters: - - name: username - in: path - description: 'The name that needs to be fetched. Use user1 for testing.' - required: true - type: string - responses: - '200': - description: successful operation - schema: - $ref: '#/definitions/User' - '400': - description: Invalid username supplied - '404': - description: User not found - put: - tags: - - user - summary: Updated user - description: This can only be done by the logged in user. - operationId: updateUser - produces: - - application/xml - - application/json - parameters: - - name: username - in: path - description: name that need to be deleted - required: true - type: string - - in: body - name: body - description: Updated user object - required: true - schema: - $ref: '#/definitions/User' - responses: - '400': - description: Invalid user supplied - '404': - description: User not found - delete: - tags: - - user - summary: Delete user - description: This can only be done by the logged in user. - operationId: deleteUser - produces: - - application/xml - - application/json - parameters: - - name: username - in: path - description: The name that needs to be deleted - required: true - type: string - responses: - '400': - description: Invalid username supplied - '404': - description: User not found - - /fake_classname_test: - patch: - tags: - - "fake_classname_tags 123#$%^" - summary: To test class name in snake case - description: To test class name in snake case - operationId: testClassname - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: body - description: client model - required: true - schema: - $ref: '#/definitions/Client' - responses: - '200': - description: successful operation - schema: - $ref: '#/definitions/Client' - security: - - api_key_query: [] - /fake: - patch: - tags: - - fake - summary: To test "client" model - description: To test "client" model - operationId: testClientModel - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: body - description: client model - required: true - schema: - $ref: '#/definitions/Client' - responses: - '200': - description: successful operation - schema: - $ref: '#/definitions/Client' - get: - tags: - - fake - summary: To test enum parameters - description: To test enum parameters - operationId: testEnumParameters - consumes: - - "application/x-www-form-urlencoded" - parameters: - - name: enum_form_string_array - type: array - items: - type: string - default: '$' - enum: - - '>' - - '$' - in: formData - description: Form parameter enum test (string array) - - name: enum_form_string - type: string - default: '-efg' - enum: - - _abc - - '-efg' - - (xyz) - in: formData - description: Form parameter enum test (string) - - name: enum_header_string_array - type: array - items: - type: string - default: '$' - enum: - - '>' - - '$' - in: header - description: Header parameter enum test (string array) - - name: enum_header_string - type: string - default: '-efg' - enum: - - _abc - - '-efg' - - (xyz) - in: header - description: Header parameter enum test (string) - - name: enum_query_string_array - type: array - items: - type: string - default: '$' - enum: - - '>' - - '$' - in: query - description: Query parameter enum test (string array) - - name: enum_query_string - type: string - default: '-efg' - enum: - - _abc - - '-efg' - - (xyz) - in: query - description: Query parameter enum test (string) - - name: enum_query_integer - type: integer - format: int32 - enum: - - 1 - - -2 - in: query - description: Query parameter enum test (double) - - name: enum_query_double - type: number - format: double - enum: - - 1.1 - - -1.2 - in: query - description: Query parameter enum test (double) - responses: - '400': - description: Invalid request - '404': - description: Not found - post: - tags: - - fake - summary: "Fake endpoint for testing various parameters\n - 假端點\n - 偽のエンドポイント\n - 가짜 엔드 포인트" - description: "Fake endpoint for testing various parameters\n - 假端點\n - 偽のエンドポイント\n - 가짜 엔드 포인트" - operationId: testEndpointParameters - consumes: - - application/x-www-form-urlencoded - parameters: - - name: integer - type: integer - maximum: 100 - minimum: 10 - in: formData - description: None - - name: int32 - type: integer - format: int32 - maximum: 200 - minimum: 20 - in: formData - description: None - - name: int64 - type: integer - format: int64 - in: formData - description: None - - name: number - type: number - maximum: 543.2 - minimum: 32.1 - in: formData - description: None - required: true - - name: float - type: number - format: float - maximum: 987.6 - in: formData - description: None - - name: double - type: number - in: formData - format: double - maximum: 123.4 - minimum: 67.8 - required: true - description: None - - name: string - type: string - pattern: /[a-z]/i - in: formData - description: None - - name: pattern_without_delimiter - type: string - pattern: "^[A-Z].*" - in: formData - description: None - required: true - - name: byte - type: string - format: byte - in: formData - description: None - required: true - - name: binary - type: string - format: binary - in: formData - description: None - - name: date - type: string - format: date - in: formData - description: None - - name: dateTime - type: string - format: date-time - in: formData - description: None - - name: password - type: string - format: password - maxLength: 64 - minLength: 10 - in: formData - description: None - - name: callback - type: string - in: formData - description: None - responses: - '400': - description: Invalid username supplied - '404': - description: User not found - security: - - http_basic_test: [] - delete: - tags: - - fake - summary: Fake endpoint to test group parameters (optional) - description: Fake endpoint to test group parameters (optional) - operationId: testGroupParameters - x-group-parameters: true - parameters: - - name: required_string_group - type: integer - in: query - description: Required String in group parameters - required: true - - name: required_boolean_group - type: boolean - in: header - description: Required Boolean in group parameters - required: true - - name: required_int64_group - type: integer - format: int64 - in: query - description: Required Integer in group parameters - required: true - - name: string_group - type: integer - in: query - description: String in group parameters - - name: boolean_group - type: boolean - in: header - description: Boolean in group parameters - - name: int64_group - type: integer - format: int64 - in: query - description: Integer in group parameters - responses: - '400': - description: Someting wrong - /fake/outer/number: - post: - tags: - - fake - description: Test serialization of outer number types - operationId: fakeOuterNumberSerialize - parameters: - - name: body - in: body - description: Input number as post body - schema: - $ref: '#/definitions/OuterNumber' - responses: - '200': - description: Output number - schema: - $ref: '#/definitions/OuterNumber' - /fake/outer/string: - post: - tags: - - fake - description: Test serialization of outer string types - operationId: fakeOuterStringSerialize - parameters: - - name: body - in: body - description: Input string as post body - schema: - $ref: '#/definitions/OuterString' - responses: - '200': - description: Output string - schema: - $ref: '#/definitions/OuterString' - /fake/outer/boolean: - post: - tags: - - fake - description: Test serialization of outer boolean types - operationId: fakeOuterBooleanSerialize - parameters: - - name: body - in: body - description: Input boolean as post body - schema: - $ref: '#/definitions/OuterBoolean' - responses: - '200': - description: Output boolean - schema: - $ref: '#/definitions/OuterBoolean' - /fake/outer/composite: - post: - tags: - - fake - description: Test serialization of object with outer number type - operationId: fakeOuterCompositeSerialize - parameters: - - name: body - in: body - description: Input composite as post body - schema: - $ref: '#/definitions/OuterComposite' - responses: - '200': - description: Output composite - schema: - $ref: '#/definitions/OuterComposite' - /fake/jsonFormData: - get: - tags: - - fake - summary: test json serialization of form data - description: '' - operationId: testJsonFormData - consumes: - - application/x-www-form-urlencoded - parameters: - - name: param - in: formData - description: field1 - required: true - type: string - - name: param2 - in: formData - description: field2 - required: true - type: string - responses: - '200': - description: successful operation - /fake/inline-additionalProperties: - post: - tags: - - fake - summary: test inline additionalProperties - description: '' - operationId: testInlineAdditionalProperties - consumes: - - application/json - parameters: - - name: param - in: body - description: request body - required: true - schema: - type: object - additionalProperties: - type: string - responses: - '200': - description: successful operation - /fake/body-with-query-params: - put: - tags: - - fake - operationId: testBodyWithQueryParams - parameters: - - name: body - in: body - required: true - schema: - $ref: '#/definitions/User' - - name: query - in: query - required: true - type: string - consumes: - - application/json - responses: - '200': - description: Success - /fake/create_xml_item: - post: - tags: - - fake - operationId: createXmlItem - summary: creates an XmlItem - description: this route creates an XmlItem - consumes: - - 'application/xml' - - 'application/xml; charset=utf-8' - - 'application/xml; charset=utf-16' - - 'text/xml' - - 'text/xml; charset=utf-8' - - 'text/xml; charset=utf-16' - produces: - - 'application/xml' - - 'application/xml; charset=utf-8' - - 'application/xml; charset=utf-16' - - 'text/xml' - - 'text/xml; charset=utf-8' - - 'text/xml; charset=utf-16' - parameters: - - in: body - name: XmlItem - description: XmlItem Body - required: true - schema: - $ref: '#/definitions/XmlItem' - responses: - 200: - description: successful operation - /another-fake/dummy: - patch: - tags: - - "$another-fake?" - summary: To test special tags - description: To test special tags and operation ID starting with number - operationId: 123_test_@#$%_special_tags - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: body - description: client model - required: true - schema: - $ref: '#/definitions/Client' - responses: - '200': - description: successful operation - schema: - $ref: '#/definitions/Client' - /fake/body-with-file-schema: - put: - tags: - - fake - description: 'For this test, the body for this request much reference a schema named `File`.' - operationId: testBodyWithFileSchema - parameters: - - name: body - in: body - required: true - schema: - $ref: '#/definitions/FileSchemaTestClass' - consumes: - - application/json - responses: - '200': - description: Success - /fake/test-query-paramters: - put: - tags: - - fake - description: 'To test the collection format in query parameters' - operationId: testQueryParameterCollectionFormat - parameters: - - name: pipe - in: query - required: true - type: array - items: - type: string - collectionFormat: pipe - - name: ioutil - in: query - required: true - type: array - items: - type: string - collectionFormat: tsv - - name: http - in: query - required: true - type: array - items: - type: string - collectionFormat: ssv - - name: url - in: query - required: true - type: array - items: - type: string - collectionFormat: csv - - name: context - in: query - required: true - type: array - items: - type: string - collectionFormat: multi - consumes: - - application/json - responses: - '200': - description: Success - '/fake/{petId}/uploadImageWithRequiredFile': - post: - tags: - - pet - summary: uploads an image (required) - description: '' - operationId: uploadFileWithRequiredFile - consumes: - - multipart/form-data - produces: - - application/json - parameters: - - name: petId - in: path - description: ID of pet to update - required: true - type: integer - format: int64 - - name: additionalMetadata - in: formData - description: Additional data to pass to server - required: false - type: string - - name: requiredFile - in: formData - description: file to upload - required: true - type: file - responses: - '200': - description: successful operation - schema: - $ref: '#/definitions/ApiResponse' - security: - - petstore_auth: - - 'write:pets' - - 'read:pets' -securityDefinitions: - petstore_auth: - type: oauth2 - authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog' - flow: implicit - scopes: - 'write:pets': modify pets in your account - 'read:pets': read your pets - api_key: - type: apiKey - name: api_key - in: header - api_key_query: - type: apiKey - name: api_key_query - in: query - http_basic_test: - type: basic -definitions: - Order: - type: object - properties: - id: - type: integer - format: int64 - petId: - type: integer - format: int64 - quantity: - type: integer - format: int32 - shipDate: - type: string - format: date-time - status: - type: string - description: Order Status - enum: - - placed - - approved - - delivered - complete: - type: boolean - default: false - xml: - name: Order - Category: - type: object - required: - - name - properties: - id: - type: integer - format: int64 - name: - type: string - default: default-name - xml: - name: Category - User: - type: object - properties: - id: - type: integer - format: int64 - x-is-unique: true - username: - type: string - firstName: - type: string - lastName: - type: string - email: - type: string - password: - type: string - phone: - type: string - userStatus: - type: integer - format: int32 - description: User Status - xml: - name: User - Tag: - type: object - properties: - id: - type: integer - format: int64 - name: - type: string - xml: - name: Tag - Pet: - type: object - required: - - name - - photoUrls - properties: - id: - type: integer - format: int64 - x-is-unique: true - category: - $ref: '#/definitions/Category' - name: - type: string - example: doggie - photoUrls: - type: array - xml: - name: photoUrl - wrapped: true - items: - type: string - tags: - type: array - xml: - name: tag - wrapped: true - items: - $ref: '#/definitions/Tag' - status: - type: string - description: pet status in the store - enum: - - available - - pending - - sold - xml: - name: Pet - ApiResponse: - type: object - properties: - code: - type: integer - format: int32 - type: - type: string - message: - type: string - '$special[model.name]': - properties: - '$special[property.name]': - type: integer - format: int64 - xml: - name: '$special[model.name]' - Return: - description: Model for testing reserved words - properties: - return: - type: integer - format: int32 - xml: - name: Return - Name: - description: Model for testing model name same as property name - required: - - name - properties: - name: - type: integer - format: int32 - snake_case: - readOnly: true - type: integer - format: int32 - property: - type: string - 123Number: - type: integer - readOnly: true - xml: - name: Name - 200_response: - description: Model for testing model name starting with number - properties: - name: - type: integer - format: int32 - class: - type: string - xml: - name: Name - ClassModel: - description: Model for testing model with "_class" property - properties: - _class: - type: string - Dog: - allOf: - - $ref: '#/definitions/Animal' - - type: object - properties: - breed: - type: string - Cat: - allOf: - - $ref: '#/definitions/Animal' - - type: object - properties: - declawed: - type: boolean - BigCat: - allOf: - - $ref: '#/definitions/Cat' - - type: object - properties: - kind: - type: string - enum: [lions, tigers, leopards, jaguars] - Animal: - type: object - discriminator: className - required: - - className - properties: - className: - type: string - color: - type: string - default: 'red' - AnimalFarm: - type: array - items: - $ref: '#/definitions/Animal' - format_test: - type: object - required: - - number - - byte - - date - - password - properties: - integer: - type: integer - maximum: 100 - minimum: 10 - int32: - type: integer - format: int32 - maximum: 200 - minimum: 20 - int64: - type: integer - format: int64 - number: - maximum: 543.2 - minimum: 32.1 - type: number - float: - type: number - format: float - maximum: 987.6 - minimum: 54.3 - double: - type: number - format: double - maximum: 123.4 - minimum: 67.8 - string: - type: string - pattern: /[a-z]/i - byte: - type: string - format: byte - binary: - type: string - format: binary - date: - type: string - format: date - dateTime: - type: string - format: date-time - uuid: - type: string - format: uuid - example: 72f98069-206d-4f12-9f12-3d1e525a8e84 - password: - type: string - format: password - maxLength: 64 - minLength: 10 - BigDecimal: - type: string - format: number - EnumClass: - type: string - default: '-efg' - enum: - - _abc - - '-efg' - - (xyz) - Enum_Test: - type: object - required: - - enum_string_required - properties: - enum_string: - type: string - enum: - - UPPER - - lower - - '' - enum_string_required: - type: string - enum: - - UPPER - - lower - - '' - enum_integer: - type: integer - format: int32 - enum: - - 1 - - -1 - enum_number: - type: number - format: double - enum: - - 1.1 - - -1.2 - outerEnum: - $ref: '#/definitions/OuterEnum' - AdditionalPropertiesClass: - type: object - properties: - map_string: - type: object - additionalProperties: - type: string - map_number: - type: object - additionalProperties: - type: number - map_integer: - type: object - additionalProperties: - type: integer - map_boolean: - type: object - additionalProperties: - type: boolean - map_array_integer: - type: object - additionalProperties: - type: array - items: - type: integer - map_array_anytype: - type: object - additionalProperties: - type: array - items: - type: object - map_map_string: - type: object - additionalProperties: - type: object - additionalProperties: - type: string - map_map_anytype: - type: object - additionalProperties: - type: object - additionalProperties: - type: object - map_with_additional_properties: - type: object - additionalProperties: true - map_without_additional_properties: - type: object - additionalProperties: false - anytype_1: - type: object - anytype_2: {} - anytype_3: - type: object - properties: {} - AdditionalPropertiesString: - type: object - properties: - name: - type: string - additionalProperties: - type: string - AdditionalPropertiesInteger: - type: object - properties: - name: - type: string - additionalProperties: - type: integer - AdditionalPropertiesNumber: - type: object - properties: - name: - type: string - additionalProperties: - type: number - AdditionalPropertiesBoolean: - type: object - properties: - name: - type: string - additionalProperties: - type: boolean - AdditionalPropertiesArray: - type: object - properties: - name: - type: string - additionalProperties: - type: array - items: - type: object - AdditionalPropertiesObject: - type: object - properties: - name: - type: string - additionalProperties: - type: object - additionalProperties: - type: object - AdditionalPropertiesAnyType: - type: object - properties: - name: - type: string - additionalProperties: - type: object - MixedPropertiesAndAdditionalPropertiesClass: - type: object - properties: - uuid: - type: string - format: uuid - dateTime: - type: string - format: date-time - map: - type: object - additionalProperties: - $ref: '#/definitions/Animal' - List: - type: object - properties: - 123-list: - type: string - Client: - type: object - properties: - client: - type: string - ReadOnlyFirst: - type: object - properties: - bar: - type: string - readOnly: true - baz: - type: string - hasOnlyReadOnly: - type: object - properties: - bar: - type: string - readOnly: true - foo: - type: string - readOnly: true - Capitalization: - type: object - properties: - smallCamel: - type: string - CapitalCamel: - type: string - small_Snake: - type: string - Capital_Snake: - type: string - SCA_ETH_Flow_Points: - type: string - ATT_NAME: - description: > - Name of the pet - type: string - MapTest: - type: object - properties: - map_map_of_string: - type: object - additionalProperties: - type: object - additionalProperties: - type: string - # comment out the following (map of map of enum) as many language not yet support this - #map_map_of_enum: - # type: object - # additionalProperties: - # type: object - # additionalProperties: - # type: string - # enum: - # - UPPER - # - lower - map_of_enum_string: - type: object - additionalProperties: - type: string - enum: - - UPPER - - lower - direct_map: - type: object - additionalProperties: - type: boolean - indirect_map: - $ref: "#/definitions/StringBooleanMap" - ArrayTest: - type: object - properties: - array_of_string: - type: array - items: - type: string - array_array_of_integer: - type: array - items: - type: array - items: - type: integer - format: int64 - array_array_of_model: - type: array - items: - type: array - items: - $ref: '#/definitions/ReadOnlyFirst' - # commented out the below test case for array of enum for the time being - # as not all language can handle it - #array_of_enum: - # type: array - # items: - # type: string - # enum: - # - UPPER - # - lower - NumberOnly: - type: object - properties: - JustNumber: - type: number - ArrayOfNumberOnly: - type: object - properties: - ArrayNumber: - type: array - items: - type: number - ArrayOfArrayOfNumberOnly: - type: object - properties: - ArrayArrayNumber: - type: array - items: - type: array - items: - type: number - EnumArrays: - type: object - properties: - just_symbol: - type: string - enum: - - ">=" - - "$" - array_enum: - type: array - items: - type: string - enum: - - fish - - crab - # comment out the following as 2d array of enum is not supported at the moment - #array_array_enum: - # type: array - # items: - # type: array - # items: - # type: string - # enum: - # - Cat - # - Dog - OuterEnum: - type: string - enum: - - "placed" - - "approved" - - "delivered" - OuterComposite: - type: object - properties: - my_number: - $ref: '#/definitions/OuterNumber' - my_string: - $ref: '#/definitions/OuterString' - my_boolean: - $ref: '#/definitions/OuterBoolean' - OuterNumber: - type: number - OuterString: - type: string - OuterBoolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body - StringBooleanMap: - additionalProperties: - type: boolean - FileSchemaTestClass: - type: object - properties: - file: - $ref: "#/definitions/File" - files: - type: array - items: - $ref: "#/definitions/File" - File: - type: object - description: 'Must be named `File` for test.' - properties: - sourceURI: - description: 'Test capitalization' - type: string - TypeHolderDefault: - type: object - required: - - string_item - - number_item - - integer_item - - bool_item - - array_item - properties: - string_item: - type: string - default: what - number_item: - type: number - default: 1.234 - integer_item: - type: integer - default: -2 - bool_item: - type: boolean - default: true - array_item: - type: array - items: - type: integer - default: - - 0 - - 1 - - 2 - - 3 - TypeHolderExample: - type: object - required: - - string_item - - number_item - - float_item - - integer_item - - bool_item - - array_item - properties: - string_item: - type: string - example: what - number_item: - type: number - example: 1.234 - float_item: - type: number - example: 1.234 - format: float - integer_item: - type: integer - example: -2 - bool_item: - type: boolean - example: true - array_item: - type: array - items: - type: integer - example: - - 0 - - 1 - - 2 - - 3 - XmlItem: - type: object - xml: - namespace: http://a.com/schema - prefix: pre - properties: - attribute_string: - type: string - example: string - xml: - attribute: true - attribute_number: - type: number - example: 1.234 - xml: - attribute: true - attribute_integer: - type: integer - example: -2 - xml: - attribute: true - attribute_boolean: - type: boolean - example: true - xml: - attribute: true - wrapped_array: - type: array - xml: - wrapped: true - items: - type: integer - name_string: - type: string - example: string - xml: - name: xml_name_string - name_number: - type: number - example: 1.234 - xml: - name: xml_name_number - name_integer: - type: integer - example: -2 - xml: - name: xml_name_integer - name_boolean: - type: boolean - example: true - xml: - name: xml_name_boolean - name_array: - type: array - items: - type: integer - xml: - name: xml_name_array_item - name_wrapped_array: - type: array - xml: - wrapped: true - name: xml_name_wrapped_array - items: - type: integer - xml: - name: xml_name_wrapped_array_item - prefix_string: - type: string - example: string - xml: - prefix: ab - prefix_number: - type: number - example: 1.234 - xml: - prefix: cd - prefix_integer: - type: integer - example: -2 - xml: - prefix: ef - prefix_boolean: - type: boolean - example: true - xml: - prefix: gh - prefix_array: - type: array - items: - type: integer - xml: - prefix: ij - prefix_wrapped_array: - type: array - xml: - wrapped: true - prefix: kl - items: - type: integer - xml: - prefix: mn - namespace_string: - type: string - example: string - xml: - namespace: http://a.com/schema - namespace_number: - type: number - example: 1.234 - xml: - namespace: http://b.com/schema - namespace_integer: - type: integer - example: -2 - xml: - namespace: http://c.com/schema - namespace_boolean: - type: boolean - example: true - xml: - namespace: http://d.com/schema - namespace_array: - type: array - items: - type: integer - xml: - namespace: http://e.com/schema - namespace_wrapped_array: - type: array - xml: - wrapped: true - namespace: http://f.com/schema - items: - type: integer - xml: - namespace: http://g.com/schema - prefix_ns_string: - type: string - example: string - xml: - namespace: http://a.com/schema - prefix: a - prefix_ns_number: - type: number - example: 1.234 - xml: - namespace: http://b.com/schema - prefix: b - prefix_ns_integer: - type: integer - example: -2 - xml: - namespace: http://c.com/schema - prefix: c - prefix_ns_boolean: - type: boolean - example: true - xml: - namespace: http://d.com/schema - prefix: d - prefix_ns_array: - type: array - items: - type: integer - xml: - namespace: http://e.com/schema - prefix: e - prefix_ns_wrapped_array: - type: array - xml: - wrapped: true - namespace: http://f.com/schema - prefix: f - items: - type: integer - xml: - namespace: http://g.com/schema - prefix: g From 5339ab728076ed348387f8c742ed9e7a2dfd6872 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Fri, 22 May 2020 17:53:51 +0000 Subject: [PATCH 097/105] simplify code and add imports directly --- .../PythonClientExperimentalCodegen.java | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java index 470849ce5710..5b7138c0686c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java @@ -50,10 +50,6 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { private static final Logger LOGGER = LoggerFactory.getLogger(PythonClientExperimentalCodegen.class); - // A private vendor extension to track the list of imports that are needed when - // schemas are referenced under the 'additionalProperties' keyword. - private static final String referencedModelNamesExtension = "x-python-referenced-model-names"; - public PythonClientExperimentalCodegen() { super(); @@ -386,15 +382,6 @@ public Map postProcessAllModels(Map objs) { for (Map mo : models) { CodegenModel cm = (CodegenModel) mo.get("model"); - // Models that are referenced in the 'additionalPropertiesType' keyword - // must be added to the imports. - List refModelNames = (List) cm.vendorExtensions.get(referencedModelNamesExtension); - if (refModelNames != null) { - for (String refModelName : refModelNames) { - cm.imports.add(refModelName); - } - } - // make sure discriminator models are included in imports CodegenDiscriminator discriminator = cm.discriminator; if (discriminator != null) { @@ -1016,7 +1003,9 @@ protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Sc List referencedModelNames = new ArrayList(); codegenModel.additionalPropertiesType = getTypeString(addProps, "", "", referencedModelNames); if (referencedModelNames.size() != 0) { - codegenModel.vendorExtensions.put(referencedModelNamesExtension, referencedModelNames); + // Models that are referenced in the 'additionalPropertiesType' keyword + // must be added to the imports. + codegenModel.imports.addAll(referencedModelNames); } } // If addProps is null, the value of the 'additionalProperties' keyword is set From 0f014dddbb9d7855afe43f88ebec5ddc1cbd5907 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Fri, 22 May 2020 21:41:00 +0000 Subject: [PATCH 098/105] rename some of the properties used in tests --- .../codegen/DefaultCodegenTest.java | 24 +++++++++++-- ...odels-for-testing-with-http-signature.yaml | 14 ++++---- .../docs/AdditionalPropertiesClass.md | 12 +++---- .../models/additional_properties_class.py | 34 +++++++++---------- 4 files changed, 52 insertions(+), 32 deletions(-) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index e9bfaaded951..de2690860067 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -307,14 +307,32 @@ public void testAdditionalPropertiesV3Spec() { CodegenModel cm = codegen.fromModel("AdditionalPropertiesClass", schema); Map m = schema.getProperties(); - Schema child = m.get("map_string"); + Schema child = m.get("map_with_undeclared_properties_string"); // This property has the following inline schema. // additionalProperties: // type: string Assert.assertNotNull(child); Assert.assertNotNull(child.getAdditionalProperties()); - child = m.get("map_with_additional_properties"); + child = m.get("map_with_undeclared_properties_anytype_1"); + // This property does not use the additionalProperties keyword, + // which means by default undeclared properties are allowed. + Assert.assertNotNull(child); + Assert.assertNull(child.getAdditionalProperties()); + addProps = ModelUtils.getAdditionalProperties(openAPI, child); + Assert.assertNotNull(addProps); + Assert.assertTrue(addProps instanceof ObjectSchema); + + child = m.get("map_with_undeclared_properties_anytype_2"); + // This property does not use the additionalProperties keyword, + // which means by default undeclared properties are allowed. + Assert.assertNotNull(child); + Assert.assertNull(child.getAdditionalProperties()); + addProps = ModelUtils.getAdditionalProperties(openAPI, child); + Assert.assertNotNull(addProps); + Assert.assertTrue(addProps instanceof ObjectSchema); + + child = m.get("map_with_undeclared_properties_anytype_3"); // This property has the following inline schema. // additionalProperties: true Assert.assertNotNull(child); @@ -326,7 +344,7 @@ public void testAdditionalPropertiesV3Spec() { Assert.assertNotNull(addProps); Assert.assertTrue(addProps instanceof ObjectSchema); - child = m.get("map_without_additional_properties"); + child = m.get("empty_map"); // This property has the following inline schema. // additionalProperties: false Assert.assertNotNull(child); diff --git a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index 187a6488f0ed..6b38a82009e4 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -1543,19 +1543,21 @@ components: type: object additionalProperties: type: string - anytype_1: + anytype_1: {} + map_with_undeclared_properties_anytype_1: type: object - anytype_2: {} - anytype_3: + map_with_undeclared_properties_anytype_2: type: object properties: {} - map_with_additional_properties: + map_with_undeclared_properties_anytype_3: type: object additionalProperties: true - map_without_additional_properties: + empty_map: type: object + description: an object with no declared properties and no undeclared + properties, hence it's an empty map. additionalProperties: false - map_string: + map_with_undeclared_properties_string: type: object additionalProperties: type: string diff --git a/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md index e84cb566f5d1..042d7c437d60 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md @@ -5,12 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **map_property** | **{str: (str,)}** | | [optional] **map_of_map_property** | **{str: ({str: (str,)},)}** | | [optional] -**anytype_1** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] -**anytype_2** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] -**anytype_3** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] -**map_with_additional_properties** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] -**map_without_additional_properties** | **bool, date, datetime, dict, float, int, list, str** | | [optional] -**map_string** | **{str: (str,)}** | | [optional] +**anytype_1** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] +**map_with_undeclared_properties_anytype_1** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**map_with_undeclared_properties_anytype_2** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**map_with_undeclared_properties_anytype_3** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**empty_map** | **bool, date, datetime, dict, float, int, list, str** | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional] +**map_with_undeclared_properties_string** | **{str: (str,)}** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py index e5350f672dcf..f170265f9ab7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py @@ -81,12 +81,12 @@ def openapi_types(): return { 'map_property': ({str: (str,)},), # noqa: E501 'map_of_map_property': ({str: ({str: (str,)},)},), # noqa: E501 - 'anytype_1': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'anytype_2': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'anytype_3': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'map_with_additional_properties': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'map_without_additional_properties': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 - 'map_string': ({str: (str,)},), # noqa: E501 + 'anytype_1': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'map_with_undeclared_properties_anytype_1': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'map_with_undeclared_properties_anytype_2': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'map_with_undeclared_properties_anytype_3': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'empty_map': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 + 'map_with_undeclared_properties_string': ({str: (str,)},), # noqa: E501 } @cached_property @@ -97,11 +97,11 @@ def discriminator(): 'map_property': 'map_property', # noqa: E501 'map_of_map_property': 'map_of_map_property', # noqa: E501 'anytype_1': 'anytype_1', # noqa: E501 - 'anytype_2': 'anytype_2', # noqa: E501 - 'anytype_3': 'anytype_3', # noqa: E501 - 'map_with_additional_properties': 'map_with_additional_properties', # noqa: E501 - 'map_without_additional_properties': 'map_without_additional_properties', # noqa: E501 - 'map_string': 'map_string', # noqa: E501 + 'map_with_undeclared_properties_anytype_1': 'map_with_undeclared_properties_anytype_1', # noqa: E501 + 'map_with_undeclared_properties_anytype_2': 'map_with_undeclared_properties_anytype_2', # noqa: E501 + 'map_with_undeclared_properties_anytype_3': 'map_with_undeclared_properties_anytype_3', # noqa: E501 + 'empty_map': 'empty_map', # noqa: E501 + 'map_with_undeclared_properties_string': 'map_with_undeclared_properties_string', # noqa: E501 } _composed_schemas = {} @@ -150,12 +150,12 @@ def __init__(self, _check_type=True, _from_server=False, _path_to_item=(), _conf _visited_composed_classes = (Animal,) map_property ({str: (str,)}): [optional] # noqa: E501 map_of_map_property ({str: ({str: (str,)},)}): [optional] # noqa: E501 - anytype_1 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 - anytype_2 (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - anytype_3 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 - map_with_additional_properties ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 - map_without_additional_properties (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 - map_string ({str: (str,)}): [optional] # noqa: E501 + anytype_1 (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 + map_with_undeclared_properties_anytype_1 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + map_with_undeclared_properties_anytype_2 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + map_with_undeclared_properties_anytype_3 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + empty_map (bool, date, datetime, dict, float, int, list, str): an object with no declared properties and no undeclared properties, hence it's an empty map.. [optional] # noqa: E501 + map_with_undeclared_properties_string ({str: (str,)}): [optional] # noqa: E501 """ self._data_store = {} From ffae039487a7c5333a920eece5bea4b5a73966ab Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Fri, 22 May 2020 23:24:00 +0000 Subject: [PATCH 099/105] Handle more scenarios for nullable types --- .../python-experimental/model_utils.mustache | 20 +++++++++---------- ...odels-for-testing-with-http-signature.yaml | 1 + .../petstore_api/model_utils.py | 20 +++++++++---------- .../petstore_api/model_utils.py | 20 +++++++++---------- .../petstore_api/models/apple.py | 2 +- .../python-experimental/test/test_fruit.py | 19 ++++++++++++++++++ .../test/test_outer_enum.py | 14 ++++++++++--- 7 files changed, 59 insertions(+), 37 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache index e18ba8c360cf..44fdfb579361 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache @@ -66,16 +66,8 @@ class OpenApiModel(object): # pick a new schema/class to instantiate because a discriminator # propertyName value was passed in - # Build a list containing all oneOf and anyOf descendants. - oneof_anyof_classes = None - if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) - if (oneof_anyof_classes and none_type in oneof_anyof_classes and - len(args) == 1 and args[0] is None): - # The input data is the 'null' value AND one of the oneOf/anyOf children - # is the 'null' type (which is introduced in OAS schema >= 3.1). + if len(args) == 1 and args[0] is None and is_type_nullable(cls): + # The input data is the 'null' value and the type is nullable. return None visited_composed_classes = kwargs.get('_visited_composed_classes', ()) @@ -144,6 +136,12 @@ class OpenApiModel(object): # if we are coming from the chosen new_cls use cls instead return super(OpenApiModel, cls).__new__(cls) + # Build a list containing all oneOf and anyOf descendants. + oneof_anyof_classes = None + if cls._composed_schemas is not None: + oneof_anyof_classes = ( + cls._composed_schemas.get('oneOf', ()) + + cls._composed_schemas.get('anyOf', ())) oneof_anyof_child = new_cls in oneof_anyof_classes kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) @@ -934,7 +932,7 @@ def is_type_nullable(input_type): if issubclass(input_type, OpenApiModel) and input_type._nullable: return True if issubclass(input_type, ModelComposed): - # If oneOf/anyOf, check if the 'null' type is one of the allowed types. + # If oneOf/anyOf, check if the 'null' type is one of the allowed types. for t in input_type._composed_schemas.get('oneOf', ()): if is_type_nullable(t): return True for t in input_type._composed_schemas.get('anyOf', ()): diff --git a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index 6b38a82009e4..bd0ea05c9d97 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -1849,6 +1849,7 @@ components: origin: type: string pattern: /^[A-Z\s]*$/i + nullable: true banana: type: object properties: diff --git a/samples/client/petstore/python-experimental/petstore_api/model_utils.py b/samples/client/petstore/python-experimental/petstore_api/model_utils.py index 59cd1a55715b..c876b3eeffca 100644 --- a/samples/client/petstore/python-experimental/petstore_api/model_utils.py +++ b/samples/client/petstore/python-experimental/petstore_api/model_utils.py @@ -138,16 +138,8 @@ def __new__(cls, *args, **kwargs): # pick a new schema/class to instantiate because a discriminator # propertyName value was passed in - # Build a list containing all oneOf and anyOf descendants. - oneof_anyof_classes = None - if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) - if (oneof_anyof_classes and none_type in oneof_anyof_classes and - len(args) == 1 and args[0] is None): - # The input data is the 'null' value AND one of the oneOf/anyOf children - # is the 'null' type (which is introduced in OAS schema >= 3.1). + if len(args) == 1 and args[0] is None and is_type_nullable(cls): + # The input data is the 'null' value and the type is nullable. return None visited_composed_classes = kwargs.get('_visited_composed_classes', ()) @@ -216,6 +208,12 @@ def __new__(cls, *args, **kwargs): # if we are coming from the chosen new_cls use cls instead return super(OpenApiModel, cls).__new__(cls) + # Build a list containing all oneOf and anyOf descendants. + oneof_anyof_classes = None + if cls._composed_schemas is not None: + oneof_anyof_classes = ( + cls._composed_schemas.get('oneOf', ()) + + cls._composed_schemas.get('anyOf', ())) oneof_anyof_child = new_cls in oneof_anyof_classes kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) @@ -1201,7 +1199,7 @@ def is_type_nullable(input_type): if issubclass(input_type, OpenApiModel) and input_type._nullable: return True if issubclass(input_type, ModelComposed): - # If oneOf/anyOf, check if the 'null' type is one of the allowed types. + # If oneOf/anyOf, check if the 'null' type is one of the allowed types. for t in input_type._composed_schemas.get('oneOf', ()): if is_type_nullable(t): return True for t in input_type._composed_schemas.get('anyOf', ()): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model_utils.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model_utils.py index 59cd1a55715b..c876b3eeffca 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model_utils.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model_utils.py @@ -138,16 +138,8 @@ def __new__(cls, *args, **kwargs): # pick a new schema/class to instantiate because a discriminator # propertyName value was passed in - # Build a list containing all oneOf and anyOf descendants. - oneof_anyof_classes = None - if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) - if (oneof_anyof_classes and none_type in oneof_anyof_classes and - len(args) == 1 and args[0] is None): - # The input data is the 'null' value AND one of the oneOf/anyOf children - # is the 'null' type (which is introduced in OAS schema >= 3.1). + if len(args) == 1 and args[0] is None and is_type_nullable(cls): + # The input data is the 'null' value and the type is nullable. return None visited_composed_classes = kwargs.get('_visited_composed_classes', ()) @@ -216,6 +208,12 @@ def __new__(cls, *args, **kwargs): # if we are coming from the chosen new_cls use cls instead return super(OpenApiModel, cls).__new__(cls) + # Build a list containing all oneOf and anyOf descendants. + oneof_anyof_classes = None + if cls._composed_schemas is not None: + oneof_anyof_classes = ( + cls._composed_schemas.get('oneOf', ()) + + cls._composed_schemas.get('anyOf', ())) oneof_anyof_child = new_cls in oneof_anyof_classes kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) @@ -1201,7 +1199,7 @@ def is_type_nullable(input_type): if issubclass(input_type, OpenApiModel) and input_type._nullable: return True if issubclass(input_type, ModelComposed): - # If oneOf/anyOf, check if the 'null' type is one of the allowed types. + # If oneOf/anyOf, check if the 'null' type is one of the allowed types. for t in input_type._composed_schemas.get('oneOf', ()): if is_type_nullable(t): return True for t in input_type._composed_schemas.get('anyOf', ()): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple.py index 45a1ae1d18e6..ea2e74eb3802 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple.py @@ -77,7 +77,7 @@ class Apple(ModelNormal): additional_properties_type = None - _nullable = False + _nullable = True @cached_property def openapi_types(): diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_fruit.py b/samples/openapi3/client/petstore/python-experimental/test/test_fruit.py index 20f83968fd3d..70e2bb46a1ef 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_fruit.py @@ -189,5 +189,24 @@ def testFruit(self): fruit._additional_properties_model_instances, [] ) + def testFruitNullValue(self): + # Since 'apple' is nullable, validate we can create an apple with the 'null' value. + apple = petstore_api.Apple(None) + self.assertIsNone(apple) + + # But 'banana' is not nullable. + banana = petstore_api.Banana(None) + # TODO: this does not seem right. Shouldn't this raise an exception? + assert isinstance(banana, petstore_api.Banana) + + # Since 'fruit' has oneOf 'apple', 'banana' and 'apple' is nullable, + # validate we can create a fruit with the 'null' value. + fruit = petstore_api.Fruit(None) + self.assertIsNone(fruit) + + # Redo the same thing, this time passing a null Apple to the Fruit constructor. + fruit = petstore_api.Fruit(petstore_api.Apple(None)) + self.assertIsNone(fruit) + if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_outer_enum.py b/samples/openapi3/client/petstore/python-experimental/test/test_outer_enum.py index ad8f7cc68b28..fbb8cb7ad5cf 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_outer_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_outer_enum.py @@ -28,9 +28,17 @@ def tearDown(self): def testOuterEnum(self): """Test OuterEnum""" - # FIXME: construct object with mandatory attributes with example values - # model = petstore_api.OuterEnum() # noqa: E501 - pass + # Since 'OuterEnum' is nullable, validate the null value can be assigned + # to OuterEnum. + inst = petstore_api.OuterEnum(None) + self.assertIsNone(inst) + + inst = petstore_api.OuterEnum('approved') + assert isinstance(inst, petstore_api.OuterEnum) + + with self.assertRaises(petstore_api.ApiValueError): + inst = petstore_api.OuterEnum('garbage') + assert isinstance(inst, petstore_api.OuterEnum) if __name__ == '__main__': From b1b487a14ca2689e06bc5760d3be3f41c63c03d9 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Sat, 23 May 2020 10:45:48 -0700 Subject: [PATCH 100/105] add code comments --- .../tests/test_discard_unknown_properties.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/samples/openapi3/client/petstore/python-experimental/tests/test_discard_unknown_properties.py b/samples/openapi3/client/petstore/python-experimental/tests/test_discard_unknown_properties.py index 35c628bf24ef..a85ae29c46e2 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests/test_discard_unknown_properties.py +++ b/samples/openapi3/client/petstore/python-experimental/tests/test_discard_unknown_properties.py @@ -47,7 +47,9 @@ def test_deserialize_banana_req_do_not_discard_unknown_properties(self): data = { 'lengthCm': 21.3, 'sweet': False, - # Below are additional (undeclared) properties not specified in the bananaReq schema. + # Below is an unknown property not explicitly declared in the OpenAPI document. + # It should not be in the payload because additional properties (undeclared) are + # not allowed in the bananaReq schema (additionalProperties: false). 'unknown_property': 'a-value' } response = MockResponse(data=json.dumps(data)) @@ -71,7 +73,9 @@ def test_deserialize_isosceles_triangle_do_not_discard_unknown_properties(self): data = { 'shape_type': 'Triangle', 'triangle_type': 'EquilateralTriangle', - # Below are additional (undeclared) properties not specified in the bananaReq schema. + # Below is an unknown property not explicitly declared in the OpenAPI document. + # It should not be in the payload because additional properties (undeclared) are + # not allowed in the schema (additionalProperties: false). 'unknown_property': 'a-value' } response = MockResponse(data=json.dumps(data)) From 5466a8876b4c4fe2a3a243155b0a4e6b37467b5d Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 24 May 2020 00:14:30 -0700 Subject: [PATCH 101/105] Adds *args input to __init__ method to fix test testFruitNullValue --- .../python/python-experimental/model.mustache | 1 + .../method_init_shared.mustache | 23 ++++++++++++++++++- .../models/additional_properties_class.py | 19 ++++++++++++++- .../petstore_api/models/address.py | 19 ++++++++++++++- .../petstore_api/models/animal.py | 19 ++++++++++++++- .../petstore_api/models/api_response.py | 19 ++++++++++++++- .../petstore_api/models/apple.py | 19 ++++++++++++++- .../petstore_api/models/apple_req.py | 19 ++++++++++++++- .../models/array_of_array_of_number_only.py | 19 ++++++++++++++- .../models/array_of_number_only.py | 19 ++++++++++++++- .../petstore_api/models/array_test.py | 19 ++++++++++++++- .../petstore_api/models/banana.py | 19 ++++++++++++++- .../petstore_api/models/banana_req.py | 19 ++++++++++++++- .../petstore_api/models/biology_chordate.py | 19 ++++++++++++++- .../petstore_api/models/biology_hominid.py | 19 ++++++++++++++- .../petstore_api/models/biology_mammal.py | 19 ++++++++++++++- .../petstore_api/models/biology_primate.py | 19 ++++++++++++++- .../petstore_api/models/biology_reptile.py | 19 ++++++++++++++- .../petstore_api/models/capitalization.py | 19 ++++++++++++++- .../petstore_api/models/cat.py | 19 ++++++++++++++- .../petstore_api/models/cat_all_of.py | 19 ++++++++++++++- .../petstore_api/models/category.py | 20 +++++++++++++++- .../petstore_api/models/class_model.py | 19 ++++++++++++++- .../petstore_api/models/client.py | 19 ++++++++++++++- .../models/complex_quadrilateral.py | 19 ++++++++++++++- .../petstore_api/models/dog.py | 19 ++++++++++++++- .../petstore_api/models/dog_all_of.py | 19 ++++++++++++++- .../petstore_api/models/drawing.py | 19 ++++++++++++++- .../petstore_api/models/enum_arrays.py | 19 ++++++++++++++- .../petstore_api/models/enum_class.py | 20 +++++++++++++++- .../petstore_api/models/enum_test.py | 19 ++++++++++++++- .../models/equilateral_triangle.py | 19 ++++++++++++++- .../petstore_api/models/file.py | 19 ++++++++++++++- .../models/file_schema_test_class.py | 19 ++++++++++++++- .../petstore_api/models/foo.py | 19 ++++++++++++++- .../petstore_api/models/format_test.py | 19 ++++++++++++++- .../petstore_api/models/fruit.py | 19 ++++++++++++++- .../petstore_api/models/fruit_req.py | 21 ++++++++++++++++- .../petstore_api/models/gm_fruit.py | 19 ++++++++++++++- .../petstore_api/models/has_only_read_only.py | 19 ++++++++++++++- .../models/health_check_result.py | 19 ++++++++++++++- .../petstore_api/models/inline_object.py | 19 ++++++++++++++- .../petstore_api/models/inline_object1.py | 19 ++++++++++++++- .../petstore_api/models/inline_object2.py | 19 ++++++++++++++- .../petstore_api/models/inline_object3.py | 19 ++++++++++++++- .../petstore_api/models/inline_object4.py | 19 ++++++++++++++- .../petstore_api/models/inline_object5.py | 19 ++++++++++++++- .../models/inline_response_default.py | 19 ++++++++++++++- .../petstore_api/models/isosceles_triangle.py | 19 ++++++++++++++- .../petstore_api/models/list.py | 19 ++++++++++++++- .../petstore_api/models/mammal.py | 19 ++++++++++++++- .../petstore_api/models/map_test.py | 19 ++++++++++++++- ...perties_and_additional_properties_class.py | 19 ++++++++++++++- .../petstore_api/models/model200_response.py | 19 ++++++++++++++- .../petstore_api/models/model_return.py | 19 ++++++++++++++- .../petstore_api/models/name.py | 19 ++++++++++++++- .../petstore_api/models/nullable_class.py | 19 ++++++++++++++- .../petstore_api/models/nullable_shape.py | 21 ++++++++++++++++- .../petstore_api/models/number_only.py | 19 ++++++++++++++- .../petstore_api/models/order.py | 19 ++++++++++++++- .../petstore_api/models/outer_composite.py | 19 ++++++++++++++- .../petstore_api/models/outer_enum.py | 19 ++++++++++++++- .../models/outer_enum_default_value.py | 20 +++++++++++++++- .../petstore_api/models/outer_enum_integer.py | 19 ++++++++++++++- .../outer_enum_integer_default_value.py | 20 +++++++++++++++- .../petstore_api/models/pet.py | 19 ++++++++++++++- .../petstore_api/models/quadrilateral.py | 20 +++++++++++++++- .../models/quadrilateral_interface.py | 19 ++++++++++++++- .../petstore_api/models/read_only_first.py | 19 ++++++++++++++- .../petstore_api/models/scalene_triangle.py | 19 ++++++++++++++- .../petstore_api/models/shape.py | 21 ++++++++++++++++- .../petstore_api/models/shape_interface.py | 19 ++++++++++++++- .../petstore_api/models/shape_or_null.py | 21 ++++++++++++++++- .../models/simple_quadrilateral.py | 19 ++++++++++++++- .../petstore_api/models/special_model_name.py | 19 ++++++++++++++- .../petstore_api/models/string_boolean_map.py | 19 ++++++++++++++- .../petstore_api/models/tag.py | 19 ++++++++++++++- .../petstore_api/models/triangle.py | 20 +++++++++++++++- .../petstore_api/models/triangle_interface.py | 19 ++++++++++++++- .../petstore_api/models/user.py | 19 ++++++++++++++- .../petstore_api/models/whale.py | 19 ++++++++++++++- .../petstore_api/models/zebra.py | 19 ++++++++++++++- .../python-experimental/test/test_fruit.py | 7 +++--- 83 files changed, 1480 insertions(+), 85 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model.mustache index 9afb17b52776..0790c6143578 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model.mustache @@ -10,6 +10,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from {{packageName}}.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/method_init_shared.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/method_init_shared.mustache index 3a77f7e8a8d9..78059150f20f 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/method_init_shared.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/method_init_shared.mustache @@ -1,5 +1,5 @@ @convert_js_args_to_python_args - def __init__(self{{#requiredVars}}{{^defaultValue}}, {{name}}{{/defaultValue}}{{/requiredVars}}{{#requiredVars}}{{#defaultValue}}, {{name}}={{{defaultValue}}}{{/defaultValue}}{{/requiredVars}}, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self{{#requiredVars}}{{^defaultValue}}, {{name}}{{/defaultValue}}{{/requiredVars}}, *args, **kwargs): # noqa: E501 """{{classname}} - a model defined in OpenAPI {{#requiredVars}} @@ -54,6 +54,27 @@ {{/optionalVars}} """ +{{#requiredVars}} +{{#defaultValue}} + {{name}} = kwargs.get('{{name}}', {{{defaultValue}}}) +{{/defaultValue}} +{{/requiredVars}} + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py index ee30496c58e8..c48b515a7aa3 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -116,7 +117,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """additional_properties_class.AdditionalPropertiesClass - a model defined in OpenAPI Keyword Args: @@ -160,6 +161,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= map_with_undeclared_properties_string ({str: (str,)}): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/address.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/address.py index 694df633a244..a71502767ae1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/address.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/address.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -100,7 +101,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """address.Address - a model defined in OpenAPI Keyword Args: @@ -136,6 +137,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/animal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/animal.py index 48f42ef68446..641c9c16e279 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/animal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/animal.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -120,7 +121,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """animal.Animal - a model defined in OpenAPI Args: @@ -160,6 +161,22 @@ def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _p color (str): [optional] if omitted the server will use the default value of 'red' # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/api_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/api_response.py index 8d9d8b7cc434..c921519b8783 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/api_response.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/api_response.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -106,7 +107,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """api_response.ApiResponse - a model defined in OpenAPI Keyword Args: @@ -145,6 +146,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= message (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple.py index 51568e1bd7b8..3f87c152e338 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -115,7 +116,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """apple.Apple - a model defined in OpenAPI Keyword Args: @@ -153,6 +154,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= origin (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple_req.py index 02d8db3771ce..66b2899dbf67 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple_req.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, cultivar, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, cultivar, *args, **kwargs): # noqa: E501 """apple_req.AppleReq - a model defined in OpenAPI Args: @@ -144,6 +145,22 @@ def __init__(self, cultivar, _check_type=True, _spec_property_naming=False, _pat mealy (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py index ddd5533b7620..b9f52d6ba7bc 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """array_of_array_of_number_only.ArrayOfArrayOfNumberOnly - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= array_array_number ([[float]]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py index c8b493c15090..45021fef4c51 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """array_of_number_only.ArrayOfNumberOnly - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= array_number ([float]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_test.py index 14f0609d64e1..0eed8d054611 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_test.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -111,7 +112,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """array_test.ArrayTest - a model defined in OpenAPI Keyword Args: @@ -150,6 +151,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= array_array_of_model ([[read_only_first.ReadOnlyFirst]]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana.py index a0479781f46d..6e42bcb57251 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """banana.Banana - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= length_cm (float): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana_req.py index 9e765319e10c..3128a038053f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana_req.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, length_cm, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, length_cm, *args, **kwargs): # noqa: E501 """banana_req.BananaReq - a model defined in OpenAPI Args: @@ -144,6 +145,22 @@ def __init__(self, length_cm, _check_type=True, _spec_property_naming=False, _pa sweet (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_chordate.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_chordate.py index 66ab866debf4..200fb06f67ec 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_chordate.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_chordate.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -130,7 +131,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """biology_chordate.BiologyChordate - a model defined in OpenAPI Args: @@ -169,6 +170,22 @@ def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _p _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_hominid.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_hominid.py index 467449a823a4..649c7fb061f6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_hominid.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_hominid.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -112,7 +113,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """biology_hominid.BiologyHominid - a model defined in OpenAPI Args: @@ -151,6 +152,22 @@ def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _p _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_mammal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_mammal.py index 78efad8e6d9d..3c0b199a7e3c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_mammal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_mammal.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -124,7 +125,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """biology_mammal.BiologyMammal - a model defined in OpenAPI Args: @@ -163,6 +164,22 @@ def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _p _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_primate.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_primate.py index 07562bcd0012..c295345a19be 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_primate.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_primate.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -118,7 +119,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """biology_primate.BiologyPrimate - a model defined in OpenAPI Args: @@ -157,6 +158,22 @@ def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _p _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_reptile.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_reptile.py index 380960e9c8a9..a5e8bb71dbeb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_reptile.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_reptile.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -112,7 +113,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """biology_reptile.BiologyReptile - a model defined in OpenAPI Args: @@ -151,6 +152,22 @@ def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _p _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/capitalization.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/capitalization.py index 9c4177a39434..06745009d8b8 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/capitalization.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/capitalization.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -112,7 +113,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """capitalization.Capitalization - a model defined in OpenAPI Keyword Args: @@ -154,6 +155,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= att_name (str): Name of the pet . [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat.py index fa39273d6588..b80672252538 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -126,7 +127,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """cat.Cat - a model defined in OpenAPI Args: @@ -167,6 +168,22 @@ def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _p color (str): [optional] if omitted the server will use the default value of 'red' # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat_all_of.py index 14db2c8d4ee2..49ae9462f491 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat_all_of.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """cat_all_of.CatAllOf - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= declawed (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/category.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/category.py index a9c2abbe1c3b..16e4a33d4f04 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/category.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/category.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, name='default-name', _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """category.Category - a model defined in OpenAPI Args: @@ -144,6 +145,23 @@ def __init__(self, name='default-name', _check_type=True, _spec_property_naming= id (int): [optional] # noqa: E501 """ + name = kwargs.get('name', 'default-name') + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/class_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/class_model.py index cca6f50f7792..fc88f68e3f5f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/class_model.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/class_model.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """class_model.ClassModel - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= _class (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/client.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/client.py index 51558cd36630..fa99b07fa328 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/client.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/client.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """client.Client - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= client (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/complex_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/complex_quadrilateral.py index 3c64215adf38..03497b55fb45 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/complex_quadrilateral.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -115,7 +116,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, quadrilateral_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, shape_type, quadrilateral_type, *args, **kwargs): # noqa: E501 """complex_quadrilateral.ComplexQuadrilateral - a model defined in OpenAPI Args: @@ -155,6 +156,22 @@ def __init__(self, shape_type, quadrilateral_type, _check_type=True, _spec_prope _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog.py index 58cd4813fccf..e35c52bd69d0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -121,7 +122,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """dog.Dog - a model defined in OpenAPI Args: @@ -162,6 +163,22 @@ def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _p color (str): [optional] if omitted the server will use the default value of 'red' # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog_all_of.py index 69692472909f..0d053aca2a63 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog_all_of.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """dog_all_of.DogAllOf - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= breed (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py index 54405511699d..a9cf39773d6b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -128,7 +129,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """drawing.Drawing - a model defined in OpenAPI Keyword Args: @@ -168,6 +169,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= shapes ([shape.Shape]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_arrays.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_arrays.py index ca924f02e961..a19990449748 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_arrays.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_arrays.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -112,7 +113,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """enum_arrays.EnumArrays - a model defined in OpenAPI Keyword Args: @@ -150,6 +151,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= array_enum ([str]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_class.py index 091ed9b39646..3fa95b69d0c9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_class.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -99,7 +100,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, value='-efg', _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """enum_class.EnumClass - a model defined in OpenAPI Args: @@ -138,6 +139,23 @@ def __init__(self, value='-efg', _check_type=True, _spec_property_naming=False, _visited_composed_classes = (Animal,) """ + value = kwargs.get('value', '-efg') + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_test.py index 0ab10dfaafd2..ba6118114b07 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_test.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -154,7 +155,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, enum_string_required, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, enum_string_required, *args, **kwargs): # noqa: E501 """enum_test.EnumTest - a model defined in OpenAPI Args: @@ -200,6 +201,22 @@ def __init__(self, enum_string_required, _check_type=True, _spec_property_naming outer_enum_integer_default_value (outer_enum_integer_default_value.OuterEnumIntegerDefaultValue): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/equilateral_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/equilateral_triangle.py index 1d3003b1965a..c601d01dde7f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/equilateral_triangle.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -115,7 +116,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, triangle_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, shape_type, triangle_type, *args, **kwargs): # noqa: E501 """equilateral_triangle.EquilateralTriangle - a model defined in OpenAPI Args: @@ -155,6 +156,22 @@ def __init__(self, shape_type, triangle_type, _check_type=True, _spec_property_n _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file.py index 999731b2fc00..0152f8d8c667 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """file.File - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= source_uri (str): Test capitalization. [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py index ac2ce591bcf6..79e5638ccc94 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -109,7 +110,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """file_schema_test_class.FileSchemaTestClass - a model defined in OpenAPI Keyword Args: @@ -147,6 +148,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= files ([file.File]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/foo.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/foo.py index cdfe893d698f..34b9eb6fba64 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/foo.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/foo.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """foo.Foo - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= bar (str): [optional] if omitted the server will use the default value of 'bar' # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/format_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/format_test.py index a548880fa613..6c5ae81e7dd2 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/format_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/format_test.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -173,7 +174,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, number, byte, date, password, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, number, byte, date, password, *args, **kwargs): # noqa: E501 """format_test.FormatTest - a model defined in OpenAPI Args: @@ -226,6 +227,22 @@ def __init__(self, number, byte, date, password, _check_type=True, _spec_propert pattern_with_digits_and_delimiter (str): A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit.py index 0647e16f171c..1058c953ee60 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -130,7 +131,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """fruit.Fruit - a model defined in OpenAPI Keyword Args: @@ -170,6 +171,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= length_cm (float): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit_req.py index 58d45a3c9ba2..b8af0f35f432 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit_req.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -119,7 +120,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, cultivar=nulltype.Null, length_cm=nulltype.Null, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """fruit_req.FruitReq - a model defined in OpenAPI Args: @@ -161,6 +162,24 @@ def __init__(self, cultivar=nulltype.Null, length_cm=nulltype.Null, _check_type= sweet (bool): [optional] # noqa: E501 """ + cultivar = kwargs.get('cultivar', nulltype.Null) + length_cm = kwargs.get('length_cm', nulltype.Null) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/gm_fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/gm_fruit.py index 7deb4c1f33c1..9857b08c36c6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/gm_fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/gm_fruit.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -130,7 +131,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """gm_fruit.GmFruit - a model defined in OpenAPI Keyword Args: @@ -170,6 +171,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= length_cm (float): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py index 4c77f76a9d16..eeb685139cb1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """has_only_read_only.HasOnlyReadOnly - a model defined in OpenAPI Keyword Args: @@ -142,6 +143,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= foo (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/health_check_result.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/health_check_result.py index 61d7fac5b08b..be6cfa1c0afa 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/health_check_result.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/health_check_result.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """health_check_result.HealthCheckResult - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= nullable_message (str, none_type): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object.py index b5a45be9c91e..8975f4be51ea 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """inline_object.InlineObject - a model defined in OpenAPI Keyword Args: @@ -142,6 +143,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= status (str): Updated status of the pet. [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object1.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object1.py index f87ce686d424..4991e8995301 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object1.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object1.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """inline_object1.InlineObject1 - a model defined in OpenAPI Keyword Args: @@ -142,6 +143,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= file (file_type): file to upload. [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object2.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object2.py index 2a6ab044db01..5b4140270330 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object2.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object2.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -113,7 +114,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """inline_object2.InlineObject2 - a model defined in OpenAPI Keyword Args: @@ -151,6 +152,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= enum_form_string (str): Form parameter enum test (string). [optional] if omitted the server will use the default value of '-efg' # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object3.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object3.py index bbb8b911caef..ff595ddaa1fd 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object3.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object3.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -162,7 +163,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, number, double, pattern_without_delimiter, byte, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, number, double, pattern_without_delimiter, byte, *args, **kwargs): # noqa: E501 """inline_object3.InlineObject3 - a model defined in OpenAPI Args: @@ -214,6 +215,22 @@ def __init__(self, number, double, pattern_without_delimiter, byte, _check_type= callback (str): None. [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object4.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object4.py index 29dd6f9609cd..a45a324fb517 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object4.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object4.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, param, param2, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, param, param2, *args, **kwargs): # noqa: E501 """inline_object4.InlineObject4 - a model defined in OpenAPI Args: @@ -144,6 +145,22 @@ def __init__(self, param, param2, _check_type=True, _spec_property_naming=False, _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object5.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object5.py index 34a54c696fe9..23e081958325 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object5.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object5.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, required_file, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, required_file, *args, **kwargs): # noqa: E501 """inline_object5.InlineObject5 - a model defined in OpenAPI Args: @@ -144,6 +145,22 @@ def __init__(self, required_file, _check_type=True, _spec_property_naming=False, additional_metadata (str): Additional data to pass to server. [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_response_default.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_response_default.py index a97ff40f744c..577dbfeb8517 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_response_default.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_response_default.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -107,7 +108,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """inline_response_default.InlineResponseDefault - a model defined in OpenAPI Keyword Args: @@ -144,6 +145,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= string (foo.Foo): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/isosceles_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/isosceles_triangle.py index 8994666f5450..ea5607fdfd9b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/isosceles_triangle.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -115,7 +116,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, triangle_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, shape_type, triangle_type, *args, **kwargs): # noqa: E501 """isosceles_triangle.IsoscelesTriangle - a model defined in OpenAPI Args: @@ -155,6 +156,22 @@ def __init__(self, shape_type, triangle_type, _check_type=True, _spec_property_n _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/list.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/list.py index aeaf9df87173..9499f26c7b18 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/list.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/list.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """list.List - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= _123_list (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mammal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mammal.py index 81d33fa0c438..a8f40ba6c055 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mammal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mammal.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -130,7 +131,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """mammal.Mammal - a model defined in OpenAPI Args: @@ -172,6 +173,22 @@ def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _p type (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/map_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/map_test.py index 60c5822afb51..45be8a1fecfd 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/map_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/map_test.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -117,7 +118,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """map_test.MapTest - a model defined in OpenAPI Keyword Args: @@ -157,6 +158,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= indirect_map (string_boolean_map.StringBooleanMap): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py index 306e0c9a29f2..0e584ebd43e9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -111,7 +112,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """mixed_properties_and_additional_properties_class.MixedPropertiesAndAdditionalPropertiesClass - a model defined in OpenAPI Keyword Args: @@ -150,6 +151,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= map ({str: (animal.Animal,)}): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model200_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model200_response.py index 9709655efd46..54cc1fa338d5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model200_response.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model200_response.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """model200_response.Model200Response - a model defined in OpenAPI Keyword Args: @@ -142,6 +143,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= _class (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model_return.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model_return.py index afb3c60f317b..cf7415f0bd72 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model_return.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model_return.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """model_return.ModelReturn - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= _return (int): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/name.py index bcf700a4f8a6..33a95baafcf7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/name.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/name.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -108,7 +109,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, name, *args, **kwargs): # noqa: E501 """name.Name - a model defined in OpenAPI Args: @@ -150,6 +151,22 @@ def __init__(self, name, _check_type=True, _spec_property_naming=False, _path_to _123_number (int): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_class.py index a9c5e4767304..c16714bd32f9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_class.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -124,7 +125,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """nullable_class.NullableClass - a model defined in OpenAPI Keyword Args: @@ -172,6 +173,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= object_items_nullable ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type)}): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_shape.py index d8188fe7e76a..e62a3881c520 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_shape.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_shape.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -123,7 +124,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, quadrilateral_type=nulltype.Null, triangle_type=nulltype.Null, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, shape_type, *args, **kwargs): # noqa: E501 """nullable_shape.NullableShape - a model defined in OpenAPI Args: @@ -164,6 +165,24 @@ def __init__(self, shape_type, quadrilateral_type=nulltype.Null, triangle_type=n _visited_composed_classes = (Animal,) """ + quadrilateral_type = kwargs.get('quadrilateral_type', nulltype.Null) + triangle_type = kwargs.get('triangle_type', nulltype.Null) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/number_only.py index ce2cefe48971..305da1d7538e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/number_only.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """number_only.NumberOnly - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= just_number (float): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/order.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/order.py index f292c13fa2ea..ddc3332d66d7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/order.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/order.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -117,7 +118,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """order.Order - a model defined in OpenAPI Keyword Args: @@ -159,6 +160,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= complete (bool): [optional] if omitted the server will use the default value of False # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_composite.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_composite.py index b27d0aca9f20..0011802050d3 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_composite.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_composite.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -106,7 +107,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """outer_composite.OuterComposite - a model defined in OpenAPI Keyword Args: @@ -145,6 +146,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= my_boolean (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum.py index 03450cce2774..64311e838363 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -100,7 +101,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, value, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, value, *args, **kwargs): # noqa: E501 """outer_enum.OuterEnum - a model defined in OpenAPI Args: @@ -139,6 +140,22 @@ def __init__(self, value, _check_type=True, _spec_property_naming=False, _path_t _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_default_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_default_value.py index 7ed10ea3ae5d..b53b330bbaf6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_default_value.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_default_value.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -99,7 +100,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, value='placed', _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """outer_enum_default_value.OuterEnumDefaultValue - a model defined in OpenAPI Args: @@ -138,6 +139,23 @@ def __init__(self, value='placed', _check_type=True, _spec_property_naming=False _visited_composed_classes = (Animal,) """ + value = kwargs.get('value', 'placed') + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer.py index 095e501bacf5..71d192b54f1c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -99,7 +100,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, value, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, value, *args, **kwargs): # noqa: E501 """outer_enum_integer.OuterEnumInteger - a model defined in OpenAPI Args: @@ -138,6 +139,22 @@ def __init__(self, value, _check_type=True, _spec_property_naming=False, _path_t _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer_default_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer_default_value.py index 6ac8dd3d4663..2deaeae1932a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer_default_value.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer_default_value.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -99,7 +100,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, value=0, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """outer_enum_integer_default_value.OuterEnumIntegerDefaultValue - a model defined in OpenAPI Args: @@ -138,6 +139,23 @@ def __init__(self, value=0, _check_type=True, _spec_property_naming=False, _path _visited_composed_classes = (Animal,) """ + value = kwargs.get('value', 0) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/pet.py index 29a392e2bd3e..c93acd53c96c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/pet.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -127,7 +128,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, name, photo_urls, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, name, photo_urls, *args, **kwargs): # noqa: E501 """pet.Pet - a model defined in OpenAPI Args: @@ -171,6 +172,22 @@ def __init__(self, name, photo_urls, _check_type=True, _spec_property_naming=Fal status (str): pet status in the store. [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral.py index bc3a76ca3017..0f4994064571 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -121,7 +122,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, quadrilateral_type, shape_type=nulltype.Null, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, quadrilateral_type, *args, **kwargs): # noqa: E501 """quadrilateral.Quadrilateral - a model defined in OpenAPI Args: @@ -161,6 +162,23 @@ def __init__(self, quadrilateral_type, shape_type=nulltype.Null, _check_type=Tru _visited_composed_classes = (Animal,) """ + shape_type = kwargs.get('shape_type', nulltype.Null) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral_interface.py index 8af50176301f..05e4d0f3b16d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral_interface.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, quadrilateral_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, quadrilateral_type, *args, **kwargs): # noqa: E501 """quadrilateral_interface.QuadrilateralInterface - a model defined in OpenAPI Args: @@ -141,6 +142,22 @@ def __init__(self, quadrilateral_type, _check_type=True, _spec_property_naming=F _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/read_only_first.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/read_only_first.py index 308f776869ac..691d789a92e6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/read_only_first.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/read_only_first.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """read_only_first.ReadOnlyFirst - a model defined in OpenAPI Keyword Args: @@ -142,6 +143,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= baz (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/scalene_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/scalene_triangle.py index 3f444f652bff..6350bdea3bc5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/scalene_triangle.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -115,7 +116,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, triangle_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, shape_type, triangle_type, *args, **kwargs): # noqa: E501 """scalene_triangle.ScaleneTriangle - a model defined in OpenAPI Args: @@ -155,6 +156,22 @@ def __init__(self, shape_type, triangle_type, _check_type=True, _spec_property_n _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape.py index cd0d2e5fd8d1..ef83ed3a31b7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -123,7 +124,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, quadrilateral_type=nulltype.Null, triangle_type=nulltype.Null, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, shape_type, *args, **kwargs): # noqa: E501 """shape.Shape - a model defined in OpenAPI Args: @@ -164,6 +165,24 @@ def __init__(self, shape_type, quadrilateral_type=nulltype.Null, triangle_type=n _visited_composed_classes = (Animal,) """ + quadrilateral_type = kwargs.get('quadrilateral_type', nulltype.Null) + triangle_type = kwargs.get('triangle_type', nulltype.Null) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_interface.py index 4f5914ca2786..1f3d518ba3ec 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_interface.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, shape_type, *args, **kwargs): # noqa: E501 """shape_interface.ShapeInterface - a model defined in OpenAPI Args: @@ -141,6 +142,22 @@ def __init__(self, shape_type, _check_type=True, _spec_property_naming=False, _p _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_or_null.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_or_null.py index 1b3cf94205b3..53043fdd60c4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_or_null.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_or_null.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -123,7 +124,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, quadrilateral_type=nulltype.Null, triangle_type=nulltype.Null, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, shape_type, *args, **kwargs): # noqa: E501 """shape_or_null.ShapeOrNull - a model defined in OpenAPI Args: @@ -164,6 +165,24 @@ def __init__(self, shape_type, quadrilateral_type=nulltype.Null, triangle_type=n _visited_composed_classes = (Animal,) """ + quadrilateral_type = kwargs.get('quadrilateral_type', nulltype.Null) + triangle_type = kwargs.get('triangle_type', nulltype.Null) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/simple_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/simple_quadrilateral.py index d25ebe77be31..8d8cf85fca1e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/simple_quadrilateral.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -115,7 +116,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, quadrilateral_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, shape_type, quadrilateral_type, *args, **kwargs): # noqa: E501 """simple_quadrilateral.SimpleQuadrilateral - a model defined in OpenAPI Args: @@ -155,6 +156,22 @@ def __init__(self, shape_type, quadrilateral_type, _check_type=True, _spec_prope _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/special_model_name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/special_model_name.py index 4fbb4b76f551..6e2b80cbe90c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/special_model_name.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/special_model_name.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """special_model_name.SpecialModelName - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= special_property_name (int): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py index 440bef9b742d..8351ad04e2de 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -100,7 +101,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """string_boolean_map.StringBooleanMap - a model defined in OpenAPI Keyword Args: @@ -136,6 +137,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/tag.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/tag.py index 2e28b97b7585..aa50402b7f94 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/tag.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/tag.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """tag.Tag - a model defined in OpenAPI Keyword Args: @@ -142,6 +143,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle.py index 96ea10dd4ab4..27b8ae122733 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -127,7 +128,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, triangle_type, shape_type=nulltype.Null, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, triangle_type, *args, **kwargs): # noqa: E501 """triangle.Triangle - a model defined in OpenAPI Args: @@ -167,6 +168,23 @@ def __init__(self, triangle_type, shape_type=nulltype.Null, _check_type=True, _s _visited_composed_classes = (Animal,) """ + shape_type = kwargs.get('shape_type', nulltype.Null) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle_interface.py index d0f487440913..56d960a13382 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle_interface.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, triangle_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, triangle_type, *args, **kwargs): # noqa: E501 """triangle_interface.TriangleInterface - a model defined in OpenAPI Args: @@ -141,6 +142,22 @@ def __init__(self, triangle_type, _check_type=True, _spec_property_naming=False, _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/user.py index 0adf71f11662..836e7f9c0b51 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/user.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -124,7 +125,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """user.User - a model defined in OpenAPI Keyword Args: @@ -172,6 +173,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= any_type_prop_nullable (bool, date, datetime, dict, float, int, list, str, none_type): test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values.. [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/whale.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/whale.py index cf9f8ed3b6d3..eb066c53be50 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/whale.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/whale.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -106,7 +107,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """whale.Whale - a model defined in OpenAPI Args: @@ -147,6 +148,22 @@ def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _p has_teeth (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/zebra.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/zebra.py index f8f60a8c0a6a..e4c2b8d422bd 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/zebra.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/zebra.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -109,7 +110,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """zebra.Zebra - a model defined in OpenAPI Args: @@ -149,6 +150,22 @@ def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _p type (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_fruit.py b/samples/openapi3/client/petstore/python-experimental/test/test_fruit.py index 6a94fd7c2dfa..1172373b9e1d 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_fruit.py @@ -194,10 +194,9 @@ def testFruitNullValue(self): apple = petstore_api.Apple(None) self.assertIsNone(apple) - # But 'banana' is not nullable. - banana = petstore_api.Banana(None) - # TODO: this does not seem right. Shouldn't this raise an exception? - assert isinstance(banana, petstore_api.Banana) + # 'banana' is not nullable. + with self.assertRaises(petstore_api.ApiTypeError): + banana = petstore_api.Banana(None) # Since 'fruit' has oneOf 'apple', 'banana' and 'apple' is nullable, # validate we can create a fruit with the 'null' value. From 6d561ad04585b760fb80cc13d659bb4039028462 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Mon, 25 May 2020 16:58:03 -0700 Subject: [PATCH 102/105] Resolve merge issues --- .../org/openapitools/codegen/languages/CppUE4ClientCodegen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppUE4ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppUE4ClientCodegen.java index 88d9c309ecd1..175a64160a1b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppUE4ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppUE4ClientCodegen.java @@ -386,7 +386,7 @@ public String getTypeDeclaration(Schema p) { String inner = getSchemaType(ap.getItems()); return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(p)); + String inner = getSchemaType(getAdditionalProperties(p)); return getSchemaType(p) + ""; } From 768d933f508cafadbaf79fdec312c34c8b51ad5f Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Mon, 25 May 2020 22:10:36 -0700 Subject: [PATCH 103/105] run samples scripts --- .../models/additional_properties_any_type.py | 19 ++++++++++++++- .../models/additional_properties_array.py | 19 ++++++++++++++- .../models/additional_properties_boolean.py | 19 ++++++++++++++- .../models/additional_properties_class.py | 19 ++++++++++++++- .../models/additional_properties_integer.py | 19 ++++++++++++++- .../models/additional_properties_number.py | 19 ++++++++++++++- .../models/additional_properties_object.py | 19 ++++++++++++++- .../models/additional_properties_string.py | 19 ++++++++++++++- .../petstore_api/models/animal.py | 19 ++++++++++++++- .../petstore_api/models/api_response.py | 19 ++++++++++++++- .../models/array_of_array_of_number_only.py | 19 ++++++++++++++- .../models/array_of_number_only.py | 19 ++++++++++++++- .../petstore_api/models/array_test.py | 19 ++++++++++++++- .../petstore_api/models/capitalization.py | 19 ++++++++++++++- .../petstore_api/models/cat.py | 19 ++++++++++++++- .../petstore_api/models/cat_all_of.py | 19 ++++++++++++++- .../petstore_api/models/category.py | 20 +++++++++++++++- .../petstore_api/models/child.py | 19 ++++++++++++++- .../petstore_api/models/child_all_of.py | 19 ++++++++++++++- .../petstore_api/models/child_cat.py | 19 ++++++++++++++- .../petstore_api/models/child_cat_all_of.py | 19 ++++++++++++++- .../petstore_api/models/child_dog.py | 19 ++++++++++++++- .../petstore_api/models/child_dog_all_of.py | 19 ++++++++++++++- .../petstore_api/models/child_lizard.py | 19 ++++++++++++++- .../models/child_lizard_all_of.py | 19 ++++++++++++++- .../petstore_api/models/class_model.py | 19 ++++++++++++++- .../petstore_api/models/client.py | 19 ++++++++++++++- .../petstore_api/models/dog.py | 19 ++++++++++++++- .../petstore_api/models/dog_all_of.py | 19 ++++++++++++++- .../petstore_api/models/enum_arrays.py | 19 ++++++++++++++- .../petstore_api/models/enum_class.py | 20 +++++++++++++++- .../petstore_api/models/enum_test.py | 19 ++++++++++++++- .../petstore_api/models/file.py | 19 ++++++++++++++- .../models/file_schema_test_class.py | 19 ++++++++++++++- .../petstore_api/models/format_test.py | 19 ++++++++++++++- .../petstore_api/models/grandparent.py | 19 ++++++++++++++- .../petstore_api/models/grandparent_animal.py | 19 ++++++++++++++- .../petstore_api/models/has_only_read_only.py | 19 ++++++++++++++- .../petstore_api/models/list.py | 19 ++++++++++++++- .../petstore_api/models/map_test.py | 19 ++++++++++++++- ...perties_and_additional_properties_class.py | 19 ++++++++++++++- .../petstore_api/models/model200_response.py | 19 ++++++++++++++- .../petstore_api/models/model_return.py | 19 ++++++++++++++- .../petstore_api/models/name.py | 19 ++++++++++++++- .../petstore_api/models/number_only.py | 19 ++++++++++++++- .../petstore_api/models/order.py | 19 ++++++++++++++- .../petstore_api/models/outer_composite.py | 19 ++++++++++++++- .../petstore_api/models/outer_enum.py | 19 ++++++++++++++- .../petstore_api/models/outer_number.py | 19 ++++++++++++++- .../petstore_api/models/parent.py | 19 ++++++++++++++- .../petstore_api/models/parent_all_of.py | 19 ++++++++++++++- .../petstore_api/models/parent_pet.py | 19 ++++++++++++++- .../petstore_api/models/pet.py | 19 ++++++++++++++- .../petstore_api/models/player.py | 19 ++++++++++++++- .../petstore_api/models/read_only_first.py | 19 ++++++++++++++- .../petstore_api/models/special_model_name.py | 19 ++++++++++++++- .../petstore_api/models/string_boolean_map.py | 19 ++++++++++++++- .../petstore_api/models/tag.py | 19 ++++++++++++++- .../models/type_holder_default.py | 23 ++++++++++++++++++- .../models/type_holder_example.py | 22 +++++++++++++++++- .../petstore_api/models/user.py | 19 ++++++++++++++- .../petstore_api/models/xml_item.py | 19 ++++++++++++++- 62 files changed, 1125 insertions(+), 62 deletions(-) diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py index 4cded0f050f2..7ea7b1f807bd 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """additional_properties_any_type.AdditionalPropertiesAnyType - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py index a3b0ae0b5219..5dc25499eaf9 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """additional_properties_array.AdditionalPropertiesArray - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_boolean.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_boolean.py index 0fa762dd2fb3..ae3b7cd9dc07 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_boolean.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_boolean.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """additional_properties_boolean.AdditionalPropertiesBoolean - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py index 7764818ff1b5..1b98c5f06e5d 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -122,7 +123,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """additional_properties_class.AdditionalPropertiesClass - a model defined in OpenAPI Keyword Args: @@ -169,6 +170,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= anytype_3 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_integer.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_integer.py index d00e8f163d55..005c26263abe 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_integer.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_integer.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """additional_properties_integer.AdditionalPropertiesInteger - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_number.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_number.py index 459b614f6dc7..fca97fca089d 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_number.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_number.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """additional_properties_number.AdditionalPropertiesNumber - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py index 1455c137623f..03ca022e6f82 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """additional_properties_object.AdditionalPropertiesObject - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_string.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_string.py index 021ed26400aa..7144f66699bc 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_string.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_string.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """additional_properties_string.AdditionalPropertiesString - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/animal.py b/samples/client/petstore/python-experimental/petstore_api/models/animal.py index 48f42ef68446..641c9c16e279 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/animal.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/animal.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -120,7 +121,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """animal.Animal - a model defined in OpenAPI Args: @@ -160,6 +161,22 @@ def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _p color (str): [optional] if omitted the server will use the default value of 'red' # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/api_response.py b/samples/client/petstore/python-experimental/petstore_api/models/api_response.py index 8d9d8b7cc434..c921519b8783 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/api_response.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/api_response.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -106,7 +107,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """api_response.ApiResponse - a model defined in OpenAPI Keyword Args: @@ -145,6 +146,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= message (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py b/samples/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py index ddd5533b7620..b9f52d6ba7bc 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """array_of_array_of_number_only.ArrayOfArrayOfNumberOnly - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= array_array_number ([[float]]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py b/samples/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py index c8b493c15090..45021fef4c51 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """array_of_number_only.ArrayOfNumberOnly - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= array_number ([float]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/array_test.py b/samples/client/petstore/python-experimental/petstore_api/models/array_test.py index 14f0609d64e1..0eed8d054611 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/array_test.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/array_test.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -111,7 +112,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """array_test.ArrayTest - a model defined in OpenAPI Keyword Args: @@ -150,6 +151,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= array_array_of_model ([[read_only_first.ReadOnlyFirst]]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/capitalization.py b/samples/client/petstore/python-experimental/petstore_api/models/capitalization.py index 9c4177a39434..06745009d8b8 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/capitalization.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/capitalization.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -112,7 +113,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """capitalization.Capitalization - a model defined in OpenAPI Keyword Args: @@ -154,6 +155,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= att_name (str): Name of the pet . [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/cat.py b/samples/client/petstore/python-experimental/petstore_api/models/cat.py index 47ac891bf6d2..9620612169bf 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/cat.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/cat.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -121,7 +122,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """cat.Cat - a model defined in OpenAPI Args: @@ -162,6 +163,22 @@ def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _p color (str): [optional] if omitted the server will use the default value of 'red' # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/cat_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/cat_all_of.py index 14db2c8d4ee2..49ae9462f491 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/cat_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/cat_all_of.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """cat_all_of.CatAllOf - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= declawed (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/category.py b/samples/client/petstore/python-experimental/petstore_api/models/category.py index a9c2abbe1c3b..16e4a33d4f04 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/category.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/category.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, name='default-name', _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """category.Category - a model defined in OpenAPI Args: @@ -144,6 +145,23 @@ def __init__(self, name='default-name', _check_type=True, _spec_property_naming= id (int): [optional] # noqa: E501 """ + name = kwargs.get('name', 'default-name') + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child.py b/samples/client/petstore/python-experimental/petstore_api/models/child.py index 751ae30b2c3b..7be69a7d5280 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -117,7 +118,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """child.Child - a model defined in OpenAPI Keyword Args: @@ -156,6 +157,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= inter_net (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/child_all_of.py index 93992097aedd..26e6018acf7d 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_all_of.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """child_all_of.ChildAllOf - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= inter_net (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py b/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py index ae0a3f899487..873c3bc76cf7 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -119,7 +120,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, pet_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, pet_type, *args, **kwargs): # noqa: E501 """child_cat.ChildCat - a model defined in OpenAPI Args: @@ -159,6 +160,22 @@ def __init__(self, pet_type, _check_type=True, _spec_property_naming=False, _pat name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py index 1d39e492366b..1ddf92fb1227 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """child_cat_all_of.ChildCatAllOf - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py b/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py index f5e6fb7cf154..a49f042cf74d 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -119,7 +120,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, pet_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, pet_type, *args, **kwargs): # noqa: E501 """child_dog.ChildDog - a model defined in OpenAPI Args: @@ -159,6 +160,22 @@ def __init__(self, pet_type, _check_type=True, _spec_property_naming=False, _pat bark (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_dog_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/child_dog_all_of.py index c62d7f877832..7ba37f9908fc 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_dog_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_dog_all_of.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """child_dog_all_of.ChildDogAllOf - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= bark (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py index 0ac6b2a593cc..0f11243a2493 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -119,7 +120,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, pet_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, pet_type, *args, **kwargs): # noqa: E501 """child_lizard.ChildLizard - a model defined in OpenAPI Args: @@ -159,6 +160,22 @@ def __init__(self, pet_type, _check_type=True, _spec_property_naming=False, _pat loves_rocks (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard_all_of.py index 94d64f7dd765..78b69edb872c 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard_all_of.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """child_lizard_all_of.ChildLizardAllOf - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= loves_rocks (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/class_model.py b/samples/client/petstore/python-experimental/petstore_api/models/class_model.py index cca6f50f7792..fc88f68e3f5f 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/class_model.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/class_model.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """class_model.ClassModel - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= _class (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/client.py b/samples/client/petstore/python-experimental/petstore_api/models/client.py index 51558cd36630..fa99b07fa328 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/client.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/client.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """client.Client - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= client (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/dog.py b/samples/client/petstore/python-experimental/petstore_api/models/dog.py index 411318156783..f9b93eebc78f 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/dog.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/dog.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -121,7 +122,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """dog.Dog - a model defined in OpenAPI Args: @@ -162,6 +163,22 @@ def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _p color (str): [optional] if omitted the server will use the default value of 'red' # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py index 69692472909f..0d053aca2a63 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """dog_all_of.DogAllOf - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= breed (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/enum_arrays.py b/samples/client/petstore/python-experimental/petstore_api/models/enum_arrays.py index ca924f02e961..a19990449748 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/enum_arrays.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/enum_arrays.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -112,7 +113,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """enum_arrays.EnumArrays - a model defined in OpenAPI Keyword Args: @@ -150,6 +151,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= array_enum ([str]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/enum_class.py b/samples/client/petstore/python-experimental/petstore_api/models/enum_class.py index 091ed9b39646..3fa95b69d0c9 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/enum_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/enum_class.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -99,7 +100,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, value='-efg', _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """enum_class.EnumClass - a model defined in OpenAPI Args: @@ -138,6 +139,23 @@ def __init__(self, value='-efg', _check_type=True, _spec_property_naming=False, _visited_composed_classes = (Animal,) """ + value = kwargs.get('value', '-efg') + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/enum_test.py b/samples/client/petstore/python-experimental/petstore_api/models/enum_test.py index 91cdeeb9fb48..71cf60fd4823 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/enum_test.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/enum_test.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -133,7 +134,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, enum_string_required, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, enum_string_required, *args, **kwargs): # noqa: E501 """enum_test.EnumTest - a model defined in OpenAPI Args: @@ -176,6 +177,22 @@ def __init__(self, enum_string_required, _check_type=True, _spec_property_naming outer_enum (outer_enum.OuterEnum): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/file.py b/samples/client/petstore/python-experimental/petstore_api/models/file.py index 999731b2fc00..0152f8d8c667 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/file.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/file.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """file.File - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= source_uri (str): Test capitalization. [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py b/samples/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py index ac2ce591bcf6..79e5638ccc94 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -109,7 +110,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """file_schema_test_class.FileSchemaTestClass - a model defined in OpenAPI Keyword Args: @@ -147,6 +148,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= files ([file.File]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/format_test.py b/samples/client/petstore/python-experimental/petstore_api/models/format_test.py index 06d7c298731e..7c598ae43821 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/format_test.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/format_test.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -161,7 +162,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, number, byte, date, password, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, number, byte, date, password, *args, **kwargs): # noqa: E501 """format_test.FormatTest - a model defined in OpenAPI Args: @@ -212,6 +213,22 @@ def __init__(self, number, byte, date, password, _check_type=True, _spec_propert uuid (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/grandparent.py b/samples/client/petstore/python-experimental/petstore_api/models/grandparent.py index ba15340a0ba3..3097bef04b88 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/grandparent.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/grandparent.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """grandparent.Grandparent - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= radio_waves (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py b/samples/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py index fa389d33fca8..54dc5be641d7 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -130,7 +131,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, pet_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, pet_type, *args, **kwargs): # noqa: E501 """grandparent_animal.GrandparentAnimal - a model defined in OpenAPI Args: @@ -169,6 +170,22 @@ def __init__(self, pet_type, _check_type=True, _spec_property_naming=False, _pat _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py b/samples/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py index 4c77f76a9d16..eeb685139cb1 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """has_only_read_only.HasOnlyReadOnly - a model defined in OpenAPI Keyword Args: @@ -142,6 +143,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= foo (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/list.py b/samples/client/petstore/python-experimental/petstore_api/models/list.py index aeaf9df87173..9499f26c7b18 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/list.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/list.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """list.List - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= _123_list (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/map_test.py b/samples/client/petstore/python-experimental/petstore_api/models/map_test.py index 60c5822afb51..45be8a1fecfd 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/map_test.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/map_test.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -117,7 +118,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """map_test.MapTest - a model defined in OpenAPI Keyword Args: @@ -157,6 +158,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= indirect_map (string_boolean_map.StringBooleanMap): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py index 306e0c9a29f2..0e584ebd43e9 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -111,7 +112,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """mixed_properties_and_additional_properties_class.MixedPropertiesAndAdditionalPropertiesClass - a model defined in OpenAPI Keyword Args: @@ -150,6 +151,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= map ({str: (animal.Animal,)}): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/model200_response.py b/samples/client/petstore/python-experimental/petstore_api/models/model200_response.py index 9709655efd46..54cc1fa338d5 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/model200_response.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/model200_response.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """model200_response.Model200Response - a model defined in OpenAPI Keyword Args: @@ -142,6 +143,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= _class (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/model_return.py b/samples/client/petstore/python-experimental/petstore_api/models/model_return.py index afb3c60f317b..cf7415f0bd72 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/model_return.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/model_return.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """model_return.ModelReturn - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= _return (int): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/name.py b/samples/client/petstore/python-experimental/petstore_api/models/name.py index bcf700a4f8a6..33a95baafcf7 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/name.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/name.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -108,7 +109,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, name, *args, **kwargs): # noqa: E501 """name.Name - a model defined in OpenAPI Args: @@ -150,6 +151,22 @@ def __init__(self, name, _check_type=True, _spec_property_naming=False, _path_to _123_number (int): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/number_only.py b/samples/client/petstore/python-experimental/petstore_api/models/number_only.py index ce2cefe48971..305da1d7538e 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/number_only.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/number_only.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """number_only.NumberOnly - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= just_number (float): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/order.py b/samples/client/petstore/python-experimental/petstore_api/models/order.py index f292c13fa2ea..ddc3332d66d7 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/order.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/order.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -117,7 +118,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """order.Order - a model defined in OpenAPI Keyword Args: @@ -159,6 +160,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= complete (bool): [optional] if omitted the server will use the default value of False # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/outer_composite.py b/samples/client/petstore/python-experimental/petstore_api/models/outer_composite.py index f815b40640f6..a64cbe37592c 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/outer_composite.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/outer_composite.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -111,7 +112,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """outer_composite.OuterComposite - a model defined in OpenAPI Keyword Args: @@ -150,6 +151,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= my_boolean (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/outer_enum.py b/samples/client/petstore/python-experimental/petstore_api/models/outer_enum.py index ac5c0af9dfe4..013f6bdd112a 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/outer_enum.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/outer_enum.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -99,7 +100,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, value, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, value, *args, **kwargs): # noqa: E501 """outer_enum.OuterEnum - a model defined in OpenAPI Args: @@ -138,6 +139,22 @@ def __init__(self, value, _check_type=True, _spec_property_naming=False, _path_t _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/outer_number.py b/samples/client/petstore/python-experimental/petstore_api/models/outer_number.py index f84f87533ffc..a6384cf9f5fd 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/outer_number.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/outer_number.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -98,7 +99,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, value, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, value, *args, **kwargs): # noqa: E501 """outer_number.OuterNumber - a model defined in OpenAPI Args: @@ -137,6 +138,22 @@ def __init__(self, value, _check_type=True, _spec_property_naming=False, _path_t _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/parent.py b/samples/client/petstore/python-experimental/petstore_api/models/parent.py index 1e6ac9144840..5d33beb6979d 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/parent.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/parent.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -115,7 +116,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """parent.Parent - a model defined in OpenAPI Keyword Args: @@ -153,6 +154,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= tele_vision (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/parent_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/parent_all_of.py index daf243bd2483..28d5f0739316 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/parent_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/parent_all_of.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """parent_all_of.ParentAllOf - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= tele_vision (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py b/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py index 357a2535d150..4635ac947806 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -130,7 +131,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, pet_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, pet_type, *args, **kwargs): # noqa: E501 """parent_pet.ParentPet - a model defined in OpenAPI Args: @@ -169,6 +170,22 @@ def __init__(self, pet_type, _check_type=True, _spec_property_naming=False, _pat _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/pet.py b/samples/client/petstore/python-experimental/petstore_api/models/pet.py index 29a392e2bd3e..c93acd53c96c 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/pet.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/pet.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -127,7 +128,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, name, photo_urls, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, name, photo_urls, *args, **kwargs): # noqa: E501 """pet.Pet - a model defined in OpenAPI Args: @@ -171,6 +172,22 @@ def __init__(self, name, photo_urls, _check_type=True, _spec_property_naming=Fal status (str): pet status in the store. [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/player.py b/samples/client/petstore/python-experimental/petstore_api/models/player.py index 764f5c8286d7..d65e53c2e5f7 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/player.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/player.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, name, *args, **kwargs): # noqa: E501 """player.Player - a model defined in OpenAPI Args: @@ -144,6 +145,22 @@ def __init__(self, name, _check_type=True, _spec_property_naming=False, _path_to enemy_player (Player): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/read_only_first.py b/samples/client/petstore/python-experimental/petstore_api/models/read_only_first.py index 308f776869ac..691d789a92e6 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/read_only_first.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/read_only_first.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """read_only_first.ReadOnlyFirst - a model defined in OpenAPI Keyword Args: @@ -142,6 +143,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= baz (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/special_model_name.py b/samples/client/petstore/python-experimental/petstore_api/models/special_model_name.py index 4fbb4b76f551..6e2b80cbe90c 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/special_model_name.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/special_model_name.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """special_model_name.SpecialModelName - a model defined in OpenAPI Keyword Args: @@ -139,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= special_property_name (int): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py b/samples/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py index 440bef9b742d..8351ad04e2de 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -100,7 +101,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """string_boolean_map.StringBooleanMap - a model defined in OpenAPI Keyword Args: @@ -136,6 +137,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/tag.py b/samples/client/petstore/python-experimental/petstore_api/models/tag.py index 1966dd07974b..ee10817f1387 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/tag.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/tag.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -106,7 +107,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """tag.Tag - a model defined in OpenAPI Keyword Args: @@ -145,6 +146,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= full_name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/type_holder_default.py b/samples/client/petstore/python-experimental/petstore_api/models/type_holder_default.py index 83a295a18e07..da92e2cb8ad7 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/type_holder_default.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/type_holder_default.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -114,7 +115,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, array_item, string_item='what', number_item=1.234, integer_item=-2, bool_item=True, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, array_item, *args, **kwargs): # noqa: E501 """type_holder_default.TypeHolderDefault - a model defined in OpenAPI Args: @@ -159,6 +160,26 @@ def __init__(self, array_item, string_item='what', number_item=1.234, integer_it datetime_item (datetime): [optional] # noqa: E501 """ + string_item = kwargs.get('string_item', 'what') + number_item = kwargs.get('number_item', 1.234) + integer_item = kwargs.get('integer_item', -2) + bool_item = kwargs.get('bool_item', True) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/type_holder_example.py b/samples/client/petstore/python-experimental/petstore_api/models/type_holder_example.py index f16c44461598..4253a0ce7256 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/type_holder_example.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/type_holder_example.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -119,7 +120,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, bool_item, array_item, string_item='what', number_item=1.234, integer_item=-2, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, bool_item, array_item, *args, **kwargs): # noqa: E501 """type_holder_example.TypeHolderExample - a model defined in OpenAPI Args: @@ -162,6 +163,25 @@ def __init__(self, bool_item, array_item, string_item='what', number_item=1.234, _visited_composed_classes = (Animal,) """ + string_item = kwargs.get('string_item', 'what') + number_item = kwargs.get('number_item', 1.234) + integer_item = kwargs.get('integer_item', -2) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/user.py b/samples/client/petstore/python-experimental/petstore_api/models/user.py index ad32189e72aa..6c6dcd1d28ba 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/user.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/user.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -116,7 +117,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """user.User - a model defined in OpenAPI Keyword Args: @@ -160,6 +161,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= user_status (int): User Status. [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/xml_item.py b/samples/client/petstore/python-experimental/petstore_api/models/xml_item.py index 18086909c66f..dc48355d3ce1 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/xml_item.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/xml_item.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -158,7 +159,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """xml_item.XmlItem - a model defined in OpenAPI Keyword Args: @@ -223,6 +224,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= prefix_ns_wrapped_array ([int]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming From 3283e3c696ba6cfe9dbeafcee5f2fac1b7ab4284 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Tue, 26 May 2020 06:37:14 -0700 Subject: [PATCH 104/105] run doc generator --- docs/generators/cpp-ue4.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/generators/cpp-ue4.md b/docs/generators/cpp-ue4.md index eb00fa4a5ceb..ecfac79de958 100644 --- a/docs/generators/cpp-ue4.md +++ b/docs/generators/cpp-ue4.md @@ -7,6 +7,8 @@ sidebar_label: cpp-ue4 | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |optionalProjectFile|Generate Build.cs| |true| From 65f6cf84c62e0aeb3c1f647eadc43c4deeada770 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" Date: Thu, 28 May 2020 06:47:13 -0700 Subject: [PATCH 105/105] fix merge conflicts --- .../python-experimental/docs/BasquePig.md | 1 - .../python-experimental/docs/ChildCat.md | 1 + .../python-experimental/docs/DanishPig.md | 1 - .../python-experimental/docs/ParentPet.md | 1 + .../petstore_api/models/basque_pig.py | 2 +- .../petstore_api/models/child_cat.py | 2 +- .../petstore_api/models/child_cat_all_of.py | 21 ++++++++++++++++++- .../petstore_api/models/danish_pig.py | 21 ++++++++++++++++++- .../petstore_api/models/grandparent_animal.py | 21 ++++++++++++++++++- .../petstore_api/models/parent_pet.py | 2 +- .../petstore_api/models/pig.py | 2 +- 11 files changed, 66 insertions(+), 9 deletions(-) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/BasquePig.md b/samples/openapi3/client/petstore/python-experimental/docs/BasquePig.md index 792b6d2aabe0..0e8f8bb27fba 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/BasquePig.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/BasquePig.md @@ -4,7 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **class_name** | **str** | | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ChildCat.md b/samples/openapi3/client/petstore/python-experimental/docs/ChildCat.md index 8f5ea4b2ced0..bee23082474c 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/ChildCat.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/ChildCat.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pet_type** | **str** | | **name** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/DanishPig.md b/samples/openapi3/client/petstore/python-experimental/docs/DanishPig.md index 44468a885ab9..65058d86e049 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/DanishPig.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/DanishPig.md @@ -4,7 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **class_name** | **str** | | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/ParentPet.md b/samples/openapi3/client/petstore/python-experimental/docs/ParentPet.md index 12bfa5c7fe5c..78693cf8f0e6 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/ParentPet.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/ParentPet.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pet_type** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/basque_pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/basque_pig.py index d70e8bbaa349..cf39c1833dc2 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/basque_pig.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/basque_pig.py @@ -103,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """basque_pig.BasquePig - a model defined in OpenAPI Args: diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/child_cat.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/child_cat.py index 263261b288a7..f838e61b4014 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/child_cat.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/child_cat.py @@ -120,7 +120,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, pet_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, pet_type, *args, **kwargs): # noqa: E501 """child_cat.ChildCat - a model defined in OpenAPI Args: diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py index f159c32fd86d..1ddf92fb1227 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class ChildCatAllOf(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """child_cat_all_of.ChildCatAllOf - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item= name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/danish_pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/danish_pig.py index e1942b69a938..375fde3258ab 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/danish_pig.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/danish_pig.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class DanishPig(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """danish_pig.DanishPig - a model defined in OpenAPI Args: @@ -139,6 +142,22 @@ def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _p _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py index 0dc6dd7d74a7..ab2ba56caf37 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py @@ -18,6 +18,7 @@ import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -76,6 +77,8 @@ class GrandparentAnimal(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -116,7 +119,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, pet_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, pet_type, *args, **kwargs): # noqa: E501 """grandparent_animal.GrandparentAnimal - a model defined in OpenAPI Args: @@ -155,6 +158,22 @@ def __init__(self, pet_type, _check_type=True, _spec_property_naming=False, _pat _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/parent_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/parent_pet.py index 7dedf9c2d18a..89633120977e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/parent_pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/parent_pet.py @@ -119,7 +119,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, pet_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, pet_type, *args, **kwargs): # noqa: E501 """parent_pet.ParentPet - a model defined in OpenAPI Args: diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/pig.py index ef3d8bf58632..5dd3fdb64ec1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/pig.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/pig.py @@ -120,7 +120,7 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """pig.Pig - a model defined in OpenAPI Args: